From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id 4IrjJGm8EWatDAAAqHPOHw:P1 (envelope-from ) for ; Sat, 06 Apr 2024 23:19:37 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 4IrjJGm8EWatDAAAqHPOHw (envelope-from ) for ; Sat, 06 Apr 2024 23:19:37 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=HKGdmdCS; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712438377; a=rsa-sha256; cv=none; b=XK4tO8XTmNu/Ol1kDwcf4MRBOKgaxV7+XIEJTjjRkG0F5Vl7gksk9yBv5gkRbZlytW4Pi/ jafza1yyUnI0Uan8zh+eVkvGST/cKiHCs+Faqqrc4IF0ft+Fox4VlOCNQ1CIp+B2Qab/aY uGHhMNeynl1wwolLEDJnzE/qf12esSrkdO31a++RJKQ158yoXVBC/5cGx3eVdWsKfvU6xv dqgv+aY3RHfYcELDR7+70Sq2pQVSrGjLcBTLVYz7T1M+RzO+V/G0CgjXTaPcRXo0r6anH5 OSpmYwbs934zzy/DB6AzRJuo4xeCRzgd3tAo9h1FXlIQQRrRlbDPqktLFGZKCA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=HKGdmdCS; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712438377; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=HNT9nkecpX7lGGEUPD0bYWW3ju2ZRg/oGPJpCmOYDRA=; b=b4ni9Ol9Kl6H+OeYj9w9fGaPbUjHJ+kFXWtfT8ct1tIgJT1QLsDJGyeJ2FTfsQcJtlL7y5 wWN+BPozzb3D+V9OY7VJahJL1r+rxD3RsqkVTR2ruPEbMPcslBQI98EV2Cg5hTUdjzr68w 3GDSlfLykWjeooDNQJZltcvk4QLWd8I485snLGx+OJtluAD++Wr5HMWSzXswmwo1aEg17q 0GJoUGXWHdqO9ky3CvLxpVdzt5qORG8yLskXhgamTvPvHCvMfhnr2XF9Z8zENdbB2bGGzC yqFs2YstO/AKIvIJz5tbn2tzHvwfGrFL3u9otCENlsMjMZ1YvciRQhFL/uGw7A== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7C51D74C5F for ; Sat, 6 Apr 2024 23:19:37 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtDRI-0000Pp-W3; Sat, 06 Apr 2024 17:19:05 -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 1rtDRD-0000Ls-TI 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 ) id 1rtDRD-0004Rt-KB 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 ) id 1rtDRJ-0000Zt-V5 for guix-patches@gnu.org; Sat, 06 Apr 2024 17:19:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70169] [PATCH v2 06/12] maint: Generate 'doc/version-LANG.texi' reproducibly. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 06 Apr 2024 21:19:05 +0000 Resent-Message-ID: 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.17124383161941 (code B ref 70169); Sat, 06 Apr 2024 21:19:05 +0000 Received: (at 70169) by debbugs.gnu.org; 6 Apr 2024 21:18:36 +0000 Received: from localhost ([127.0.0.1]:41131 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtDQq-0000V4-1p for submit@debbugs.gnu.org; Sat, 06 Apr 2024 17:18:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53948) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtDQj-0000Sn-NQ for 70169@debbugs.gnu.org; Sat, 06 Apr 2024 17:18:31 -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 1rtDQX-0004H5-PV; Sat, 06 Apr 2024 17:18:18 -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=HNT9nkecpX7lGGEUPD0bYWW3ju2ZRg/oGPJpCmOYDRA=; b=HKGdmdCSWNAQzlo5/EtV Ny20v3GgOlgvvFv55BR9y3QGcWA7Tx3EpRxHba0NAWVdu9vKHQOyjM88vWI6ua+m2TwZG92+j9tdx lM2VxHdBonXmOvj5KkQlhngq8U0IBraMpIQhT8Gd5CJuZJWbbQ2EeOoaDopleRO56lOHfj+CXiNdH DIxhhSGZm8EQP6erDQC/Va/3glODMCUmIex+p5KVwGjuOO5dteS8D3gL76fbeZ/EnWLs8OpGJq5dJ BsFH2Qiuunuu2lk4kdjqulqpvj+FPMBRuBQc6B10BbiToWWjxNaTM9mApY8T7A6aHxVsCwuqlMRmm fpPNXmk+jR15eg==; From: Janneke Nieuwenhuizen Date: Sat, 6 Apr 2024 23:17:58 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -6.06 X-Migadu-Queue-Id: 7C51D74C5F X-Migadu-Spam-Score: -6.06 X-Migadu-Scanner: mx10.migadu.com X-TUID: vVJC0nVa8AbH * doc/local.mk ($(srcdir)/doc/stamp-vti): Change rule into... (version.texi-from-git): ...this new function. Call it with vti,guix.texi,; and for all MANUAL_LANGUAGES with $(i),po/doc/guix-manual.$(lang).po, -$(lang.po). Change-Id: Ia8df618178066cad320eecea0299337224e23a73 --- doc/local.mk | 44 ++++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/doc/local.mk b/doc/local.mk index 017686137a..c355bec8d7 100644 --- a/doc/local.mk +++ b/doc/local.mk @@ -6,6 +6,7 @@ # Copyright © 2016, 2018 Mathieu Lirzin # Copyright © 2018, 2021 Julien Lepiller # Copyright © 2019 Timothy Sample +# Copyright © 2024 Janneke Nieuwenhuizen # # This file is part of GNU Guix. # @@ -254,19 +255,34 @@ endif # Reproducible tarball -# Generate 'version.texi' reproducibly using metadata from Git rather -# than using metadata from the filesystem. -$(srcdir)/doc/stamp-vti: $(srcdir)/doc/guix.texi $(top_srcdir)/configure - $(AM_V_GEN)set -e \ +# 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 LC_ALL=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 + 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: +# +# Makefile:7376: warning: overriding recipe for target 'doc/stamp-vti' +# Makefile:5098: warning: ignoring old recipe for target 'doc/stamp-vti' +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)))) -- 2.41.0