From: Pádraig Brady
Date: Fri, 27 Nov 2015 12:26:00 +0000 (+0000)
Subject: build: support reproducible builds with consistent man pages
X-Git-Tag: v8.25~72
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1b3d65877913f139175920699ad2c5aed592ea8;p=thirdparty%2Fcoreutils.git
build: support reproducible builds with consistent man pages
Use a consistent date in the generated man pages
even if SOURCE_DATE_EPOCH is not set.
* Makefile.am: Generate .timestamp in the tarball.
* man/local.mk: Pass .timestamp if available to help2man.
* man/dummy-man: Don't bother with the year in the stub.
Reported in http://bugs.debian.org/806321
---
diff --git a/Makefile.am b/Makefile.am
index cc4fde7aa2..d1004e1a80 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -105,6 +105,7 @@ BUILT_SOURCES = .version
# See the rm_subst comment for details.
dist-hook: gen-ChangeLog
$(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
+ $(AM_V_GEN)date +%s > $(distdir)/.timestamp
$(AM_V_at)perl -pi -e '$(rm_subst)' $(distdir)/Makefile.in
gen_start_date = 2008-02-08
diff --git a/man/dummy-man b/man/dummy-man
index bf31912b2e..f05ce2ab4f 100755
--- a/man/dummy-man
+++ b/man/dummy-man
@@ -48,11 +48,10 @@ inadequate on this system. Creating a stub man page instead.
END
progname=`basename_ "$1"`
-year=`LC_ALL=C date +%Y`
bs='\'
cat >"$output" <