From: John Keeping <john@metanate.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] systemd: set time epoch for reproducible builds
Date: Thu, 23 Nov 2017 12:26:31 +0000 [thread overview]
Message-ID: <20171123122631.52e7378f.john@metanate.com> (raw)
In-Reply-To: <20171122221639.40f60340@windsurf.lan>
On Wed, 22 Nov 2017 22:16:39 +0100, Thomas Petazzoni wrote:
> On Thu, 16 Nov 2017 17:03:16 +0000, John Keeping wrote:
> > 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(+)
>
> Following the feedback from Peter Korsgaard and myself, and the lack of
> additional justification, I've marked this patch as "Rejected" in our
> patch tracking system.
>
> John: don't hesitate to get back to us with a more detailed explanation
> of the issue if you have not been convinced by Peter's explantion and
> mine.
I'm convinced!
The original problem I was investigating wasn't actually reproducible
builds, but was related to the time set by systemd when the hardware
clock has an invalid time. It seems that e2fsck will update the
superblock timestamp when it is in the future, which means that
programming an ext4 filesystem image will trigger
systemd-fsck-root.service to attempt a reboot halfway through the first
boot.
I've solved this by setting options.broken_system_clock in e2fsck.conf,
but not before going down the root of trying to get systemd and the
rootfs to agree on a timestamp, which resulted in this patch to make the
timestamp included in systemd consistent with the rest of buildroot.
prev parent reply other threads:[~2017-11-23 12:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-16 17:03 [Buildroot] [PATCH] systemd: set time epoch for reproducible builds John Keeping
2017-11-17 9:55 ` Thomas Petazzoni
2017-11-17 10:33 ` Peter Korsgaard
2017-11-22 21:16 ` Thomas Petazzoni
2017-11-23 12:26 ` John Keeping [this message]
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=20171123122631.52e7378f.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