Message ID | 34915f43ed2e8b7ae99c3fe2fd65e7b97ff8f57b.1712437365.git.janneke@gnu.org |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 41A7227BBEA; Sat, 6 Apr 2024 22:19:20 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9813B27BBE2 for <patchwork@mira.cbaines.net>; Sat, 6 Apr 2024 22:19:19 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1rtDRF-0000Mb-Hu; Sat, 06 Apr 2024 17:19:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rtDRD-0000Lp-Qi for guix-patches@gnu.org; Sat, 06 Apr 2024 17:18:59 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rtDRC-0004RW-RZ for guix-patches@gnu.org; Sat, 06 Apr 2024 17:18:59 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rtDRJ-0000Ze-6a for guix-patches@gnu.org; Sat, 06 Apr 2024 17:19:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70169] [PATCH v2 04/12] maint: Help help2man generate reproducible man-pages. Resent-From: Janneke Nieuwenhuizen <janneke@gnu.org> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 06 Apr 2024 21:19:05 +0000 Resent-Message-ID: <handler.70169.B70169.17124383151904@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70169 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70169@debbugs.gnu.org Received: via spool by 70169-submit@debbugs.gnu.org id=B70169.17124383151904 (code B ref 70169); Sat, 06 Apr 2024 21:19:05 +0000 Received: (at 70169) by debbugs.gnu.org; 6 Apr 2024 21:18:35 +0000 Received: from localhost ([127.0.0.1]:41119 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1rtDQl-0000Tu-Ky for submit@debbugs.gnu.org; Sat, 06 Apr 2024 17:18:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <janneke@gnu.org>) id 1rtDQh-0000SX-KS for 70169@debbugs.gnu.org; Sat, 06 Apr 2024 17:18:27 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <janneke@gnu.org>) id 1rtDQV-0004GC-Uu; Sat, 06 Apr 2024 17:18:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=h8E2k4aIwAq0oD4jCXkkvLkWXalj87urDy7/BGvGZfg=; b=lf3HPxwZMyHVMbIh5wNl E6D9aqvq2EFu1V+wRu6IyC0SACgLszgfwykuh0kVoDP62eptBy9VSM/INwgGvkYJQXv6iXvOkfdt/ aW8S/3Wnb8U0Ucdj7zPpla+DD+kbCoDiFi1Jsdcn60wE/VGMEChh4Npa9OQLUNCI0uFxx+KNLylQ/ RVfPZojAf3M+zQvG5OWh/IDMvR888njZgX6TQorff4cPXhD10R0e3AO++Y/tIPgw5kl+UITrkspM0 HbYi/6y5bcdSh+xpwwt1dWEgy1jgenN1kVGGFWPtyKkmEU62HpMF2fGBlGtpqbWl47klJzeBeiehS 91xnjPU6Slihnw==; From: Janneke Nieuwenhuizen <janneke@gnu.org> Date: Sat, 6 Apr 2024 23:17:56 +0200 Message-ID: <34915f43ed2e8b7ae99c3fe2fd65e7b97ff8f57b.1712437365.git.janneke@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <cover.1712437365.git.janneke@gnu.org> References: <cover.1712437365.git.janneke@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches |
Series |
Reproducible `make dist' tarball in defiance of Autotools and Gettext
|
|
Commit Message
Janneke Nieuwenhuizen
April 6, 2024, 9:17 p.m. UTC
* doc/local.mk (SOURCE_DATE_EPOCH): New exported variable. Change-Id: I6636693695d5502657f1475d93d31949e0b0b39d --- doc/local.mk | 3 +++ 1 file changed, 3 insertions(+)
Comments
Hello Jan, Janneke Nieuwenhuizen <janneke@gnu.org> writes: > diff --git a/doc/local.mk b/doc/local.mk > index 5f014b9c3d..017686137a 100644 > --- a/doc/local.mk > +++ b/doc/local.mk > @@ -224,6 +224,9 @@ gen_man = \ > $(HELP2MANFLAGS) > > HELP2MANFLAGS = --source=GNU --info-page=$(PACKAGE_TARNAME) > +# help2man reproducibility > +SOURCE_DATE_EPOCH = $(shell git show HEAD --format=%ct --no-patch 2>/dev/null || echo 0) > +export SOURCE_DATE_EPOCH > > $(srcdir)/%D%/guix.1: scripts/guix.in $(sub_commands_mans) > -$(AM_V_HELP2MAN)$(gen_man) --output="$@" `basename "$@" .1` Do I interpret correctly that “echo 0” is a fallback timestamp? Looking at the now gone instructions from “git show 83c60bb0622440afe98930820186ddfa1e6e8b2f”, at that time, a timestamp of 1 was used for the tarball; I do not remember why. In guix/scripts/pack.scm, 1 is used for squashfs and docker images. Is 1 a better timestamp than 0? Regards, Florian
pelzflorian (Florian Pelz) writes: Hello Florian, > Janneke Nieuwenhuizen <janneke@gnu.org> writes: >> diff --git a/doc/local.mk b/doc/local.mk >> +SOURCE_DATE_EPOCH = $(shell git show HEAD --format=%ct --no-patch 2>/dev/null || echo 0) >> +export SOURCE_DATE_EPOCH > > Do I interpret correctly that “echo 0” is a fallback timestamp? Yes. > Looking at the now gone instructions from “git show > 83c60bb0622440afe98930820186ddfa1e6e8b2f”, at that time, a timestamp of > 1 was used for the tarball; I do not remember why. In > guix/scripts/pack.scm, 1 is used for squashfs and docker images. That's probably because of build dependencies. > Is 1 a better timestamp than 0? For files, using 1 is preferrable if it's not a source file. We use 1 for .go files, and 0 for .scm files, iirc. SOURCE_DATE_EPOCH is (only) used for the date in the document. Without git, 0 is as good a guess for a reproducible date for use in a document as any, I think. Greetings, Janneke
Janneke Nieuwenhuizen <janneke@gnu.org> writes: > pelzflorian (Florian Pelz) writes: >> Is 1 a better timestamp than 0? > > For files, using 1 is preferrable if it's not a source file. We use 1 > for .go files, and 0 for .scm files, iirc. SOURCE_DATE_EPOCH is (only) > used for the date in the document. Without git, 0 is as good a guess > for a reproducible date for use in a document as any, I think. > > Greetings, > Janneke Thank you for explaining. So this SOURCE_DATE_EPOCH applies to all the generated files in doc/ but still 0 is fine, because noone warns if they are not later than source files, IIUC. Regards, Florian
Hello, "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> skribis: > Looking at the now gone instructions from “git show > 83c60bb0622440afe98930820186ddfa1e6e8b2f”, at that time, a timestamp of > 1 was used for the tarball; I do not remember why. In > guix/scripts/pack.scm, 1 is used for squashfs and docker images. In the store, a timestamp of 1 (not 0) is used. This is because there are tools (among which ‘make’ IIRC) that behave differently when mtime is zero. For consistency and to be on the safe side, it’s probably a good idea to do the same (as the fallback in this case). Ludo’.
Ludovic Courtès writes: Hi, > "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> skribis: > >> Looking at the now gone instructions from “git show >> 83c60bb0622440afe98930820186ddfa1e6e8b2f”, at that time, a timestamp of >> 1 was used for the tarball; I do not remember why. In >> guix/scripts/pack.scm, 1 is used for squashfs and docker images. > > In the store, a timestamp of 1 (not 0) is used. This is because there > are tools (among which ‘make’ IIRC) that behave differently when mtime > is zero. > > For consistency and to be on the safe side, it’s probably a good idea to > do the same (as the fallback in this case). Okay, will change for v3.
diff --git a/doc/local.mk b/doc/local.mk index 5f014b9c3d..017686137a 100644 --- a/doc/local.mk +++ b/doc/local.mk @@ -224,6 +224,9 @@ gen_man = \ $(HELP2MANFLAGS) HELP2MANFLAGS = --source=GNU --info-page=$(PACKAGE_TARNAME) +# help2man reproducibility +SOURCE_DATE_EPOCH = $(shell git show HEAD --format=%ct --no-patch 2>/dev/null || echo 0) +export SOURCE_DATE_EPOCH $(srcdir)/%D%/guix.1: scripts/guix.in $(sub_commands_mans) -$(AM_V_HELP2MAN)$(gen_man) --output="$@" `basename "$@" .1`