From patchwork Wed Apr 17 09:53:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janneke Nieuwenhuizen X-Patchwork-Id: 63101 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9DEAE27BBE9; Wed, 17 Apr 2024 10:55:18 +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=unavailable 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 28D2F27BBEA for ; Wed, 17 Apr 2024 10:55:17 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rx20I-0004jo-Qm; Wed, 17 Apr 2024 05:54:58 -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 ) id 1rx20G-0004gW-97 for guix-patches@gnu.org; Wed, 17 Apr 2024 05:54:56 -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 ) id 1rx20B-0006l8-K6 for guix-patches@gnu.org; Wed, 17 Apr 2024 05:54:52 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rx20O-0005MK-80 for guix-patches@gnu.org; Wed, 17 Apr 2024 05:55:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70380] [PATCH v3 1/4] maint: Cater for running `make dist' from tarball. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 17 Apr 2024 09:55:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70380 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70380@debbugs.gnu.org Received: via spool by 70380-submit@debbugs.gnu.org id=B70380.171334765820140 (code B ref 70380); Wed, 17 Apr 2024 09:55:04 +0000 Received: (at 70380) by debbugs.gnu.org; 17 Apr 2024 09:54:18 +0000 Received: from localhost ([127.0.0.1]:45797 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rx1zd-0005Ei-Rd for submit@debbugs.gnu.org; Wed, 17 Apr 2024 05:54:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rx1zK-0005A4-Sj for 70380@debbugs.gnu.org; Wed, 17 Apr 2024 05:54:02 -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 ) id 1rx1z1-0006es-Fo; Wed, 17 Apr 2024 05:53:39 -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=MhHY04uxLV0WTTKnYE3iau0XCscxWbzEGZlawrxhJj0=; b=iEI8NQEDWc53Y5xAQXf5 Cb7wCEmczl6vLBN1NLM1tNnuzN0hi7oMxQICVh1se8u1cFJYVpQ5UiNy+1wilCSL8NiRnlMimeYA6 fQY4obWbsz33/S0cz9znhmd2pTD4dRSj/hsOJ2fbgzJ5bYUb90IbOUR7eiv3Hgz8ifUG09ek9EEMN QFgkyxyblMuqD11hbTPTYxirijsjKSbOGlnN6RPv8FiS1CGA7k8oK0aLweTLgR96ULMojHhZ7dO9k AIfw6ZkG9a/xGqOUutngYjyDGj9GeybR9DVwpC7xLkEl9K1KdyUjWK6AWtrYkjfknHHt1Axnjx4LO hIoKdvP3sEd0NQ==; From: Janneke Nieuwenhuizen Date: Wed, 17 Apr 2024 11:53:28 +0200 Message-ID: <9dd6e4436bcc0639cbbae2d468e5bc3760d73aa3.1713340673.git.janneke@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 * Makefile.am (in_git_p): New variable. Use it to disable Autotools' cache consistency assert and removal when bulding from tarball. (dist): Depend on doc-pot-update again when building from tarball. (dist-hook): Remove dependencies on gen-ChangeLog and gen-AUTHORS when building from tarball. (gen-ChangeLog, gen-AUTHORS): Remove guarding for building from tarball. Use set -e to avoid silently failing. (gen-tarball-version): Use $(SOURCE_DATE_EPOCH) instead of re-generating it using git; this also works running from a tarball. Change-Id: I9ebdd28a70837f6a4db610c4816bb283d176e2d9 --- Makefile.am | 61 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/Makefile.am b/Makefile.am index 147767ece4..39cf4b4b17 100644 --- a/Makefile.am +++ b/Makefile.am @@ -953,9 +953,24 @@ guix-binary.%.tar.xz: guix` ; \ cp "$$tarball" "$@.tmp" ; mv "$@.tmp" "$@" +# The `dist' target has other dependencies when building from Git +# to assert and achieve reproducibility. Indented to get past Automake. +in_git_p = $(shell test -e .git && echo true) + ifeq ($(in_git_p),true) + +# The dependency on dist-doc-pot-update is to clean possibly stale doc and po +# files and only then generate the .pot files, which are not checked in. +dist: dist-doc-pot-update +dist-doc-pot-update: auto-clean + $(MAKE) guile$(EXEEXT) + $(MAKE) -C po/guix all + $(MAKE) -C po/packages all + $(MAKE) doc-pot-update + +dist-hook: gen-ChangeLog gen-AUTHORS # Assert that Autotools cache is up to date with Git, by checking -# PACKAGE_VERSION against HEAD. Indented to get past Automake. +# PACKAGE_VERSION against HEAD. ifeq ($(MAKECMDGOALS),dist) git_version = $(shell build-aux/git-version-gen .tarball-version) ifneq ($(PACKAGE_VERSION),$(git_version)) @@ -967,20 +982,18 @@ guix-binary.%.tar.xz: $(error Cannot create reproducible tarball) else $(warning Tarball will be irreproducible; distdir will not get removed!) - endif - endif - endif + endif # !GUIX_ALLOW_IRREPRODUCIBLE_TARBALL + endif # PACKAGE_VERSION != git_version + endif # MAKECMDGOALS dist -# The dependency on dist-doc-pot-update is to clean possibly stale doc and po -# files and only then generate the .pot files, which are not checked in. -dist: dist-doc-pot-update -dist-doc-pot-update: auto-clean - $(MAKE) guile$(EXEEXT) - $(MAKE) -C po/guix all - $(MAKE) -C po/packages all - $(MAKE) doc-pot-update + else # !in_git_p -dist-hook: gen-ChangeLog gen-AUTHORS gen-tarball-version +dist: doc-pot-update +$(warning Not using Git, tarball will likely be irreproducible!) + + endif # !in_git_p + +dist-hook: gen-tarball-version dist-hook: assert-no-store-file-names distcheck-hook: assert-binaries-available assert-final-inputs-self-contained @@ -992,27 +1005,25 @@ $(top_srcdir)/.version: config.status gen-tarball-version: echo $(VERSION) > "$(distdir)/.tarball-version" - git show HEAD --format=%ct --no-patch > $(distdir)/.tarball-timestamp + echo $(SOURCE_DATE_EPOCH) > $(distdir)/.tarball-timestamp gen-ChangeLog: - $(AM_V_GEN)if test -e .git; then \ - export LC_ALL=en_US.UTF-8; \ - export TZ=UTC0; \ - $(top_srcdir)/build-aux/gitlog-to-changelog \ - > $(distdir)/ChangeLog.tmp; \ - rm -f $(distdir)/ChangeLog; \ - mv $(distdir)/ChangeLog.tmp $(distdir)/ChangeLog; \ - fi + $(AM_V_GEN)set -e; \ + export LC_ALL=en_US.UTF-8; \ + export TZ=UTC0; \ + $(top_srcdir)/build-aux/gitlog-to-changelog \ + > $(distdir)/ChangeLog.tmp; \ + rm -f $(distdir)/ChangeLog; \ + mv $(distdir)/ChangeLog.tmp $(distdir)/ChangeLog; gen-AUTHORS: - $(AM_V_GEN)if test -e .git; then \ + $(AM_V_GEN)set -e; \ rm -f "$(distdir)/AUTHORS"; \ export LC_ALL=en_US.UTF-8; \ export TZ=UTC0; \ $(top_builddir)/pre-inst-env "$(GUILE)" \ "$(top_srcdir)/build-aux/generate-authors.scm" \ - "$(top_srcdir)" "$(distdir)/AUTHORS"; \ - fi + "$(top_srcdir)" "$(distdir)/AUTHORS"; # Like 'dist', but regenerate 'configure' so we get an up-to-date # 'PACKAGE_VERSION' string. (In Gnulib, 'GNUmakefile' has a special trick to From patchwork Wed Apr 17 09:53:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Janneke Nieuwenhuizen X-Patchwork-Id: 63105 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5DDB227BBEA; Wed, 17 Apr 2024 10:55:36 +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=unavailable 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 A640D27BBE9 for ; Wed, 17 Apr 2024 10:55:34 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rx20M-0004l9-QY; Wed, 17 Apr 2024 05:55: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 ) id 1rx20K-0004kB-83 for guix-patches@gnu.org; Wed, 17 Apr 2024 05:55:00 -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 ) id 1rx20I-0006lS-Il for guix-patches@gnu.org; Wed, 17 Apr 2024 05:54:58 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rx20V-0005O2-5k for guix-patches@gnu.org; Wed, 17 Apr 2024 05:55:11 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70380] [PATCH v3 2/4] maint: Generate doc/version[-LANG].texi using `mdate-from-git.scm'. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 17 Apr 2024 09:55:10 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70380 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70380@debbugs.gnu.org Received: via spool by 70380-submit@debbugs.gnu.org id=B70380.171334766120177 (code B ref 70380); Wed, 17 Apr 2024 09:55:10 +0000 Received: (at 70380) by debbugs.gnu.org; 17 Apr 2024 09:54:21 +0000 Received: from localhost ([127.0.0.1]:45803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rx1zg-0005F5-05 for submit@debbugs.gnu.org; Wed, 17 Apr 2024 05:54:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53784) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rx1zK-0005A5-Ux for 70380@debbugs.gnu.org; Wed, 17 Apr 2024 05:54:05 -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 ) id 1rx1z2-0006ey-BA; Wed, 17 Apr 2024 05:53:40 -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=sVDCoqtAM4adlxC6uod3PnFyYqEQbxGaRNsCC4styP4=; b=nwNsBZS4MnknhkOsXRix qxjOoFFWBcN1qn1PZv/4n+PiuqCJfInwik2sk4GglDOjMWGlratdGHfBxHCHZk3c6gkNtmlXdWxoR VqE7XRDsTnG4bh5NhPnxG31E4AQDwZX4bF0eXO0yfH8q41R32e+Oy4telcObQLujTCcmdTwngmuqo pB/48j/a4s9iyAwfibmilgz+5ywS25Sq6GXcaaezziiBOk65vqzgqvYA4SIOAmylg25IlquK49Smr oZYx66WVt6+GhGphAUgmMBmkTooICFeeJi494NZxMyhMQ+Z9Vh4CAYCTpj1qy1XmcVXeM1dUB8MP5 gNBOcRl2cgYHbA==; From: Janneke Nieuwenhuizen Date: Wed, 17 Apr 2024 11:53:29 +0200 Message-ID: <93b2d3b1b675dfd3018d0b3005d19bdbdd97b629.1713340673.git.janneke@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 This replaces Automake's `build-aux/mdate-sh' with our own `build-aux/mdate-from-git.scm' to use reproducible timestamps from Git instead. * build-aux/mdate-from-git.scm: New script. * bootstrap: Use it to replace build-aux/mdate-sh. * Makefile.am (EXTRA_DIST): Add it. Change-Id: I17d0a7de9ffea397129c0db1728f86e28a4e245f --- Makefile.am | 1 + bootstrap | 8 +++- build-aux/mdate-from-git.scm | 86 ++++++++++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+), 1 deletion(-) create mode 100755 build-aux/mdate-from-git.scm diff --git a/Makefile.am b/Makefile.am index 39cf4b4b17..1de8149772 100644 --- a/Makefile.am +++ b/Makefile.am @@ -723,6 +723,7 @@ EXTRA_DIST += \ build-aux/config.rpath \ build-aux/convert-xref.scm \ build-aux/generate-authors.scm \ + build-aux/mdate-from-git.scm \ build-aux/test-driver.scm \ build-aux/update-NEWS.scm \ build-aux/update-guix-package.scm \ diff --git a/bootstrap b/bootstrap index de024aeaa5..5bf83175e5 100755 --- a/bootstrap +++ b/bootstrap @@ -24,4 +24,10 @@ for lang in ${langs}; do fi done -exec autoreconf -vfi +autoreconf -vfi + +# Replace Automake's build-aux/mdate-sh with build-aux/mdate-from-git, our +# own, reproducible version. +chmod +w build-aux/mdate-sh +rm -f build-aux/mdate-sh +ln -s mdate-from-git.scm build-aux/mdate-sh diff --git a/build-aux/mdate-from-git.scm b/build-aux/mdate-from-git.scm new file mode 100755 index 0000000000..abe7e97f32 --- /dev/null +++ b/build-aux/mdate-from-git.scm @@ -0,0 +1,86 @@ +#! /bin/sh +# -*-scheme-*- +export LANG=C LANGUAGE=C LC_TIME=C +export TZ=UTC0 +exec guile --no-auto-compile -L $srcdir -C $srcdir -e '(mdate-from-git)' -s "$0" "$@" +!# + +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2024 Janneke Nieuwenhuizen +;;; +;;; This file is part of GNU Guix. +;;; +;;; This program is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; This program is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with this program. If not, see . + +;;;; Commentary: +;;; +;;; Usage: mdate-from-git.scm FILE +;;; +;;; This script is compatible with Automake's `mdate-sh' but uses the timestamp +;;; from Git instead of from the file system. Also, it can be appended to +;;; mdate-sh. + +;;; As a special exception for Guix, it caters for doc/guix.LANG.texi files that +;;; are not stored in Git, by using po/doc/guix-manual.LANG.po for the Git +;;; timestamp. Test doing something like: +;;; +;;; build-aux/mdate-from-git.scm doc/guix.de.texi +;;; +;;;; Code: + +(define-module (mdate-from-git) + #:use-module (ice-9 match) + #:use-module (ice-9 popen) + #:use-module (ice-9 rdelim) + #:use-module (ice-9 regex) + #:export (main)) + +(define (pipe-command command) + (let* ((port (apply open-pipe* OPEN_READ command)) + (output (read-string port))) + (close-port port) + output)) + +(define (guix.LANG.texi->guix-manual.LANG.po file-name) + "Translated manuals doc/guix.LANG.texi are not tracked in Git and are +generated from po/doc/guix-manual.LANG.po. For such an untraced .TEXI file, +return its .PO counterpart." + (let ((m (string-match "doc/guix.([^.]+).texi" file-name))) + (if (not m) file-name + (let ((lang (match:substring m 1))) + (format #f "po/doc/guix-manual.~a.po" lang))))) + + +;;; +;;; Entry point. +;;; +(define (main args) + (match args + ((script file-name) + (let* ((command `("git" "ls-files" "--error-unmatch" "--" ,file-name)) + (tracked? (zero? (with-error-to-port (%make-void-port "w") + (lambda _ (apply system* command))))) + (file-name (if tracked? file-name + (guix.LANG.texi->guix-manual.LANG.po file-name))) + (command `("git" "log" "--pretty=format:%ct" "-n1" "--" ,file-name)) + (timestamp (pipe-command command)) + (source-date-epoch (or (getenv "SOURCE_DATE_EPOCH") "1")) + (timestamp (if (string-null? timestamp) source-date-epoch + timestamp)) + (time (gmtime (string->number timestamp))) + (d-m-y (strftime "%-d %B %Y" time))) + (display d-m-y))) + (_ + (format (current-error-port) "Usage: mdate-from-git.scm FILE\n") + (exit 2)))) From patchwork Wed Apr 17 09:53:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janneke Nieuwenhuizen X-Patchwork-Id: 63104 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id F218A27BBE9; Wed, 17 Apr 2024 10:55:32 +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=unavailable 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 77F4427BBED for ; Wed, 17 Apr 2024 10:55:29 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rx20M-0004kd-6e; Wed, 17 Apr 2024 05:55: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 ) id 1rx20I-0004jr-RX for guix-patches@gnu.org; Wed, 17 Apr 2024 05:54:58 -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 ) id 1rx20G-0006lG-4L for guix-patches@gnu.org; Wed, 17 Apr 2024 05:54:56 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rx20S-0005NN-NL for guix-patches@gnu.org; Wed, 17 Apr 2024 05:55:08 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70380] [PATCH v3 3/4] Revert "maint: Generate 'doc/version-LANG.texi' reproducibly." Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 17 Apr 2024 09:55:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70380 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70380@debbugs.gnu.org Received: via spool by 70380-submit@debbugs.gnu.org id=B70380.171334766020158 (code B ref 70380); Wed, 17 Apr 2024 09:55:08 +0000 Received: (at 70380) by debbugs.gnu.org; 17 Apr 2024 09:54:20 +0000 Received: from localhost ([127.0.0.1]:45801 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rx1zf-0005Ex-B3 for submit@debbugs.gnu.org; Wed, 17 Apr 2024 05:54:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rx1zL-0005A8-Eg for 70380@debbugs.gnu.org; Wed, 17 Apr 2024 05:54:05 -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 ) id 1rx1z3-0006fB-72; Wed, 17 Apr 2024 05:53:41 -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=8AejkK/u0zFIXXzdUR6ZcSPHi28dhCnV3kGEsT1Cpwc=; b=baD2zvu9QuiQipL0LnOW ezPZHLGvFVXls9L7JeCF23CIYhcyj/TtRrPcB4Bz5Ibwee+UHnwM7vO+Waveorl5pDxg62MKx2+g8 f51En1Mt/FvKX4u1Ma/XggwumtAW2myGsS83FNNBE+vp79FV0vo2GpMovbxs3QGf30J/dCI5GlV3O p0z+dOlf2YUB6T15TOSEsIODg3OWIy6INU35rxlLXR4yvdFX2RxGqua+EV1b3gmLF0RkO7KIM+eNo frGYrecW017ajtjMqoqTUf5Y+/IVPOQHAIvXoMedz8jCoYQU1tvN8rir0R0jQhnX0b7VWf/huCAU5 AziTqya11xWu5w==; From: Janneke Nieuwenhuizen Date: Wed, 17 Apr 2024 11:53:30 +0200 Message-ID: <99333fca4662a435c68d6a54f5f6e28aecc21103.1713340674.git.janneke@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 Using `build-aux/mdate-from-git.scm' makes this no longer necessary. This reverts commit 0e4ead187d83a958ca0deb54857c04967e84d68b. Change-Id: I9177828f90fa7f7e256bc72fdff35a2fab355780 --- doc/local.mk | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/doc/local.mk b/doc/local.mk index 130f40ece9..77d48902b6 100644 --- a/doc/local.mk +++ b/doc/local.mk @@ -260,32 +260,26 @@ endif # Reproducible tarball -# Define a rule to build `version[LANG].texi' reproducibly using metadata from -# Git rather than using metadata from the filesystem. -define version.texi-from-git -$(srcdir)/doc/stamp-$(1): $(srcdir)/$(2) $(top_srcdir)/configure - $$(AM_V_GEN)set -e; \ - export LANG=C LANGUAGE=C LC_ALL=C LC_TIME=C; \ - export TZ=UTC0; \ - timestamp="$$$$(git log --pretty=format:%ct -n1 -- "$$<" \ - 2>/dev/null \ - || echo $$(SOURCE_DATE_EPOCH))" \ - dmy=$$$$(date --date="@$$$$timestamp" "+%-d %B %Y"); \ - my=$$$$(date --date="@$$$$timestamp" "+%B %Y"); \ - { echo "@set UPDATED $$$$dmy"; \ - echo "@set UPDATED-MONTH $$$$my"; \ - echo "@set EDITION $$$(VERSION)"; \ - echo "@set VERSION $$$(VERSION)"; } > "$$@-t"; \ - mv "$$@-t" "$$@"; \ - cp -p "$$@" "$$(srcdir)/doc/version$(3).texi" -endef - -# Generate rules for stamp-vti and stamp-N that create version.texi and -# version-LANG.texi to override the Autotools versions that use timestamps -# embedded in the file-system. These are expected to generate warnings: +# Generate 'version.texi' reproducibly using metadata from Git rather than +# using metadata from the filesystem. This is expected to generate warnings: # # Makefile:7376: warning: overriding recipe for target 'doc/stamp-vti' # Makefile:5098: warning: ignoring old recipe for target 'doc/stamp-vti' +$(srcdir)/doc/stamp-vti: $(srcdir)/doc/guix.texi $(top_srcdir)/configure + $$(AM_V_GEN)set -e; \ + export LANG=C LANGUAGE=C LC_ALL=C LC_TIME=C; \ + export TZ=UTC0; \ + timestamp=$$(git log --pretty=format:%ct -n1 -- $< 2>/dev/null \ + || echo $(SOURCE_DATE_EPOCH)) \ + dmy=$$(date --date="@$$timestamp" "+%-d %B %Y"); \ + my=$$(date --date="@$$timestamp" "+%B %Y"); \ + { echo "@set UPDATED $$dmy"; \ + echo "@set UPDATED-MONTH $$my"; \ + echo "@set EDITION $(VERSION)"; \ + echo "@set VERSION $(VERSION)"; } > $@-t; \ + mv $@-t $@; \ + cp $@ $(srcdir)/doc/version.texi + i:=0 $(eval $(call version.texi-from-git,vti,doc/guix.texi,)) $(foreach lang, $(MANUAL_LANGUAGES), \ From patchwork Wed Apr 17 09:53:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janneke Nieuwenhuizen X-Patchwork-Id: 63103 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 4EB5B27BBE9; Wed, 17 Apr 2024 10:55:30 +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 0729027BBEA for ; Wed, 17 Apr 2024 10:55:29 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rx20L-0004kL-A6; Wed, 17 Apr 2024 05:55:01 -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 ) id 1rx20I-0004jU-Cs for guix-patches@gnu.org; Wed, 17 Apr 2024 05:54:58 -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 ) id 1rx20E-0006lC-6p for guix-patches@gnu.org; Wed, 17 Apr 2024 05:54:55 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rx20Q-0005My-UH for guix-patches@gnu.org; Wed, 17 Apr 2024 05:55:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70380] [PATCH v3 4/4] Revert "maint: Generate 'doc/version.texi' reproducibly." Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 17 Apr 2024 09:55:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70380 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70380@debbugs.gnu.org Received: via spool by 70380-submit@debbugs.gnu.org id=B70380.171334765920149 (code B ref 70380); Wed, 17 Apr 2024 09:55:06 +0000 Received: (at 70380) by debbugs.gnu.org; 17 Apr 2024 09:54:19 +0000 Received: from localhost ([127.0.0.1]:45799 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rx1ze-0005En-Om for submit@debbugs.gnu.org; Wed, 17 Apr 2024 05:54:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rx1zM-0005AD-8c for 70380@debbugs.gnu.org; Wed, 17 Apr 2024 05:54:05 -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 ) id 1rx1z4-0006fR-2G; Wed, 17 Apr 2024 05:53:42 -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=/IgthRV+DK3fnFHAK0ShArj105AC7+Zsb6GJNQqs/Q0=; b=e/03Bk38tp5GJ7u0t9kG I8qZ0dJXNhwQ4AdcuPObtqqTKC6V0FXSyOMavIfAxDNeLSshMPOHiaOGZzIznUWEeAviBIqd45fMb G2HmLUS4eWF7fhEzGdu8psOy0IDI2CtWIZ4PAlhSYVjdJspBYtrMso1bFWxyJin2NatrPuFPmW/ym AZ4mjFWBYlvHeKvPn05B6jvv+4EXxDM3ykqrghq7J9LdGo6LcGsHm2UXPLbxigGAygud6A7S2Sno6 kUeWgAuvWDXyvweo8t/sGYI62VPIeD6W6fvUBq9iemC1EuTpAwFZZ0soCNvLNOXE80SYPGFV82E2J 3xcCnFBpSgKfkw==; From: Janneke Nieuwenhuizen Date: Wed, 17 Apr 2024 11:53:31 +0200 Message-ID: <8de809241c8abd7ec234fcc8da2590074a5fc828.1713340674.git.janneke@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 Using `build-aux/mdate-from-git.scm' makes this no longer necessary. This reverts commit e73ea7bd64f64709c71f89dfb111cf3e8ada3771. Change-Id: I29d1e36b13d255e5a65b7348e7ae4f2b2c24a518 --- doc/local.mk | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/doc/local.mk b/doc/local.mk index 77d48902b6..1d94e3c758 100644 --- a/doc/local.mk +++ b/doc/local.mk @@ -260,32 +260,6 @@ endif # Reproducible tarball -# Generate 'version.texi' reproducibly using metadata from Git rather than -# using metadata from the filesystem. This is expected to generate warnings: -# -# Makefile:7376: warning: overriding recipe for target 'doc/stamp-vti' -# Makefile:5098: warning: ignoring old recipe for target 'doc/stamp-vti' -$(srcdir)/doc/stamp-vti: $(srcdir)/doc/guix.texi $(top_srcdir)/configure - $$(AM_V_GEN)set -e; \ - export LANG=C LANGUAGE=C LC_ALL=C LC_TIME=C; \ - export TZ=UTC0; \ - timestamp=$$(git log --pretty=format:%ct -n1 -- $< 2>/dev/null \ - || echo $(SOURCE_DATE_EPOCH)) \ - dmy=$$(date --date="@$$timestamp" "+%-d %B %Y"); \ - my=$$(date --date="@$$timestamp" "+%B %Y"); \ - { echo "@set UPDATED $$dmy"; \ - echo "@set UPDATED-MONTH $$my"; \ - echo "@set EDITION $(VERSION)"; \ - echo "@set VERSION $(VERSION)"; } > $@-t; \ - mv $@-t $@; \ - cp $@ $(srcdir)/doc/version.texi - -i:=0 -$(eval $(call version.texi-from-git,vti,doc/guix.texi,)) -$(foreach lang, $(MANUAL_LANGUAGES), \ - $(eval i=$(shell echo $$(($(i)+1)))) \ - $(eval $(call version.texi-from-git,$(i),po/doc/guix-manual.$(lang).po,-$(lang)))) - DIST_CONFIGURE_FLAGS = \ --localstatedir=/var \ --sysconfdir=/etc