Bug#1143615: keychain: please make the build reproducible
Chris Lamb
lamby at debian.org
Wed Aug 5 00:30:08 BST 2026
Source: keychain
Version: 2.9.8-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org
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
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
--- 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 <lamby at debian.org>
+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
More information about the Reproducible-bugs
mailing list