summaryrefslogtreecommitdiffstats
path: root/patches/keyutils-1.5.10
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2018-10-03 12:48:10 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2018-10-03 14:17:33 +0200
commit1ae176121d1f7daf989ebed3c2c41f0ad1cfc551 (patch)
tree71cca2c3c7b3e0df429719bf22466538f9c6d98f /patches/keyutils-1.5.10
parente3a9a8b7c885599fbb90f9e8992ff5d47c243ea5 (diff)
downloadptxdist-1ae176121d1f7daf989ebed3c2c41f0ad1cfc551.tar.gz
ptxdist-1ae176121d1f7daf989ebed3c2c41f0ad1cfc551.tar.xz
keyutils: add patch to make the build reproducible
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches/keyutils-1.5.10')
-rw-r--r--patches/keyutils-1.5.10/0002-build-use-SOURCE_DATE_EPOCH-if-available-to-make-the.patch30
-rw-r--r--patches/keyutils-1.5.10/series3
2 files changed, 32 insertions, 1 deletions
diff --git a/patches/keyutils-1.5.10/0002-build-use-SOURCE_DATE_EPOCH-if-available-to-make-the.patch b/patches/keyutils-1.5.10/0002-build-use-SOURCE_DATE_EPOCH-if-available-to-make-the.patch
new file mode 100644
index 000000000..31e472864
--- /dev/null
+++ b/patches/keyutils-1.5.10/0002-build-use-SOURCE_DATE_EPOCH-if-available-to-make-the.patch
@@ -0,0 +1,30 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Wed, 3 Oct 2018 11:32:17 +0200
+Subject: [PATCH] build: use SOURCE_DATE_EPOCH if available to make the build
+ reproducible
+
+The build date is included into the binary. As a result, the binaries
+change with the build date.
+Use SOURCE_DATE_EPOCH[1] if defined. This allows packages to make the build
+reproducible by setting SOURCE_DATE_EPOCH to a fixed value.
+
+[1] https://reproducible-builds.org/specs/source-date-epoch/
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 351e749760f7..c5aafd5fbdc5 100644
+--- a/Makefile
++++ b/Makefile
+@@ -104,7 +104,7 @@ all: keyctl request-key key.dns_resolver
+ ###############################################################################
+ #RPATH = -Wl,-rpath,$(LIBDIR)
+
+-VCPPFLAGS := -DPKGBUILD="\"$(shell date -u +%F)\""
++VCPPFLAGS := -DPKGBUILD="\"$(shell date $(if $(SOURCE_DATE_EPOCH),--date @$(SOURCE_DATE_EPOCH)) -u +%F)\""
+ VCPPFLAGS += -DPKGVERSION="\"keyutils-$(VERSION)\""
+ VCPPFLAGS += -DAPIVERSION="\"libkeyutils-$(APIVERSION)\""
+
diff --git a/patches/keyutils-1.5.10/series b/patches/keyutils-1.5.10/series
index 35904c966..342a4d284 100644
--- a/patches/keyutils-1.5.10/series
+++ b/patches/keyutils-1.5.10/series
@@ -1,4 +1,5 @@
# generated by git-ptx-patches
#tag:base --start-number 1
0001-Makefile-don-t-create-absolute-link-outside-of-DESTD.patch
-# d74c4a397aad9b8ca484847dcd33cb32 - git-ptx-patches magic
+0002-build-use-SOURCE_DATE_EPOCH-if-available-to-make-the.patch
+# e3c7105910490cdca15c0686e7a9d661 - git-ptx-patches magic