From: John Keeping <john@metanate.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] systemd: set time epoch for reproducible builds
Date: Thu, 16 Nov 2017 17:03:16 +0000 [thread overview]
Message-ID: <20171116170316.19081-1-john@metanate.com> (raw)
Systemd embeds a timestamp which is used to impose a minimum bound on
the system time during boot. Normally this comes from stat'ing the NEWS
file included with the systemd source, but this makes the build
non-reproducible. Pass in $SOURCE_DATE_EPOCH to use a deterministic
timestamp when reproducible builds are enabled.
Signed-off-by: John Keeping <john@metanate.com>
---
package/systemd/systemd.mk | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
index 9f286fd54b..d87c9d33dd 100644
--- a/package/systemd/systemd.mk
+++ b/package/systemd/systemd.mk
@@ -40,6 +40,11 @@ SYSTEMD_CONF_OPTS += \
--with-default-dnssec=no \
--without-python
+ifeq ($(BR2_REPRODUCIBLE),y)
+SYSTEMD_CONF_OPTS += \
+ --with-time-epoch=$(SOURCE_DATE_EPOCH)
+endif
+
SYSTEMD_CFLAGS = $(TARGET_CFLAGS) -fno-lto
# Override paths to a few utilities needed at runtime, to
--
2.15.0
next reply other threads:[~2017-11-16 17:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-16 17:03 John Keeping [this message]
2017-11-17 9:55 ` [Buildroot] [PATCH] systemd: set time epoch for reproducible builds Thomas Petazzoni
2017-11-17 10:33 ` Peter Korsgaard
2017-11-22 21:16 ` Thomas Petazzoni
2017-11-23 12:26 ` John Keeping
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171116170316.19081-1-john@metanate.com \
--to=john@metanate.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox