Bug#1089092: setup-translators: respect SOURCE_DATE_EPOCH when creating /var/lib/random-seed
Johannes Schauer Marin Rodrigues
josch at debian.org
Thu Dec 5 10:37:24 GMT 2024
Source: hurd
Version: 1:0.9.git20240714-4
Severity: normal
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org
Hi,
currently, /usr/lib/hurd/setup-translators contains the following snippet:
[ -r /var/lib/random-seed ] || date > /var/lib/random-seed 2> /dev/null
This means that the contents of /var/lib/random-seed will differ every time the
script is run. This is undesirable when the script is run in context of
producing bit-by-bit reproducible installation media or bootable system images.
The patch at the end of this mail fixes the problem.
Thanks!
cheers, josch
>From 2d23917442313428ff01802bf3870e82cd7d579a Mon Sep 17 00:00:00 2001
From: Johannes Schauer Marin Rodrigues <josch at mister-muffin.de>
Date: Thu, 5 Dec 2024 11:32:51 +0100
Subject: [PATCH] debian/local/setup-translators: if set, respect
SOURCE_DATE_EPOCH when running date
---
debian/local/setup-translators | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/debian/local/setup-translators b/debian/local/setup-translators
index 7b6fb0825..c8753c005 100755
--- a/debian/local/setup-translators
+++ b/debian/local/setup-translators
@@ -148,7 +148,7 @@ md netdde
md ethX 0123
md pseudo-root
-[ -r /var/lib/random-seed ] || date > /var/lib/random-seed 2> /dev/null
+[ -r /var/lib/random-seed ] || date ${SOURCE_DATE_EPOCH:+--date=@${SOURCE_DATE_EPOCH}} > /var/lib/random-seed 2> /dev/null
chmod 600 /var/lib/random-seed
if [ "$MINIMAL" ]; then
--
2.39.2
More information about the Reproducible-bugs
mailing list