[PATCH 0/7] Reproducible `make dist' tarball in defiance of Autotools and Gettext

  • Done
  • quality assurance status badge
Details
3 participants
  • Janneke Nieuwenhuizen
  • Ludovic Courtès
  • pelzflorian (Florian Pelz)
Owner
unassigned
Submitted by
Janneke Nieuwenhuizen
Severity
normal
J
J
Janneke Nieuwenhuizen wrote on 3 Apr 21:08 +0200
(address . guix-patches@gnu.org)
cover.1712165977.git.janneke@gnu.org
Hi,

debacle inspired me to resurrect and finish my patch set for creating a
reproducible source tarball for Guix, i.e., finally have `make dist' be
reproducible (when run from Git). I've been using a version of these patches
in simpler projects for some years now and stole one from Timothy Samplet's
Gash project.

Autotools and Gettext still make it harder than necessary to do reproducible
(responsible?) computing, which is especially sad given the fact that the
Reproducible Builds project recently had their 10th birthday

Gettext tooling embeds timestamps found in the file-system, fails to respect
SOURCE_DATE_EPOCH, and lacks options like `--pot-creation-date' so that we
have to resort to SED to fixup. The caching of all sorts of information, in
separate build stages, also doesn't help.

To create a reproducible source tarball, having a reproducible build
environment is a prerequitite, so this would have to be recorded too.
Using this patch set, I created a tarball doing something like

Toggle snippet (7 lines)
guix pull --commit=1dbe492b993a7629df3b35146ce0272b52913776
guix shell
bootstrap && ./configure --localstatedir=/var --sysconfdir=/etc && make dist
guix hash guix-1.3.0.57425-80a228.tar.gz
0mk59ay5k2dxmjni9fx4i8qyfhvlgxbhqzsjpg2pbw381nskkxbj

and I've uploaded it to


Who can reproduce it...and WDYT?

(I've also pushed this patch set to `wip-tarball', as a slight difference
may already produce another tarball).

Greetings,
Janneke

Janneke Nieuwenhuizen (6):
maint: Cater for running `make dist' from a worktree.
maint: Use reproducible timestamps and name for tarball.
maint: Help help2man generate reproducible man-pages.
maint: Generate 'doc/version-LANG.texi' reproducibly.
maint: Use reproducible Git timestamp for POT-Creation-Date.
maint: Ensure generated file reproducibility for dist.

Timothy Sample (1):
maint: Generate 'doc/version.texi' reproducibly.

Makefile.am | 18 ++++++++++++++---
doc/local.mk | 54 +++++++++++++++++++++++++++++++++++++++++++++++++
po/doc/local.mk | 16 +++++++++++----
3 files changed, 81 insertions(+), 7 deletions(-)


base-commit: df64d48e6f9f648044aa5279c045b8d6f7bee604
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 3 Apr 21:11 +0200
[PATCH 1/7] maint: Cater for running `make dist' from a worktree.
(address . 70169@debbugs.gnu.org)
bafaaf24acd7bfeb249a1378eda096e3e9936afb.1712165977.git.janneke@gnu.org
* Makefile.am (gen-ChangeLog): Check for existance of `.git', rather than it
being a directory.
(gen-AUTHORS): Likewise.

Change-Id: I1b7f8cc147084c1804deb7be9d36e5eeda2599cb
---
Makefile.am | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/Makefile.am b/Makefile.am
index 1c5688ac13..2b5e145095 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -972,7 +972,7 @@ gen-tarball-version:
echo $(VERSION) > "$(distdir)/.tarball-version"
gen-ChangeLog:
- $(AM_V_GEN)if test -d .git; then \
+ $(AM_V_GEN)if test -e .git; then \
$(top_srcdir)/build-aux/gitlog-to-changelog \
> $(distdir)/ChangeLog.tmp; \
rm -f $(distdir)/ChangeLog; \
@@ -980,7 +980,7 @@ gen-ChangeLog:
fi
gen-AUTHORS:
- $(AM_V_GEN)if test -d .git; then \
+ $(AM_V_GEN)if test -e .git; then \
rm -f "$(distdir)/AUTHORS"; \
$(top_builddir)/pre-inst-env "$(GUILE)" \
"$(top_srcdir)/build-aux/generate-authors.scm" \
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 3 Apr 21:11 +0200
[PATCH 2/7] maint: Use reproducible timestamps and name for tarball.
(address . 70169@debbugs.gnu.org)
05e6677d56a3a23ae8526cc56c14c7de33a8254a.1712165977.git.janneke@gnu.org
* Makefile.am (gen-tarball-version): Add reproducible timestamp to tarball.
(am__tar): Use it in new variable, overriding the Automake default.
(GZIP_ENV): New variable, overriding the Automake default.

Change-Id: Iea5c2f80eaf24b2f2d80e651c73c348231de8d63
---
Makefile.am | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)

Toggle diff (41 lines)
diff --git a/Makefile.am b/Makefile.am
index 2b5e145095..c33d69ed9f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,7 +7,7 @@
# Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
# Copyright © 2017 Leo Famulari <leo@famulari.name>
# Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
-# Copyright © 2017, 2020, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+# Copyright © 2017, 2020, 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
# Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
# Copyright © 2018 Nikita <nikita@n0.is>
# Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
@@ -970,6 +970,7 @@ $(top_srcdir)/.version: config.status
gen-tarball-version:
echo $(VERSION) > "$(distdir)/.tarball-version"
+ git show HEAD --format=%ct --no-patch > $(distdir)/.tarball-timestamp
gen-ChangeLog:
$(AM_V_GEN)if test -e .git; then \
@@ -1002,6 +1003,17 @@ dist-with-updated-version:
# Release management.
#
+# Reproducible tarball
+GZIP_ENV = --no-name
+# Be friendly to Debian; avoid using EPOCH
+am__tar = $${TAR-tar} \
+ --sort=name \
+ --mode=go=rX,u+rw,a-s \
+ --mtime=@$$(cat "$$tardir"/.tarball-timestamp) \
+ --owner=0 --group=0 --numeric-owner \
+ -cf - \
+ "$$tardir"
+
releasedir = release-$(PACKAGE_VERSION)
PACKAGE_FULL_TARNAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 3 Apr 21:11 +0200
[PATCH 3/7] maint: Generate 'doc/version.texi' reproducibly.
(address . 70169@debbugs.gnu.org)(name . Timothy Sample)(address . samplet@ngyro.com)
285de866686d0e8ffdbae88b4cc5e06d5fee69ca.1712165977.git.janneke@gnu.org
From: Timothy Sample <samplet@ngyro.com>

* doc/local.mk ($(srcdir)/doc/stamp-vti): New rule (overriding one provided
by Automake).

Co-authored-by: Janneke Nieuwenhuizen <janneke@gnu.org>

Change-Id: If44965e9a3ecfb45865c58ee7a558951be8d15ae
---
doc/local.mk | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (37 lines)
diff --git a/doc/local.mk b/doc/local.mk
index 8df003b891..4c8c852657 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -5,6 +5,7 @@
# Copyright © 2016 Taylan Ulrich Bay?rl?/Kammer <taylanbayirli@gmail.com>
# Copyright © 2016, 2018 Mathieu Lirzin <mthl@gnu.org>
# Copyright © 2018, 2021 Julien Lepiller <julien@lepiller.eu>
+# Copyright © 2019 Timothy Sample <samplet@ngyro.com>
#
# 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.
+override $(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
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 3 Apr 21:11 +0200
[PATCH 4/7] maint: Help help2man generate reproducible man-pages.
(address . 70169@debbugs.gnu.org)
880afb1dcf4c19f493aaacfeb30912a3453e3be1.1712165977.git.janneke@gnu.org
* doc/local.mk (SOURCE_DATE_EPOCH): New exported variable.

Change-Id: I6636693695d5502657f1475d93d31949e0b0b39d
---
doc/local.mk | 3 +++
1 file changed, 3 insertions(+)

Toggle diff (16 lines)
diff --git a/doc/local.mk b/doc/local.mk
index 4c8c852657..99a7e84361 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -224,6 +224,9 @@ gen_man = \
$(HELP2MANFLAGS)
HELP2MANFLAGS = --source=GNU --info-page=$(PACKAGE_TARNAME)
+# help2man reproducibility
+SOURCE_DATE_EPOCH = $(shell git show HEAD --format=%ct --no-patch 2>/dev/null || echo 0)
+export SOURCE_DATE_EPOCH
$(srcdir)/%D%/guix.1: scripts/guix.in $(sub_commands_mans)
-$(AM_V_HELP2MAN)$(gen_man) --output="$@" `basename "$@" .1`
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 3 Apr 21:11 +0200
[PATCH 5/7] maint: Generate 'doc/version-LANG.texi' reproducibly.
(address . 70169@debbugs.gnu.org)
947bed93d2e2fec221fdec0d247f61912fb89567.1712165977.git.janneke@gnu.org
* 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 | 42 ++++++++++++++++++++++++++----------------
1 file changed, 26 insertions(+), 16 deletions(-)

Toggle diff (59 lines)
diff --git a/doc/local.mk b/doc/local.mk
index 99a7e84361..893c99e1b1 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -6,6 +6,7 @@
# Copyright © 2016, 2018 Mathieu Lirzin <mthl@gnu.org>
# Copyright © 2018, 2021 Julien Lepiller <julien@lepiller.eu>
# Copyright © 2019 Timothy Sample <samplet@ngyro.com>
+# Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
#
# This file is part of GNU Guix.
#
@@ -254,19 +255,28 @@ endif
# Reproducible tarball
-# Generate 'version.texi' reproducibly using metadata from Git rather
-# than using metadata from the filesystem.
-override $(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
+# 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
+override $(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 -p $$@ $$(srcdir)/doc/version$(3).texi
+endef
+
+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
J
J
Janneke Nieuwenhuizen wrote on 3 Apr 21:11 +0200
[PATCH 7/7] maint: Ensure generated file reproducibility for dist.
(address . 70169@debbugs.gnu.org)
80a2280ce7a14f1b8770dad24a230a569143d304.1712165977.git.janneke@gnu.org
* doc/local.mk (override $(srcdir)/doc/stamp-vti): New target override.
(doc-clean, man-clean): New targets.
(auto-clean): Depend on it in new target.
(DIST_CONFIGURE_FLAGS): New variable.
(dist-hook): Use them.

Change-Id: I7b8a3d9ef1e4a4eddb7c329a2c27f481a451b84b
---
doc/local.mk | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (31 lines)
diff --git a/doc/local.mk b/doc/local.mk
index 893c99e1b1..a8e59bb7e6 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -280,3 +280,24 @@ $(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
+
+dist: auto-clean
+auto-clean: maintainer-clean-vti doc-clean man-clean
+ rm -f ABOUT-NLS INSTALL
+ rm -f aclocal.m4 configure libtool Makefile.in
+ git clean -fdx -- build-aux
+ ./bootstrap
+ ./configure $(DIST_CONFIGURE_FLAGS)
+
+doc-clean:
+ rm -f $(srcdir)/doc/stamp*
+ rm -f $(DOT_FILES:%.dot=%.png)
+ rm -f $(filter-out %D%/guix.texi %D%/guix-cookbook.texi, $(info_TEXINFOS))
+ rm -f $(srcdir)/po/doc/*.pot $(srcdir)/po/guix/*.pot $(srcdir)/po/packages/*.pot
+
+man-clean:
+ rm -f $(srcdir)/doc/*.1
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 3 Apr 21:11 +0200
[PATCH 6/7] maint: Use reproducible Git timestamp for POT-Creation-Date.
(address . 70169@debbugs.gnu.org)
45e5e23d88c8846551c7493d3e9ab344dcb2f942.1712165977.git.janneke@gnu.org
* po/doc/local.mk (%D%/%.pot): Replace POT-Creation-Date using timestamp from
Git.
(%D%/guix-manual.pot): Likewise.

Change-Id: I1b7f8cc147084c1804deb7be9d36e5eeda2599cb
---
po/doc/local.mk | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)

Toggle diff (38 lines)
diff --git a/po/doc/local.mk b/po/doc/local.mk
index dd6ba30133..f68d67ec02 100644
--- a/po/doc/local.mk
+++ b/po/doc/local.mk
@@ -1,6 +1,7 @@
# GNU Guix --- Functional package management for GNU
# Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
# Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+# Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
#
# This file is part of GNU Guix.
#
@@ -44,12 +45,19 @@ POT_OPTIONS = \
--msgid-bugs-address "bug-guix@gnu.org"
%D%/%.pot: $(srcdir)/doc/%.texi
- $(AM_V_PO4A)$(PO4A_UPDATEPO) -M UTF-8 -f texinfo -m "$<" \
- -p "$@" $(POT_OPTIONS) && \
- touch $@
+ $(AM_V_PO4A)$(PO4A_UPDATEPO) -M UTF-8 -f texinfo -m "$<" \
+ -p "$@-t" $(POT_OPTIONS)
+ date=$$(git log --pretty=format:%ci -n 1 -- $< 2>/dev/null \
+ || echo $(SOURCE_DATE_EPOCH)) \
+ sed -ri -e "s,^(.POT-Creation-Date: )[^\]*,\1$$date," $@-t
+ mv $@-t $@
%D%/guix-manual.pot: %D%/guix.pot %D%/contributing.pot
- msgcat $^ > $@
+ msgcat $^ > $@-t
+ date=$$(git log --pretty=format:%ci -n 1 -- $< 2>/dev/null \
+ || echo $(SOURCE_DATE_EPOCH)) \
+ sed -ri "s,^(.POT-Creation-Date: )[^\]*,\1$$date," $@-t
+ mv $@-t $@
doc-pot-update: %D%/guix-manual.pot %D%/guix-cookbook.pot
.PHONY: doc-pot-update
--
2.41.0
L
L
Ludovic Courtès wrote on 3 Apr 22:25 +0200
Re: [bug#70169] [PATCH 5/7] maint: Generate 'doc/version-LANG.texi' reproducibly.
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)(address . 70169@debbugs.gnu.org)
87o7aqxkgw.fsf@gnu.org
Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

Toggle quote (26 lines)
> +# 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
> +override $(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 -p $$@ $$(srcdir)/doc/version$(3).texi
> +endef
> +
> +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))))

Maybe we could drop ‘i’ and instead create ‘samp-fr’, ‘stamp-de’, and so
on? That is, ‘version.texi-from-git’ would take 2 arguments instead of 3.

(That’s really a minor issue though.)

Ludo’.
L
L
Ludovic Courtès wrote on 3 Apr 22:26 +0200
Re: [bug#70169] [PATCH 6/7] maint: Use reproducible Git timestamp for POT-Creation-Date.
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)
87jzlexkdr.fsf@gnu.org
Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

Toggle quote (5 lines)
> + date=$$(git log --pretty=format:%ci -n 1 -- $< 2>/dev/null \
> + || echo $(SOURCE_DATE_EPOCH)) \
> + sed -ri -e "s,^(.POT-Creation-Date: )[^\]*,\1$$date," $@-t
> + mv $@-t $@

Nitpick: I'd use double quotes to avoid bad surprises:

date="$$(git log …)"
mv "$@-t" "$@"
J
J
Janneke Nieuwenhuizen wrote on 3 Apr 22:33 +0200
Re: [bug#70169] [PATCH 5/7] maint: Generate 'doc/version-LANG.texi' reproducibly.
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 70169@debbugs.gnu.org)
87frw2p4oz.fsf@gnu.org
Ludovic Courtès writes:

Toggle quote (10 lines)
> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> +$(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))))
>
> Maybe we could drop ‘i’ and instead create ‘samp-fr’, ‘stamp-de’, and so
> on? That is, ‘version.texi-from-git’ would take 2 arguments instead of 3.

I don't think so, or, I wouldn't know how to do that. The stamp-N is
created by Automake's magic. They are distributed together with the
version-LANG.texi files.

If Automake would have used stamp-LANG, this would have been much
easier, we could probably have used stem (%) instead of this hairy
function.

Toggle quote (2 lines)
> (That’s really a minor issue though.)

Ok, but if it's somehow possible, I agree it would be nice.

Greetings,
Janneke

--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
J
J
Janneke Nieuwenhuizen wrote on 3 Apr 22:36 +0200
Re: [bug#70169] [PATCH 6/7] maint: Use reproducible Git timestamp for POT-Creation-Date.
(name . Ludovic Courtès)(address . ludo@gnu.org)
87bk6qp4je.fsf@gnu.org
Ludovic Courtès writes:

Toggle quote (13 lines)
> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> + date=$$(git log --pretty=format:%ci -n 1 -- $< 2>/dev/null \
>> + || echo $(SOURCE_DATE_EPOCH)) \
>> + sed -ri -e "s,^(.POT-Creation-Date: )[^\]*,\1$$date," $@-t
>> + mv $@-t $@
>
> Nitpick: I'd use double quotes to avoid bad surprises:
>
> date="$$(git log …)"
> …
> mv "$@-t" "$@"

Makes sense, thanks.
L
L
Ludovic Courtès wrote on 3 Apr 22:39 +0200
Re: [bug#70169] [PATCH 5/7] maint: Generate 'doc/version-LANG.texi' reproducibly.
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)(address . 70169@debbugs.gnu.org)
87a5maxjt3.fsf@gnu.org
Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

Toggle quote (7 lines)
> * 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

[...]

Toggle quote (6 lines)
> +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))))

Also, not sure why but I get this:

Toggle snippet (10 lines)
make[2]: Entering directory '/home/ludo/src/guix'
Makefile:7389: warning: overriding recipe for target 'doc/stamp-vti'
Makefile:5111: warning: ignoring old recipe for target 'doc/stamp-vti'
Makefile:7390: warning: overriding recipe for target 'override'
Makefile:7389: warning: ignoring old recipe for target 'override'
Makefile:7390: warning: overriding recipe for target 'doc/stamp-1'
Makefile:5176: warning: ignoring old recipe for target 'doc/stamp-1'
[…]

Ludo’.
J
J
Janneke Nieuwenhuizen wrote on 3 Apr 22:43 +0200
(name . Ludovic Courtès)(address . ludo@gnu.org)
875xwyp483.fsf@gnu.org
Ludovic Courtès writes:

[cc: Timothy Samplet who created an early version of this patch]

Toggle quote (28 lines)
> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> * 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
>
> [...]
>
>> +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))))
>
> Also, not sure why but I get this:
>
> make[2]: Entering directory '/home/ludo/src/guix'
> Makefile:7389: warning: overriding recipe for target 'doc/stamp-vti'
> Makefile:5111: warning: ignoring old recipe for target 'doc/stamp-vti'
> Makefile:7390: warning: overriding recipe for target 'override'
> Makefile:7389: warning: ignoring old recipe for target 'override'
> Makefile:7390: warning: overriding recipe for target 'doc/stamp-1'
> Makefile:5176: warning: ignoring old recipe for target 'doc/stamp-1'
> […]

Yes, sadly that's expected, and couldn't figure out how to avoid this.
Any ideas would be greatly appreciated. Automake will just create those
targets, and it seems we must override exactly those. May Timothy has
an idea?
L
L
Ludovic Courtès wrote on 3 Apr 22:45 +0200
Re: [bug#70169] [PATCH 2/7] maint: Use reproducible timestamps and name for tarball.
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)(address . 70169@debbugs.gnu.org)
875xwyxjje.fsf@gnu.org
Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

Toggle quote (3 lines)
> +# Reproducible tarball
> +GZIP_ENV = --no-name

Looks like Automake can feel the defiance:

Toggle snippet (4 lines)
Makefile.am:1007: warning: user variable 'GZIP_ENV' defined here ...
/gnu/store/lynhxxaygrbw0z05bwsc5c3i5r5qdv38-automake-1.16.5/share/automake-1.16/am/distdir.am: ... overrides Automake variable 'GZIP_ENV' defined here

Probably nothing to worry about, though IWBN if we could silence it.

Ludo’.
J
J
Janneke Nieuwenhuizen wrote on 3 Apr 22:49 +0200
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 70169@debbugs.gnu.org)
87zfuanpdj.fsf@gnu.org
Ludovic Courtès writes:

Toggle quote (5 lines)
> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> +# Reproducible tarball
>> +GZIP_ENV = --no-name

Hmm, should we add `--best' here too?

Toggle quote (7 lines)
> Looks like Automake can feel the defiance:
>
> Makefile.am:1007: warning: user variable 'GZIP_ENV' defined here ...
> /gnu/store/lynhxxaygrbw0z05bwsc5c3i5r5qdv38-automake-1.16.5/share/automake-1.16/am/distdir.am: ... overrides Automake variable 'GZIP_ENV' defined here
>
> Probably nothing to worry about, though IWBN if we could silence it.

Yes, indeed... (Help! :)

Janneke
L
L
Ludovic Courtès wrote on 3 Apr 22:57 +0200
Re: [bug#70169] [PATCH 0/7] Reproducible `make dist' tarball in defiance of Autotools and Gettext
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)(address . 70169@debbugs.gnu.org)
87wmpew4e7.fsf@gnu.org
Hi!

Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

Toggle quote (7 lines)
> debacle inspired me to resurrect and finish my patch set for creating a
> reproducible source tarball for Guix, i.e., finally have `make dist' be
> reproducible (when run from Git). I've been using a version of these patches
> in simpler projects for some years now and stole one from Timothy Samplet's
> Gash project.

Yay, kudos to you and Timothy!

Toggle quote (10 lines)
> Autotools and Gettext still make it harder than necessary to do reproducible
> (responsible?) computing, which is especially sad given the fact that the
> Reproducible Builds project recently had their 10th birthday
> <https://reproducible-builds.org/_lfs/presentations/2023-05-27-R-B-the-first-10-years/#/>.
>
> Gettext tooling embeds timestamps found in the file-system, fails to respect
> SOURCE_DATE_EPOCH, and lacks options like `--pot-creation-date' so that we
> have to resort to SED to fixup. The caching of all sorts of information, in
> separate build stages, also doesn't help.

Sadness indeed. Hopefully things will improve in the coming weeks, now
that there’s an impetus.

Toggle quote (10 lines)
> To create a reproducible source tarball, having a reproducible build
> environment is a prerequitite, so this would have to be recorded too.
> Using this patch set, I created a tarball doing something like
>
> guix pull --commit=1dbe492b993a7629df3b35146ce0272b52913776
> guix shell
> bootstrap && ./configure --localstatedir=/var --sysconfdir=/etc && make dist
> guix hash guix-1.3.0.57425-80a228.tar.gz
> 0mk59ay5k2dxmjni9fx4i8qyfhvlgxbhqzsjpg2pbw381nskkxbj

I applied the whole series on top of
df64d48e6f9f648044aa5279c045b8d6f7bee604 (the ‘base-commit’ at the
bottom of your message). Thus I got the same content as you but with a
different commit ID.

“make dist” gave me guix-1.3.0.57425-9f4a4a.tar.gz. The name indeed
corresponds to the tip of my tree:

Toggle snippet (15 lines)
$ guix hash guix-1.3.0.57425-9f4a4a.tar.gz
0z3c4f8g6rsi9n0j8cwzwvw4bc59srg6bl3jj8yi60hbr9vrz5ql
$ git log |head
commit 9f4a4adfa778b281b794b61014e06dad98b6c945
Author: Janneke Nieuwenhuizen <janneke@gnu.org>
Date: Wed Apr 3 21:11:09 2024 +0200

maint: Ensure generated file reproducibility for dist.
* doc/local.mk (override $(srcdir)/doc/stamp-vti): New target override.
(doc-clean, man-clean): New targets.
(auto-clean): Depend on it in new target.
(DIST_CONFIGURE_FLAGS): New variable.

But as a result, I get a different hash, and since the directory in the
tarball has a different name, ‘diffoscope’ isn’t very helpful.

There’s at least one relevant difference in the gzip metadata:

Toggle snippet (10 lines)
--- guix-1.3.0.57425-9f4a4a.tar.gz
+++ /tmp/guix-1.3.0.57425-80a228.tar.gz
??? filetype from file(1)
? @@ -1 +1 @@
? -gzip compressed data, from Unix, original size modulo 2^32 208138240 gzip compressed data, rese
rved method, ASCII, extra field, encrypted, from FAT filesystem (MS-DOS, OS/2, NT)
? +gzip compressed data, from Unix, original size modulo 2^32 222504960 gzip compressed data, rese
rved method, ASCII, has CRC, was "", has comment, encrypted, from FAT filesystem (MS-DOS, OS/2, NT

(Your tarball has a CRC and comment, mine doesn’t.)

Maybe we’ll have to iterate once you’ve pushed a first version, so we
can truly build the same thing. Or we should push the branch somewhere
(or use the one from https://data.qa.guix.gnu.org/ once it’s been
created).

Thanks!

Ludo’.
J
J
Janneke Nieuwenhuizen wrote on 3 Apr 23:04 +0200
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 70169@debbugs.gnu.org)
87ttkinooh.fsf@gnu.org
Ludovic Courtès writes:

Hello,

Toggle quote (11 lines)
> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> The recent XZ-utils <https://www.openwall.com/lists/oss-security/2024/03/29/4>
>> debacle inspired me to resurrect and finish my patch set for creating a
>> reproducible source tarball for Guix, i.e., finally have `make dist' be
>> reproducible (when run from Git). I've been using a version of these patches
>> in simpler projects for some years now and stole one from Timothy Samplet's
>> Gash project.
>
> Yay, kudos to you and Timothy!

\o/

Toggle quote (13 lines)
>> Autotools and Gettext still make it harder than necessary to do reproducible
>> (responsible?) computing, which is especially sad given the fact that the
>> Reproducible Builds project recently had their 10th birthday
>> <https://reproducible-builds.org/_lfs/presentations/2023-05-27-R-B-the-first-10-years/#/>.
>>
>> Gettext tooling embeds timestamps found in the file-system, fails to respect
>> SOURCE_DATE_EPOCH, and lacks options like `--pot-creation-date' so that we
>> have to resort to SED to fixup. The caching of all sorts of information, in
>> separate build stages, also doesn't help.
>
> Sadness indeed. Hopefully things will improve in the coming weeks, now
> that there’s an impetus.

Yes, that would be nice. With more people joining the effort, it could
be fixed brilliantly, in no time :)

Toggle quote (15 lines)
>> To create a reproducible source tarball, having a reproducible build
>> environment is a prerequitite, so this would have to be recorded too.
>> Using this patch set, I created a tarball doing something like
>>
>> guix pull --commit=1dbe492b993a7629df3b35146ce0272b52913776
>> guix shell
>> bootstrap && ./configure --localstatedir=/var --sysconfdir=/etc && make dist
>> guix hash guix-1.3.0.57425-80a228.tar.gz
>> 0mk59ay5k2dxmjni9fx4i8qyfhvlgxbhqzsjpg2pbw381nskkxbj
>
> I applied the whole series on top of
> df64d48e6f9f648044aa5279c045b8d6f7bee604 (the ‘base-commit’ at the
> bottom of your message). Thus I got the same content as you but with a
> different commit ID.

Yeah..., that's why I pushed `wip-tarball'. We even look at the
committer's timestamp (not author, as that could be quite old).

Toggle quote (3 lines)
> “make dist” gave me guix-1.3.0.57425-9f4a4a.tar.gz. The name indeed
> corresponds to the tip of my tree:

[..]

Toggle quote (17 lines)
> But as a result, I get a different hash, and since the directory in the
> tarball has a different name, ‘diffoscope’ isn’t very helpful.
>
> There’s at least one relevant difference in the gzip metadata:
>
> --- guix-1.3.0.57425-9f4a4a.tar.gz
> +++ /tmp/guix-1.3.0.57425-80a228.tar.gz
> ??? filetype from file(1)
> ? @@ -1 +1 @@
> ? -gzip compressed data, from Unix, original size modulo 2^32 208138240 gzip compressed data, rese
> rved method, ASCII, extra field, encrypted, from FAT filesystem (MS-DOS, OS/2, NT)
> ? +gzip compressed data, from Unix, original size modulo 2^32 222504960 gzip compressed data, rese
> rved method, ASCII, has CRC, was "", has comment, encrypted, from FAT filesystem (MS-DOS, OS/2, NT
>
>
> (Your tarball has a CRC and comment, mine doesn’t.)

I believe this is a red herring. I saw this all day whenever one file
had a difference...

Toggle quote (3 lines)
> Maybe we’ll have to iterate once you’ve pushed a first version, so we
> can truly build the same thing. Or we should push the branch somewhere

I boldly pushed `origin/wip-tarball', you may try that :)

Be sure to git diff between your tip and origin/wip-tarball to ascertain
I didn't place easter eggs (just kidding).

Toggle quote (3 lines)
> (or use the one from https://data.qa.guix.gnu.org/ once it’s been
> created).

Thanks a lot for trying!

Greetings,
Janneke
L
L
Ludovic Courtès wrote on 3 Apr 23:28 +0200
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)(address . 70169@debbugs.gnu.org)
87msqaw2yw.fsf@gnu.org
Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

Toggle quote (2 lines)
> I boldly pushed `origin/wip-tarball', you may try that :)

Silly me. ?

First try: I wasn’t running in a UTF-8 locale (in ‘guix shell -CP’) so I
got things like this:

Toggle snippet (13 lines)
? ??? guix-1.3.0.57425-80a228/AUTHORS
? ? @@ -9,35 +9,35 @@
? ?
? ? 10255 Ricardo Wurmus <rekado@elephly.net>
? ? 7293 Nicolas Goaziou <mail@nicolasgoaziou.fr>
? ? 5991 Efraim Flashner <efraim@flashner.co.il>
? ? 4033 Maxim Cournoyer <maxim.cournoyer@gmail.com>
? ? 3124 Tobias Geerinckx-Rice <me@tobias.gr>
? ? 2356 Marius Bakke <marius@gnu.org>
? ? - 2306 Ludovic Court??s <ludo@gnu.org>
? ? + 2306 Ludovic Courtès <ludo@gnu.org>

Then there’s prolly a timezone issue with the generated ChangeLog:

Toggle snippet (7 lines)
? ? -2024-02-19 Troy Figiel <troy@troyfigiel.com>
? ? +2024-02-20 Troy Figiel <troy@troyfigiel.com>
? ?
? ? gnu: Add go-github-com-coocood-freecache.
? ? * gnu/packages/golang-xyz.scm (go-github-com-coocood-freecache): New variable.

The best thing to do is probably to drop ‘ChangeLog’ generation (maybe
‘AUTHORS’ too) and just add a text inviting users to check the Git log.

Then I must have stale ‘help2man’ byproducts:

Toggle snippet (9 lines)
? ??? guix-1.3.0.57425-80a228/doc/guix-challenge.1
? ? @@ -1,11 +1,11 @@
? ? .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
? ? .TH GUIX "1" "April 2024" "GNU" "User Commands"
? ? .SH NAME
? ? -guix \- manual page for guix challenge (GNU Guix) 1.3.0.51884-370f8f3
? ? +guix \- manual page for guix challenge (GNU Guix) 1.3.0.57425-80a228

Lots of differences in Info files:

Toggle snippet (15 lines)
? ??? guix-1.3.0.57425-80a228/doc/guix-cookbook.fr.info
? ?? xxd not available in path. Falling back to Python hexlify.
? ? @@ -1,6 +1,8216 @@
? ? 5468697320697320677569782d636f6f6b626f6f6b2e66722e696e666f2c2070
? ? 726f6475636564206279206d616b65696e666f2076657273696f6e20362e3820
? ? -66726f6d0a677569782d636f6f6b626f6f6b2e66722e746578692e0a0a0a1f0a
? ? -546167205461626c653a0a1f0a456e6420546167205461626c650a0a1f0a4c6f
? ? -63616c205661726961626c65733a0a636f64696e673a207574662d380a456e64
? ? -3a0a
? ? +66726f6d0a677569782d636f6f6b626f6f6b2e66722e746578692e0a0a436f70
? ? +79726967687420c2a920323031392c2032303232205269636172646f20577572
? ? +6d75730a436f7079726967687420c2a920323031392045667261696d20466c61
? ? +73686e65720a436f7079726967687420c2a9203230313920506965727265204e

Something with PO files not being regenerated (?):

Toggle snippet (32 lines)
? ??? guix-1.3.0.57425-80a228/po/packages/en@boldquot.po
? ? @@ -1,11 +1,11 @@
? ? # English translations for guix package.
? ? -# Copyright (C) 2020 the authors of Guix (msgids)
? ? +# Copyright (C) 2024 the authors of Guix (msgids)
? ? # This file is distributed under the same license as the guix package.
? ? -# Automatically generated, 2020.
? ? +# Automatically generated, 2024.
? ? #
? ? # All this catalog "translates" are quotation characters.
? ? # The msgids must be ASCII and therefore cannot contain real quotation
? ? # characters, only substitutes like grave accent (0x60), apostrophe (0x27)
? ? # and double quote (0x22). These substitutes look strange; see
? ? # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
? ? #
? ? @@ -26,118 +26,85 @@
? ? # transliterated to 0x22.
? ? #
? ? # This catalog furthermore displays the text between the quotation marks in
? ? # bold face, assuming the VT100/XTerm escape sequences.
? ? #
? ? msgid ""
? ? msgstr ""
? ? -"Project-Id-Version: guix 1.2.0\n"
? ? +"Project-Id-Version: guix 1.3.0.57419-5a2b40\n"
? ? "Report-Msgid-Bugs-To: bug-guix@gnu.org\n"
? ? -"POT-Creation-Date: 2020-11-22 20:33+0100\n"
? ? -"PO-Revision-Date: 2020-11-22 20:33+0100\n"
? ? +"POT-Creation-Date: 2024-04-03 09:04+0200\n"
? ? +"PO-Revision-Date: 2024-04-03 09:04+0200\n"

and possibly a timezone issue for POT files:

Toggle snippet (14 lines)
? ??? guix-1.3.0.57425-80a228/po/packages/guix-packages.pot
? ? @@ -4,15 +4,15 @@
? ? # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
? ? #
? ? #, fuzzy
? ? msgid ""
? ? msgstr ""
? ? "Project-Id-Version: guix 1.3.0.57425-80a228\n"
? ? "Report-Msgid-Bugs-To: bug-guix@gnu.org\n"
? ? -"POT-Creation-Date: 2024-04-03 21:14+0000\n"
? ? +"POT-Creation-Date: 2024-04-03 20:56+0200\n"
? ? "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"

Note that in ‘guix shell -CP’ I had no TZ and LC_* variable set and
/etc/timezone is missing.

That’s it for today!

Ludo’.
J
J
Janneke Nieuwenhuizen wrote on 4 Apr 07:12 +0200
Re: [bug#70169] [PATCH 6/7] maint: Use reproducible Git timestamp for POT-Creation-Date.
(name . Ludovic Courtès)(address . ludo@gnu.org)
87jzldognk.fsf@gnu.org
Ludovic Courtès writes:

Toggle quote (13 lines)
> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> + date=$$(git log --pretty=format:%ci -n 1 -- $< 2>/dev/null \
>> + || echo $(SOURCE_DATE_EPOCH)) \
>> + sed -ri -e "s,^(.POT-Creation-Date: )[^\]*,\1$$date," $@-t
>> + mv $@-t $@
>
> Nitpick: I'd use double quotes to avoid bad surprises:
>
> date="$$(git log …)"
> …
> mv "$@-t" "$@"

Makes sense, thanks.
J
J
Janneke Nieuwenhuizen wrote on 6 Apr 23:16 +0200
Re: [bug#70169] [PATCH 0/7] Reproducible `make dist' tarball in defiance of Autotools and Gettext
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 70169@debbugs.gnu.org)
874jcejip6.fsf@gnu.org
Ludovic Courtès writes:

Hello!

Toggle quote (6 lines)
> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> I boldly pushed `origin/wip-tarball', you may try that :)
>
> Silly me. ?

Yeah, when you see it, it's obvious :)

Toggle quote (4 lines)
> First try: I wasn’t running in a UTF-8 locale (in ‘guix shell -CP’) so I
> got things like this:
>
> ? ??? guix-1.3.0.57425-80a228/AUTHORS
[..]
Toggle quote (3 lines)
> ? ? - 2306 Ludovic Court??s <ludo@gnu.org>
> ? ? + 2306 Ludovic Courtès <ludo@gnu.org>

Ah, not good.

Toggle quote (8 lines)
> Then there’s prolly a timezone issue with the generated ChangeLog:
>
> ? ? -2024-02-19 Troy Figiel <troy@troyfigiel.com>
> ? ? +2024-02-20 Troy Figiel <troy@troyfigiel.com>
> ? ?
> ? ? gnu: Add go-github-com-coocood-freecache.
> ? ? * gnu/packages/golang-xyz.scm (go-github-com-coocood-freecache): New variable.

Yes!

Toggle quote (3 lines)
> The best thing to do is probably to drop ‘ChangeLog’ generation (maybe
> ‘AUTHORS’ too) and just add a text inviting users to check the Git log.

I think AUTHORS and ChangeLog are amongst the simplest of our worries.
Setting TZ=UTC0 and LC_ALL=en_US.UTF-8 should address these.

Toggle quote (10 lines)
> Then I must have stale ‘help2man’ byproducts:
>
> ? ??? guix-1.3.0.57425-80a228/doc/guix-challenge.1
> ? ? @@ -1,11 +1,11 @@
> ? ? .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
> ? ? .TH GUIX "1" "April 2024" "GNU" "User Commands"
> ? ? .SH NAME
> ? ? -guix \- manual page for guix challenge (GNU Guix) 1.3.0.51884-370f8f3
> ? ? +guix \- manual page for guix challenge (GNU Guix) 1.3.0.57425-80a228

That looks like a dependency or parallelism problem. I made the
auto-clean dependency more strict and clean even more Autotools caching.

Toggle quote (5 lines)
> Lots of differences in Info files:
> ? ??? guix-1.3.0.57425-80a228/doc/guix-cookbook.fr.info
> ? ?? xxd not available in path. Falling back to Python hexlify.
> ? ? @@ -1,6 +1,8216 @@

Yeah, there's also something with the (building of) the cookbooks. I'm
hoping the strict auto-clean dependency fixes this too.

Toggle quote (8 lines)
> Something with PO files not being regenerated (?):
>
> ? ??? guix-1.3.0.57425-80a228/po/packages/en@boldquot.po
> ? ? @@ -1,11 +1,11 @@
> ? ? # English translations for guix package.
> ? ? -# Copyright (C) 2020 the authors of Guix (msgids)
> ? ? +# Copyright (C) 2024 the authors of Guix (msgids)

Hmm. I've added a naive xgettext.scm wrapper to take care of this.

Toggle quote (3 lines)
> Note that in ‘guix shell -CP’ I had no TZ and LC_* variable set and
> /etc/timezone is missing.

Okay, thanks for the hint. "Of course", you'll have to use something
like

guix shell -CP -m manifest.scm fontconfig font-ghostscript \
graphviz imagemagick texlive-bin

to make it succeed now. When running in a container from a worktree
you'll also have to expose the master .git directory.

I fixed some image generation rules that would silently fail without
graphviz or imagemagic, or when fonts cannot be found.

Toggle quote (2 lines)
> That’s it for today!

Thanks, find a V2 soon.

Greetings,
Janneke

--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
J
J
Janneke Nieuwenhuizen wrote on 6 Apr 23:17 +0200
[PATCH v2 00/12] Reproducible `make dist' tarball in defiance of Autotools and Gettext
(address . 70169@debbugs.gnu.org)
cover.1712437365.git.janneke@gnu.org
Thanks for your support and to all who helped testing!

V2 brings

* Use `override' with GZIP_ENV and am__tar to avoid warnings,
* Add --best to GZIP_ENV (i.e., keep using --best),
* Generate AUTHORS and ChangeLog reproducibly by setting TZ and LC_ALL,
* Use double quotes for file-name variables in amended pot rules,
* Generate POT files reproducibly using a new, naive xgettext.scm script,
* Remove %%CreationDate from generated EPS files,
* Reset CreationDate in generated PDF files,
* Fix dist -> auto-clean -> doc-pot-update dependency,
* Remove more Autotools caches (.am*, m4/, po/),
* Document the expected override warnings for stamp-vti, stamp-N, and
* A toplevel assert that Autotools cache is up-to-date with Git HEAD.

I have reset wip-tarball and uploaded

Toggle snippet (4 lines)
guix hash guix-1.3.0.57430-933766.tar.gz
01v37vp7hcsfbjsrl22wb01aw6incrxn905rmg54l1svz351nri0

Note that you'll need an environment with something like

Toggle snippet (4 lines)
guix shell -CP -m manifest.scm fontconfig font-ghostscript graphviz \
imagemagick texlive-bin

Phew! Almost starting to wonder why didn't I name the initial patch series `A
somewhat more reproducible tarball...' ;)

Greetings,
Janneke

Janneke Nieuwenhuizen (11):
maint: Cater for running `make dist' from a worktree.
maint: Use reproducible timestamps and name for tarball.
maint: Help help2man generate reproducible man-pages.
maint: Generate AUTHORS and ChangeLog reproducibly.
maint: Generate 'doc/version-LANG.texi' reproducibly.
maint: Use xgettext.scm wrapper to create .PO files reproducibly.
maint: Use reproducible Git timestamp for POT-Creation-Date.
maint: Remove %%CreationDate from generated EPS files
maint: Avoid PNG and PDF generation to fail silently.
maint: Reset CreationDate metadata on generated PDFs.
maint: Ensure generated file reproducibility for dist.

Timothy Sample (1):
maint: Generate 'doc/version.texi' reproducibly.

Makefile.am | 51 ++++++++++++++++++++---
build-aux/xgettext.scm | 87 +++++++++++++++++++++++++++++++++++++++
doc/local.mk | 92 ++++++++++++++++++++++++++++++++++++++----
po/doc/local.mk | 16 ++++++--
po/guix/Makevars | 7 +++-
po/packages/Makevars | 10 ++++-
6 files changed, 242 insertions(+), 21 deletions(-)
create mode 100755 build-aux/xgettext.scm


base-commit: df64d48e6f9f648044aa5279c045b8d6f7bee604
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 6 Apr 23:17 +0200
[PATCH v2 01/12] maint: Cater for running `make dist' from a worktree.
(address . 70169@debbugs.gnu.org)
3f5f29f3a3f29a9e09a9275e8c10ef8b8a4cc779.1712437365.git.janneke@gnu.org
* Makefile.am (gen-ChangeLog): Check for existance of `.git', rather than it
being a directory.
(gen-AUTHORS): Likewise.

Change-Id: I1b7f8cc147084c1804deb7be9d36e5eeda2599cb
---
Makefile.am | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/Makefile.am b/Makefile.am
index 1c5688ac13..2b5e145095 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -972,7 +972,7 @@ gen-tarball-version:
echo $(VERSION) > "$(distdir)/.tarball-version"
gen-ChangeLog:
- $(AM_V_GEN)if test -d .git; then \
+ $(AM_V_GEN)if test -e .git; then \
$(top_srcdir)/build-aux/gitlog-to-changelog \
> $(distdir)/ChangeLog.tmp; \
rm -f $(distdir)/ChangeLog; \
@@ -980,7 +980,7 @@ gen-ChangeLog:
fi
gen-AUTHORS:
- $(AM_V_GEN)if test -d .git; then \
+ $(AM_V_GEN)if test -e .git; then \
rm -f "$(distdir)/AUTHORS"; \
$(top_builddir)/pre-inst-env "$(GUILE)" \
"$(top_srcdir)/build-aux/generate-authors.scm" \
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 6 Apr 23:17 +0200
[PATCH v2 02/12] maint: Use reproducible timestamps and name for tarball.
(address . 70169@debbugs.gnu.org)
64f881308ffd375845708caf00ced3879cb578e4.1712437365.git.janneke@gnu.org
* Makefile.am (gen-tarball-version): Add reproducible timestamp to tarball.
(am__tar): Use it in new variable, overriding the Automake default.
(GZIP_ENV): New variable, overriding the Automake default.
---
Makefile.am | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)

Toggle diff (41 lines)
diff --git a/Makefile.am b/Makefile.am
index 2b5e145095..a5e49bc406 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,7 +7,7 @@
# Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
# Copyright © 2017 Leo Famulari <leo@famulari.name>
# Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
-# Copyright © 2017, 2020, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+# Copyright © 2017, 2020, 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
# Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
# Copyright © 2018 Nikita <nikita@n0.is>
# Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
@@ -970,6 +970,7 @@ $(top_srcdir)/.version: config.status
gen-tarball-version:
echo $(VERSION) > "$(distdir)/.tarball-version"
+ git show HEAD --format=%ct --no-patch > $(distdir)/.tarball-timestamp
gen-ChangeLog:
$(AM_V_GEN)if test -e .git; then \
@@ -1002,6 +1003,17 @@ dist-with-updated-version:
# Release management.
#
+# Reproducible tarball
+override GZIP_ENV = --best --no-name
+# Be friendly to Debian; avoid using EPOCH
+override am__tar = $${TAR-tar} \
+ --sort=name \
+ --mode=go=rX,u+rw,a-s \
+ --mtime=@$$(cat "$$tardir"/.tarball-timestamp) \
+ --owner=0 --group=0 --numeric-owner \
+ -cf - \
+ "$$tardir"
+
releasedir = release-$(PACKAGE_VERSION)
PACKAGE_FULL_TARNAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 6 Apr 23:17 +0200
[PATCH v2 04/12] maint: Help help2man generate reproducible man-pages.
(address . 70169@debbugs.gnu.org)
34915f43ed2e8b7ae99c3fe2fd65e7b97ff8f57b.1712437365.git.janneke@gnu.org
* doc/local.mk (SOURCE_DATE_EPOCH): New exported variable.

Change-Id: I6636693695d5502657f1475d93d31949e0b0b39d
---
doc/local.mk | 3 +++
1 file changed, 3 insertions(+)

Toggle diff (16 lines)
diff --git a/doc/local.mk b/doc/local.mk
index 5f014b9c3d..017686137a 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -224,6 +224,9 @@ gen_man = \
$(HELP2MANFLAGS)
HELP2MANFLAGS = --source=GNU --info-page=$(PACKAGE_TARNAME)
+# help2man reproducibility
+SOURCE_DATE_EPOCH = $(shell git show HEAD --format=%ct --no-patch 2>/dev/null || echo 0)
+export SOURCE_DATE_EPOCH
$(srcdir)/%D%/guix.1: scripts/guix.in $(sub_commands_mans)
-$(AM_V_HELP2MAN)$(gen_man) --output="$@" `basename "$@" .1`
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 6 Apr 23:17 +0200
[PATCH v2 05/12] maint: Generate AUTHORS and ChangeLog reproducibly.
(address . 70169@debbugs.gnu.org)
535e975e124a2c9f82cf683728ca25fcf30f7948.1712437365.git.janneke@gnu.org
* Makefile.am (gen-ChangeLog): Set LC_ALL=en_US.UTF-8 TZ=UTC0.
(gen-AUTHORS): Likewise.

Change-Id: I109ceffdf07b8dde6385b6b509366c47564c9f31
---
Makefile.am | 4 ++++
1 file changed, 4 insertions(+)

Toggle diff (24 lines)
diff --git a/Makefile.am b/Makefile.am
index a5e49bc406..7af88b2988 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -974,6 +974,8 @@ gen-tarball-version:
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; \
@@ -983,6 +985,8 @@ gen-ChangeLog:
gen-AUTHORS:
$(AM_V_GEN)if test -e .git; then \
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"; \
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 6 Apr 23:17 +0200
[PATCH v2 06/12] maint: Generate 'doc/version-LANG.texi' reproducibly.
(address . 70169@debbugs.gnu.org)
dc9b0c95813c735bca8de5e0bbcea0fd63eb526a.1712437365.git.janneke@gnu.org
* 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(-)

Toggle diff (63 lines)
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 <mthl@gnu.org>
# Copyright © 2018, 2021 Julien Lepiller <julien@lepiller.eu>
# Copyright © 2019 Timothy Sample <samplet@ngyro.com>
+# Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
#
# 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
J
J
Janneke Nieuwenhuizen wrote on 6 Apr 23:17 +0200
[PATCH v2 07/12] maint: Use xgettext.scm wrapper to create .PO files reproducibly.
(address . 70169@debbugs.gnu.org)
83a27ee0460886ac9802caa34addd8d111acf68a.1712437365.git.janneke@gnu.org
* build-aux/xgettext.scm: New script.
* po/guix/Makevars (XGETTEXT): Set it.
(XGETTEXT_OPTIONS): Add --xgettext option to `real' xgettext.
* po/packages/Makevars (XGETTEXT): Set it.
(XGETTEXT_OPTIONS): Add --xgettext option to `real' xgettext.

Change-Id: I71b6b843970090f765f46ac346b92a346560e3f0
---
build-aux/xgettext.scm | 87 ++++++++++++++++++++++++++++++++++++++++++
po/guix/Makevars | 7 +++-
po/packages/Makevars | 10 ++++-
3 files changed, 101 insertions(+), 3 deletions(-)
create mode 100755 build-aux/xgettext.scm

Toggle diff (145 lines)
diff --git a/build-aux/xgettext.scm b/build-aux/xgettext.scm
new file mode 100755
index 0000000000..e8a970f251
--- /dev/null
+++ b/build-aux/xgettext.scm
@@ -0,0 +1,87 @@
+#! /bin/sh
+# -*-scheme-*-
+build_aux=$(dirname $0)
+srcdir=$build_aux/..
+exec guile --no-auto-compile -L $srcdir -C $srcdir -e main -s "$0" "$@"
+!#
+
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;;
+;;; This program is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; This program is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+;;;; Commentary:
+;;;
+;;; This script provides an xgettext wrapper to (re)set POT-Creation-Date from
+;;; a Git timestamp. Test doing something like:
+;;;
+;;; build-aux/xgettext.scm --files-from=po/guix/POTFILES.in --default-domain=test
+;;;
+;;;; Code:
+
+(use-modules (srfi srfi-1)
+ (srfi srfi-26)
+ (ice-9 curried-definitions)
+ (ice-9 match)
+ (ice-9 popen)
+ (ice-9 rdelim)
+ (guix build utils))
+
+(define ((option? name) option)
+ (string-prefix? name option))
+
+(define (get-option args name)
+ (let ((option (find (option? name) args)))
+ (and option
+ (substring option (string-length name)))))
+
+(define (pipe-command command)
+ (let* ((port (apply open-pipe* OPEN_READ command))
+ (output (read-string port)))
+ (close-port port)
+ output))
+
+
+;;;
+;;; Entry point.
+;;;
+(define (main args)
+ ;; Cater for being run in a container.
+ (setenv "LC_ALL" "en_US.UTF-8")
+ (setenv "TZ" "UTC0")
+ (fluid-set! %default-port-encoding #f)
+ (let* ((files-from (get-option args "--files-from="))
+ (default-domain (get-option args "--default-domain="))
+ (directory (or (get-option args "--directory=") "."))
+ (xgettext (or (get-option args "--xgettext=") "xgettext"))
+ (xgettext-args (filter (negate (option? "--xgettext=")) args))
+ (command (match xgettext-args
+ ((xgettext.scm args ...)
+ `(,xgettext ,@args))))
+ (result (apply system* command))
+ (status (/ result 256)))
+ (if (or (not (zero? status))
+ (not files-from))
+ (exit status)
+ (let* ((text (with-input-from-file files-from read-string))
+ (lines (string-split text #\newline))
+ (files (filter (negate (cute string-prefix? "#" <>)) lines))
+ (files (map (cute string-append directory "/" <>) files))
+ (git-command `("git" "log" "--pretty=format:%ci" "-n1" ,@files))
+ (timestamp (pipe-command git-command))
+ (po-file (string-append default-domain ".po")))
+ (when (string-null? timestamp)
+ (exit 1))
+ (substitute* po-file
+ (("(\"POT-Creation-Date: )[^\\]*" all header)
+ (string-append header timestamp)))))))
diff --git a/po/guix/Makevars b/po/guix/Makevars
index 88a4e8c7bc..4cfd0f431d 100644
--- a/po/guix/Makevars
+++ b/po/guix/Makevars
@@ -5,6 +5,10 @@ DOMAIN = guix
subdir = po/guix
top_builddir = ../..
+# We use our xgettext.scm wrapper to produce .PO files reproducibly using a
+# timestamp from Git.
+XGETTEXT:=$(top_srcdir)/build-aux/xgettext.scm
+
# These options get passed to xgettext. We want to catch standard
# gettext uses, and SRFI-35 error condition messages. In C++ code
# we use 'n_' instead of the more usual 'N_' for no-ops.
@@ -14,7 +18,8 @@ XGETTEXT_OPTIONS = \
--keyword=message \
--keyword=description \
--keyword=synopsis \
- --keyword=n_
+ --keyword=n_ \
+ --xgettext=$(XGETTEXT_)
COPYRIGHT_HOLDER = the authors of Guix (msgids)
diff --git a/po/packages/Makevars b/po/packages/Makevars
index 65912786d8..0ba4f1ba7e 100644
--- a/po/packages/Makevars
+++ b/po/packages/Makevars
@@ -6,12 +6,18 @@ DOMAIN = guix-packages
subdir = po/packages
top_builddir = ../..
+# We use our xgettext.scm wrapper to produce .PO files reproducibly using a
+# timestamp from Git. The `real' xgettext is passed as an option to
+# xgettext.scm
+XGETTEXT:=$(top_srcdir)/build-aux/xgettext.scm
+
# These options get passed to xgettext. We want to catch exclusively package
# synopses and descriptions.
XGETTEXT_OPTIONS = \
--language=Scheme --from-code=UTF-8 \
- --keyword=synopsis --keyword=description \
- --keyword=output-synopsis:2
+ --keyword=synopsis --keyword=description \
+ --keyword=output-synopsis:2 \
+ --xgettext=$(XGETTEXT_)
COPYRIGHT_HOLDER = the authors of Guix (msgids)
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 6 Apr 23:18 +0200
[PATCH v2 08/12] maint: Use reproducible Git timestamp for POT-Creation-Date.
(address . 70169@debbugs.gnu.org)
0761c8a153cb6e4e6144f57c2fa7eb0fc70c2950.1712437365.git.janneke@gnu.org
* po/doc/local.mk (%D%/%.pot): Replace POT-Creation-Date using timestamp from
Git.
(%D%/guix-manual.pot): Likewise.

Change-Id: I1b7f8cc147084c1804deb7be9d36e5eeda2599cb
---
po/doc/local.mk | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)

Toggle diff (38 lines)
diff --git a/po/doc/local.mk b/po/doc/local.mk
index dd6ba30133..77ec4721e3 100644
--- a/po/doc/local.mk
+++ b/po/doc/local.mk
@@ -1,6 +1,7 @@
# GNU Guix --- Functional package management for GNU
# Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
# Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+# Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
#
# This file is part of GNU Guix.
#
@@ -44,12 +45,19 @@ POT_OPTIONS = \
--msgid-bugs-address "bug-guix@gnu.org"
%D%/%.pot: $(srcdir)/doc/%.texi
- $(AM_V_PO4A)$(PO4A_UPDATEPO) -M UTF-8 -f texinfo -m "$<" \
- -p "$@" $(POT_OPTIONS) && \
- touch $@
+ $(AM_V_PO4A)$(PO4A_UPDATEPO) -M UTF-8 -f texinfo -m "$<" \
+ -p "$@-t" $(POT_OPTIONS)
+ date="$$(git log --pretty=format:%ci -n 1 -- $< 2>/dev/null \
+ || echo $(SOURCE_DATE_EPOCH))" \
+ sed -ri -e "s,^(.POT-Creation-Date: )[^\]*,\1$$date," "$@-t"
+ mv "$@-t" "$@"
%D%/guix-manual.pot: %D%/guix.pot %D%/contributing.pot
- msgcat $^ > $@
+ msgcat $^ > "$@-t"
+ date="$$(git log --pretty=format:%ci -n 1 -- $< 2>/dev/null \
+ || echo $(SOURCE_DATE_EPOCH))" \
+ sed -ri "s,^(.POT-Creation-Date: )[^\]*,\1$$date," "$@-t"
+ mv "$@-t" "$@"
doc-pot-update: %D%/guix-manual.pot %D%/guix-cookbook.pot
.PHONY: doc-pot-update
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 6 Apr 23:17 +0200
[PATCH v2 03/12] maint: Generate 'doc/version.texi' reproducibly.
(address . 70169@debbugs.gnu.org)(name . Timothy Sample)(address . samplet@ngyro.com)
8dd765c01a81bb5105fa32bc71bbb71181664609.1712437365.git.janneke@gnu.org
From: Timothy Sample <samplet@ngyro.com>

* doc/local.mk ($(srcdir)/doc/stamp-vti): New rule (overriding one provided
by Automake).

Co-authored-by: Janneke Nieuwenhuizen <janneke@gnu.org>

Change-Id: If44965e9a3ecfb45865c58ee7a558951be8d15ae
---
doc/local.mk | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (37 lines)
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 <taylanbayirli@gmail.com>
# Copyright © 2016, 2018 Mathieu Lirzin <mthl@gnu.org>
# Copyright © 2018, 2021 Julien Lepiller <julien@lepiller.eu>
+# Copyright © 2019 Timothy Sample <samplet@ngyro.com>
#
# 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
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 6 Apr 23:18 +0200
[PATCH v2 09/12] maint: Remove %%CreationDate from generated EPS files
(address . 70169@debbugs.gnu.org)
109c05ead54c3e48a8df27794c8df56149343a37.1712437365.git.janneke@gnu.org
* doc/local.mk (.dot.eps, png.eps): Remove %%CreationDate. Split single shell
command into separate recipe lines, prefixed by $(AM_V_at).

Change-Id: I5a03485c19c72f0c46411815c51290e52a8e5399
---
doc/local.mk | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

Toggle diff (27 lines)
diff --git a/doc/local.mk b/doc/local.mk
index c355bec8d7..60e36091ce 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -152,12 +152,16 @@ DOT_OPTIONS = \
mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
.dot.eps:
- $(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
- mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
+ $(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
+ $(AM_V_at)grep -v ^%%CreationDate: "$(srcdir)/$@.tmp" > "$(srcdir)/$@.tmp2"
+ $(AM_V_at)rm -f "$(srcdir)/$@.tmp"
+ $(AM_V_at)mv "$(srcdir)/$@.tmp2" "$@"
.png.eps:
- $(AM_V_GEN)convert "$<" "$@-tmp.eps"; \
- mv "$@-tmp.eps" "$@"
+ $(AM_V_GEN)convert "$<" "$@-tmp.eps"
+ $(AM_V_at)grep -v ^%%CreationDate: "$@-tmp.eps" > "$@-tmp2.eps"
+ $(AM_V_at)rm -f "$@-tmp.eps"
+ $(AM_V_at)mv "$@-tmp2.eps" "$@"
# We cannot add new dependencies to `%D%/guix.pdf' & co. (info "(automake)
# Extending"). Using the `-local' rules is imperfect, because they may be
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 6 Apr 23:18 +0200
[PATCH v2 10/12] maint: Avoid PNG and PDF generation to fail silently.
(address . 70169@debbugs.gnu.org)
ad583386eca8a21b0cc9df040f4a44176660fa24.1712437365.git.janneke@gnu.org
* doc/local.mk (.dot.png): Split single shell command into separate recipe
lines, prefixed by $(AM_V_at).
(.dot.pdf): Likewise.

Change-Id: I41fb856bb73f947abd91361ed203132e939f3897
---
doc/local.mk | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Toggle diff (23 lines)
diff --git a/doc/local.mk b/doc/local.mk
index 60e36091ce..a0d94614d3 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -144,12 +144,12 @@ DOT_OPTIONS = \
-Nfontsize=9 -Nheight=.1 -Nwidth=.1
.dot.png:
- $(AM_V_DOT)$(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
- mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
+ $(AM_V_DOT)$(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
+ $(AM_V_at)mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
.dot.pdf:
- $(AM_V_DOT)$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
- mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
+ $(AM_V_DOT)$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
+ $(AM_V_at)mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
.dot.eps:
$(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 6 Apr 23:18 +0200
[PATCH v2 11/12] maint: Reset CreationDate metadata on generated PDFs.
(address . 70169@debbugs.gnu.org)
7d3e7ef4c6ecfa77a6b6c237165c148578443511.1712437365.git.janneke@gnu.org
* doc/local.mk (.dot.pdf): Create PDF in UTC0 and reset CreationDate metadata.

Change-Id: I3873ecdeec781c30874d53d032406cbe23922a25
---
doc/local.mk | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

Toggle diff (19 lines)
diff --git a/doc/local.mk b/doc/local.mk
index a0d94614d3..25741a5c88 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -148,7 +148,11 @@ DOT_OPTIONS = \
$(AM_V_at)mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
.dot.pdf:
- $(AM_V_DOT)$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
+ export TZ=UTC0; \
+ $(AM_V_DOT)$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
+ $(AM_V_at)sed -ri \
+ -e 's,(/CreationDate [(]D:)[0-9+]{14},\119700101000000,' \
+ "$(srcdir)/$@.tmp"
$(AM_V_at)mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
.dot.eps:
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 6 Apr 23:18 +0200
[PATCH v2 12/12] maint: Ensure generated file reproducibility for dist.
(address . 70169@debbugs.gnu.org)
933766d5b3574d509b917b80743b127370a61676.1712437365.git.janneke@gnu.org
* 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 | 29 ++++++++++++++++++++++++++---
doc/local.mk | 29 +++++++++++++++++++++++++++++
2 files changed, 55 insertions(+), 3 deletions(-)

Toggle diff (79 lines)
diff --git a/Makefile.am b/Makefile.am
index 7af88b2988..aac328b75e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -954,9 +954,32 @@ 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 `autoreconf -vif'.) #`
+ 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
+ $(MAKE) guix-daemon
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 25741a5c88..8ba1ce4668 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -294,3 +294,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
J
J
Janneke Nieuwenhuizen wrote on 7 Apr 10:57 +0200
[PATCH v2 13/12] doc: Use "dejavu sans" instead of "Helvetica" or "sans" in dot images.
(address . 70169@debbugs.gnu.org)
87msq5im7s.fsf@gnu.org
Janneke Nieuwenhuizen writes:

Toggle quote (5 lines)
> Note that you'll need an environment with something like
>
> guix shell -CP -m manifest.scm fontconfig font-ghostscript graphviz \
> imagemagick texlive-bin

Headsup: using the attached bonus patch the tarball reproduces for me
also without using a container, i.e., building it in

guix shell -CP -m manifest.scm fontconfig graphviz imagemagick texlive-bin

or

guix shell -m manifest.scm fontconfig graphviz imagemagick texlive-bin

now creates the same tarball for me.

Greetings,
Janneke
--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
P
P
pelzflorian (Florian Pelz) wrote on 7 Apr 15:54 +0200
Re: [bug#70169] [PATCH v2 04/12] maint: Help help2man generate reproducible man-pages.
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)(address . 70169@debbugs.gnu.org)
87sezxmg6y.fsf@pelzflorian.de
Hello Jan,

Janneke Nieuwenhuizen <janneke@gnu.org> writes:
Toggle quote (15 lines)
> diff --git a/doc/local.mk b/doc/local.mk
> index 5f014b9c3d..017686137a 100644
> --- a/doc/local.mk
> +++ b/doc/local.mk
> @@ -224,6 +224,9 @@ gen_man = \
> $(HELP2MANFLAGS)
>
> HELP2MANFLAGS = --source=GNU --info-page=$(PACKAGE_TARNAME)
> +# help2man reproducibility
> +SOURCE_DATE_EPOCH = $(shell git show HEAD --format=%ct --no-patch 2>/dev/null || echo 0)
> +export SOURCE_DATE_EPOCH
>
> $(srcdir)/%D%/guix.1: scripts/guix.in $(sub_commands_mans)
> -$(AM_V_HELP2MAN)$(gen_man) --output="$@" `basename "$@" .1`

Do I interpret correctly that “echo 0” is a fallback timestamp?

Looking at the now gone instructions from “git show
83c60bb0622440afe98930820186ddfa1e6e8b2f”, at that time, a timestamp of
1 was used for the tarball; I do not remember why. In
guix/scripts/pack.scm, 1 is used for squashfs and docker images.

Is 1 a better timestamp than 0?

Regards,
Florian
J
J
Janneke Nieuwenhuizen wrote on 7 Apr 16:06 +0200
(name . pelzflorian (Florian Pelz))(address . pelzflorian@pelzflorian.de)(address . 70169@debbugs.gnu.org)
87bk6li7wy.fsf@gnu.org
pelzflorian (Florian Pelz) writes:

Hello Florian,

Toggle quote (7 lines)
> Janneke Nieuwenhuizen <janneke@gnu.org> writes:
>> diff --git a/doc/local.mk b/doc/local.mk
>> +SOURCE_DATE_EPOCH = $(shell git show HEAD --format=%ct --no-patch 2>/dev/null || echo 0)
>> +export SOURCE_DATE_EPOCH
>
> Do I interpret correctly that “echo 0” is a fallback timestamp?

Yes.

Toggle quote (5 lines)
> Looking at the now gone instructions from “git show
> 83c60bb0622440afe98930820186ddfa1e6e8b2f”, at that time, a timestamp of
> 1 was used for the tarball; I do not remember why. In
> guix/scripts/pack.scm, 1 is used for squashfs and docker images.

That's probably because of build dependencies.

Toggle quote (2 lines)
> Is 1 a better timestamp than 0?

For files, using 1 is preferrable if it's not a source file. We use 1
for .go files, and 0 for .scm files, iirc. SOURCE_DATE_EPOCH is (only)
used for the date in the document. Without git, 0 is as good a guess
for a reproducible date for use in a document as any, I think.

Greetings,
Janneke

--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
P
P
pelzflorian (Florian Pelz) wrote on 7 Apr 17:20 +0200
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)(address . 70169@debbugs.gnu.org)
87h6gdci82.fsf@pelzflorian.de
Janneke Nieuwenhuizen <janneke@gnu.org> writes:
Toggle quote (11 lines)
> pelzflorian (Florian Pelz) writes:
>> Is 1 a better timestamp than 0?
>
> For files, using 1 is preferrable if it's not a source file. We use 1
> for .go files, and 0 for .scm files, iirc. SOURCE_DATE_EPOCH is (only)
> used for the date in the document. Without git, 0 is as good a guess
> for a reproducible date for use in a document as any, I think.
>
> Greetings,
> Janneke

Thank you for explaining. So this SOURCE_DATE_EPOCH applies to all the
generated files in doc/ but still 0 is fine, because noone warns if they
are not later than source files, IIUC.

Regards,
Florian
P
P
pelzflorian (Florian Pelz) wrote on 7 Apr 19:16 +0200
Re: [bug#70169] [PATCH v2 11/12] maint: Reset CreationDate metadata on generated PDFs.
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)(address . 70169@debbugs.gnu.org)
87cyr1f5zo.fsf@pelzflorian.de
Janneke Nieuwenhuizen <janneke@gnu.org> writes:
Toggle quote (12 lines)
> diff --git a/doc/local.mk b/doc/local.mk
> index a0d94614d3..25741a5c88 100644
> --- a/doc/local.mk
> +++ b/doc/local.mk
> @@ -148,7 +148,11 @@ DOT_OPTIONS = \
> $(AM_V_at)mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
>
> .dot.pdf:
> - $(AM_V_DOT)$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
> + export TZ=UTC0; \
> + $(AM_V_DOT)$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"

I see a non-fatal message here that

@echo " DOT " doc/images/bootstrap-graph.pdf;/bin/sh '/home/florian/src/guix/test70169/build-aux/missing' dot -Tpdf -Gratio=.9 -Gnodesep=.005 -Granksep=.00005 -Nfontsize=9 -Nheight=.1 -Nwidth=.1 < "doc/images/bootstrap-graph.dot" > "./doc/images/bootstrap-graph.pdf.tmp"
/bin/sh: line 2: @echo: command not found

Perhaps AM_V_DOT cannot be used after export TZ=UTC0;?


Toggle quote (7 lines)
> + $(AM_V_at)sed -ri \
> + -e 's,(/CreationDate [(]D:)[0-9+]{14},\119700101000000,' \
> + "$(srcdir)/$@.tmp"
> $(AM_V_at)mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
>
> .dot.eps:

Regards,
Florian
J
J
Janneke Nieuwenhuizen wrote on 7 Apr 19:38 +0200
(name . pelzflorian (Florian Pelz))(address . pelzflorian@pelzflorian.de)(address . 70169@debbugs.gnu.org)
87sezxdqdt.fsf@gnu.org
pelzflorian (Florian Pelz) writes:

Hi!

Toggle quote (24 lines)
> Janneke Nieuwenhuizen <janneke@gnu.org> writes:
>> diff --git a/doc/local.mk b/doc/local.mk
>> index a0d94614d3..25741a5c88 100644
>> --- a/doc/local.mk
>> +++ b/doc/local.mk
>> @@ -148,7 +148,11 @@ DOT_OPTIONS = \
>> $(AM_V_at)mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
>>
>> .dot.pdf:
>> - $(AM_V_DOT)$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
>> + export TZ=UTC0; \
>> + $(AM_V_DOT)$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
>
> I see a non-fatal message here that
>
> @echo " DOT " doc/images/bootstrap-graph.pdf;/bin/sh
> '/home/florian/src/guix/test70169/build-aux/missing' dot -Tpdf
> -Gratio=.9 -Gnodesep=.005 -Granksep=.00005 -Nfontsize=9 -Nheight=.1
> -Nwidth=.1 < "doc/images/bootstrap-graph.dot" >
> "./doc/images/bootstrap-graph.pdf.tmp"
> /bin/sh: line 2: @echo: command not found
>
> Perhaps AM_V_DOT cannot be used after export TZ=UTC0;?

Ah, that's not good. Apparently I ontly tested using V=2 in the end.

I believe this should fix it

Toggle diff (22 lines)
diff --git a/doc/local.mk b/doc/local.mk
index fffba409dc..0cdad3e58c 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -148,8 +148,8 @@ DOT_OPTIONS = \
$(AM_V_at)mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
.dot.pdf:
- export TZ=UTC0; \
- $(AM_V_DOT)$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
+ $(AM_V_DOT)export TZ=UTC0; \
+ $(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
$(AM_V_at)sed -ri \
-e 's,(/CreationDate \(D:).*\),\119700101000000,' \
"$(srcdir)/$@.tmp"

Greetings,
Janneke

--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com
J
J
Janneke Nieuwenhuizen wrote on 7 Apr 20:09 +0200
(name . pelzflorian (Florian Pelz))(address . pelzflorian@pelzflorian.de)(address . 70169@debbugs.gnu.org)
87msq5doyu.fsf@gnu.org
Janneke Nieuwenhuizen writes:

Hi again,

Toggle quote (3 lines)
> pelzflorian (Florian Pelz) writes:
>
>> Janneke Nieuwenhuizen <janneke@gnu.org> writes:
[..]
Toggle quote (6 lines)
>> Perhaps AM_V_DOT cannot be used after export TZ=UTC0;?
>
> Ah, that's not good. Apparently I ontly tested using V=2 in the end.
>
> I believe this should fix it

Come to think of it, as we're removeing CreationDate anyway, setting TZ
is quite unnecessary, and we can just do

.dot.pdf:
$(AM_V_DOT)$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
[..]

Thanks for looking into this!
L
L
Ludovic Courtès wrote on 8 Apr 11:23 +0200
Re: [bug#70169] [PATCH v2 04/12] maint: Help help2man generate reproducible man-pages.
(name . pelzflorian (Florian Pelz))(address . pelzflorian@pelzflorian.de)
87edbgrywv.fsf@gnu.org
Hello,

"pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> skribis:

Toggle quote (5 lines)
> Looking at the now gone instructions from “git show
> 83c60bb0622440afe98930820186ddfa1e6e8b2f”, at that time, a timestamp of
> 1 was used for the tarball; I do not remember why. In
> guix/scripts/pack.scm, 1 is used for squashfs and docker images.

In the store, a timestamp of 1 (not 0) is used. This is because there
are tools (among which ‘make’ IIRC) that behave differently when mtime
is zero.

For consistency and to be on the safe side, it’s probably a good idea to
do the same (as the fallback in this case).

Ludo’.
L
L
Ludovic Courtès wrote on 8 Apr 11:26 +0200
Re: [bug#70169] [PATCH 5/7] maint: Generate 'doc/version-LANG.texi' reproducibly.
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)(address . 70169@debbugs.gnu.org)
877ch8ryrr.fsf@gnu.org
Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

Toggle quote (20 lines)
> Ludovic Courtès writes:
>
>> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>>
>>> +$(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))))
>>
>> Maybe we could drop ‘i’ and instead create ‘samp-fr’, ‘stamp-de’, and so
>> on? That is, ‘version.texi-from-git’ would take 2 arguments instead of 3.
>
> I don't think so, or, I wouldn't know how to do that. The stamp-N is
> created by Automake's magic. They are distributed together with the
> version-LANG.texi files.
>
> If Automake would have used stamp-LANG, this would have been much
> easier, we could probably have used stem (%) instead of this hairy
> function.

Oh, I see. I didn't know there were internal uses of ‘stamp-N’.

Ludo’.
J
J
Janneke Nieuwenhuizen wrote on 8 Apr 11:40 +0200
Re: [bug#70169] [PATCH v2 04/12] maint: Help help2man generate reproducible man-pages.
(name . Ludovic Courtès)(address . ludo@gnu.org)
87bk6kdwev.fsf@gnu.org
Ludovic Courtès writes:

Hi,

Toggle quote (14 lines)
> "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> skribis:
>
>> Looking at the now gone instructions from “git show
>> 83c60bb0622440afe98930820186ddfa1e6e8b2f”, at that time, a timestamp of
>> 1 was used for the tarball; I do not remember why. In
>> guix/scripts/pack.scm, 1 is used for squashfs and docker images.
>
> In the store, a timestamp of 1 (not 0) is used. This is because there
> are tools (among which ‘make’ IIRC) that behave differently when mtime
> is zero.
>
> For consistency and to be on the safe side, it’s probably a good idea to
> do the same (as the fallback in this case).

Okay, will change for v3.
L
L
Ludovic Courtès wrote on 8 Apr 11:41 +0200
Re: [bug#70169] [PATCH v2 09/12] maint: Remove %%CreationDate from generated EPS files
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)(address . 70169@debbugs.gnu.org)
871q7gry2w.fsf@gnu.org
Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

Toggle quote (23 lines)
> * doc/local.mk (.dot.eps, png.eps): Remove %%CreationDate. Split single shell
> command into separate recipe lines, prefixed by $(AM_V_at).
>
> Change-Id: I5a03485c19c72f0c46411815c51290e52a8e5399
> ---
> doc/local.mk | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/doc/local.mk b/doc/local.mk
> index c355bec8d7..60e36091ce 100644
> --- a/doc/local.mk
> +++ b/doc/local.mk
> @@ -152,12 +152,16 @@ DOT_OPTIONS = \
> mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
>
> .dot.eps:
> - $(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
> - mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
> + $(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
> + $(AM_V_at)grep -v ^%%CreationDate: "$(srcdir)/$@.tmp" > "$(srcdir)/$@.tmp2"
> + $(AM_V_at)rm -f "$(srcdir)/$@.tmp"
> + $(AM_V_at)mv "$(srcdir)/$@.tmp2" "$@"

Apparently ‘dot’ (GraphViz) does not emit a ‘CreationDate’ header.

Should we drop this change and add a line like this above the ‘mv’ line:

@if grep -q CreationDate "$@.tmp"; then false; else true; fi

to be on the safe side?

Toggle quote (8 lines)
> .png.eps:
> - $(AM_V_GEN)convert "$<" "$@-tmp.eps"; \
> - mv "$@-tmp.eps" "$@"
> + $(AM_V_GEN)convert "$<" "$@-tmp.eps"
> + $(AM_V_at)grep -v ^%%CreationDate: "$@-tmp.eps" > "$@-tmp2.eps"
> + $(AM_V_at)rm -f "$@-tmp.eps"
> + $(AM_V_at)mv "$@-tmp2.eps" "$@"

Looking into the code of ImageMagick, I see:

Toggle snippet (6 lines)
timer=GetMagickTime();
(void) FormatMagickTime(timer,MaxTextExtent,date);
(void) FormatLocaleString(buffer,MaxTextExtent,
"%%%%CreationDate: %s\n",date);

where ‘GetMagickTime’ honors ‘SOURCE_DATE_EPOCH’. Should we set
‘SOURCE_DATE_EPOCH’ and avoid the ‘grep’ trick?

OTOH, an argument to keep this patch as-is is that it’ll resist to
changes in ImageMagick/GraphViz. So maybe the comments above aren’t
that relevant.

Ludo’.
L
L
Ludovic Courtès wrote on 8 Apr 14:15 +0200
Re: [bug#70169] [PATCH v2 13/12] doc: Use "dejavu sans" instead of "Helvetica" or "sans" in dot images.
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)(address . 70169@debbugs.gnu.org)
87v84sqce3.fsf@gnu.org
Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

Toggle quote (18 lines)
> Janneke Nieuwenhuizen writes:
>
>> Note that you'll need an environment with something like
>>
>> guix shell -CP -m manifest.scm fontconfig font-ghostscript graphviz \
>> imagemagick texlive-bin
>
> Headsup: using the attached bonus patch the tarball reproduces for me
> also without using a container, i.e., building it in
>
> guix shell -CP -m manifest.scm fontconfig graphviz imagemagick texlive-bin
>
> or
>
> guix shell -m manifest.scm fontconfig graphviz imagemagick texlive-bin
>
> now creates the same tarball for me.

Ah yes, I had:

Toggle snippet (30 lines)
/bin/sh '/home/ludo/src/guix/build-aux/missing' dot -Tpng -Gratio=.9 -Gnodesep=.005 -Granksep=.00005 -Nfontsize=9 -Nheight=.1 -Nwidth=.1 < "doc/images/bootstrap-graph.dot" > "./doc/images/bootstrap-graph.png.tmp"
Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?
Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?
Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?
Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?
Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?
Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?
Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?
Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?
Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?
Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?
Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?
Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?
Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?
Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?
Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?
Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?
Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?
Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?
Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?
Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?
Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?
Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?
Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?
Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?
Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?
Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?
make[2]: *** [Makefile:7321: doc/images/bootstrap-graph.png] Error 1

Toggle quote (25 lines)
>>From 83287968f06487fa907ef3575cef331b415350c7 Mon Sep 17 00:00:00 2001
> Message-ID: <83287968f06487fa907ef3575cef331b415350c7.1712479964.git.janneke@gnu.org>
> In-Reply-To: <cover.1712479964.git.janneke@gnu.org>
> References: <cover.1712479964.git.janneke@gnu.org>
> From: Janneke Nieuwenhuizen <janneke@gnu.org>
> Date: Sun, 7 Apr 2024 10:03:06 +0200
> Subject: [PATCH v2 13/12] doc: Use "dejavu sans" instead of "Helvetica" or
> "sans" in dot images.
>
> Font-dejavu is (now) an input of fontconfig. Specifying "dejavu sans" makes
> generated images reproducible even when other fonts are installed (notably
> font-google-noto).
>
> * doc/images/bootstrap-graph.dot,
> doc/images/bootstrap-packages.dot,
> doc/images/coreutils-bag-graph.dot,
> doc/images/coreutils-graph.dot,
> doc/images/gcc-core-mesboot0-graph.dot,
> doc/images/service-graph.dot,
> doc/images/shepherd-graph.dot: Use fontname = "dejavu sans".
> * doc/guix.texi (Full-Source Bootstrap): Update gcc-core-mesboot0.dot recipe
> accordingly.
>
> Change-Id: If21d7d39d45c66de5bceafb7b825a057d540ee50

I installed this patch but got:

Toggle snippet (22 lines)
$ make dist -j4 V=1
Makefile:7391: warning: overriding recipe for target 'doc/stamp-vti'
Makefile:5105: warning: ignoring old recipe for target 'doc/stamp-vti'
Makefile:7392: warning: overriding recipe for target 'doc/stamp-1'
Makefile:5170: warning: ignoring old recipe for target 'doc/stamp-1'
Makefile:7392: warning: overriding recipe for target 'doc/stamp-2'
Makefile:5235: warning: ignoring old recipe for target 'doc/stamp-2'
Makefile:7392: warning: overriding recipe for target 'doc/stamp-3'
Makefile:5300: warning: ignoring old recipe for target 'doc/stamp-3'
Makefile:7392: warning: overriding recipe for target 'doc/stamp-4'
Makefile:5365: warning: ignoring old recipe for target 'doc/stamp-4'
Makefile:7392: warning: overriding recipe for target 'doc/stamp-5'
Makefile:5430: warning: ignoring old recipe for target 'doc/stamp-5'
Makefile:7392: warning: overriding recipe for target 'doc/stamp-6'
Makefile:5495: warning: ignoring old recipe for target 'doc/stamp-6'
Makefile:7484: Autotools cache out of date.
Autotools cache version: 1.3.0.57430-933766.
Git version: 1.3.0.57431-732eb8.
Please run `autoreconf -vif'.
Makefile:7489: *** Cannot create reproducible tarball. Stop.

Same story after running ‘autoreconf -vfi’, not sure why.

Ludo’.
J
J
Janneke Nieuwenhuizen wrote on 8 Apr 19:12 +0200
Re: [bug#70169] [PATCH v2 09/12] maint: Remove %%CreationDate from generated EPS files
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 70169@debbugs.gnu.org)
87o7ajdbif.fsf@gnu.org
Ludovic Courtès writes:

Toggle quote (27 lines)
> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> * doc/local.mk (.dot.eps, png.eps): Remove %%CreationDate. Split single shell
>> command into separate recipe lines, prefixed by $(AM_V_at).
>>
>> Change-Id: I5a03485c19c72f0c46411815c51290e52a8e5399
>> ---
>> doc/local.mk | 12 ++++++++----
>> 1 file changed, 8 insertions(+), 4 deletions(-)
>>
>> diff --git a/doc/local.mk b/doc/local.mk
>> index c355bec8d7..60e36091ce 100644
>> --- a/doc/local.mk
>> +++ b/doc/local.mk
>> @@ -152,12 +152,16 @@ DOT_OPTIONS = \
>> mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
>>
>> .dot.eps:
>> - $(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
>> - mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
>> + $(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
>> + $(AM_V_at)grep -v ^%%CreationDate: "$(srcdir)/$@.tmp" > "$(srcdir)/$@.tmp2"
>> + $(AM_V_at)rm -f "$(srcdir)/$@.tmp"
>> + $(AM_V_at)mv "$(srcdir)/$@.tmp2" "$@"
>
> Apparently ‘dot’ (GraphViz) does not emit a ‘CreationDate’ header.

Ah, good catch.

Toggle quote (2 lines)
> Should we drop this change and add a line like this above the ‘mv’ line:

Probably I just copied the grep to remove it without much looking or
thinking :)

Toggle quote (4 lines)
> @if grep -q CreationDate "$@.tmp"; then false; else true; fi
>
> to be on the safe side?

Let's do that, I'm adding it as

$(AM_V_at)! grep -q %%CreationDate "$(srcdir)/$@.tmp"

in v3.

Toggle quote (18 lines)
>> .png.eps:
>> - $(AM_V_GEN)convert "$<" "$@-tmp.eps"; \
>> - mv "$@-tmp.eps" "$@"
>> + $(AM_V_GEN)convert "$<" "$@-tmp.eps"
>> + $(AM_V_at)grep -v ^%%CreationDate: "$@-tmp.eps" > "$@-tmp2.eps"
>> + $(AM_V_at)rm -f "$@-tmp.eps"
>> + $(AM_V_at)mv "$@-tmp2.eps" "$@"
>
> Looking into the code of ImageMagick, I see:
>
> timer=GetMagickTime();
> (void) FormatMagickTime(timer,MaxTextExtent,date);
> (void) FormatLocaleString(buffer,MaxTextExtent,
> "%%%%CreationDate: %s\n",date);
>
> where ‘GetMagickTime’ honors ‘SOURCE_DATE_EPOCH’. Should we set
> ‘SOURCE_DATE_EPOCH’ and avoid the ‘grep’ trick?

Good catch; and it already works.

Toggle quote (4 lines)
> OTOH, an argument to keep this patch as-is is that it’ll resist to
> changes in ImageMagick/GraphViz. So maybe the comments above aren’t
> that relevant.

Well, I like what we have now better; it's a bit sharper/cleaner anyway.

Thanks!
Janneke
J
J
Janneke Nieuwenhuizen wrote on 8 Apr 19:26 +0200
Re: [bug#70169] [PATCH v2 13/12] doc: Use "dejavu sans" instead of "Helvetica" or "sans" in dot images.
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 70169@debbugs.gnu.org)
87jzl7dauc.fsf@gnu.org
Ludovic Courtès writes:

Toggle quote (25 lines)
> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> Janneke Nieuwenhuizen writes:
>>
>>> Note that you'll need an environment with something like
>>>
>>> guix shell -CP -m manifest.scm fontconfig font-ghostscript graphviz \
>>> imagemagick texlive-bin
>>
>> Headsup: using the attached bonus patch the tarball reproduces for me
>> also without using a container, i.e., building it in
>>
>> guix shell -CP -m manifest.scm fontconfig graphviz imagemagick texlive-bin
>>
>> or
>>
>> guix shell -m manifest.scm fontconfig graphviz imagemagick texlive-bin
>>
>> now creates the same tarball for me.
>
> Ah yes, I had:
>
> /bin/sh '/home/ludo/src/guix/build-aux/missing' dot -Tpng -Gratio=.9 -Gnodesep=.005 -Granksep=.00005 -Nfontsize=9 -Nheight=.1 -Nwidth=.1 < "doc/images/bootstrap-graph.dot" > "./doc/images/bootstrap-graph.png.tmp"
> Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?

Yes...and if it finds one, it could be another than DejaVu sans

Toggle quote (9 lines)
>>>From 83287968f06487fa907ef3575cef331b415350c7 Mon Sep 17 00:00:00 2001
>> Message-ID: <83287968f06487fa907ef3575cef331b415350c7.1712479964.git.janneke@gnu.org>
>> In-Reply-To: <cover.1712479964.git.janneke@gnu.org>
>> References: <cover.1712479964.git.janneke@gnu.org>
>> From: Janneke Nieuwenhuizen <janneke@gnu.org>
>> Date: Sun, 7 Apr 2024 10:03:06 +0200
>> Subject: [PATCH v2 13/12] doc: Use "dejavu sans" instead of "Helvetica" or
>> "sans" in dot images.

[..]

Toggle quote (25 lines)
> I installed this patch but got:
>
> $ make dist -j4 V=1
> Makefile:7391: warning: overriding recipe for target 'doc/stamp-vti'
> Makefile:5105: warning: ignoring old recipe for target 'doc/stamp-vti'
> Makefile:7392: warning: overriding recipe for target 'doc/stamp-1'
> Makefile:5170: warning: ignoring old recipe for target 'doc/stamp-1'
> Makefile:7392: warning: overriding recipe for target 'doc/stamp-2'
> Makefile:5235: warning: ignoring old recipe for target 'doc/stamp-2'
> Makefile:7392: warning: overriding recipe for target 'doc/stamp-3'
> Makefile:5300: warning: ignoring old recipe for target 'doc/stamp-3'
> Makefile:7392: warning: overriding recipe for target 'doc/stamp-4'
> Makefile:5365: warning: ignoring old recipe for target 'doc/stamp-4'
> Makefile:7392: warning: overriding recipe for target 'doc/stamp-5'
> Makefile:5430: warning: ignoring old recipe for target 'doc/stamp-5'
> Makefile:7392: warning: overriding recipe for target 'doc/stamp-6'
> Makefile:5495: warning: ignoring old recipe for target 'doc/stamp-6'
> Makefile:7484: Autotools cache out of date.
> Autotools cache version: 1.3.0.57430-933766.
> Git version: 1.3.0.57431-732eb8.
> Please run `autoreconf -vif'.
> Makefile:7489: *** Cannot create reproducible tarball. Stop.
>
> Same story after running ‘autoreconf -vfi’, not sure why.

Oop, yes, I see that here now too. I'm changing the message to say:

Please run ./bootstrap; ./configure $(DIST_CONFIGURE_FLAGS)

Greetings,
Janneke
J
J
Janneke Nieuwenhuizen wrote on 8 Apr 20:46 +0200
[PATCH v3 00/13] Reproducible `make dist' tarball in defiance of Autotools and Gettext
(address . 70169@debbugs.gnu.org)
cover.1712600307.git.janneke@gnu.org
V3 brings

* Use `1' as fallback for SOURCE_DATE_EPOCH,
* Do not remove %%CreationDate when creating EPS files. Imagemagick's
convert respects SOURCE_DATE_EPOCH (as long as it's not set to `0'!), and
* Graphviz' dot does currently not insert it; add a check for that,
* Update advice when Autotools's version is out of date to say
./bootstrap && ./configure ..., and
* Use "dejavu sans" in DOT sources (already sent as v2 13/12).

I have reset wip-tarball and uploaded

Toggle snippet (4 lines)
guix hash guix-1.3.0.57741-0e3053.tar.gz
1d6s9m2pcpcnq1hkxzkqklrlnqcqfib4gypylpr85nqmbn3clrq5

Note that you'll need an environment with something like:

Toggle snippet (3 lines)
guix shell -CP -m manifest.scm fontconfig graphviz imagemagick texlive-bin

on my machine, it now also reproduces outside a container, in:

Toggle snippet (3 lines)
guix shell -m manifest.scm fontconfig graphviz imagemagick texlive-bin

Greetings,
Janneke

Janneke Nieuwenhuizen (12):
doc: Use "dejavu sans" instead of "Helvetica" or "sans" in dot images.
maint: Cater for running `make dist' from a worktree.
maint: Use reproducible timestamps and name for tarball.
maint: Help help2man generate reproducible man-pages.
maint: Generate AUTHORS and ChangeLog reproducibly.
maint: Generate 'doc/version-LANG.texi' reproducibly.
maint: Use xgettext.scm wrapper to create .PO files reproducibly.
maint: Use reproducible Git timestamp for POT-Creation-Date.
maint: Avoid EPS generation to fail silently, ensure reproducibility.
maint: Avoid PNG and PDF generation to fail silently.
maint: Reset CreationDate metadata on generated PDFs.
maint: Ensure generated file reproducibility for dist.

Timothy Sample (1):
maint: Generate 'doc/version.texi' reproducibly.

Makefile.am | 50 +++++++++++++--
build-aux/xgettext.scm | 87 +++++++++++++++++++++++++
doc/guix.texi | 7 +-
doc/images/bootstrap-graph.dot | 52 +++++++--------
doc/images/bootstrap-packages.dot | 32 ++++-----
doc/images/coreutils-bag-graph.dot | 56 ++++++++--------
doc/images/coreutils-graph.dot | 18 +++---
doc/images/gcc-core-mesboot0-graph.dot | 28 ++++----
doc/images/service-graph.dot | 16 ++---
doc/images/shepherd-graph.dot | 54 ++++++++--------
doc/local.mk | 89 +++++++++++++++++++++++---
po/doc/local.mk | 16 +++--
po/guix/Makevars | 7 +-
po/packages/Makevars | 10 ++-
14 files changed, 372 insertions(+), 150 deletions(-)
create mode 100755 build-aux/xgettext.scm


base-commit: 21fad13fffa3b90fdd004c6c5514ae5dfec17492
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 8 Apr 20:46 +0200
[PATCH v3 02/13] maint: Cater for running `make dist' from a worktree.
(address . 70169@debbugs.gnu.org)
ffed0bec56b41fff5524d7a9321eb938c648f145.1712600307.git.janneke@gnu.org
* Makefile.am (gen-ChangeLog): Check for existance of `.git', rather than it
being a directory.
(gen-AUTHORS): Likewise.

Change-Id: I1b7f8cc147084c1804deb7be9d36e5eeda2599cb
---
Makefile.am | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/Makefile.am b/Makefile.am
index 1c5688ac13..2b5e145095 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -972,7 +972,7 @@ gen-tarball-version:
echo $(VERSION) > "$(distdir)/.tarball-version"
gen-ChangeLog:
- $(AM_V_GEN)if test -d .git; then \
+ $(AM_V_GEN)if test -e .git; then \
$(top_srcdir)/build-aux/gitlog-to-changelog \
> $(distdir)/ChangeLog.tmp; \
rm -f $(distdir)/ChangeLog; \
@@ -980,7 +980,7 @@ gen-ChangeLog:
fi
gen-AUTHORS:
- $(AM_V_GEN)if test -d .git; then \
+ $(AM_V_GEN)if test -e .git; then \
rm -f "$(distdir)/AUTHORS"; \
$(top_builddir)/pre-inst-env "$(GUILE)" \
"$(top_srcdir)/build-aux/generate-authors.scm" \
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 8 Apr 20:46 +0200
[PATCH v3 01/13] doc: Use "dejavu sans" instead of "Helvetica" or "sans" in dot images.
(address . 70169@debbugs.gnu.org)
d30f7239a4c8dc89ab0de721d470c7ee95c10bca.1712600307.git.janneke@gnu.org
Font-dejavu is (now) an input of fontconfig. Specifying "dejavu sans" makes
generated images reproducible even when other fonts are installed (notably
font-google-noto).

* doc/images/bootstrap-graph.dot,
doc/images/bootstrap-packages.dot,
doc/images/coreutils-bag-graph.dot,
doc/images/coreutils-graph.dot,
doc/images/gcc-core-mesboot0-graph.dot,
doc/images/service-graph.dot,
doc/images/shepherd-graph.dot: Use fontname = "dejavu sans".
* doc/guix.texi (Full-Source Bootstrap): Update gcc-core-mesboot0.dot recipe
accordingly.

Change-Id: If21d7d39d45c66de5bceafb7b825a057d540ee50
---
doc/guix.texi | 7 +++-
doc/images/bootstrap-graph.dot | 52 ++++++++++++------------
doc/images/bootstrap-packages.dot | 32 +++++++--------
doc/images/coreutils-bag-graph.dot | 56 +++++++++++++-------------
doc/images/coreutils-graph.dot | 18 ++++-----
doc/images/gcc-core-mesboot0-graph.dot | 28 ++++++-------
doc/images/service-graph.dot | 16 ++++----
doc/images/shepherd-graph.dot | 54 ++++++++++++-------------
8 files changed, 134 insertions(+), 129 deletions(-)

Toggle diff (138 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index 5827e0de14..f96feae8dc 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -47865,7 +47865,12 @@ Full-Source Bootstrap
@code{gcc-core-mesboot0}, the bootstrap compiler used for the
traditional bootstrap of the rest of the Guix System.
-@c ./pre-inst-env guix graph -e '(@@ (gnu packages commencement) gcc-core-mesboot0)' | sed -re 's,((bootstrap-seeds|guile-bootstrap).*shape =) box,\1 ellipse,' > doc/images/gcc-core-mesboot0-graph.dot
+@c ./pre-inst-env guix graph \
+@c -e '(@@ (gnu packages commencement) gcc-core-mesboot0)' \
+@c | sed -r \
+@c -e 's,((bootstrap-seeds|guile-bootstrap).*shape =) box,\1 ellipse,' \
+@c -e 's,fontname = sans,fontname = "dejavu sans",' \
+@c > doc/images/gcc-core-mesboot0-graph.dot
@image{images/gcc-core-mesboot0-graph,6in,,Dependency graph of gcc-core-mesboot0}
Work is ongoing to bring these bootstraps to the @code{arm-linux} and
diff --git a/doc/images/bootstrap-graph.dot b/doc/images/bootstrap-graph.dot
index 06d7f29c7a..317ee25749 100644
--- a/doc/images/bootstrap-graph.dot
+++ b/doc/images/bootstrap-graph.dot
@@ -1,7 +1,7 @@
# Obtained by running "nix-store --graph" on the first GCC derivation.
digraph G {
-"/nix/store/x60397za40lx0n88f51a2csfdq5xvb19-gcc-bootstrap-0.drv" [label = "gcc-bootstrap-0.drv", fontname = Helvetica, shape = box, style = filled, fillcolor = "#ffffff"];
+"/nix/store/x60397za40lx0n88f51a2csfdq5xvb19-gcc-bootstrap-0.drv" [label = "gcc-bootstrap-0.drv", fontname = "dejavu sans", shape = box, style = filled, fillcolor = "#ffffff"];
"/nix/store/3iawic1z95112yfz5y9xdp66qbxxr8l1-tar" -> "/nix/store/x60397za40lx0n88f51a2csfdq5xvb19-gcc-bootstrap-0.drv" [color = "black"];
"/nix/store/4sv9xhcjap6byca130fzpzzjalb7iixv-glibc-bootstrap-0.drv" -> "/nix/store/x60397za40lx0n88f51a2csfdq5xvb19-gcc-bootstrap-0.drv" [color = "red"];
"/nix/store/8cc81w6m04csm52y247xj3gydrbz2niv-xz" -> "/nix/store/x60397za40lx0n88f51a2csfdq5xvb19-gcc-bootstrap-0.drv" [color = "green"];
@@ -11,8 +11,8 @@ digraph G {
"/nix/store/r3dsy5j2c16sv26raala6kahff7w18hb-gcc-bootstrap-0-guile-builder" -> "/nix/store/x60397za40lx0n88f51a2csfdq5xvb19-gcc-bootstrap-0.drv" [color = "black"];
"/nix/store/x9x1a86flhx15cams7235rfy5gc5cww1-guile-bootstrap-2.0.drv" -> "/nix/store/x60397za40lx0n88f51a2csfdq5xvb19-gcc-bootstrap-0.drv" [color = "red"];
"/nix/store/y4n7rzysx6qz3p0n91dw9qz5w93l6iqv-module-import-compiled.drv" -> "/nix/store/x60397za40lx0n88f51a2csfdq5xvb19-gcc-bootstrap-0.drv" [color = "green"];
-"/nix/store/3iawic1z95112yfz5y9xdp66qbxxr8l1-tar" [label = "tar", fontname = Helvetica, shape = box, style = filled, fillcolor = "#ffffff"];
-"/nix/store/4sv9xhcjap6byca130fzpzzjalb7iixv-glibc-bootstrap-0.drv" [label = "glibc-bootstrap-0.drv", fontname = Helvetica, shape = box, style = filled, fillcolor = "#ffffff"];
+"/nix/store/3iawic1z95112yfz5y9xdp66qbxxr8l1-tar" [label = "tar", fontname = "dejavu sans", shape = box, style = filled, fillcolor = "#ffffff"];
+"/nix/store/4sv9xhcjap6byca130fzpzzjalb7iixv-glibc-bootstrap-0.drv" [label = "glibc-bootstrap-0.drv", fontname = "dejavu sans", shape = box, style = filled, fillcolor = "#ffffff"];
"/nix/store/3iawic1z95112yfz5y9xdp66qbxxr8l1-tar" -> "/nix/store/4sv9xhcjap6byca130fzpzzjalb7iixv-glibc-bootstrap-0.drv" [color = "blue"];
"/nix/store/8cc81w6m04csm52y247xj3gydrbz2niv-xz" -> "/nix/store/4sv9xhcjap6byca130fzpzzjalb7iixv-glibc-bootstrap-0.drv" [color = "magenta"];
"/nix/store/8iivk9hpnps21yrbq3zzsxgzv9ixbhgh-glibc-bootstrap-0-guile-builder" -> "/nix/store/4sv9xhcjap6byca130fzpzzjalb7iixv-glibc-bootstrap-0.drv" [color = "burlywood"];
@@ -20,63 +20,63 @@ digraph G {
"/nix/store/wdwrkg02gn28bkpbxgdb2nv558v8s3ji-glibc-2.17.tar.xz.drv" -> "/nix/store/4sv9xhcjap6byca130fzpzzjalb7iixv-glibc-bootstrap-0.drv" [color = "red"];
"/nix/store/x9x1a86flhx15cams7235rfy5gc5cww1-guile-bootstrap-2.0.drv" -> "/nix/store/4sv9xhcjap6byca130fzpzzjalb7iixv-glibc-bootstrap-0.drv" [color = "green"];
"/nix/store/y4n7rzysx6qz3p0n91dw9qz5w93l6iqv-module-import-compiled.drv" -> "/nix/store/4sv9xhcjap6byca130fzpzzjalb7iixv-glibc-bootstrap-0.drv" [color = "blue"];
-"/nix/store/8cc81w6m04csm52y247xj3gydrbz2niv-xz" [label = "xz", fontname = Helvetica, shape = box, style = filled, fillcolor = "#ffffff"];
-"/nix/store/8iivk9hpnps21yrbq3zzsxgzv9ixbhgh-glibc-bootstrap-0-guile-builder" [label = "glibc-bootstrap-0-guile-builder", fontname = Helvetica, shape = box, style = filled, fillcolor = "#ffffff"];
+"/nix/store/8cc81w6m04csm52y247xj3gydrbz2niv-xz" [label = "xz", fontname = "dejavu sans", shape = box, style = filled, fillcolor = "#ffffff"];
+"/nix/store/8iivk9hpnps21yrbq3zzsxgzv9ixbhgh-glibc-bootstrap-0-guile-builder" [label = "glibc-bootstrap-0-guile-builder", fontname = "dejavu sans", shape = box, style = filled, fillcolor = "#ffffff"];
"/nix/store/3iawic1z95112yfz5y9xdp66qbxxr8l1-tar" -> "/nix/store/8iivk9hpnps21yrbq3zzsxgzv9ixbhgh-glibc-bootstrap-0-guile-builder" [color = "magenta"];
"/nix/store/8cc81w6m04csm52y247xj3gydrbz2niv-xz" -> "/nix/store/8iivk9hpnps21yrbq3zzsxgzv9ixbhgh-glibc-bootstrap-0-guile-builder" [color = "burlywood"];
-"/nix/store/96yx6013dhggr3mpg5ayxv8dm9mv2ghv-module-import.drv" [label = "module-import.drv", fontname = Helvetica, shape = box, style = filled, fillcolor = "#ffffff"];
+"/nix/store/96yx6013dhggr3mpg5ayxv8dm9mv2ghv-module-import.drv" [label = "module-import.drv", fontname = "dejavu sans", shape = box, style = filled, fillcolor = "#ffffff"];
"/nix/store/9zrdfvnrpljryr82an2n1mj6bh2przhn-module-import-guile-builder" -> "/nix/store/96yx6013dhggr3mpg5ayxv8dm9mv2ghv-module-import.drv" [color = "black"];
"/nix/store/mj7amprgvl2rgash1nr0v64apik8vc7f-utils.scm" -> "/nix/store/96yx6013dhggr3mpg5ayxv8dm9mv2ghv-module-import.drv" [color = "red"];
"/nix/store/x9x1a86flhx15cams7235rfy5gc5cww1-guile-bootstrap-2.0.drv" -> "/nix/store/96yx6013dhggr3mpg5ayxv8dm9mv2ghv-module-import.drv" [color = "green"];
-"/nix/store/9zrdfvnrpljryr82an2n1mj6bh2przhn-module-import-guile-builder" [label = "module-import-guile-builder", fontname = Helvetica, shape = box, style = filled, fillcolor = "#ffffff"];
+"/nix/store/9zrdfvnrpljryr82an2n1mj6bh2przhn-module-import-guile-builder" [label = "module-import-guile-builder", fontname = "dejavu sans", shape = box, style = filled, fillcolor = "#ffffff"];
"/nix/store/mj7amprgvl2rgash1nr0v64apik8vc7f-utils.scm" -> "/nix/store/9zrdfvnrpljryr82an2n1mj6bh2przhn-module-import-guile-builder" [color = "blue"];
-"/nix/store/fl9cwcczfdv73vq5sr0c4rd5hqzrgvac-gcc-4.7.2.tar.xz.drv" [label = "gcc-4.7.2.tar.xz.drv", fontname = Helvetica, shape = box, style = filled, fillcolor = "#ffffff"];
+"/nix/store/fl9cwcczfdv73vq5sr0c4rd5hqzrgvac-gcc-4.7.2.tar.xz.drv" [label = "gcc-4.7.2.tar.xz.drv", fontname = "dejavu sans", shape = box, style = filled, fillcolor = "#ffffff"];
"/nix/store/6kslnirvm26fij7wpjqbw617ri4gf5x5-gcc-4.7.2.tar.xz-guile-builder" -> "/nix/store/fl9cwcczfdv73vq5sr0c4rd5hqzrgvac-gcc-4.7.2.tar.xz.drv" [color = "magenta"];
"/nix/store/kvk5wp8c9rzvvrmq5fv5r58l78q8i6ch-module-import.drv" -> "/nix/store/fl9cwcczfdv73vq5sr0c4rd5hqzrgvac-gcc-4.7.2.tar.xz.drv" [color = "burlywood"];
"/nix/store/pzv319p3q7raiad7nq7fcdw9rafzp14k-module-import-compiled.drv" -> "/nix/store/fl9cwcczfdv73vq5sr0c4rd5hqzrgvac-gcc-4.7.2.tar.xz.drv" [color = "black"];
"/nix/store/x9x1a86flhx15cams7235rfy5gc5cww1-guile-bootstrap-2.0.drv" -> "/nix/store/fl9cwcczfdv73vq5sr0c4rd5hqzrgvac-gcc-4.7.2.tar.xz.drv" [color = "red"];
-"/nix/store/6kslnirvm26fij7wpjqbw617ri4gf5x5-gcc-4.7.2.tar.xz-guile-builder" [label = "gcc-4.7.2.tar.xz-guile-builder", fontname = Helvetica, shape = box, style = filled, fillcolor = "#ffffff"];
-"/nix/store/jaaqdl979wjirnbxz1jqsipg22nva5n4-bash" [label = "bash", fontname = Helvetica, shape = box, style = filled, fillcolor = "#ffffff"];
-"/nix/store/kvk5wp8c9rzvvrmq5fv5r58l78q8i6ch-module-import.drv" [label = "module-import.drv", fontname = Helvetica, shape = box, style = filled, fillcolor = "#ffffff"];
+"/nix/store/6kslnirvm26fij7wpjqbw617ri4gf5x5-gcc-4.7.2.tar.xz-guile-builder" [label = "gcc-4.7.2.tar.xz-guile-builder", fontname = "dejavu sans", shape = box, style = filled, fillcolor = "#ffffff"];
+"/nix/store/jaaqdl979wjirnbxz1jqsipg22nva5n4-bash" [label = "bash", fontname = "dejavu sans", shape = box, style = filled, fillcolor = "#ffffff"];
+"/nix/store/kvk5wp8c9rzvvrmq5fv5r58l78q8i6ch-module-import.drv" [label = "module-import.drv", fontname = "dejavu sans", shape = box, style = filled, fillcolor = "#ffffff"];
"/nix/store/abagrdbdndkd0y2dwk0nw1gw0g0rhl2z-ftp-client.scm" -> "/nix/store/kvk5wp8c9rzvvrmq5fv5r58l78q8i6ch-module-import.drv" [color = "green"];
"/nix/store/dwd2iwd1ban8a8rmx568dpgrbkkidfhw-download.scm" -> "/nix/store/kvk5wp8c9rzvvrmq5fv5r58l78q8i6ch-module-import.drv" [color = "blue"];
"/nix/store/mj7amprgvl2rgash1nr0v64apik8vc7f-utils.scm" -> "/nix/store/kvk5wp8c9rzvvrmq5fv5r58l78q8i6ch-module-import.drv" [color = "magenta"];
"/nix/store/x9x1a86flhx15cams7235rfy5gc5cww1-guile-bootstrap-2.0.drv" -> "/nix/store/kvk5wp8c9rzvvrmq5fv5r58l78q8i6ch-module-import.drv" [color = "burlywood"];
"/nix/store/yfixjx2gpvsi5dhkpdx5gj6gx0xdk1c8-module-import-guile-builder" -> "/nix/store/kvk5wp8c9rzvvrmq5fv5r58l78q8i6ch-module-import.drv" [color = "black"];
-"/nix/store/abagrdbdndkd0y2dwk0nw1gw0g0rhl2z-ftp-client.scm" [label = "ftp-client.scm", fontname = Helvetica, shape = box, style = filled, fillcolor = "#ffffff"];
-"/nix/store/dwd2iwd1ban8a8rmx568dpgrbkkidfhw-download.scm" [label = "download.scm", fontname = Helvetica, shape = box, style = filled, fillcolor = "#ffffff"];
-"/nix/store/mj7amprgvl2rgash1nr0v64apik8vc7f-utils.scm" [label = "utils.scm", fontname = Helvetica, shape = box, style = filled, fillcolor = "#ffffff"];
-"/nix/store/pzv319p3q7raiad7nq7fcdw9rafzp14k-module-import-compiled.drv" [label = "module-import-compiled.drv", fontname = Helvetica, shape = box, style = filled, fillcolor = "#ffffff"];
+"/nix/store/abagrdbdndkd0y2dwk0nw1gw0g0rhl2z-ftp-client.scm" [label = "ftp-client.scm", fontname = "dejavu sans", shape = box, style = filled, fillcolor = "#ffffff"];
+"/nix/store/dwd2iwd1ban8a8rmx568dpgrbkkidfhw-download.scm" [label = "download.scm", fontname = "dejavu sans", shape = box, style = filled, fillcolor = "#ffffff"];
+"/nix/store/mj7amprgvl2rgash1nr0v64apik8vc7f-utils.scm" [label = "utils.scm", fontname = "dejavu sans", shape = box, style = filled, fillcolor = "#ffffff"];
+"/nix/store/pzv319p3q7raiad7nq7fcdw9rafzp14k-module-import-compiled.drv" [label = "module-import-compiled.drv", fontname = "dejavu sans", shape = box, style = filled, fillcolor = "#ffffff"];
"/nix/store/98gzqlgpm4gxrpl5bzykpqbwrx8ckx8l-module-import-compiled-guile-builder" -> "/nix/store/pzv319p3q7raiad7nq7fcdw9rafzp14k-module-import-compiled.drv" [color = "red"];
"/nix/store/kvk5wp8c9rzvvrmq5fv5r58l78q8i6ch-module-import.drv" -> "/nix/store/pzv319p3q7raiad7nq7fcdw9rafzp14k-module-import-compiled.drv" [color = "green"];
"/nix/store/x9x1a86flhx15cams7235rfy5gc5cww1-guile-bootstrap-2.0.drv" -> "/nix/store/pzv319p3q7raiad7nq7fcdw9rafzp14k-module-import-compiled.drv" [color = "blue"];
-"/nix/store/98gzqlgpm4gxrpl5bzykpqbwrx8ckx8l-module-import-compiled-guile-builder" [label = "module-import-compiled-guile-builder", fontname = Helvetica, shape = box, style = filled, fillcolor = "#ffffff"];
-"/nix/store/r3dsy5j2c16sv26raala6kahff7w18hb-gcc-bootstrap-0-guile-builder" [label = "gcc-bootstrap-0-guile-builder", fontname = Helvetica, shape = box, style = filled, fillcolor = "#ffffff"];
+"/nix/store/98gzqlgpm4gxrpl5bzykpqbwrx8ckx8l-module-import-compiled-guile-builder" [label = "module-import-compiled-guile-builder", fontname = "dejavu sans", shape = box, style = filled, fillcolor = "#ffffff"];
+"/nix/store/r3dsy5j2c16sv26raala6kahff7w18hb-gcc-bootstrap-0-guile-builder" [label = "gcc-bootstrap-0-guile-builder", fontname = "dejavu sans", shape = box, style = filled, fillcolor = "#ffffff"];
"/nix/store/3iawic1z95112yfz5y9xdp66qbxxr8l1-tar" -> "/nix/store/r3dsy5j2c16sv26raala6kahff7w18hb-gcc-bootstrap-0-guile-builder" [color = "magenta"];
"/nix/store/8cc81w6m04csm52y247xj3gydrbz2niv-xz" -> "/nix/store/r3dsy5j2c16sv26raala6kahff7w18hb-gcc-bootstrap-0-guile-builder" [color = "burlywood"];
"/nix/store/jaaqdl979wjirnbxz1jqsipg22nva5n4-bash" -> "/nix/store/r3dsy5j2c16sv26raala6kahff7w18hb-gcc-bootstrap-0-guile-builder" [color = "black"];
-"/nix/store/wdwrkg02gn28bkpbxgdb2nv558v8s3ji-glibc-2.17.tar.xz.drv" [label = "glibc-2.17.tar.xz.drv", fontname = Helvetica, shape = box, style = filled, fillcolor = "#ffffff"];
+"/nix/store/wdwrkg02gn28bkpbxgdb2nv558v8s3ji-glibc-2.17.tar.xz.drv" [label = "glibc-2.17.tar.xz.drv", fontname = "dejavu sans", shape = box, style = filled, fillcolor = "#ffffff"];
"/nix/store/kvk5wp8c9rzvvrmq5fv5r58l78q8i6ch-module-import.drv" -> "/nix/store/wdwrkg02gn28bkpbxgdb2nv558v8s3ji-glibc-2.17.tar.xz.drv" [color = "red"];
"/nix/store/pzv319p3q7raiad7nq7fcdw9rafzp14k-module-import-compiled.drv" -> "/nix/store/wdwrkg02gn28bkpbxgdb2nv558v8s3ji-glibc-2.17.tar.xz.drv" [color = "green"];
"/nix/store/q7as3jddipj4g6si8lawrdbkjg0zcjvg-glibc-2.17.tar.xz-guile-builder" -> "/nix/store/wdwrkg02gn28bkpbxgdb2nv558v8s3ji-glibc-2.17.tar.xz.drv" [color = "blue"];
"/nix/store/x9x1a86flhx15cams7235rfy5gc5cww1-guile-bootstrap-2.0.drv" -> "/nix/store/wdwrkg02gn28bkpbxgdb2nv558v8s3ji-glibc-2.17.tar.xz.drv" [color = "magenta"];
-"/nix/store/q7as3jddipj4g6si8lawrdbkjg0zcjvg-glibc-2.17.tar.xz-guile-builder" [label = "glibc-2.17.tar.xz-guile-builder", fontname = Helvetica, shape = box, style = filled, fillcolor = "#ffffff"];
-"/nix/store/x9x1a86flhx15cams7235rfy5gc5cww1-guile-bootstrap-2.0.drv" [label = "guile-bootstrap-2.0.drv", fontname = Helvetica, shape = box, style = filled, fillcolor = "#ffffff"];
+"/nix/store/q7as3jddipj4g6si8lawrdbkjg0zcjvg-glibc-2.17.tar.xz-guile-builder" [label = "glibc-2.17.tar.xz-guile-builder", fontname = "dejavu sans", shape = box, style = filled, fillcolor = "#ffffff"];
+"/nix/store/x9x1a86flhx15cams7235rfy5gc5cww1-guile-bootstrap-2.0.drv" [label = "guile-bootstrap-2.0.drv", fontname = "dejavu sans", shape = box, style = filled, fillcolor = "#ffffff"];
"/nix/store/bplka3yqdg8prqq3zdxza6wxlkjdhr2g-build-bootstrap-guile.sh" -> "/nix/store/x9x1a86flhx15cams7235rfy5gc5cww1-guile-bootstrap-2.0.drv" [color = "burlywood"];
"/nix/store/jaaqdl979wjirnbxz1jqsipg22nva5n4-bash" -> "/nix/store/x9x1a86flhx15cams7235rfy5gc5cww1-guile-bootstrap-2.0.drv" [color = "black"];
-"/nix/store/bplka3yqdg8prqq3zdxza6wxlkjdhr2g-build-bootstrap-guile.sh" [label = "build-bootstrap-guile.sh", fontname = Helvetica, shape = box, style = filled, fillcolor = "#ffffff"];
+"/nix/store/bplka3yqdg8prqq3zdxza6wxlkjdhr2g-build-bootstrap-guile.sh" [label = "build-bootstrap-guile.sh", fontname = "dejavu sans", shape = box, style = filled, fillcolor = "#ffffff"];
"/nix/store/3iawic1z95112yfz5y9xdp66qbxxr8l1-tar" -> "/nix/store/bplka3yqdg8prqq3zdxza6wxlkjdhr2g-build-bootstrap-guile.sh" [color = "red"];
"/nix/store/4xv2y0m6zr2lgi8x8pcb3zxjqxsz69kj-mkdir" -> "/nix/store/bplka3yqdg8prqq3zdxza6wxlkjdhr2g-build-bootstrap-guile.sh" [color = "green"];
"/nix/store/8cc81w6m04csm52y247xj3gydrbz2niv-xz" -> "/nix/store/bplka3yqdg8prqq3zdxza6wxlkjdhr2g-build-bootstrap-guile.sh" [color = "blue"];
"/nix/store/c450lqvaaz3ngx9pfiiiw55rqq6ssfda-guile-2.0.7.tar.xz" -> "/nix/store/bplka3yqdg8prqq3zdxza6wxlkjdhr2g-build-bootstrap-guile.sh" [color = "magenta"];
-"/nix/store/4xv2y0m6zr2lgi8x8pcb3zxjqxsz69kj-mkdir" [label = "mkdir", fontname = Helvetica, shape = box, style = filled, fillcolor = "#ffffff"];
-"/nix/store/c450lqvaaz3ngx9pfiiiw55rqq6ssfda-guile-2.0.7.tar.xz" [label = "guile-2.0.7.tar.xz", fontname = Helvetica, shape = box, style = filled, fillcolor = "#ffffff"];
-"/nix/store/y4n7rzysx6qz3p0n91dw9qz5w93l6iqv-module-import-compiled.drv" [label = "module-import-compiled.drv", fontname = Helvetica, shape = box, style = filled, fillcolor = "#ffffff"];
+"/nix/store/4xv2y0m6zr2lgi8x8pcb3zxjqxsz69kj-mkdir" [label = "mkdir", fontname = "dejavu sans", shape = box, style = filled, fillcolor = "#ffffff"];
+"/nix/store/c450lqvaaz3ngx9pfiiiw55rqq6ssfda-guile-2.0.7.tar.xz" [label = "guile-2.0.7.tar.xz", fontname = "dejavu sans", shape = box, style = filled, fillcolor = "#ffffff"];
+"/nix/store/y4n7rzysx6qz3p0n91dw9qz5w93l6iqv-module-import-compiled.drv" [label = "module-import-compiled.drv", fontname = "dejavu sans", shape = box, style = filled, fillcolor = "#ffffff"];
"/nix/store/8jiqjlb6zxjys16ca7s6jvxcc620c71k-module-import-compiled-guile-builder" -> "/nix/store/y4n7rzysx6qz3p0n91dw9qz5w93l6iqv-module-import-compiled.drv" [color = "burlywood"];
"/nix/store/96yx6013dhggr3mpg5ayxv8dm9mv2ghv-module-import.drv" -> "/nix/store/y4n7rzysx6qz3p0n91dw9qz5w93l6iqv-module-import-compiled.drv" [color = "black"];
"/nix/store/x9x1a86flhx15cams7235rfy5gc5cww1-guile-bootstrap-2.0.drv" -> "/nix/store/y4n7rzysx6qz3p0n91dw9qz5w93l6iqv-module-import-compiled.drv" [color = "red"];
-"/nix/store/8jiqjlb6zxjys16ca7s6jvxcc620c71k-module-import-compiled-guile-builder" [label = "module-import-compiled-guile-builder", fontname = Helvetica, shape = box, style = filled, fillcolor = "#ffffff"];
-"/nix/store/yfixjx2gpvsi5dhkpdx5gj6gx0xdk1c8-module-import-guile-builder" [label = "module-import-guile-builder", fontname = Helvetica, shape = box, style = filled, fillcolor = "#ffffff"];
+"/nix/store/8jiqjlb6zxjys16ca7s6jvxcc620c71k-module-import-compiled-guile-builder" [label = "module-import-compiled-guile-builder", fontname = "dejavu sans", shape = box, style = filled, fillcolor = "#ffffff"];
+"/nix/store/yfixjx2gpvsi5dhkpdx5gj6gx0xdk1c8-module-import-guile-builder" [label = "module-import-guile-builder", fontname = "dejavu sans", shape = box, style = filled, fillcolor = "#ffffff"];
"/nix/store/abagrdbdndkd0y2dwk0nw1gw0g0rhl2z-ftp-client.scm" -> "/nix/store/yfixjx2gpvsi5dhkpdx5gj6gx0xdk1c8-module-import-guile-builder" [color = "green"];
"/nix/store/dwd2iwd1ban8a8rmx568dpgrbkkidfhw-download.scm" -> "/nix/store/yfixjx2gpvsi5dhkpdx5gj6gx0xdk1c8-module-import-guile-builder" [color = "blue"];
"/nix/store/mj7amprgvl2rgash1nr0v64apik8vc7f-utils.scm" -> "/nix/store/yfixjx2gpvsi5dhkpdx5gj6gx0xdk1c8-module-import-guile-builder" [color = "magenta"];
diff --git a/doc/images/bootstrap-packages.dot b/doc/images/bootstrap-packages.dot
index 8b2df068a8..579bbcd00f 100644
--- a/doc/images/bootstrap-packages.dot
+++ b/doc/images/bootstrap-packages.dot
@@ -1,5 +1,5 @@
digraph "Guix bag" {
- "/gnu/store/aymf6jlxxpwgr71rkiz24m646nqsyii6-glibc-intermediate-2.24.drv" [label = "glibc-intermediate-2.24", shape = box, fontname = Helvetica];
+ "/gnu/store/aymf6jlxxpwgr71rkiz24m646nqsyii6-glibc-intermediate-2.24.drv" [label = "glibc-intermediate-2.24", shape = box, fontname = "dejavu sans"];
"/gnu/store/aymf6jlxxpwgr71rkiz24m646nqsyii6-glibc-intermediate-2.24.drv" -> "/gnu/
This message was truncated. Download the full message here.
J
J
Janneke Nieuwenhuizen wrote on 8 Apr 20:46 +0200
[PATCH v3 03/13] maint: Use reproducible timestamps and name for tarball.
(address . 70169@debbugs.gnu.org)
99a54f6f3b2f5707fe51c3d6c6561ce9d30e0d01.1712600307.git.janneke@gnu.org
* Makefile.am (gen-tarball-version): Add reproducible timestamp to tarball.
(am__tar): Use it in new variable, overriding the Automake default.
(GZIP_ENV): New variable, overriding the Automake default.
---
Makefile.am | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)

Toggle diff (41 lines)
diff --git a/Makefile.am b/Makefile.am
index 2b5e145095..a5e49bc406 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,7 +7,7 @@
# Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
# Copyright © 2017 Leo Famulari <leo@famulari.name>
# Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
-# Copyright © 2017, 2020, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+# Copyright © 2017, 2020, 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
# Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
# Copyright © 2018 Nikita <nikita@n0.is>
# Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
@@ -970,6 +970,7 @@ $(top_srcdir)/.version: config.status
gen-tarball-version:
echo $(VERSION) > "$(distdir)/.tarball-version"
+ git show HEAD --format=%ct --no-patch > $(distdir)/.tarball-timestamp
gen-ChangeLog:
$(AM_V_GEN)if test -e .git; then \
@@ -1002,6 +1003,17 @@ dist-with-updated-version:
# Release management.
#
+# Reproducible tarball
+override GZIP_ENV = --best --no-name
+# Be friendly to Debian; avoid using EPOCH
+override am__tar = $${TAR-tar} \
+ --sort=name \
+ --mode=go=rX,u+rw,a-s \
+ --mtime=@$$(cat "$$tardir"/.tarball-timestamp) \
+ --owner=0 --group=0 --numeric-owner \
+ -cf - \
+ "$$tardir"
+
releasedir = release-$(PACKAGE_VERSION)
PACKAGE_FULL_TARNAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 8 Apr 20:46 +0200
[PATCH v3 05/13] maint: Help help2man generate reproducible man-pages.
(address . 70169@debbugs.gnu.org)
1328c73e64bacd037bdf4d01224f03c5a9d7125c.1712600307.git.janneke@gnu.org
* doc/local.mk (SOURCE_DATE_EPOCH): New exported variable.

Change-Id: I6636693695d5502657f1475d93d31949e0b0b39d
---
doc/local.mk | 3 +++
1 file changed, 3 insertions(+)

Toggle diff (16 lines)
diff --git a/doc/local.mk b/doc/local.mk
index 5f014b9c3d..595710a5b8 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -224,6 +224,9 @@ gen_man = \
$(HELP2MANFLAGS)
HELP2MANFLAGS = --source=GNU --info-page=$(PACKAGE_TARNAME)
+# help2man reproducibility
+SOURCE_DATE_EPOCH = $(shell git show HEAD --format=%ct --no-patch 2>/dev/null || echo 1)
+export SOURCE_DATE_EPOCH
$(srcdir)/%D%/guix.1: scripts/guix.in $(sub_commands_mans)
-$(AM_V_HELP2MAN)$(gen_man) --output="$@" `basename "$@" .1`
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 8 Apr 20:46 +0200
[PATCH v3 06/13] maint: Generate AUTHORS and ChangeLog reproducibly.
(address . 70169@debbugs.gnu.org)
626cfae42149334cfc126698159839570c14c4fc.1712600307.git.janneke@gnu.org
* Makefile.am (gen-ChangeLog): Set LC_ALL=en_US.UTF-8 TZ=UTC0.
(gen-AUTHORS): Likewise.

Change-Id: I109ceffdf07b8dde6385b6b509366c47564c9f31
---
Makefile.am | 4 ++++
1 file changed, 4 insertions(+)

Toggle diff (24 lines)
diff --git a/Makefile.am b/Makefile.am
index a5e49bc406..7af88b2988 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -974,6 +974,8 @@ gen-tarball-version:
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; \
@@ -983,6 +985,8 @@ gen-ChangeLog:
gen-AUTHORS:
$(AM_V_GEN)if test -e .git; then \
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"; \
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 8 Apr 20:46 +0200
[PATCH v3 07/13] maint: Generate 'doc/version-LANG.texi' reproducibly.
(address . 70169@debbugs.gnu.org)
599132e3c89700ae3f29d97460c0f94048cf291e.1712600307.git.janneke@gnu.org
* 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(-)

Toggle diff (63 lines)
diff --git a/doc/local.mk b/doc/local.mk
index 595710a5b8..7a9840187a 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -6,6 +6,7 @@
# Copyright © 2016, 2018 Mathieu Lirzin <mthl@gnu.org>
# Copyright © 2018, 2021 Julien Lepiller <julien@lepiller.eu>
# Copyright © 2019 Timothy Sample <samplet@ngyro.com>
+# Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
#
# 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
J
J
Janneke Nieuwenhuizen wrote on 8 Apr 20:46 +0200
[PATCH v3 08/13] maint: Use xgettext.scm wrapper to create .PO files reproducibly.
(address . 70169@debbugs.gnu.org)
166e00ca6ee00be9e6f353fc32bb4c5b3bc93bb8.1712600307.git.janneke@gnu.org
* build-aux/xgettext.scm: New script.
* po/guix/Makevars (XGETTEXT): Set it.
(XGETTEXT_OPTIONS): Add --xgettext option to `real' xgettext.
* po/packages/Makevars (XGETTEXT): Set it.
(XGETTEXT_OPTIONS): Add --xgettext option to `real' xgettext.

Change-Id: I71b6b843970090f765f46ac346b92a346560e3f0
---
build-aux/xgettext.scm | 87 ++++++++++++++++++++++++++++++++++++++++++
po/guix/Makevars | 7 +++-
po/packages/Makevars | 10 ++++-
3 files changed, 101 insertions(+), 3 deletions(-)
create mode 100755 build-aux/xgettext.scm

Toggle diff (145 lines)
diff --git a/build-aux/xgettext.scm b/build-aux/xgettext.scm
new file mode 100755
index 0000000000..e8a970f251
--- /dev/null
+++ b/build-aux/xgettext.scm
@@ -0,0 +1,87 @@
+#! /bin/sh
+# -*-scheme-*-
+build_aux=$(dirname $0)
+srcdir=$build_aux/..
+exec guile --no-auto-compile -L $srcdir -C $srcdir -e main -s "$0" "$@"
+!#
+
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;;
+;;; This program is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; This program is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+;;;; Commentary:
+;;;
+;;; This script provides an xgettext wrapper to (re)set POT-Creation-Date from
+;;; a Git timestamp. Test doing something like:
+;;;
+;;; build-aux/xgettext.scm --files-from=po/guix/POTFILES.in --default-domain=test
+;;;
+;;;; Code:
+
+(use-modules (srfi srfi-1)
+ (srfi srfi-26)
+ (ice-9 curried-definitions)
+ (ice-9 match)
+ (ice-9 popen)
+ (ice-9 rdelim)
+ (guix build utils))
+
+(define ((option? name) option)
+ (string-prefix? name option))
+
+(define (get-option args name)
+ (let ((option (find (option? name) args)))
+ (and option
+ (substring option (string-length name)))))
+
+(define (pipe-command command)
+ (let* ((port (apply open-pipe* OPEN_READ command))
+ (output (read-string port)))
+ (close-port port)
+ output))
+
+
+;;;
+;;; Entry point.
+;;;
+(define (main args)
+ ;; Cater for being run in a container.
+ (setenv "LC_ALL" "en_US.UTF-8")
+ (setenv "TZ" "UTC0")
+ (fluid-set! %default-port-encoding #f)
+ (let* ((files-from (get-option args "--files-from="))
+ (default-domain (get-option args "--default-domain="))
+ (directory (or (get-option args "--directory=") "."))
+ (xgettext (or (get-option args "--xgettext=") "xgettext"))
+ (xgettext-args (filter (negate (option? "--xgettext=")) args))
+ (command (match xgettext-args
+ ((xgettext.scm args ...)
+ `(,xgettext ,@args))))
+ (result (apply system* command))
+ (status (/ result 256)))
+ (if (or (not (zero? status))
+ (not files-from))
+ (exit status)
+ (let* ((text (with-input-from-file files-from read-string))
+ (lines (string-split text #\newline))
+ (files (filter (negate (cute string-prefix? "#" <>)) lines))
+ (files (map (cute string-append directory "/" <>) files))
+ (git-command `("git" "log" "--pretty=format:%ci" "-n1" ,@files))
+ (timestamp (pipe-command git-command))
+ (po-file (string-append default-domain ".po")))
+ (when (string-null? timestamp)
+ (exit 1))
+ (substitute* po-file
+ (("(\"POT-Creation-Date: )[^\\]*" all header)
+ (string-append header timestamp)))))))
diff --git a/po/guix/Makevars b/po/guix/Makevars
index 88a4e8c7bc..4cfd0f431d 100644
--- a/po/guix/Makevars
+++ b/po/guix/Makevars
@@ -5,6 +5,10 @@ DOMAIN = guix
subdir = po/guix
top_builddir = ../..
+# We use our xgettext.scm wrapper to produce .PO files reproducibly using a
+# timestamp from Git.
+XGETTEXT:=$(top_srcdir)/build-aux/xgettext.scm
+
# These options get passed to xgettext. We want to catch standard
# gettext uses, and SRFI-35 error condition messages. In C++ code
# we use 'n_' instead of the more usual 'N_' for no-ops.
@@ -14,7 +18,8 @@ XGETTEXT_OPTIONS = \
--keyword=message \
--keyword=description \
--keyword=synopsis \
- --keyword=n_
+ --keyword=n_ \
+ --xgettext=$(XGETTEXT_)
COPYRIGHT_HOLDER = the authors of Guix (msgids)
diff --git a/po/packages/Makevars b/po/packages/Makevars
index 65912786d8..0ba4f1ba7e 100644
--- a/po/packages/Makevars
+++ b/po/packages/Makevars
@@ -6,12 +6,18 @@ DOMAIN = guix-packages
subdir = po/packages
top_builddir = ../..
+# We use our xgettext.scm wrapper to produce .PO files reproducibly using a
+# timestamp from Git. The `real' xgettext is passed as an option to
+# xgettext.scm
+XGETTEXT:=$(top_srcdir)/build-aux/xgettext.scm
+
# These options get passed to xgettext. We want to catch exclusively package
# synopses and descriptions.
XGETTEXT_OPTIONS = \
--language=Scheme --from-code=UTF-8 \
- --keyword=synopsis --keyword=description \
- --keyword=output-synopsis:2
+ --keyword=synopsis --keyword=description \
+ --keyword=output-synopsis:2 \
+ --xgettext=$(XGETTEXT_)
COPYRIGHT_HOLDER = the authors of Guix (msgids)
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 8 Apr 20:46 +0200
[PATCH v3 09/13] maint: Use reproducible Git timestamp for POT-Creation-Date.
(address . 70169@debbugs.gnu.org)
59ce2f3e278e6629f21358bb66269d2baeeebf95.1712600307.git.janneke@gnu.org
* po/doc/local.mk (%D%/%.pot): Replace POT-Creation-Date using timestamp from
Git.
(%D%/guix-manual.pot): Likewise.

Change-Id: I1b7f8cc147084c1804deb7be9d36e5eeda2599cb
---
po/doc/local.mk | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)

Toggle diff (38 lines)
diff --git a/po/doc/local.mk b/po/doc/local.mk
index dd6ba30133..77ec4721e3 100644
--- a/po/doc/local.mk
+++ b/po/doc/local.mk
@@ -1,6 +1,7 @@
# GNU Guix --- Functional package management for GNU
# Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
# Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+# Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
#
# This file is part of GNU Guix.
#
@@ -44,12 +45,19 @@ POT_OPTIONS = \
--msgid-bugs-address "bug-guix@gnu.org"
%D%/%.pot: $(srcdir)/doc/%.texi
- $(AM_V_PO4A)$(PO4A_UPDATEPO) -M UTF-8 -f texinfo -m "$<" \
- -p "$@" $(POT_OPTIONS) && \
- touch $@
+ $(AM_V_PO4A)$(PO4A_UPDATEPO) -M UTF-8 -f texinfo -m "$<" \
+ -p "$@-t" $(POT_OPTIONS)
+ date="$$(git log --pretty=format:%ci -n 1 -- $< 2>/dev/null \
+ || echo $(SOURCE_DATE_EPOCH))" \
+ sed -ri -e "s,^(.POT-Creation-Date: )[^\]*,\1$$date," "$@-t"
+ mv "$@-t" "$@"
%D%/guix-manual.pot: %D%/guix.pot %D%/contributing.pot
- msgcat $^ > $@
+ msgcat $^ > "$@-t"
+ date="$$(git log --pretty=format:%ci -n 1 -- $< 2>/dev/null \
+ || echo $(SOURCE_DATE_EPOCH))" \
+ sed -ri "s,^(.POT-Creation-Date: )[^\]*,\1$$date," "$@-t"
+ mv "$@-t" "$@"
doc-pot-update: %D%/guix-manual.pot %D%/guix-cookbook.pot
.PHONY: doc-pot-update
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 8 Apr 20:46 +0200
[PATCH v3 04/13] maint: Generate 'doc/version.texi' reproducibly.
(address . 70169@debbugs.gnu.org)(name . Timothy Sample)(address . samplet@ngyro.com)
598ea1a4860dd21a0b6a5bfad1d80cc9f6591a92.1712600307.git.janneke@gnu.org
From: Timothy Sample <samplet@ngyro.com>

* doc/local.mk ($(srcdir)/doc/stamp-vti): New rule (overriding one provided
by Automake).

Co-authored-by: Janneke Nieuwenhuizen <janneke@gnu.org>

Change-Id: If44965e9a3ecfb45865c58ee7a558951be8d15ae
---
doc/local.mk | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (37 lines)
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 <taylanbayirli@gmail.com>
# Copyright © 2016, 2018 Mathieu Lirzin <mthl@gnu.org>
# Copyright © 2018, 2021 Julien Lepiller <julien@lepiller.eu>
+# Copyright © 2019 Timothy Sample <samplet@ngyro.com>
#
# 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
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 8 Apr 20:46 +0200
[PATCH v3 10/13] maint: Avoid EPS generation to fail silently, ensure reproducibility.
(address . 70169@debbugs.gnu.org)
45268fc2a2b8d85454bb2971946f6ab90b394b50.1712600307.git.janneke@gnu.org
Currently, Graphviz' dot does not insert a %%CreationDate. ImageMagick's
convert on PNG->EPS does insert a %%CreationDate but it respects
SOURCE_DATE_EPOCH.

* doc/local.mk (.png.eps): Split single shell command into separate recipe
lines, prefixed by $(AM_V_at).
(.dot.png): Likewise. Check that generated EPS file has no %%CreationDate.

Change-Id: I5a03485c19c72f0c46411815c51290e52a8e5399
---
doc/local.mk | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)

Toggle diff (24 lines)
diff --git a/doc/local.mk b/doc/local.mk
index 7a9840187a..e5ee06f6ee 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -152,12 +152,13 @@ DOT_OPTIONS = \
mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
.dot.eps:
- $(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
- mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
+ $(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
+ $(AM_v_at)! grep -q %%CreationDate "$(srcdir)/$@.tmp"
+ $(AM_V_at)mv "$(srcdir)/$@.tmp" "$@"
.png.eps:
- $(AM_V_GEN)convert "$<" "$@-tmp.eps"; \
- mv "$@-tmp.eps" "$@"
+ $(AM_V_GEN)convert "$<" "$@-tmp.eps"
+ $(AM_V_at)mv "$@-tmp.eps" "$@"
# We cannot add new dependencies to `%D%/guix.pdf' & co. (info "(automake)
# Extending"). Using the `-local' rules is imperfect, because they may be
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 8 Apr 20:46 +0200
[PATCH v3 11/13] maint: Avoid PNG and PDF generation to fail silently.
(address . 70169@debbugs.gnu.org)
e5c80b49d08b1380963f383768023922ead48df3.1712600307.git.janneke@gnu.org
* doc/local.mk (.dot.png): Split single shell command into separate recipe
lines, prefixed by $(AM_V_at).
(.dot.pdf): Likewise.

Change-Id: I41fb856bb73f947abd91361ed203132e939f3897
---
doc/local.mk | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Toggle diff (23 lines)
diff --git a/doc/local.mk b/doc/local.mk
index e5ee06f6ee..569d20c5cb 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -144,12 +144,12 @@ DOT_OPTIONS = \
-Nfontsize=9 -Nheight=.1 -Nwidth=.1
.dot.png:
- $(AM_V_DOT)$(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
- mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
+ $(AM_V_DOT)$(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
+ $(AM_V_at)mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
.dot.pdf:
- $(AM_V_DOT)$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
- mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
+ $(AM_V_DOT)$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
+ $(AM_V_at)mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
.dot.eps:
$(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 8 Apr 20:46 +0200
[PATCH v3 12/13] maint: Reset CreationDate metadata on generated PDFs.
(address . 70169@debbugs.gnu.org)
de5018de13345e9e5db5d67cde5731c942bd9ae1.1712600307.git.janneke@gnu.org
* doc/local.mk (.dot.pdf): Create PDF in UTC0 and reset CreationDate metadata.

Change-Id: I3873ecdeec781c30874d53d032406cbe23922a25
---
doc/local.mk | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

Toggle diff (19 lines)
diff --git a/doc/local.mk b/doc/local.mk
index 569d20c5cb..72f80bb511 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -148,7 +148,11 @@ DOT_OPTIONS = \
$(AM_V_at)mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
.dot.pdf:
- $(AM_V_DOT)$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
+ $(AM_V_DOT)set -e; export TZ=UTC0; \
+ $(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
+ $(AM_V_at)sed -ri \
+ -e 's,(/CreationDate \(D:).*\),\119700101000000),' \
+ "$(srcdir)/$@.tmp"
$(AM_V_at)mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
.dot.eps:
--
2.41.0
J
J
Janneke Nieuwenhuizen wrote on 8 Apr 20:46 +0200
[PATCH v3 13/13] maint: Ensure generated file reproducibility for dist.
(address . 70169@debbugs.gnu.org)
0e305324621bdf2c04a6770d37f15efa85dcdb07.1712600307.git.janneke@gnu.org
* 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(-)

Toggle diff (78 lines)
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
P
P
pelzflorian (Florian Pelz) wrote on 10 Apr 18:35 +0200
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)(address . 70169@debbugs.gnu.org)
87a5m1mb0g.fsf@pelzflorian.de
Hello Janneke.

Janneke Nieuwenhuizen <janneke@gnu.org> writes:
Toggle quote (5 lines)
> +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

Could you enclose the call to git in
“if test -e .git; then … fi” as well?

I’ve switched to wip-tarball, but the hash is different.
It is still quite similar.

florian@floriandesktop ~/src/guix [env]$ diffoscope guix-1.3.0.57741-0e3053.tar.gz /tmp/guix-1.3.0.57741-0e3053.tar.gz
--- guix-1.3.0.57741-0e3053.tar.gz
+++ /tmp/guix-1.3.0.57741-0e3053.tar.gz
??? guix-1.3.0.57741-0e3053.tar
? ??? file list
? ? @@ -215,25 +215,25 @@
? ? -rw-r--r-- 0 0 0 11898 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/local.mk
? ? -rw-r--r-- 0 0 0 2454 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/os-config-bare-bones.texi
? ? -rw-r--r-- 0 0 0 3960 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/os-config-desktop.texi
? ? -rw-r--r-- 0 0 0 2182 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/os-config-lightweight-desktop.texi
? ? -rw-r--r-- 0 0 0 838 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/package-hello.json
? ? -rw-r--r-- 0 0 0 615 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/package-hello.scm
? ? -rw-r--r-- 0 0 0 118 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/stamp-1
? ? --rw-r--r-- 0 0 0 123 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/stamp-2
? ? --rw-r--r-- 0 0 0 123 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/stamp-3
? ? +-rw-r--r-- 0 0 0 125 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/stamp-2
? ? +-rw-r--r-- 0 0 0 125 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/stamp-3
? ? -rw-r--r-- 0 0 0 118 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/stamp-4
? ? --rw-r--r-- 0 0 0 122 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/stamp-5
? ? +-rw-r--r-- 0 0 0 124 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/stamp-5
? ? -rw-r--r-- 0 0 0 118 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/stamp-6
? ? -rw-r--r-- 0 0 0 118 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/stamp-vti
? ? -rw-r--r-- 0 0 0 118 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/version-de.texi
? ? --rw-r--r-- 0 0 0 123 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/version-es.texi
? ? --rw-r--r-- 0 0 0 123 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/version-fr.texi
? ? +-rw-r--r-- 0 0 0 125 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/version-es.texi
? ? +-rw-r--r-- 0 0 0 125 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/version-fr.texi
? ? -rw-r--r-- 0 0 0 118 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/version-pt_BR.texi
? ? --rw-r--r-- 0 0 0 122 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/version-ru.texi
? ? +-rw-r--r-- 0 0 0 124 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/version-ru.texi
? ? -rw-r--r-- 0 0 0 118 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/version-zh_CN.texi
? ? -rw-r--r-- 0 0 0 118 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/version.texi
? ? drwxr-xr-x 0 0 0 0 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/etc/
? ? -rwxr-xr-x 0 0 0 19022 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/etc/committer.scm.in
? ? drwxr-xr-x 0 0 0 0 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/etc/completion/
? ? drwxr-xr-x 0 0 0 0 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/etc/completion/bash/
? ? -rw-r--r-- 0 0 0 9266 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/etc/completion/bash/guix
? ??? guix-1.3.0.57741-0e3053/doc/stamp-2
? ? @@ -1,4 +1,4 @@
? ? -@set UPDATED 29 Februar 2024
? ? -@set UPDATED-MONTH Februar 2024
? ? +@set UPDATED 29 February 2024
? ? +@set UPDATED-MONTH February 2024
? ? @set EDITION .3.0.57741-0e3053
? ? @set VERSION .3.0.57741-0e3053
? ??? guix-1.3.0.57741-0e3053/doc/stamp-3
? ? @@ -1,4 +1,4 @@
? ? -@set UPDATED 29 Februar 2024
? ? -@set UPDATED-MONTH Februar 2024
? ? +@set UPDATED 29 February 2024
? ? +@set UPDATED-MONTH February 2024
? ? @set EDITION .3.0.57741-0e3053
? ? @set VERSION .3.0.57741-0e3053
? ??? guix-1.3.0.57741-0e3053/doc/stamp-5
? ? @@ -1,4 +1,4 @@
? ? -@set UPDATED 1 Februar 2024
? ? -@set UPDATED-MONTH Februar 2024
? ? +@set UPDATED 1 February 2024
? ? +@set UPDATED-MONTH February 2024
? ? @set EDITION .3.0.57741-0e3053
? ? @set VERSION .3.0.57741-0e3053
? ??? guix-1.3.0.57741-0e3053/doc/version-es.texi
? ? @@ -1,4 +1,4 @@
? ? -@set UPDATED 29 Februar 2024
? ? -@set UPDATED-MONTH Februar 2024
? ? +@set UPDATED 29 February 2024
? ? +@set UPDATED-MONTH February 2024
? ? @set EDITION .3.0.57741-0e3053
? ? @set VERSION .3.0.57741-0e3053
? ??? guix-1.3.0.57741-0e3053/doc/version-fr.texi
? ? @@ -1,4 +1,4 @@
? ? -@set UPDATED 29 Februar 2024
? ? -@set UPDATED-MONTH Februar 2024
? ? +@set UPDATED 29 February 2024
? ? +@set UPDATED-MONTH February 2024
? ? @set EDITION .3.0.57741-0e3053
? ? @set VERSION .3.0.57741-0e3053
? ??? guix-1.3.0.57741-0e3053/doc/version-ru.texi
? ? @@ -1,4 +1,4 @@
? ? -@set UPDATED 1 Februar 2024
? ? -@set UPDATED-MONTH Februar 2024
? ? +@set UPDATED 1 February 2024
? ? +@set UPDATED-MONTH February 2024
? ? @set EDITION .3.0.57741-0e3053
? ? @set VERSION .3.0.57741-0e3053

I have used an de_DE locale where February is Februar.

Regards,
Florian
J
J
Janneke Nieuwenhuizen wrote on 10 Apr 19:25 +0200
(name . pelzflorian (Florian Pelz))(address . pelzflorian@pelzflorian.de)(address . 70169@debbugs.gnu.org)
877ch52kqg.fsf@gnu.org
pelzflorian (Florian Pelz) writes:

Hello Florian,

Toggle quote (9 lines)
> Janneke Nieuwenhuizen <janneke@gnu.org> writes:
>> +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
>
> Could you enclose the call to git in
> “if test -e .git; then … fi” as well?

I've changed it to

if test -e .git; then \
git clean -fdx -- '.am*' build-aux m4 po; \
else \
rm -rf .am*; \
$(MAKE) -C po/guix maintainer-clean; \
$(MAKE) -C po/packages maintainer-clean; \
fi

Toggle quote (9 lines)
> I’ve switched to wip-tarball, but the hash is different.
> It is still quite similar.

> florian@floriandesktop ~/src/guix [env]$ diffoscope
> guix-1.3.0.57741-0e3053.tar.gz /tmp/guix-1.3.0.57741-0e3053.tar.gz
> --- guix-1.3.0.57741-0e3053.tar.gz
> +++ /tmp/guix-1.3.0.57741-0e3053.tar.gz
> ??? guix-1.3.0.57741-0e3053.tar
> ? ??? file list
[..]
Toggle quote (6 lines)
> ? ? @@ -215,25 +215,25 @@

> ? ? --rw-r--r-- 0 0 0 123 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/stamp-2
> ? ? --rw-r--r-- 0 0 0 123 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/stamp-3
> ? ? +-rw-r--r-- 0 0 0 125 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/stamp-2
> ? ? +-rw-r--r-- 0 0 0 125 2024-04-08 18:08:07.000000 guix-1.3.0.57741-0e3053/doc/stamp-3
[..]

Toggle quote (10 lines)
> guix-1.3.0.57741-0e3053/etc/completion/bash/guix
> ? ??? guix-1.3.0.57741-0e3053/doc/stamp-2
> ? ? @@ -1,4 +1,4 @@
> ? ? -@set UPDATED 29 Februar 2024
> ? ? -@set UPDATED-MONTH Februar 2024
> ? ? +@set UPDATED 29 February 2024
> ? ? +@set UPDATED-MONTH February 2024
> ? ? @set EDITION .3.0.57741-0e3053
> ? ? @set VERSION .3.0.57741-0e3053

[..]

Toggle quote (2 lines)
> I have used an de_DE locale where February is Februar.

Wow, that's amazing news, and thanks for testing! (I could have said:
well, using de_DE is /asking/ for such differences ;)

I tested with

export LANG=de_DE LANGUAGE=fr_FR LC_TIME=pt_BR

and found similar errors, and only those. In this case LC_TIME
prevailed. So I made this change

Toggle snippet (13 lines)
@@ -264,8 +264,8 @@ endif
# 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; \
+ $$(AM_V_GEN)set -e; \
+ export LANG=C LANGUAGE=C LC_ALL=C LC_TIME=C; \
export TZ=UTC0; \
timestamp="$$$$(git log --pretty=format:%ct -n1 -- "$$<" \
2>/dev/null \

and checked against a clean/LC_ALL=C locale.

Not sure if I should send a V4 for this? Let's see if there are more
comments.

Greetings,
Janneke

--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
P
P
pelzflorian (Florian Pelz) wrote on 11 Apr 13:32 +0200
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)(address . 70169@debbugs.gnu.org)
87zfu0gmnv.fsf@pelzflorian.de
Janneke Nieuwenhuizen <janneke@gnu.org> writes:
Toggle quote (12 lines)
> @@ -264,8 +264,8 @@ endif
> # 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; \
> + $$(AM_V_GEN)set -e; \
> + export LANG=C LANGUAGE=C LC_ALL=C LC_TIME=C; \
> export TZ=UTC0; \
> timestamp="$$$$(git log --pretty=format:%ct -n1 -- "$$<" \
> 2>/dev/null \

LGTM. No v4 needed in my opinion.

Regards,
Florian
J
J
Janneke Nieuwenhuizen wrote on 14 Apr 11:24 +0200
(name . pelzflorian (Florian Pelz))(address . pelzflorian@pelzflorian.de)
87a5lw1el3.fsf@gnu.org
pelzflorian (Florian Pelz) writes:

Toggle quote (15 lines)
> Janneke Nieuwenhuizen <janneke@gnu.org> writes:
>> @@ -264,8 +264,8 @@ endif
>> # 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; \
>> + $$(AM_V_GEN)set -e; \
>> + export LANG=C LANGUAGE=C LC_ALL=C LC_TIME=C; \
>> export TZ=UTC0; \
>> timestamp="$$$$(git log --pretty=format:%ct -n1 -- "$$<" \
>> 2>/dev/null \
>
> LGTM. No v4 needed in my opinion.

Great, pushed to master as 416f11f1d4b2e12d8db2687e753d760f148cfc2d

--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 70169@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 70169
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch