Generate the ChangeLog reproducibly.
* build-aux/gitlog-to-changelog-repro.patch: New file. * Makefile.am (EXTRA_DIST): Add it. (build-aux/gitlog-to-changelog-repro): New rule. (gen-ChangeLog): Use 'gitlog-to-changelog-repro'. (DISTCLEANFILES): Add 'build-aux/gitlog-to-changelog-repro'.
This commit is contained in:
parent
fda97e32ef
commit
a4cfff0641
|
@ -9,6 +9,7 @@
|
||||||
!/build-aux/git-version-gen
|
!/build-aux/git-version-gen
|
||||||
!/build-aux/gitlab-ci.yml
|
!/build-aux/gitlab-ci.yml
|
||||||
!/build-aux/gitlog-to-changelog
|
!/build-aux/gitlog-to-changelog
|
||||||
|
!/build-aux/gitlog-to-changelog-repro.patch
|
||||||
!/build-aux/guile.am
|
!/build-aux/guile.am
|
||||||
!/build-aux/pre-inst-env.in
|
!/build-aux/pre-inst-env.in
|
||||||
/config.log
|
/config.log
|
||||||
|
|
14
Makefile.am
14
Makefile.am
|
@ -27,6 +27,7 @@ EXTRA_DIST += \
|
||||||
build-aux/git-version-gen \
|
build-aux/git-version-gen \
|
||||||
build-aux/gitlab-ci.yml \
|
build-aux/gitlab-ci.yml \
|
||||||
build-aux/gitlog-to-changelog \
|
build-aux/gitlog-to-changelog \
|
||||||
|
build-aux/gitlog-to-changelog-repro.patch \
|
||||||
guix.scm \
|
guix.scm \
|
||||||
tests/data/README
|
tests/data/README
|
||||||
|
|
||||||
|
@ -206,10 +207,17 @@ dist-hook: gen-ChangeLog
|
||||||
cp $(srcdir)/.tarball-timestamp $(distdir)/.tarball-timestamp; \
|
cp $(srcdir)/.tarball-timestamp $(distdir)/.tarball-timestamp; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
build-aux/gitlog-to-changelog-repro: \
|
||||||
|
$(srcdir)/build-aux/gitlog-to-changelog \
|
||||||
|
$(srcdir)/build-aux/gitlog-to-changelog-repro.patch
|
||||||
|
$(AM_V_GEN){ mkdir -p $$(dirname $@) && \
|
||||||
|
patch -t --output=$@ $? && \
|
||||||
|
chmod a+x $@; }
|
||||||
|
|
||||||
.PHONY: gen-ChangeLog
|
.PHONY: gen-ChangeLog
|
||||||
gen-ChangeLog:
|
gen-ChangeLog: build-aux/gitlog-to-changelog-repro
|
||||||
$(AM_V_GEN)if test -d .git; then \
|
$(AM_V_GEN)if test -d .git; then \
|
||||||
{ $(top_srcdir)/build-aux/gitlog-to-changelog \
|
{ ./build-aux/gitlog-to-changelog-repro \
|
||||||
--format='%s%n%n%b%n' -- v0.1.. && \
|
--format='%s%n%n%b%n' -- v0.1.. && \
|
||||||
echo && \
|
echo && \
|
||||||
sed -n -e '/^Copyright/,$$p' < $(top_srcdir)/ChangeLog; \
|
sed -n -e '/^Copyright/,$$p' < $(top_srcdir)/ChangeLog; \
|
||||||
|
@ -250,6 +258,8 @@ CLEANFILES += \
|
||||||
$(UNIT_TESTS:tests/%.scm=tests/%.log) \
|
$(UNIT_TESTS:tests/%.scm=tests/%.log) \
|
||||||
$(UNIT_TESTS:tests/%.scm=tests/%.trs)
|
$(UNIT_TESTS:tests/%.scm=tests/%.trs)
|
||||||
|
|
||||||
|
DISTCLEANFILES = build-aux/gitlog-to-changelog-repro
|
||||||
|
|
||||||
clean-local:
|
clean-local:
|
||||||
$(MAKE) $(AM_MAKEFLAGS) -L -C tests/spec clean
|
$(MAKE) $(AM_MAKEFLAGS) -L -C tests/spec clean
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
This patch adjusts the 'gitlog-to-changelog' script from Gnulib so
|
||||||
|
that its output is reproducible.
|
||||||
|
|
||||||
|
diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog
|
||||||
|
index deddef2..6fec950 100755
|
||||||
|
--- a/build-aux/gitlog-to-changelog
|
||||||
|
+++ b/build-aux/gitlog-to-changelog
|
||||||
|
@@ -345,7 +345,7 @@ sub git_dir_option($)
|
||||||
|
? ' (tiny change)' : '');
|
||||||
|
|
||||||
|
my $date_line = sprintf "%s %s$tiny\n",
|
||||||
|
- strftime ("%Y-%m-%d", localtime ($1)), $2;
|
||||||
|
+ strftime ("%Y-%m-%d", gmtime ($1)), $2;
|
||||||
|
|
||||||
|
my @coauthors = grep /^Co-authored-by:.*$/, @line;
|
||||||
|
# Omit meta-data lines we've already interpreted.
|
Loading…
Reference in New Issue