]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/freeradius-no-buildtime-cert-gen.patch
freeradius: Build package without generating certificates
[ipfire-2.x.git] / src / patches / freeradius-no-buildtime-cert-gen.patch
CommitLineData
6580bdeb
MT
1From e6f7c9d4c2af1cda7760ca8155166bb5d4d541d0 Mon Sep 17 00:00:00 2001
2From: Alexander Scheel <ascheel@redhat.com>
3Date: Wed, 8 May 2019 12:58:02 -0400
4Subject: [PATCH] Don't generate certificates in reproducible builds
5
6Signed-off-by: Alexander Scheel <ascheel@redhat.com>
7---
8 Make.inc.in | 5 +++++
9 configure | 4 ++++
10 configure.ac | 3 +++
11 raddb/all.mk | 4 ++++
12 4 files changed, 16 insertions(+)
13
14diff --git a/Make.inc.in b/Make.inc.in
15index 0b2cd74de8..8c623cf95c 100644
16--- a/Make.inc.in
17+++ b/Make.inc.in
18@@ -173,3 +173,8 @@ else
19 TESTBINDIR = ./$(BUILD_DIR)/bin
20 TESTBIN = ./$(BUILD_DIR)/bin
21 endif
22+
23+#
24+# With reproducible builds, do not generate certificates during installation
25+#
26+ENABLE_REPRODUCIBLE_BUILDS = @ENABLE_REPRODUCIBLE_BUILDS@
27diff --git a/configure b/configure
28index c2c599c92b..3d4403a844 100755
29--- a/configure
30+++ b/configure
31@@ -655,6 +655,7 @@ RUSERS
32 SNMPWALK
33 SNMPGET
34 PERL
35+ENABLE_REPRODUCIBLE_BUILDS
36 openssl_version_check_config
37 WITH_DHCP
38 modconfdir
39@@ -5586,6 +5587,7 @@ else
40 fi
41
42
43+ENABLE_REPRODUCIBLE_BUILDS=yes
44 # Check whether --enable-reproducible-builds was given.
45 if test "${enable_reproducible_builds+set}" = set; then :
46 enableval=$enable_reproducible_builds; case "$enableval" in
47@@ -5597,6 +5599,7 @@ $as_echo "#define ENABLE_REPRODUCIBLE_BUILDS 1" >>confdefs.h
48 ;;
49 *)
50 reproducible_builds=no
51+ ENABLE_REPRODUCIBLE_BUILDS=no
52 esac
53
54 fi
55@@ -5604,6 +5607,7 @@ fi
56
57
58
59+
60 CHECKRAD=checkrad
61 # Extract the first word of "perl", so it can be a program name with args.
62 set dummy perl; ac_word=$2
63diff --git a/configure.ac b/configure.ac
64index a7abf0025a..35b013f4af 100644
65--- a/configure.ac
66+++ b/configure.ac
67@@ -619,6 +619,7 @@ AC_SUBST([openssl_version_check_config])
68 dnl #
69 dnl # extra argument: --enable-reproducible-builds
70 dnl #
71+ENABLE_REPRODUCIBLE_BUILDS=yes
72 AC_ARG_ENABLE(reproducible-builds,
73 [AS_HELP_STRING([--enable-reproducible-builds],
74 [ensure the build does not change each time])],
75@@ -630,8 +631,10 @@ AC_ARG_ENABLE(reproducible-builds,
76 ;;
77 *)
78 reproducible_builds=no
79+ ENABLE_REPRODUCIBLE_BUILDS=no
80 esac ]
81 )
82+AC_SUBST(ENABLE_REPRODUCIBLE_BUILDS)
83
84
85 dnl #############################################################
86diff --git a/raddb/all.mk b/raddb/all.mk
87index c966edd657..c8e976a499 100644
88--- a/raddb/all.mk
89+++ b/raddb/all.mk
90@@ -124,7 +124,11 @@ $(R)$(raddbdir)/users: $(R)$(modconfdir)/files/authorize
91 ifneq "$(LOCAL_CERT_PRODUCTS)" ""
92 $(LOCAL_CERT_PRODUCTS):
93 @echo BOOTSTRAP raddb/certs/
94+ifeq "$(ENABLE_REPRODUCIBLE_BUILDS)" "yes"
95+ @$(MAKE) -C $(R)$(raddbdir)/certs/ passwords.mk
96+else
97 @$(MAKE) -C $(R)$(raddbdir)/certs/
98+endif
99
100 # Bootstrap is special
101 $(R)$(raddbdir)/certs/bootstrap: | raddb/certs/bootstrap $(LOCAL_CERT_PRODUCTS)
102--
1032.21.0
104