]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
testing: Whitelist all Git repositories in the root image
authorTobias Brunner <tobias@strongswan.org>
Tue, 27 Jun 2023 16:41:42 +0000 (18:41 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 13 Jul 2023 08:48:53 +0000 (10:48 +0200)
Without this, Git refuses to operate on the build dirs that are mounted
with weird ownership.  When running as root in the chroot, Git checks
SUDO_UID, which won't match.

testing/scripts/build-strongswan

index f7eeb6fede8798c47fb2480c066fa5c760801f68..1956e132d46e0af8b5626061d514b86bf42ae9d0 100755 (executable)
@@ -165,6 +165,10 @@ if [ "$ALL_RECIPES" ]; then
                execute "cp -r $RECPDIR/patches $LOOPDIR/root/shared/compile" 0
        fi
        RECIPES=`ls $RECPDIR/*.mk | xargs -n1 basename`
+       log_action "Whitelist all Git repositories"
+       echo "[safe]"             > $LOOPDIR/root/.gitconfig
+       echo "    directory = *" >> $LOOPDIR/root/.gitconfig
+       log_status 0
 else
        echo "Building and installing strongSwan"
        RECIPES=`ls $RECPDIR/*strongswan.mk | xargs -n1 basename`