Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'doc/4.3-reproducible' into docs-next

Ben Hutchings writes:

As part of the reproducible builds project, Jérémy Bobbio identified
several time-dependent and non-deterministic functions in the document
build process (htmldocs, mandocs targets). This patch series should fix
all of those.

I ended up reverting one patch that introduced problems.

+15 -5
+1 -1
Documentation/DocBook/Makefile
··· 56 56 57 57 MAN := $(patsubst %.xml, %.9, $(BOOKS)) 58 58 mandocs: $(MAN) 59 - find $(obj)/man -name '*.9' | xargs gzip -f 59 + find $(obj)/man -name '*.9' | xargs gzip -nf 60 60 61 61 installmandocs: mandocs 62 62 mkdir -p /usr/local/man/man9/
+1
Documentation/DocBook/stylesheet.xsl
··· 5 5 <param name="funcsynopsis.tabular.threshold">80</param> 6 6 <param name="callout.graphics">0</param> 7 7 <!-- <param name="paper.type">A4</param> --> 8 + <param name="generate.consistent.ids">1</param> 8 9 <param name="generate.section.toc.level">2</param> 9 10 <param name="use.id.as.filename">1</param> 10 11 </stylesheet>
+13 -4
scripts/kernel-doc
··· 253 253 my $blankline = $blankline_man; 254 254 my $modulename = "Kernel API"; 255 255 my $function_only = 0; 256 + my $show_not_found = 0; 257 + 258 + my @build_time; 259 + if (defined($ENV{'KBUILD_BUILD_TIMESTAMP'}) && 260 + (my $seconds = `date -d"${ENV{'KBUILD_BUILD_TIMESTAMP'}}" +%s`) ne '') { 261 + @build_time = gmtime($seconds); 262 + } else { 263 + @build_time = localtime; 264 + } 265 + 256 266 my $man_date = ('January', 'February', 'March', 'April', 'May', 'June', 257 267 'July', 'August', 'September', 'October', 258 - 'November', 'December')[(localtime)[4]] . 259 - " " . ((localtime)[5]+1900); 260 - my $show_not_found = 0; 268 + 'November', 'December')[$build_time[4]] . 269 + " " . ($build_time[5]+1900); 261 270 262 271 # Essentially these are globals. 263 272 # They probably want to be tidied up, made more localised or something. ··· 2596 2587 2597 2588 # generate a sequence of code that will splice in highlighting information 2598 2589 # using the s// operator. 2599 - foreach my $pattern (keys %highlights) { 2590 + foreach my $pattern (sort keys %highlights) { 2600 2591 # print STDERR "scanning pattern:$pattern, highlight:($highlights{$pattern})\n"; 2601 2592 $dohighlight .= "\$contents =~ s:$pattern:$highlights{$pattern}:gs;\n"; 2602 2593 }