projects-dir.mk: Remove "-l user" in ssh-wrapper.sh

By the time projects-dir.mk is used during onboarding, it's already cloned, and so is jw-pkg in all its glory. So better use a ssh-wrapper.sh directly under jw-pkg's version control instead of plainly generating one with echo some-script-logic > ssh-wrapper.sh.

This has the main benefit of allowing a more elaborate script. The one added by this commit removes "-l user" from remotes which have a standard-user@gitserver form, typically because they differentiate users via their SSH pubkeys only, and which would deny access if both -l user and standard-user@ were specified.

ssh-wrapper.sh still needs to be a target which is updated by a recipe, because the version found in jw-pkg can't be trusted to be executable during bootstrapping, because "make all" has not run, yet.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-06-07 11:36:02 +02:00
commit ca72c21293
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61
2 changed files with 64 additions and 2 deletions

View file

@ -397,8 +397,8 @@ git-commit:
# --- rules
$(SSH_WRAPPER_SH): $(PROJECTS_MAKEFILE_NAME)
/bin/echo -e '#!/bin/bash $(SSH_WRAPPER_TRACE)\n\nexec /usr/bin/ssh $$JW_PKG_SSH_EXTRA_OPTS "$$@"' > $@.tmp
$(SSH_WRAPPER_SH): $(JWB_SCRIPT_DIR)/ssh-wrapper.sh
cp $< $@.tmp
chmod 700 $@.tmp
mv $@.tmp $@
ssh-wrapper: $(SSH_WRAPPER_SH)