Skip to content

Commit 5ff984f

Browse files
terceirosorah
authored andcommitted
Turn local changes into explicit patches
1 parent 8664f7e commit 5ff984f

6 files changed

+268
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
From: Christian Hofstaedtler <[email protected]>
2+
Date: Tue, 10 Oct 2017 15:04:34 -0300
3+
Subject: rdoc: build reproducible documentation
4+
5+
- sort input filenames
6+
- provide a fixed timestamp to the gzip compression
7+
8+
Signed-off-by: Antonio Terceiro <[email protected]>
9+
Signed-off-by: Christian Hofstaedtler <[email protected]>
10+
---
11+
lib/rdoc/generator/json_index.rb | 4 ++--
12+
lib/rdoc/rdoc.rb | 2 +-
13+
2 files changed, 3 insertions(+), 3 deletions(-)
14+
15+
diff --git a/lib/rdoc/generator/json_index.rb b/lib/rdoc/generator/json_index.rb
16+
index ea9384e..3ad0152 100644
17+
--- a/lib/rdoc/generator/json_index.rb
18+
+++ b/lib/rdoc/generator/json_index.rb
19+
@@ -175,7 +175,7 @@ def generate_gzipped
20+
debug_msg "Writing gzipped search index to %s" % outfile
21+
22+
Zlib::GzipWriter.open(outfile) do |gz|
23+
- gz.mtime = File.mtime(search_index_file)
24+
+ gz.mtime = -1
25+
gz.orig_name = search_index_file.basename.to_s
26+
gz.write search_index
27+
gz.close
28+
@@ -193,7 +193,7 @@ def generate_gzipped
29+
debug_msg "Writing gzipped file to %s" % outfile
30+
31+
Zlib::GzipWriter.open(outfile) do |gz|
32+
- gz.mtime = File.mtime(dest)
33+
+ gz.mtime = -1
34+
gz.orig_name = dest.basename.to_s
35+
gz.write data
36+
gz.close
37+
diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb
38+
index adcb65b..f07dba1 100644
39+
--- a/lib/rdoc/rdoc.rb
40+
+++ b/lib/rdoc/rdoc.rb
41+
@@ -315,7 +315,7 @@ def normalized_file_list(relative_files, force_doc = false,
42+
end
43+
end
44+
45+
- file_list.flatten
46+
+ file_list.flatten.sort
47+
end
48+
49+
##
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
From: Reiner Herrmann <[email protected]>
2+
Date: Tue, 10 Oct 2017 15:06:13 -0300
3+
Subject: lib/mkmf.rb: sort list of object files in generated Makefile
4+
5+
Without sorting the list explicitely, its order is indeterministic,
6+
because readdir() is also not deterministic.
7+
When the list of object files varies between builds, they are linked
8+
in a different order, which results in an unreproducible build.
9+
10+
Signed-off-by: Antonio Terceiro <[email protected]>
11+
Signed-off-by: Reiner Herrmann <[email protected]>
12+
---
13+
lib/mkmf.rb | 2 +-
14+
1 file changed, 1 insertion(+), 1 deletion(-)
15+
16+
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
17+
index 7e40c2d..a7e9d77 100644
18+
--- a/lib/mkmf.rb
19+
+++ b/lib/mkmf.rb
20+
@@ -2281,7 +2281,7 @@ def create_makefile(target, srcprefix = nil)
21+
LIBS = #{$LIBRUBYARG} #{$libs} #{$LIBS}
22+
ORIG_SRCS = #{orig_srcs.collect(&File.method(:basename)).join(' ')}
23+
SRCS = $(ORIG_SRCS) #{(srcs - orig_srcs).collect(&File.method(:basename)).join(' ')}
24+
-OBJS = #{$objs.join(" ")}
25+
+OBJS = #{$objs.sort.join(" ")}
26+
HDRS = #{hdrs.map{|h| '$(srcdir)/' + File.basename(h)}.join(' ')}
27+
LOCAL_HDRS = #{$headers.join(' ')}
28+
TARGET = #{target}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
From: Christian Hofstaedtler <[email protected]>
2+
Date: Tue, 10 Oct 2017 15:07:11 -0300
3+
Subject: Mark Gemspec-reproducible change fixing #784225, too
4+
5+
I think the UTC date change will fix the Multi-Arch not-same file issue,
6+
too.
7+
8+
Signed-off-by: Antonio Terceiro <[email protected]>
9+
Signed-off-by: Christian Hofstaedtler <[email protected]>
10+
---
11+
lib/rubygems/specification.rb | 4 +++-
12+
1 file changed, 3 insertions(+), 1 deletion(-)
13+
14+
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
15+
index efc08c4..890c7c5 100644
16+
--- a/lib/rubygems/specification.rb
17+
+++ b/lib/rubygems/specification.rb
18+
@@ -1786,7 +1786,9 @@ def date= date
19+
raise(Gem::InvalidSpecificationException,
20+
"invalid date format in specification: #{date.inspect}")
21+
end
22+
- when Time, DateLike then
23+
+ when Time then
24+
+ Time.utc(date.utc.year, date.utc.month, date.utc.day)
25+
+ when DateLike then
26+
Time.utc(date.year, date.month, date.day)
27+
else
28+
TODAY
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
From: Antonio Terceiro <[email protected]>
2+
Date: Tue, 10 Oct 2017 15:08:43 -0300
3+
Subject: Make gemspecs reproducible
4+
5+
With an explicit date, they will get the current date and make build
6+
unreproducible
7+
---
8+
ext/bigdecimal/bigdecimal.gemspec | 1 +
9+
ext/io/console/io-console.gemspec | 2 +-
10+
lib/rdoc/rdoc.gemspec | 1 +
11+
3 files changed, 3 insertions(+), 1 deletion(-)
12+
13+
diff --git a/ext/bigdecimal/bigdecimal.gemspec b/ext/bigdecimal/bigdecimal.gemspec
14+
index 4efe438..c0d19e7 100644
15+
--- a/ext/bigdecimal/bigdecimal.gemspec
16+
+++ b/ext/bigdecimal/bigdecimal.gemspec
17+
@@ -5,6 +5,7 @@
18+
s.name = "bigdecimal"
19+
s.version = _VERSION
20+
s.authors = ["Kenta Murata", "Zachary Scott", "Shigeo Kobayashi"]
21+
+ s.date = RUBY_RELEASE_DATE
22+
s.email = ["[email protected]"]
23+
24+
s.summary = "Arbitrary-precision decimal floating-point number library."
25+
diff --git a/ext/io/console/io-console.gemspec b/ext/io/console/io-console.gemspec
26+
index 1256162..99e18bd 100644
27+
--- a/ext/io/console/io-console.gemspec
28+
+++ b/ext/io/console/io-console.gemspec
29+
@@ -5,7 +5,7 @@
30+
Gem::Specification.new do |s|
31+
s.name = "io-console"
32+
s.version = _VERSION
33+
- s.date = date
34+
+ s.date = RUBY_RELEASE_DATE
35+
s.summary = "Console interface"
36+
s.email = "[email protected]"
37+
s.description = "add console capabilities to IO instances."
38+
diff --git a/lib/rdoc/rdoc.gemspec b/lib/rdoc/rdoc.gemspec
39+
index 2787f07..578c023 100644
40+
--- a/lib/rdoc/rdoc.gemspec
41+
+++ b/lib/rdoc/rdoc.gemspec
42+
@@ -7,6 +7,7 @@
43+
44+
Gem::Specification.new do |s|
45+
s.name = "rdoc"
46+
+ s.date = RUBY_RELEASE_DATE
47+
s.version = RDoc::VERSION
48+
s.date = "2017-10-10"
49+
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
From: Christian Hofstaedtler <[email protected]>
2+
Date: Tue, 10 Oct 2017 15:54:24 -0300
3+
Subject: Exclude tests that fail on Debian builds
4+
5+
Some of these tests fail because of the sbuild environment, others fail
6+
on some Debian architectures, and others fail for some yet-unknown
7+
reason.
8+
9+
Signed-off-by: Antonio Terceiro <[email protected]>
10+
Signed-off-by: Christian Hofstaedtler <[email protected]>
11+
---
12+
test/excludes/TestArray.rb | 1 +
13+
test/excludes/TestBeginEndBlock.rb | 1 +
14+
test/excludes/TestDir.rb | 1 +
15+
test/excludes/TestFile.rb | 1 +
16+
test/excludes/TestFileExhaustive.rb | 1 +
17+
test/excludes/TestGc.rb | 1 +
18+
test/excludes/TestMkmf/TestConfig.rb | 1 +
19+
test/excludes/TestProcess.rb | 6 ++++++
20+
test/excludes/TestRefinement.rb | 2 ++
21+
test/excludes/TestRubyOptimization.rb | 1 +
22+
10 files changed, 16 insertions(+)
23+
create mode 100644 test/excludes/TestArray.rb
24+
create mode 100644 test/excludes/TestBeginEndBlock.rb
25+
create mode 100644 test/excludes/TestDir.rb
26+
create mode 100644 test/excludes/TestFile.rb
27+
create mode 100644 test/excludes/TestFileExhaustive.rb
28+
create mode 100644 test/excludes/TestGc.rb
29+
create mode 100644 test/excludes/TestMkmf/TestConfig.rb
30+
create mode 100644 test/excludes/TestProcess.rb
31+
create mode 100644 test/excludes/TestRefinement.rb
32+
create mode 100644 test/excludes/TestRubyOptimization.rb
33+
34+
diff --git a/test/excludes/TestArray.rb b/test/excludes/TestArray.rb
35+
new file mode 100644
36+
index 0000000..6625436
37+
--- /dev/null
38+
+++ b/test/excludes/TestArray.rb
39+
@@ -0,0 +1 @@
40+
+exclude :test_permutation_stack_error, "too expensive, will timeout on some Debian architectures"
41+
diff --git a/test/excludes/TestBeginEndBlock.rb b/test/excludes/TestBeginEndBlock.rb
42+
new file mode 100644
43+
index 0000000..cf72f0b
44+
--- /dev/null
45+
+++ b/test/excludes/TestBeginEndBlock.rb
46+
@@ -0,0 +1 @@
47+
+exclude :test_propagate_signaled, "FIXME: investigate failure"
48+
diff --git a/test/excludes/TestDir.rb b/test/excludes/TestDir.rb
49+
new file mode 100644
50+
index 0000000..ad5d650
51+
--- /dev/null
52+
+++ b/test/excludes/TestDir.rb
53+
@@ -0,0 +1 @@
54+
+exclude :test_home, "fails under sbuild"
55+
diff --git a/test/excludes/TestFile.rb b/test/excludes/TestFile.rb
56+
new file mode 100644
57+
index 0000000..460780c
58+
--- /dev/null
59+
+++ b/test/excludes/TestFile.rb
60+
@@ -0,0 +1 @@
61+
+exclude :test_open_tempfile_path, "fails under sbuild"
62+
diff --git a/test/excludes/TestFileExhaustive.rb b/test/excludes/TestFileExhaustive.rb
63+
new file mode 100644
64+
index 0000000..075fb40
65+
--- /dev/null
66+
+++ b/test/excludes/TestFileExhaustive.rb
67+
@@ -0,0 +1 @@
68+
+exclude :test_expand_path_for_existent_username, "fails under sbuild"
69+
diff --git a/test/excludes/TestGc.rb b/test/excludes/TestGc.rb
70+
new file mode 100644
71+
index 0000000..c381dbe
72+
--- /dev/null
73+
+++ b/test/excludes/TestGc.rb
74+
@@ -0,0 +1 @@
75+
+exclude :test_gc_parameter, "too expensive, timesout on some Debian architectures"
76+
diff --git a/test/excludes/TestMkmf/TestConfig.rb b/test/excludes/TestMkmf/TestConfig.rb
77+
new file mode 100644
78+
index 0000000..2e25548
79+
--- /dev/null
80+
+++ b/test/excludes/TestMkmf/TestConfig.rb
81+
@@ -0,0 +1 @@
82+
+exclude :test_dir_config, "fails for some reason"
83+
diff --git a/test/excludes/TestProcess.rb b/test/excludes/TestProcess.rb
84+
new file mode 100644
85+
index 0000000..5c10bb2
86+
--- /dev/null
87+
+++ b/test/excludes/TestProcess.rb
88+
@@ -0,0 +1,6 @@
89+
+exclude :test_exec_wordsplit, "fails under sbuild"
90+
+exclude :test_popen_wordsplit, "fails under sbuild"
91+
+exclude :test_popen_wordsplit_beginning_and_trailing_spaces, "fails under sbuild"
92+
+exclude :test_spawn_wordsplit, "fails under sbuild"
93+
+exclude :test_status_quit, "fails under sbuild"
94+
+exclude :test_system_wordsplit, "fails under sbuild"
95+
diff --git a/test/excludes/TestRefinement.rb b/test/excludes/TestRefinement.rb
96+
new file mode 100644
97+
index 0000000..8f148fd
98+
--- /dev/null
99+
+++ b/test/excludes/TestRefinement.rb
100+
@@ -0,0 +1,2 @@
101+
+# Found on Debian arm*, powerpc buildds
102+
+exclude :test_prepend_after_refine_wb_miss, "time consuming test"
103+
diff --git a/test/excludes/TestRubyOptimization.rb b/test/excludes/TestRubyOptimization.rb
104+
new file mode 100644
105+
index 0000000..6f1a4ba
106+
--- /dev/null
107+
+++ b/test/excludes/TestRubyOptimization.rb
108+
@@ -0,0 +1 @@
109+
+exclude :test_tailcall_interrupted_by_sigint, "hangs under sbuild"

debian/patches/series

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
0001-rdoc-build-reproducible-documentation.patch
2+
0002-lib-mkmf.rb-sort-list-of-object-files-in-generated-M.patch
3+
0003-Mark-Gemspec-reproducible-change-fixing-784225-too.patch
4+
0004-Make-gemspecs-reproducible.patch
5+
0005-Exclude-tests-that-fail-on-Debian-builds.patch

0 commit comments

Comments
 (0)