From patchwork Mon Apr 8 18:46:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Janneke Nieuwenhuizen X-Patchwork-Id: 62869 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 A66A027BBE9; Mon, 8 Apr 2024 19:48:51 +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 45B9D27BBE2 for ; Mon, 8 Apr 2024 19:48:50 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtu2D-00045f-ML; Mon, 08 Apr 2024 14:48: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 1rtu2A-00043I-SB for guix-patches@gnu.org; Mon, 08 Apr 2024 14:47: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 1rtu2A-00056i-JF for guix-patches@gnu.org; Mon, 08 Apr 2024 14:47:58 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rtu2I-0005Xc-3y for guix-patches@gnu.org; Mon, 08 Apr 2024 14:48:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70169] [PATCH v3 04/13] maint: Generate 'doc/version.texi' reproducibly. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 08 Apr 2024 18:48:06 +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 Cc: Timothy Sample Received: via spool by 70169-submit@debbugs.gnu.org id=B70169.171260206921081 (code B ref 70169); Mon, 08 Apr 2024 18:48:06 +0000 Received: (at 70169) by debbugs.gnu.org; 8 Apr 2024 18:47:49 +0000 Received: from localhost ([127.0.0.1]:47670 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtu20-0005To-Ea for submit@debbugs.gnu.org; Mon, 08 Apr 2024 14:47:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44190) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtu1h-0005Px-32 for 70169@debbugs.gnu.org; Mon, 08 Apr 2024 14:47:41 -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 1rtu1U-00051J-7Z; Mon, 08 Apr 2024 14:47:16 -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=yEh0s9k5wuUas+d9sT5lQNiUMKcB+alt+Mda8GU7uVU=; b=R4uOmY/hNTkXg+nEo9GW 9a1K4wJTvbzMoQXWAmxtkn+cP9+zURM/7qjcogzefJ/slGiyggMiDGcICSWXlJW/To6js5Rvl9Jtz Ko5khzI3ywNL25kcEjEpvIOF4mW1NLeRMGN5fC9RmRVVoR6scZIU71vqAmwDgS/hL0WDuuaqIrjBt ZYOZ0ACSDGFXMaWK1YUUar22VQJoPOptA7RZykJpygcVP372SXVO7Id8L2Zausga39DxqgVuJy0ak BLBiW1rDyOzK/PmyPOeFyX5sCA8iQtk0hoRj0WDp9+4zC2pp3llVgfMTtUJITogu4rNbF3FKjskxM 3yTFP8Jt1c767w==; From: Janneke Nieuwenhuizen Date: Mon, 8 Apr 2024 18:46:47 +0000 Message-ID: <598ea1a4860dd21a0b6a5bfad1d80cc9f6591a92.1712600307.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 From: Timothy Sample * doc/local.mk ($(srcdir)/doc/stamp-vti): New rule (overriding one provided by Automake). Co-authored-by: Janneke Nieuwenhuizen Change-Id: If44965e9a3ecfb45865c58ee7a558951be8d15ae --- doc/local.mk | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/doc/local.mk b/doc/local.mk index 8df003b891..5f014b9c3d 100644 --- a/doc/local.mk +++ b/doc/local.mk @@ -5,6 +5,7 @@ # Copyright © 2016 Taylan Ulrich Bayırlı/Kammer # Copyright © 2016, 2018 Mathieu Lirzin # Copyright © 2018, 2021 Julien Lepiller +# Copyright © 2019 Timothy Sample # # This file is part of GNU Guix. # @@ -247,3 +248,22 @@ $(srcdir)/%D%/guix-daemon.1: guix-daemon$(EXEEXT) endif 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 \ + 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