From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id iExWOYWcH2Zy5AAAqHPOHw:P1 (envelope-from ) for ; Wed, 17 Apr 2024 11:55:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id iExWOYWcH2Zy5AAAqHPOHw (envelope-from ) for ; Wed, 17 Apr 2024 11:55:18 +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=iEI8NQED; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1713347717; 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=MhHY04uxLV0WTTKnYE3iau0XCscxWbzEGZlawrxhJj0=; b=K9brjkJHPcYA/AKOiuiIQD7qpY24N77I/nlljJcuk/f6ok40GB5gQ60/+jN9eIYMYi9SO2 5l2ahljyWqUKMoQJEAW3uYpjQlRJM18GEBcAIvFZVT+RImJ8Eor6Ioqs/uoqIzdb41wxwY A+N+/9xiJDbCXcC2tayP0K0HixbOn35eO5aR41Gs9jvV3k7+bpLCpA9mTRm4+rYhz3NWr8 0SgVkFuTX5YPgQ4wDpTYKxI8LyvT7NcZfI4eD4B0fhdHHTU8/ZY7iS4xdluHbDgY2yygJj qj2X0mcc1PYMZd8hiZ/AyzcSfw+OZhwql2CoRUphvo8hViiZXRJKFeoQzP2Qsg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1713347717; a=rsa-sha256; cv=none; b=AIG7M6KslQldvIXI7wBbMqUgO85i1lBmRd62ZSi+dDnOvGM8WC4wDMFJczuv/xP2rgKPuc FvCudz945X/DhxtNtydkImW2WKeY1F1OjIKHQK57TOXAWmQ0E/WvgxJxBzXo8pwl/5WoAL PiRgTLQPZsO68rcReC8Mjxxv3Mio5zc1OgtLzRD7O9mJwjX/cbH+zz4o8y4HmbYgBDRPN4 Jur3hj5CahrJpG5l8i77b9Ms1ffbjC2Pa3jp26Ka98MjWzQ+3O8unqw7ovI3/ASGFPMrsE 3l8jykDgHGWFVjwSdvPAZkyiHDLxToLx7u47N3yf+sCJ3b2akBiB2AJWNLm5AA== 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=iEI8NQED; 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"; dmarc=pass (policy=none) header.from=gnu.org 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 AA04A1DF72 for ; Wed, 17 Apr 2024 11:55:17 +0200 (CEST) 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 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.58 X-Spam-Score: -5.58 X-Migadu-Queue-Id: AA04A1DF72 X-Migadu-Scanner: mx12.migadu.com X-TUID: OT3yBcjFSKcP * 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 -- 2.41.0