Commit d2fbc8056b for strongswan.org

commit d2fbc8056bec84a36898f07b70aa875283b0f695
Author: Tobias Brunner <tobias@strongswan.org>
Date:   Thu Nov 5 12:01:22 2026 +0100

    testing: Rebuild Botan and wolfSSL if their config options change

    If the version doesn't change, it was previously necessary to manually
    delete the `.*built*` stamp file to rebuild with the new options.

    The working tree is now also cleaned before rebuilding to avoid that the
    modified options don't apply properly and to prevent side-effects of old
    build artifacts when changing versions (while wolfSSL's configure script
    runs `make clean` automatically, Botan doesn't have such a cleanup).

diff --git a/testing/scripts/recipes/011_botan.mk b/testing/scripts/recipes/011_botan.mk
index d12715237a..fe4b6b93e7 100644
--- a/testing/scripts/recipes/011_botan.mk
+++ b/testing/scripts/recipes/011_botan.mk
@@ -15,6 +15,8 @@ CONFIG_OPTS = \
 	--disable-deprecated-features \
 	--enable-modules=md5

+BUILD_HASH := $(shell printf '%s\n' '$(CONFIG_OPTS)' | sha256sum | cut -c1-12)
+
 all: install

 .$(PKG)-cloned:
@@ -25,9 +27,10 @@ all: install
 	cd $(PKG) && git fetch && git checkout $(REV)
 	@rm -f .$(PKG)-checkout-* && touch $@

-.$(PKG)-built-$(REV): .$(PKG)-checkout-$(REV)
-	cd $(PKG) && python3 ./configure.py $(CONFIG_OPTS) && make -j $(NUM_CPUS)
+.$(PKG)-built-$(REV)-$(BUILD_HASH): .$(PKG)-checkout-$(REV)
+	cd $(PKG) && git clean -xdf && python3 ./configure.py $(CONFIG_OPTS) && \
+		make -j $(NUM_CPUS)
 	@rm -f .$(PKG)-built-* && touch $@

-install: .$(PKG)-built-$(REV)
+install: .$(PKG)-built-$(REV)-$(BUILD_HASH)
 	cd $(PKG) && make install && ldconfig
diff --git a/testing/scripts/recipes/012_wolfssl.mk b/testing/scripts/recipes/012_wolfssl.mk
index 92d9187947..ece7316930 100644
--- a/testing/scripts/recipes/012_wolfssl.mk
+++ b/testing/scripts/recipes/012_wolfssl.mk
@@ -33,6 +33,8 @@ CONFIG_OPTS = \
 	--enable-shake256 \
 	--with-max-rsa-bits=8192

+BUILD_HASH := $(shell printf '%s\n' '$(CFLAGS)' '$(CONFIG_OPTS)' | sha256sum | cut -c1-12)
+
 all: install

 .$(PKG)-cloned:
@@ -43,9 +45,10 @@ all: install
 	cd $(PKG) && git fetch -f --tags && git checkout $(REV)
 	@rm -f .$(PKG)-checkout-* && touch $@

-.$(PKG)-built-$(REV): .$(PKG)-checkout-$(REV)
-	cd $(PKG) && ./autogen.sh && ./configure C_FLAGS="$(CFLAGS)" $(CONFIG_OPTS) && make -j $(NUM_CPUS)
+.$(PKG)-built-$(REV)-$(BUILD_HASH): .$(PKG)-checkout-$(REV)
+	cd $(PKG) && git clean -xdf && ./autogen.sh && \
+		./configure C_FLAGS="$(CFLAGS)" $(CONFIG_OPTS) && make -j $(NUM_CPUS)
 	@rm -f .$(PKG)-built-* && touch $@

-install: .$(PKG)-built-$(REV)
+install: .$(PKG)-built-$(REV)-$(BUILD_HASH)
 	cd $(PKG) && make install && ldconfig