File: 0001-rdoc-build-reproducible-documentation.patch

package info (click to toggle)
ruby3.1 3.1.2-7%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 132,892 kB
  • sloc: ruby: 1,154,753; ansic: 736,782; yacc: 46,445; pascal: 10,401; sh: 3,931; cpp: 1,158; python: 838; makefile: 787; asm: 462; javascript: 382; lisp: 97; sed: 94; perl: 62; awk: 36; xml: 4
file content (34 lines) | stat: -rw-r--r-- 1,227 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From: Christian Hofstaedtler <zeha@debian.org>
Date: Tue, 10 Oct 2017 15:04:34 -0300
Subject: rdoc: build reproducible documentation

- provide a fixed timestamp to the gzip compression

Signed-off-by: Antonio Terceiro <terceiro@debian.org>
Signed-off-by: Christian Hofstaedtler <zeha@debian.org>
---
 lib/rdoc/generator/json_index.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/rdoc/generator/json_index.rb b/lib/rdoc/generator/json_index.rb
index 3a10000..f40bb37 100644
--- a/lib/rdoc/generator/json_index.rb
+++ b/lib/rdoc/generator/json_index.rb
@@ -178,7 +178,7 @@ class RDoc::Generator::JsonIndex
     debug_msg "Writing gzipped search index to %s" % outfile
 
     Zlib::GzipWriter.open(outfile) do |gz|
-      gz.mtime = File.mtime(search_index_file)
+      gz.mtime = -1
       gz.orig_name = search_index_file.basename.to_s
       gz.write search_index
       gz.close
@@ -196,7 +196,7 @@ class RDoc::Generator::JsonIndex
         debug_msg "Writing gzipped file to %s" % outfile
 
         Zlib::GzipWriter.open(outfile) do |gz|
-          gz.mtime = File.mtime(dest)
+          gz.mtime = -1
           gz.orig_name = dest.basename.to_s
           gz.write data
           gz.close