projects-dir.mk: Re-enable persistent SSH connections

This reverts commit 88e81 and effectively re-enables persistent SSH
connections to speed up builds.

    commit 88e8197ed7
    Author: Jan Lindemann <jan@janware.com>
    Date:   Thu Apr 20 20:00:46 2017 +0000

    projects-dir.mk: Partly disable persistent SSH

    Don't use persistent SSH-connections any more for "pkg-" targets,
    because, sadly, this hangs after uploading a package.

This commit puts some safeguards against hanging SSH into place,
namely setting default SSH timeouts down, SSH keepalive, setting SSH
BatchMode to yes.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-04-04 16:07:23 +02:00
commit fe5f343536

View file

@ -88,13 +88,18 @@ else
export GIT_SSH := $(SSH_WRAPPER_SH) export GIT_SSH := $(SSH_WRAPPER_SH)
endif endif
ifeq ($(filter pkg-%,$(MAKECMDGOALS)),) JW_PKG_SSH_EXTRA_OPTS += \
JW_PKG_SSH_EXTRA_OPTS += -o StrictHostKeyChecking=no -o ControlMaster=auto -o ControlPath=/tmp/%r@jw-pkg:%h:%p -o ControlPersist=3m -o StrictHostKeyChecking=no \
ifneq ($(JANWARE_USER),) -o BatchMode=yes \
JW_PKG_SSH_EXTRA_OPTS += -l $(JANWARE_USER) -o ServerAliveInterval=15 \
endif -o ServerAliveCountMax=3 \
export JW_PKG_SSH_EXTRA_OPTS -o ControlMaster=auto \
-o ControlPath=/tmp/%r@jw-pkg:%h:%p \
-o ControlPersist=3m
ifneq ($(JANWARE_USER),)
JW_PKG_SSH_EXTRA_OPTS += -l $(JANWARE_USER)
endif endif
export JW_PKG_SSH_EXTRA_OPTS
ifneq ($(EXCLUDE_FROM_BUILD),) ifneq ($(EXCLUDE_FROM_BUILD),)
JW_PKG_PY_EXTRA_BUILD_OPTS += --exclude "$(EXCLUDE_FROM_BUILD)" JW_PKG_PY_EXTRA_BUILD_OPTS += --exclude "$(EXCLUDE_FROM_BUILD)"
@ -138,7 +143,7 @@ endif
PURGE_SH = /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/purge-stale-projects.sh $(JW_PKG_BINDIR)/purge-stale-projects.sh) purge-not-found) PURGE_SH = /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/purge-stale-projects.sh $(JW_PKG_BINDIR)/purge-stale-projects.sh) purge-not-found)
CREATE_PROJECT_SH ?= /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/jw-pkg-create-project.sh $(JW_PKG_BINDIR)/jw-pkg-create-project.sh) jw-pkg-create-project-not-found) CREATE_PROJECT_SH ?= /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/jw-pkg-create-project.sh $(JW_PKG_BINDIR)/jw-pkg-create-project.sh) jw-pkg-create-project-not-found)
LIST_VCS_FILES_SH = /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/scm.sh $(JW_PKG_BINDIR)/scm.sh) scm-sh-not-found) ls-files LIST_VCS_FILES_SH = /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/scm.sh $(JW_PKG_BINDIR)/scm.sh) scm-sh-not-found) ls-files
GIT_SRV_ADMIN_SH = JW_PKG_SSH_EXTRA_OPTS="$(JW_PKG_SSH_EXTRA_OPTS)" $(GIT_SSH) $(JANWARE_USER)@git.janware.com $(JW_PKG_REMOTE_BINDIR)/git-srv-admin.sh GIT_SRV_ADMIN_SH = $(GIT_SSH) $(JANWARE_USER)@git.janware.com $(JW_PKG_REMOTE_BINDIR)/git-srv-admin.sh
JANWARE_PACKAGE_FILTER = url =~ janware JANWARE_PACKAGE_FILTER = url =~ janware
# ------------ projects to be built # ------------ projects to be built