Source: ruby2.3 Version: 2.3.1-1 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: toolchain fileordering X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org Forwarded: https://github.com/ruby/ruby/pull/1367
Hi! ruby2.3 contains the mkmf.rb module, which is used by several ruby projects to generate Makefiles during build. Unfortunately the generated Makefiles cause unreproducible builds [1], because they don't sort the list of collected (sources/)objects, which leads to an indeterministic linking order. The attached patch (forwarded upstream) fixes this issue. Regards, Reiner [1]: https://tests.reproducible-builds.org/issues/unstable/ruby_mkmf_makefile_unsorted_objects_issue.html
diff --git a/debian/patches/debian-changes b/debian/patches/debian-changes index 6e99b72..838808e 100644 --- a/debian/patches/debian-changes +++ b/debian/patches/debian-changes @@ -105,3 +105,14 @@ files, you can clone that repository, and from the master branch, run: Time.utc(date.year, date.month, date.day) else TODAY +--- a/lib/mkmf.rb ++++ b/lib/mkmf.rb +@@ -2275,7 +2275,7 @@ + LIBS = #{$LIBRUBYARG} #{$libs} #{$LIBS} + ORIG_SRCS = #{orig_srcs.collect(&File.method(:basename)).join(' ')} + SRCS = $(ORIG_SRCS) #{(srcs - orig_srcs).collect(&File.method(:basename)).join(' ')} +-OBJS = #{$objs.join(" ")} ++OBJS = #{$objs.sort.join(" ")} + HDRS = #{hdrs.map{|h| '$(srcdir)/' + File.basename(h)}.join(' ')} + TARGET = #{target} + TARGET_NAME = #{target && target[/\A\w+/]}
signature.asc
Description: PGP signature