Debian Bug report logs -
#1005727
ruby-tioga: reproducible builds: Embedded date in sty file
Reply or subscribe to this bug.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, reproducible-bugs@lists.alioth.debian.org, Vincent Fourmond <fourmond@debian.org>:
Bug#1005727; Package src:ruby-tioga.
(Mon, 14 Feb 2022 00:30:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Vagrant Cascadian <vagrant@reproducible-builds.org>:
New Bug report received and forwarded. Copy sent to reproducible-bugs@lists.alioth.debian.org, Vincent Fourmond <fourmond@debian.org>.
(Mon, 14 Feb 2022 00:30:03 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Source: ruby-tioga
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org
The tioga.sty.gz embeds the current date:
https://tests.reproducible-builds.org/debian/rb-pkg/bookworm/amd64/diffoscope-results/ruby-tioga.html
./usr/share/doc/ruby-tioga/tioga.sty.gz
\ProvidesPackage{tioga}[2023/03/16]
vs.
\ProvidesPackage{tioga}[2022/02/12]
The attached patch fixes this by using the SOURCE_DATE_EPOCH environment
variable instead of the current time, which is typically set from the
timestamp in debian/changelog.
With this patch applied, ruby-tioga should build reproducibly on
tests.reproducible-builds.org!
Thanks for maintaining ruby-tioga!
live well,
vagrant
[0001-misc-mk_tioga_sty.rb-Use-a-consistent-date-when-gene.patch (text/x-diff, inline)]
From 59fec7800e70a9dc93a52121a813b8d1226222c6 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Mon, 14 Feb 2022 00:19:12 +0000
Subject: [PATCH] misc/mk_tioga_sty.rb: Use a consistent date when generating
the sty file.
If the SOURCE_DATE_EPOCH environment variable is available, use that
instead of the current time to set the date.
https://reproducible-builds.org/docs/source-date-epoch/
---
misc/mk_tioga_sty.rb | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/misc/mk_tioga_sty.rb b/misc/mk_tioga_sty.rb
index dcbe275..6bb4fc0 100644
--- a/misc/mk_tioga_sty.rb
+++ b/misc/mk_tioga_sty.rb
@@ -42,7 +42,11 @@ color_specs + "\nEnd_of_preamble\n" +
out.close
-date = Date::today
+if ENV['SOURCE_DATE_EPOCH'].nil?
+ date = Date::today
+else
+ date = Time.at(ENV['SOURCE_DATE_EPOCH'].to_i).gmtime
+end
str_date = sprintf "%04d/%02d/%02d", date.year, date.month, date.day
--
2.34.1
[signature.asc (application/pgp-signature, inline)]
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Wed May 17 10:19:24 2023;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.