[arch-commits] Commit in keyutils/trunk (PKGBUILD reproducible.patch)

Jelle van der Waa jelle at archlinux.org
Wed Nov 20 20:35:13 UTC 2019


    Date: Wednesday, November 20, 2019 @ 20:35:12
  Author: jelle
Revision: 369505

upgpkg: keyutils 1.6.1-3

Make keyutils reproducible. Patch send upstream, no reply yet..

Added:
  keyutils/trunk/reproducible.patch
Modified:
  keyutils/trunk/PKGBUILD

--------------------+
 PKGBUILD           |   10 +++++++---
 reproducible.patch |   24 ++++++++++++++++++++++++
 2 files changed, 31 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-11-20 20:29:26 UTC (rev 369504)
+++ PKGBUILD	2019-11-20 20:35:12 UTC (rev 369505)
@@ -3,7 +3,7 @@
 
 pkgname=keyutils
 pkgver=1.6.1
-pkgrel=2
+pkgrel=3
 pkgdesc='Linux Key Management Utilities'
 arch=('x86_64')
 url='https://www.kernel.org/'
@@ -13,14 +13,18 @@
 backup=('etc/request-key.conf')
 validpgpkeys=('A86E54B0D5E1B4E0AB7C640FFBB7576BA7CB0B6B') # David Howells <dhowells at redhat.com>
 source=("git+https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git#tag=v${pkgver}?signed"
-        'request-key.conf.patch')
+        'request-key.conf.patch' 'reproducible.patch')
 sha256sums=('SKIP'
-            '203c602c61ed94ccd423a0a453d74143d678c641a9a4486367576ee8af2cb8d6')
+            '203c602c61ed94ccd423a0a453d74143d678c641a9a4486367576ee8af2cb8d6'
+            '7bb7400b2b8c8f0288c86ec9191f8964a1e682745a204013d5fc7c2e1a253d8e')
 
 prepare() {
   cd ${pkgname}
   # fix paths of binaries in /etc/request-key.conf
   patch -Np0 -i ../request-key.conf.patch
+
+  # make keyutils reproducible
+  patch -Np1 -i ../reproducible.patch
 }
 
 build() {

Added: reproducible.patch
===================================================================
--- reproducible.patch	                        (rev 0)
+++ reproducible.patch	2019-11-20 20:35:12 UTC (rev 369505)
@@ -0,0 +1,24 @@
+Adhere to the SOURCE_DATE_EPOCH standard and use it's date when set
+otherwise fall back to the default behaviour.
+
+Signed-off-by: Jelle van der Waa <jelle at vdwaa.nl>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 33a451e..9066d5d 100644
+--- a/Makefile
++++ b/Makefile
+@@ -108,7 +108,7 @@ all: keyctl request-key key.dns_resolver
+ ###############################################################################
+ #RPATH = -Wl,-rpath,$(LIBDIR)
+ 
+-VCPPFLAGS	:= -DPKGBUILD="\"$(shell date -u +%F)\""
++VCPPFLAGS	:= -DPKGBUILD="\"$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%F)\""
+ VCPPFLAGS	+= -DPKGVERSION="\"keyutils-$(VERSION)\""
+ VCPPFLAGS	+= -DAPIVERSION="\"libkeyutils-$(APIVERSION)\""
+ 
+-- 
+2.21.0
+



More information about the arch-commits mailing list