From e6f7c9d4c2af1cda7760ca8155166bb5d4d541d0 Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Wed, 8 May 2019 12:58:02 -0400 Subject: [PATCH] Don't generate certificates in reproducible builds Signed-off-by: Alexander Scheel --- Make.inc.in | 5 +++++ configure | 3 +++ configure.ac | 3 +++ raddb/all.mk | 4 ++++ 4 files changed, 15 insertions(+) diff --git a/Make.inc.in b/Make.inc.in index 0b2cd74de8..8c623cf95c 100644 --- a/Make.inc.in +++ b/Make.inc.in @@ -174,6 +174,10 @@ else TESTBIN = ./$(BUILD_DIR)/bin endif +# +# With reproducible builds, do not generate certificates during installation +# +ENABLE_REPRODUCIBLE_BUILDS = @ENABLE_REPRODUCIBLE_BUILDS@ # # For creating documentation via doc/all.mk diff --git a/configure b/configure index 77a1436510..74ff9a1fd4 100755 --- a/configure +++ b/configure @@ -652,6 +652,7 @@ AUTOCONF ACLOCAL RUSERS SNMPWALK +ENABLE_REPRODUCIBLE_BUILDS SNMPGET openssl_version_check_config WITH_DHCP @@ -5961,7 +5962,7 @@ else openssl_version_check_config= fi - +ENABLE_REPRODUCIBLE_BUILDS=yes # Check whether --enable-reproducible-builds was given. if test "${enable_reproducible_builds+set}" = set; then : enableval=$enable_reproducible_builds; case "$enableval" in @@ -5973,6 +5974,7 @@ $as_echo "#define ENABLE_REPRODUCIBLE_BUILDS 1" >>confdefs.h ;; *) reproducible_builds=no + ENABLE_REPRODUCIBLE_BUILDS=no esac fi diff --git a/configure.ac b/configure.ac index ce4d9b0ae5..790cbf02a0 100644 --- a/configure.ac +++ b/configure.ac @@ -697,6 +697,7 @@ AC_SUBST([openssl_version_check_config]) dnl # dnl # extra argument: --enable-reproducible-builds dnl # +ENABLE_REPRODUCIBLE_BUILDS=yes AC_ARG_ENABLE(reproducible-builds, [AS_HELP_STRING([--enable-reproducible-builds], [ensure the build does not change each time])], @@ -708,8 +709,10 @@ AC_ARG_ENABLE(reproducible-builds, ;; *) reproducible_builds=no + ENABLE_REPRODUCIBLE_BUILDS=no esac ] ) +AC_SUBST(ENABLE_REPRODUCIBLE_BUILDS) dnl # dnl # Enable the -fsanitize=fuzzer and link in the address sanitizer dnl ############################################################# diff --git a/raddb/all.mk b/raddb/all.mk index c966edd657..c8e976a499 100644 --- a/raddb/all.mk +++ b/raddb/all.mk @@ -124,7 +124,11 @@ $(R)$(raddbdir)/users: $(R)$(modconfdir)/files/authorize ifneq "$(LOCAL_CERT_PRODUCTS)" "" $(LOCAL_CERT_PRODUCTS): @echo BOOTSTRAP raddb/certs/ +ifeq "$(ENABLE_REPRODUCIBLE_BUILDS)" "yes" + @$(MAKE) -C $(R)$(raddbdir)/certs/ passwords.mk +else @$(MAKE) -C $(R)$(raddbdir)/certs/ +endif # Bootstrap is special $(R)$(raddbdir)/certs/bootstrap: | raddb/certs/bootstrap $(LOCAL_CERT_PRODUCTS) -- 2.21.0