Package: help2man Version: 1.46.6 Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: timestamp toolchain
Hi Brendan-- Please consider the attached patch as a step on the way toward allowing packages that use help2man to build reproducibly. For more info, see: https://reproducible.debian.net/issues/unstable/timestamps_in_manpage_generated_by_help2man_issue.html Thanks for help2man, --dkg
>From c0622fc09da334f4637eb983c8585de2e8128642 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor <d...@fifthhorseman.net> Date: Mon, 1 Jun 2015 14:21:57 -0400 Subject: [PATCH] add --date option to enable reproducible builds This patch provides a -d or --date option to help2man, which allows the invoker to avoid embedding the current timestamp in the generated manpage. This should help to address the issue described here: https://reproducible.debian.net/issues/unstable/timestamps_in_manpage_generated_by_help2man_issue.html --- debian/changelog | 8 ++++++++ help2man.PL | 11 +++++++++-- help2man.texi | 5 +++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 80fa32f..4f1b980 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +help2man (1.46.6+nmu1) unstable; urgency=medium + + * Non-Maintainer Upload. + * add -d or --date option to avoid embedding the current month+year in + the generated man page. + + -- Daniel Kahn Gillmor <d...@fifthhorseman.net> Mon, 01 Jun 2015 14:21:08 -0400 + help2man (1.46.6) unstable; urgency=medium * Add Danish translation (thanks to Joe Hansen). diff --git a/help2man.PL b/help2man.PL index cefed06..97da3ea 100755 --- a/help2man.PL +++ b/help2man.PL @@ -16,7 +16,7 @@ use 5.008; use Config; use Getopt::Long; -my ($program, $version) = ('help2man', '1.46.6'); +my ($program, $version) = ('help2man', '1.46.6+nmu1'); my %opts; die "Usage: $0 [--quiet] [--stdout] [--with-gettext] [--name] [--version]\n" @@ -207,7 +207,7 @@ my $help_option = '--help'; my $version_option = '--version'; my $discard_stderr = 1; my ($opt_name, @opt_include, $opt_output, $opt_info, $opt_no_info, $opt_libtool, - $version_text); + $version_text, $opt_date); my %opt_def = ( 'n|name=s' => \$opt_name, @@ -219,6 +219,7 @@ my %opt_def = ( 'I|opt-include=s' => sub { push @opt_include, [ pop, 0 ] }, 'o|output=s' => \$opt_output, 'p|info-page=s' => \$opt_info, + 'd|date=s' => \$opt_date, 'N|no-info' => \$opt_no_info, 'l|libtool' => \$opt_libtool, 'help' => sub { print $help_info; exit }, @@ -371,6 +372,12 @@ $version_text ||= get_option_value $ARGV[0], $version_option; # is used on the footer of the generated manual pages. If in doubt, you may # just use %x as the value (which should be the full locale-specific date). my $date = enc strftime _("%B %Y"), localtime; +if ($opt_date) +{ + # --date overrides local time. + $date = $opt_date; +} + my $program = program_basename $ARGV[0]; my $package = $program; my $version; diff --git a/help2man.texi b/help2man.texi index f35067d..89df8a0 100644 --- a/help2man.texi +++ b/help2man.texi @@ -167,6 +167,11 @@ Send output to @var{file} rather than @code{stdout}. @itemx --info-page=@var{text} Name of Texinfo manual. +@item -d @var{text} +@itemx --date=@var{text} +The string to use for the date of the man page. By default, help2man +will use the current month and year. + @item -N @itemx --no-info Suppress inclusion of a @samp{SEE ALSO} paragraph directing the reader -- 2.1.4