Package: texi2html Version: 1.82+dfsg1 Severity: normal Tags: patch User: reproducible-bui...@lists.alioth.debian.org
Hi! While working on the "reproducible builds" effort [1], we have noticed that texi2html could not allow to built documentation reproducibly. The attached patch adds the flag use-date that allows use the given string for the date, instead the generated timestamps. Once applied, we can build reproducibly the packages that use texi2html for generate documentation in our current experimental framework. [1]: https://wiki.debian.org/ReproducibleBuilds -- System Information: Debian Release: 8.0 APT prefers testing-updates APT policy: (500, 'testing-updates'), (500, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores) Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system)
Description: Add flag use-date Allow make the build of documentation reproducible using the value given in the command line for use instead of date timestamp. Author: Juan Picca <jumap...@gmail.com> Last-Update: 2015-04-26 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/texi2html.init +++ b/texi2html.init @@ -260,6 +260,10 @@ $MONOLITHIC = 1; # the specified url are used as stylesheet links @CSS_REFS = (); +# -use-date +# the specified string is used as date timestamp in generated files +$USE_DATE = undef; + ###################### # The following options are only relevant if $L2H is set # --- a/texi2html.pl +++ b/texi2html.pl @@ -261,6 +261,7 @@ $EXTERNAL_DIR $IGNORE_PREAMBLE_TEXT @CSS_FILES @CSS_REFS +$USE_DATE $INLINE_CONTENTS $INLINE_INSERTCOPYING ); @@ -1910,6 +1911,8 @@ sub set_date() } $Texi2HTML::THISDOC{'today'} = $Texi2HTML::Config::DATE if (defined($Texi2HTML::Config::DATE)); + $Texi2HTML::THISDOC{'today'} = $Texi2HTML::Config::USE_DATE + if (defined($Texi2HTML::Config::USE_DATE)); $::things_map_ref->{'today'} = $Texi2HTML::THISDOC{'today'}; $::pre_map_ref->{'today'} = $Texi2HTML::THISDOC{'today'}; $::texi_map_ref->{'today'} = $Texi2HTML::THISDOC{'today'}; @@ -2600,6 +2603,13 @@ $T2H_OPTIONS -> {'css-ref'} = verbose => 'generate reference to the CSS URL $s' }; +$T2H_OPTIONS -> {'use-date'} = +{ + type => '=s', + linkage => \$Texi2HTML::Config::USE_DATE, + verbose => 'use given date in generation timestamps $s' +}; + $T2H_OPTIONS -> {'transliterate-file-names'} = { type => '!', --- a/doc/texi2html.texi +++ b/doc/texi2html.texi @@ -853,6 +853,9 @@ This command line switch provides for th to a Cascading Style Sheet (@acronym{CSS}) URL. More than one URL may be specified (array @variable{@@CSS_REFS}). +@item @longopt{use-date=@var{DATE}} +This command line uses the given date in place of generated timestamps. + @item @longopt{html-xref-prefix=@var{path}} This option sets the base directory for external @acronym{HTML} texinfo manuals (variable @variable{$EXTERNAL_DIR}). Defaults to @samp{../}. --- a/doc/texi2html.info +++ b/doc/texi2html.info @@ -700,6 +700,9 @@ Miscalleneous style changes may be achie to a Cascading Style Sheet (CSS) URL. More than one URL may be specified (array `@CSS_REFS'). +`--use-date=DATE' + This command line uses the given date in place of generated timestamps. + `--html-xref-prefix=PATH' This option sets the base directory for external HTML texinfo manuals (variable `$EXTERNAL_DIR'). Defaults to `../'.