From patchwork Thu Nov 16 17:03:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Keeping X-Patchwork-Id: 838703 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=metanate.com header.i=@metanate.com header.b="FPhL98qw"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yd7lz1TcRz9s4s for ; Fri, 17 Nov 2017 04:39:22 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6C32587B1E; Thu, 16 Nov 2017 17:39:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2Czu41MXM4Oh; Thu, 16 Nov 2017 17:39:16 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id D97408753B; Thu, 16 Nov 2017 17:39:15 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 340421C098D for ; Thu, 16 Nov 2017 17:03:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 2E14B2EF52 for ; Thu, 16 Nov 2017 17:03:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lZ46giRw0GJF for ; Thu, 16 Nov 2017 17:03:23 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from metanate.com (dougal.metanate.com [90.155.101.14]) by silver.osuosl.org (Postfix) with ESMTPS id E5DC42637F for ; Thu, 16 Nov 2017 17:03:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=metanate.com; s=stronger; h=Message-Id:Date:Subject:Cc:To:From; bh=YoArBSHrb3btb5b1C5+BdGxq5J255o39O+Nde9p62rE=; b=FPhL98qwbsKrKu28LSQblpGb19d+Fo3BxpQhmac6DSKi3LasAF78ahncDcOkfGBlw0gBWUhrIw6zSDMhdcJJsAm/8ZXcWmh6lWLTJehjOawVDPJ6eBb/pH+Wn6jGzGSIjoQbSk1qnm9V0luXRb2cU2tmZorUTmAtKRwr++DaTxpyPpKChUramH69oBCbJoXtr2vqMkq2MMmQMtf0PZW8uMWTSGbd8sQAl2HpLK9BFtxByUP43cjuRyAOF7FSqMDVXMd/jIo8UytJi9nmF322dUpZx4SF4eumqtB1cvW7nUBC8elszlMfEd5ncT23fKgvWyfyK+zde2y6pmeuDi5PiQ==; Received: from brian ([192.168.88.1] helo=leela.metanate.com) by shrek.metanate.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-GCM-SHA256:128) (Exim 4.83_RC2) (envelope-from ) id 1eFNZR-0002oX-2w; Thu, 16 Nov 2017 17:03:21 +0000 From: John Keeping To: buildroot@buildroot.org Date: Thu, 16 Nov 2017 17:03:16 +0000 Message-Id: <20171116170316.19081-1-john@metanate.com> X-Mailer: git-send-email 2.15.0 Subject: [Buildroot] [PATCH] systemd: set time epoch for reproducible builds X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Keeping MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" 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 --- 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