Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame^] | 1 | From: Christian Hofstaedtler <zeha@debian.org> |
| 2 | Date: Tue, 10 Oct 2017 15:04:34 -0300 |
| 3 | Subject: rdoc: build reproducible documentation |
| 4 | |
| 5 | - provide a fixed timestamp to the gzip compression |
| 6 | |
| 7 | Upstream-Status: Backport [debian] |
| 8 | |
| 9 | Signed-off-by: Antonio Terceiro <terceiro@debian.org> |
| 10 | Signed-off-by: Christian Hofstaedtler <zeha@debian.org> |
| 11 | --- |
| 12 | lib/rdoc/generator/json_index.rb | 4 ++-- |
| 13 | lib/rdoc/rdoc.rb | 2 +- |
| 14 | 2 files changed, 3 insertions(+), 3 deletions(-) |
| 15 | |
| 16 | --- a/lib/rdoc/generator/json_index.rb |
| 17 | +++ b/lib/rdoc/generator/json_index.rb |
| 18 | @@ -178,7 +178,7 @@ |
| 19 | debug_msg "Writing gzipped search index to %s" % outfile |
| 20 | |
| 21 | Zlib::GzipWriter.open(outfile) do |gz| |
| 22 | - gz.mtime = File.mtime(search_index_file) |
| 23 | + gz.mtime = -1 |
| 24 | gz.orig_name = search_index_file.basename.to_s |
| 25 | gz.write search_index |
| 26 | gz.close |
| 27 | @@ -196,7 +196,7 @@ |
| 28 | debug_msg "Writing gzipped file to %s" % outfile |
| 29 | |
| 30 | Zlib::GzipWriter.open(outfile) do |gz| |
| 31 | - gz.mtime = File.mtime(dest) |
| 32 | + gz.mtime = -1 |
| 33 | gz.orig_name = dest.basename.to_s |
| 34 | gz.write data |
| 35 | gz.close |