From: Tobias Brunner Date: Thu, 20 Mar 2025 08:23:34 +0000 (+0100) Subject: testing: Add option for a quick rebuild of strongSwan X-Git-Tag: 6.0.2dr1~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=022f2d5f30e7ab941f00f888fc5408ad3264df6a;p=thirdparty%2Fstrongswan.git testing: Add option for a quick rebuild of strongSwan This shaves off about 1 minute of build time on my machine. We also don't need the separate build step and can just run `make install`. --- diff --git a/testing/scripts/build-strongswan b/testing/scripts/build-strongswan index 1956e132d4..d51ffddbfb 100755 --- a/testing/scripts/build-strongswan +++ b/testing/scripts/build-strongswan @@ -23,6 +23,7 @@ Usage: --help (-h) show usage information --all (-a) build/install all software, not only strongSwan --clean (-c) use a new strongSwan build directory + --quick-rebuild (-q) skip running autoreconf and configure --guest NAME (-g) only install in a specific guest image --no-guests (-n) don't build any guest images after the root image --replace (-r) replace the root image (implies --all) @@ -32,6 +33,7 @@ EOF ALL_RECIPES= CLEAN= +QUICK_REBUILD= GUEST= NO_GUESTS= REPLACE= @@ -49,6 +51,9 @@ while :; do -c|--clean) CLEAN=1 ;; + -q|--quick-rebuild) + QUICK_REBUILD=1 + ;; -g|--guest) if [ "$2" ]; then GUEST=$2 @@ -153,8 +158,10 @@ if [ -z "$TARBALL" ]; then echo "$version" > $SHAREDDIR/.strongswan-version log_status 0 - log_action "Preparing source tree" - execute_chroot 'autoreconf -i /root/strongswan' + if [ -z "$QUICK_REBUILD" ]; then + log_action "Preparing source tree" + execute_chroot 'autoreconf -i /root/strongswan' + fi fi RECPDIR=$DIR/recipes @@ -185,7 +192,7 @@ do log_action "Installing from recipe $r" if [[ $r == *strongswan.mk && -z "$TARBALL" ]]; then cp $RECPDIR/$r $SHAREDDIR/build-strongswan - execute_chroot "make SRCDIR=/root/strongswan BUILDDIR=/root/shared/build-strongswan -f /root/shared/build-strongswan/$r" + execute_chroot "make SRCDIR=/root/strongswan BUILDDIR=/root/shared/build-strongswan QUICK_REBUILD=$QUICK_REBUILD -f /root/shared/build-strongswan/$r" else cp $RECPDIR/$r ${LOOPDIR}/root/shared/compile execute_chroot "make SWANVERSION=$TARBALL -C /root/shared/compile -f $r" diff --git a/testing/scripts/recipes/013_strongswan.mk b/testing/scripts/recipes/013_strongswan.mk index ddd9664828..003f15203e 100644 --- a/testing/scripts/recipes/013_strongswan.mk +++ b/testing/scripts/recipes/013_strongswan.mk @@ -127,11 +127,8 @@ $(PKG): $(TAR) echo "$(SWANVERSION)" > /root/shared/.strongswan-version configure: $(BUILDDIR) - cd $(BUILDDIR) && $(DIR)/configure $(CONFIG_OPTS) + [ -n "$(QUICK_REBUILD)" ] || (cd $(BUILDDIR) && $(DIR)/configure $(CONFIG_OPTS)) -build: configure - cd $(BUILDDIR) && make -j $(NUM_CPUS) - -install: build +install: configure cd $(BUILDDIR) && make -j install && \ cd $(DIR)/src/libcharon/plugins/vici/python && python3 setup.py install