Source: aboot Version: 1.0~pre20040408-4 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: timestamps locale X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org
Hi! While working on the "reproducible builds" effort [1], we have noticed that aboot could not be built reproducibly. It has a copy of the docbook2man-de-spec.pl script from docbook-utils, which doesn't support SOURCE_DATE_EPOCH yet, so the timestamp embedded into manpages varies with locale and build time. The attached patch fixes this. Regards, Reiner [1]: https://wiki.debian.org/ReproducibleBuilds
diff --git a/doc/man/de/docbook2man-de-spec.pl b/doc/man/de/docbook2man-de-spec.pl index 2eed901..d52b26a 100644 --- a/doc/man/de/docbook2man-de-spec.pl +++ b/doc/man/de/docbook2man-de-spec.pl @@ -78,6 +78,7 @@ Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. use SGMLS; # Use the SGMLS package. use SGMLS::Output; # Use stack-based output. use SGMLS::Refs; +use POSIX qw(strftime setlocale LC_TIME); ######################################################################## @@ -93,6 +94,10 @@ $blank_xrefs = 0; $default_sect = "1"; $default_date = `date "+%d %B %Y"`; # L10N +if ($ENV{SOURCE_DATE_EPOCH}) { + setlocale(LC_TIME, "C"); + $default_date = strftime("%d %B %Y", gmtime($ENV{SOURCE_DATE_EPOCH} || time)); +} while (@ARGV) { my $arg = shift @ARGV;
signature.asc
Description: PGP signature