From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id sHjWGf07FGZuPQAAqHPOHw:P1 (envelope-from ) for ; Mon, 08 Apr 2024 20:48:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id sHjWGf07FGZuPQAAqHPOHw (envelope-from ) for ; Mon, 08 Apr 2024 20:48:29 +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=cDKz6iDO; 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=1712602109; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: 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=uTv80dTKFheU8HPXeV49hSlByFv/4lLiU0/fzsESt7I=; b=paD2TYhZ1SQz0/9dV/H8d+nENsoWEmCNK88eIQEsB6CQht1KtcZhxEFkMWGbxDd2QrKUsQ rl17kxi4whqtBdymJi9AiFwmKXLRFUUy8o/hKCG7tpFuIsLxnboo4uisVLD5TGJ/4GDNlc 6HVk7ReB40RqvNMado0Ny7xjfkcqBBr2Aq73opOtuwCNmUeiqZRApsoEphHH6MNu5vsh6n cmCdtfXoO1Ft3viLp/rTYZANSqdt/OIPtj4dZ2uWZFPIDaCzqnHlA3cfHHNVcLZYPcdnXx DBOas0vWMMQC0OtYX30fQih7tygALtbS2QEzXPusSEIu9EEUO0RzcwJ7nGdqfA== 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=cDKz6iDO; 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=1712602109; a=rsa-sha256; cv=none; b=k53T5LtMmTUJkjD1b/elorojdSSUWBrmuEcngt+cPNpyptIT6AbLazjj8Nk3nOJD8mXMmf 6pVVR54Ms5lA919IH+hywvbs/q86U3mGekALHW+p76uUPlpyt6vWhGYHnSqy+29WqHcZee Sn7jPH8qvwBdwkQzmZpta3IP2dUDRNy48jd8DXQedkMxn1YoTsZrJnGREssuvZvkC6l6w8 kFto7Qz5ZbELQgHkaG9oKXy4szUxLFY0HiLKIWunXl/BE430ms3NihJFPoQyK5fUnbdoqs HYOAdGl2/YXtMC0Ub3xuiFV2liidwjPisO+HmX5X+ZA15/Acu64NS/+sMp8flg== 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 32C30399A0 for ; Mon, 08 Apr 2024 20:48:29 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtu2E-00046q-2X; Mon, 08 Apr 2024 14:48: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 1rtu2C-00043y-EL for guix-patches@gnu.org; Mon, 08 Apr 2024 14:48: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 1rtu2C-00057C-5p for guix-patches@gnu.org; Mon, 08 Apr 2024 14:48:00 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rtu2J-0005YK-N9 for guix-patches@gnu.org; Mon, 08 Apr 2024 14:48:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70169] [PATCH v3 13/13] maint: Ensure generated file reproducibility for dist. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 08 Apr 2024 18:48:07 +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.171260207121118 (code B ref 70169); Mon, 08 Apr 2024 18:48:07 +0000 Received: (at 70169) by debbugs.gnu.org; 8 Apr 2024 18:47:51 +0000 Received: from localhost ([127.0.0.1]:47678 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtu22-0005UQ-J0 for submit@debbugs.gnu.org; Mon, 08 Apr 2024 14:47:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55126) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtu1z-0005Sr-96 for 70169@debbugs.gnu.org; Mon, 08 Apr 2024 14:47:47 -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 1rtu1m-00054k-De; Mon, 08 Apr 2024 14:47:34 -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=uTv80dTKFheU8HPXeV49hSlByFv/4lLiU0/fzsESt7I=; b=cDKz6iDO2D7VDAnCay/G zgDfYOEzTXHs4RCd4A1Q14GuPQRnGANdcsH5aIpxo+XGBgtxrRo+SpI6HQ61znGx5+FNTKYWWTsd6 TX8kAWd0GRFSz1QejLO26YsLexdP333HR3OHxJ4RZRNK2Lii/PASSdddRlqGpXsXU+kqV3RjH2FpA PNOECjbcMS3GScF7xSVePOQgDfyS2ISNjGa42nHxhnOjv+pyEajeVus1lVR9vUY1ZK3eWBgccvlXa /nfbxmZdjcwL9vxkxlZlWtQTWY6AJN4RQRYl8OPjS5F0DIcuq1ErbvSvAtQIeqVJ/5S3MLrNzPxGX HtLsJ0oNC1tQBQ==; From: Janneke Nieuwenhuizen Date: Mon, 8 Apr 2024 18:46:56 +0000 Message-ID: <0e305324621bdf2c04a6770d37f15efa85dcdb07.1712600307.git.janneke@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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: 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-Migadu-Spam-Score: -5.57 X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: -5.57 X-Migadu-Queue-Id: 32C30399A0 X-TUID: UCNjtSKMkOg0 * doc/local.mk (doc-clean): New target. (DIST_CONFIGURE_FLAGS): New variable. (auto-clean): Use them in new target. * Makefile.am (dist-doc-pot-update): Use it in new target. (dist): Change to depend on it to clean possibly stale files, instead of doc-pot-update directly. Add a toplevel check to ensure that Autotools cache is up to date. Change-Id: I2ff2d88db9fe1e708ab65e33e1f3d7ecee882cb4 --- Makefile.am | 28 +++++++++++++++++++++++++--- doc/local.mk | 29 +++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index 7af88b2988..5f0809ee00 100644 --- a/Makefile.am +++ b/Makefile.am @@ -954,9 +954,31 @@ guix-binary.%.tar.xz: cp "$$tarball" "$@.tmp" ; mv "$@.tmp" "$@" -# The dependency on doc-pot-update is to generate the .pot files, which are -# not checked in. -dist: doc-pot-update +# Assert that Autotools cache is up to date with Git, by checking +# PACKAGE_VERSION against HEAD. Indented to get past Automake. + ifeq ($(MAKECMDGOALS),dist) + git_version = $(shell build-aux/git-version-gen .tarball-version) + ifneq ($(PACKAGE_VERSION),$(git_version)) + $(warning Autotools cache out of date.) + $(info Autotools cache version: $(PACKAGE_VERSION).) + $(info Git version: $(git_version).) + $(info Please run ./bootstrap && ./configure $(DIST_CONFIGURE_FLAGS)) + ifneq ($(GUIX_ALLOW_IRREPRODUCIBLE_TARBALL),yes) + $(error Cannot create reproducible tarball) + else + $(warning Tarball will be irreproducible; distdir will not get removed!) + endif + endif + endif + +# 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 gen-tarball-version dist-hook: assert-no-store-file-names diff --git a/doc/local.mk b/doc/local.mk index 72f80bb511..f6d6640546 100644 --- a/doc/local.mk +++ b/doc/local.mk @@ -291,3 +291,32 @@ $(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 + +# Delete all Autotools-generated files and rerun configure to ensure +# a clean cache and distributing reproducible versions. +auto-clean: maintainer-clean-vti doc-clean + rm -f ABOUT-NLS INSTALL + rm -f aclocal.m4 configure libtool Makefile.in + git clean -fdx -- '.am*' build-aux m4 po + rm -f guile + rm -f guix-daemon nix/nix-daemon/guix_daemon-guix-daemon.o +# Automake fails if guix-cookbook-LANG.texi stubs are missing; running +# autoreconf -vif is not enough. + ./bootstrap +# The dependency chain for the guix-cookbook-LANG.texi was cut on purpose; +# they must be deleted to ensure a rebuild. + rm -f $(filter-out %D%/guix.texi %D%/guix-cookbook.texi, $(info_TEXINFOS)) + ./configure $(DIST_CONFIGURE_FLAGS) + +# Delete all generated doc files to ensure a clean cache and distributing +# reproducible versions. +doc-clean: + rm -f $(srcdir)/doc/*.1 + rm -f $(srcdir)/doc/stamp* + rm -f $(DOT_FILES:%.dot=%.png) + rm -f $(DOT_VECTOR_GRAPHICS) + rm -f doc/images/coreutils-size-map.eps -- 2.41.0