Source: gem2deb Version: 0.17 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: timezone timestamps
Hi! While working on the "reproducible builds" effort [1], we have noticed that dh_ruby don't allow generate the gemspec file from the metadata.yml file in a reproducible manner due usage of the user timezone. The attached patch set the environment variable TZ to UTC in dh_ruby, ignoring the timezone of the user. Once applied, we can built about 70 packages reproducibly in our current experimental framework. [1]: https://wiki.debian.org/ReproducibleBuilds -- System Information: Debian Release: stretch/sid APT prefers testing-updates APT policy: (500, 'testing-updates'), (500, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores) Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system)
diff -urNp gem2deb-0.17.old/bin/dh_ruby gem2deb-0.17+nmu1/bin/dh_ruby --- gem2deb-0.17.old/bin/dh_ruby 2015-05-28 08:50:10.000000000 -0300 +++ gem2deb-0.17+nmu1/bin/dh_ruby 2015-06-05 15:26:29.476450780 -0300 @@ -21,6 +21,8 @@ require 'gem2deb/setup_rb_installer' require 'optparse' include Gem2Deb +ENV["TZ"] = "UTC" + engine = Gem2Deb::DhRuby.new optparse = OptionParser.new do |opts| diff -urNp gem2deb-0.17.old/debian/changelog gem2deb-0.17+nmu1/debian/changelog --- gem2deb-0.17.old/debian/changelog 2015-05-28 08:50:10.000000000 -0300 +++ gem2deb-0.17+nmu1/debian/changelog 2015-06-05 15:39:49.308481924 -0300 @@ -1,3 +1,10 @@ +gem2deb (0.17+nmu1) unstable; urgency=medium + + * dh_ruby: set TZ environ variable to UTC for make the generation of + gemspec file from metadata.yml reproducible. + + -- Juan Picca <jumap...@gmail.com> Fri, 05 Jun 2015 18:22:37 +0000 + gem2deb (0.17) unstable; urgency=medium * dh-make-ruby: