From 357ad0c8f982dc7ff5067d4679ad599ef898513b Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Thu, 13 Apr 2017 08:42:50 +0000 Subject: [PATCH] projects-dir.mk: Fix support for automated builds Since Revision 1.97, CVS_RSH is unconditionally set to override settings from the CVS packages' environment. This, however, broke automated builds, since that environment variable also communicated their pubkey-authenticated SSH variant. Introduced two ways to remedy that: 1. Take JW_BUILD_SSH from the environment which takes precendence over everything else. 2. Made JW_BUILD_SSH_EXTRA_OPTS a += assignment, to allow callers to squeeze extra options into the environment. Signed-off-by: Jan Lindemann --- make/projects-dir.mk | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/make/projects-dir.mk b/make/projects-dir.mk index 16c78eaa..197dde0a 100644 --- a/make/projects-dir.mk +++ b/make/projects-dir.mk @@ -5,9 +5,9 @@ # You will need a janware.com user account for pretty much anything this # Makefile does. Ask admin@janware.com if you want one. # -# https://janware.com/wiki/pub/en/sw/build/ provides current documentation on -# how this Makefile is meant to be used. Running "make doc-module" might take -# you there semi-automatically. +# Please see https://janware.com/wiki/pub/en/sw/build/ for current +# documentation on how this Makefile is meant to be used. Running +# "make doc-module" might take you there semi-automatically. # # ------------ Makefile and environment variables @@ -42,9 +42,15 @@ endif CWD := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) export CVSROOT = :ext:$(JANWARE_USER)@cvs.jannet.de:/home/jannet/arc/cvs -export CVS_RSH := $(CWD)/ssh-wrapper.sh + +ifneq ($(JW_BUILD_SSH),) + export CVS_RSH := $(JW_BUILD_SSH) +else + export CVS_RSH := $(CWD)/ssh-wrapper.sh +endif + export GIT_SSH := $(CVS_RSH) -export JW_BUILD_SSH_EXTRA_OPTS = -o ControlMaster=auto -o ControlPath=/tmp/%r@build:%p -o ControlPersist=3m +export JW_BUILD_SSH_EXTRA_OPTS += -o ControlMaster=auto -o ControlPath=/tmp/%r@jw-build:%p -o ControlPersist=3m ifneq ($(CLONE_FROM_USER),) export PGIT_CLONE_FROM_USER = $(CLONE_FROM_USER) @@ -53,7 +59,7 @@ else endif ifneq ($(EXCLUDE_FROM_BUILD),) -BUILD_PY_EXTRA_ARGS += --exclude "$(EXCLUDE_FROM_BUILD)" + BUILD_PY_EXTRA_ARGS += --exclude "$(EXCLUDE_FROM_BUILD)" endif # ------------ external programs