Source: keychain
Version: 2.9.8-1
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: timestamps
X-Debbugs-Cc: [email protected]

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed that
keychain could not be built reproducibly.

This is because the /usr/bin/keychain binary embeds the current build
year. A patch is attached that seeds this value from SOURCE_DATE_EPOCH
if available.


 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      [email protected] / chris-lamb.co.uk
       `-
--- a/debian/patches/reproducible-build.patch   1969-12-31 16:00:00.000000000 
-0800
--- b/debian/patches/reproducible-build.patch   2026-08-04 16:27:54.196148271 
-0700
@@ -0,0 +1,20 @@
+Description: Make the build reproducible
+Author: Chris Lamb <[email protected]>
+Last-Update: 2026-08-04
+
+--- keychain-2.9.8.orig/Makefile
++++ keychain-2.9.8/Makefile
+@@ -6,7 +6,12 @@ Y:sh = date +'%Y'
+ # for GNU Make:
+ V ?= $(shell cat VERSION)
+ D ?= $(shell date +'%d %b %Y')
+-Y ?= $(shell date +'%Y')
++DATE_FMT = +%Y
++ifdef SOURCE_DATE_EPOCH
++    Y ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null 
|| date -u -r "$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u 
"$(DATE_FMT)")
++else
++    Y ?= $(shell date "$(DATE_FMT)")
++endif
+ 
+ PREFIX ?= /usr/local
+ COMPLETIONSDIR ?= $(PREFIX)/share/bash-completion/completions
--- a/debian/patches/series     1969-12-31 16:00:00.000000000 -0800
--- b/debian/patches/series     2026-08-04 16:22:07.251223395 -0700
@@ -0,0 +1 @@
+reproducible-build.patch

Reply via email to