[DRE-maint] Bug#1136425: ruby-otr-activerecord: please make the build reproducible

Chris Lamb lamby at debian.org
Wed May 13 17:53:10 BST 2026


Source: ruby-otr-activerecord
Version: 2.6.0-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed that
ruby-otr-activerecord could not be built reproducibly.

This is because the testsuite bumps the modification time of the
directories under the examples/ dir to the current time (which later
gets clamped back to SOURCE_DATE_EPOCH), so if the tests are skipped
via nocheck, then this directory will retain its original, upstream
timestamp.

Instead of saving upstream's original timestamp and restoring that
later, I've attached a patch to always set the mtime of this directory
to SOURCE_DATE_EPOCH, regardless of whether the tests are run or not.


 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/rules	2026-05-13 08:59:49.092936380 -0700
--- b/debian/rules	2026-05-13 09:24:31.303521549 -0700
@@ -6,5 +6,10 @@
 %:
 	dh $@ --buildsystem=ruby --with ruby
 
+execute_before_dh_auto_install:
+	# Running the testsuite adjusts the mtimes of these directories so
+	# reset them to a fixed time for reproducibility
+	touch -d@$(SOURCE_DATE_EPOCH) examples/*/
+
 override_dh_installchangelogs:
 	dh_installchangelogs CHANGELOG.md


More information about the Pkg-ruby-extras-maintainers mailing list