Skip to contentSkip to conversation

Make keyutils reproducible

PATCH New Jelle van der Waa 1 participant 1 message Jun 7, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Make keyutils reproducible

Adhere to the SOURCE_DATE_EPOCH standard and use it's date when set otherwise fall back to the default behaviour.

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index 33a451e..9066d5d 100644
@@ -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)\""
 
Signature · 1 line
2.21.0