From: Janneke Nieuwenhuizen <janneke@gnu.org>
To: 70380@debbugs.gnu.org
Subject: [bug#70380] [PATCH v4 3/6] maint: Cater for running `make dist' from tarball.
Date: Wed, 17 Apr 2024 21:08:47 +0200 [thread overview]
Message-ID: <b08c1af94ea36b341ba2ccb91d5a6341a48a4745.1713379858.git.janneke@gnu.org> (raw)
In-Reply-To: <cover.1713379858.git.janneke@gnu.org>
* Makefile.am: Use in_git_p conditional 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 | 60 ++++++++++++++++++++++++++++++++---------------------
1 file changed, 36 insertions(+), 24 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index ca3fa0a693..af08bc546f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -955,6 +955,20 @@ 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.
+if in_git_p
+
+# 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.
@@ -969,20 +983,20 @@ 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: doc-pot-update
-dist-hook: gen-ChangeLog gen-AUTHORS gen-tarball-version
+ ifeq ($(MAKECMDGOALS),dist)
+$(warning Not using Git, tarball will likely be irreproducible!)
+ endif # MAKECMDGOALS dist
+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
@@ -994,27 +1008,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
next prev parent reply other threads:[~2024-04-17 19:10 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-14 9:56 [bug#70380] [PATCH 0/3] Reproducible `make dist' tarball: Avoid override stamp-N warnings Janneke Nieuwenhuizen
2024-04-14 9:59 ` [bug#70380] [PATCH 1/3] maint: Generate doc/version[-LANG].texi using `mdate-from-git.scm' Janneke Nieuwenhuizen
2024-04-14 9:59 ` [bug#70380] [PATCH 2/3] Revert "maint: Generate 'doc/version-LANG.texi' reproducibly." Janneke Nieuwenhuizen
2024-04-14 9:59 ` [bug#70380] [PATCH 3/3] Revert "maint: Generate 'doc/version.texi' reproducibly." Janneke Nieuwenhuizen
2024-04-15 14:27 ` [bug#70380] [PATCH v2 0/3] Reproducible `make dist' tarball: Avoid override stamp-N warnings Janneke Nieuwenhuizen
2024-04-15 14:27 ` [bug#70380] [PATCH v2 1/3] maint: Generate doc/version[-LANG].texi using `mdate-from-git.scm' Janneke Nieuwenhuizen
2024-04-15 14:27 ` [bug#70380] [PATCH v2 2/3] Revert "maint: Generate 'doc/version-LANG.texi' reproducibly." Janneke Nieuwenhuizen
2024-04-15 14:27 ` [bug#70380] [PATCH v2 3/3] Revert "maint: Generate 'doc/version.texi' reproducibly." Janneke Nieuwenhuizen
2024-04-16 7:33 ` [bug#70380] [PATCH v2 0/3] Reproducible `make dist' tarball: Avoid override stamp-N warnings pelzflorian (Florian Pelz)
2024-04-16 7:38 ` pelzflorian (Florian Pelz)
2024-04-17 8:10 ` Janneke Nieuwenhuizen
2024-04-17 9:53 ` [bug#70380] [PATCH v3 0/4] " Janneke Nieuwenhuizen
2024-04-17 9:53 ` [bug#70380] [PATCH v3 1/4] maint: Cater for running `make dist' from tarball Janneke Nieuwenhuizen
2024-04-17 15:37 ` pelzflorian (Florian Pelz)
2024-04-17 19:02 ` Janneke Nieuwenhuizen
2024-04-17 9:53 ` [bug#70380] [PATCH v3 2/4] maint: Generate doc/version[-LANG].texi using `mdate-from-git.scm' Janneke Nieuwenhuizen
2024-04-17 9:53 ` [bug#70380] [PATCH v3 3/4] Revert "maint: Generate 'doc/version-LANG.texi' reproducibly." Janneke Nieuwenhuizen
2024-04-17 9:53 ` [bug#70380] [PATCH v3 4/4] Revert "maint: Generate 'doc/version.texi' reproducibly." Janneke Nieuwenhuizen
2024-04-17 19:08 ` [bug#70380] [PATCH v4 0/6] Reproducible `make dist' tarball: Avoid override stamp-N warnings Janneke Nieuwenhuizen
2024-04-17 19:08 ` [bug#70380] [PATCH v4 1/6] maint: Resurrect running `make' from a tarball Janneke Nieuwenhuizen
2024-04-17 19:08 ` [bug#70380] [PATCH v4 2/6] maint: Support `make doc-po-update' from tarball Janneke Nieuwenhuizen
2024-04-18 12:01 ` pelzflorian (Florian Pelz)
2024-04-18 18:50 ` Janneke Nieuwenhuizen
2024-04-19 11:34 ` pelzflorian (Florian Pelz)
2024-04-19 14:47 ` bug#70380: " Janneke Nieuwenhuizen
2024-04-17 19:08 ` Janneke Nieuwenhuizen [this message]
2024-04-17 19:08 ` [bug#70380] [PATCH v4 4/6] maint: Generate doc/version[-LANG].texi using `mdate-from-git.scm' Janneke Nieuwenhuizen
2024-04-17 19:08 ` [bug#70380] [PATCH v4 5/6] Revert "maint: Generate 'doc/version-LANG.texi' reproducibly." Janneke Nieuwenhuizen
2024-04-17 19:08 ` [bug#70380] [PATCH v4 6/6] Revert "maint: Generate 'doc/version.texi' reproducibly." Janneke Nieuwenhuizen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b08c1af94ea36b341ba2ccb91d5a6341a48a4745.1713379858.git.janneke@gnu.org \
--to=janneke@gnu.org \
--cc=70380@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.