Your message dated Sat, 13 Jan 2024 18:36:48 +0100
with message-id <[email protected]>
and subject line Reprotest fixed for geophar, in salsa.debian.org
has caused the Debian Bug report #1059576,
regarding geophar: please make the build reproducible
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1059576: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1059576
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: geophar
Version: 18.10+dfsg1-1
Severity: wishlist
Tags: patch
X-Debbugs-Cc: [email protected]
Control: user -1 [email protected]

Dear Maintainer,

I'm an occasional volunteer to the Reproducible Builds[0] project and
noticed that your package 'geophar' failed to build reproducibly recently
during automated testing.

The reproducible-builds tests build projects with varying environment
configuration (locale, shell, username, ...) and in the case of 'geophar' it
seems that differing timezones (env var TZ) caused the build to emit different
results.

The cause seems to be the version-replacement code in 'debian/rules' that
embeds the latest version and date from the Debian changelog (sensible) into
the packaged version information.

Extracting some scripting from geophar-18.10+dfsg1 and re-running it for some
widely-separated timezones I confirmed that the resulting output differs:

  $ TZ='Etc/GMT+12' date --date=@$(dpkg-parsechangelog --show-field Timestamp) 
+"%Y, %-m, %-d"
  2023, 10, 4
  $ TZ='Etc/GMT-14' date --date=@$(dpkg-parsechangelog --show-field Timestamp) 
+"%Y, %-m, %-d"
  2023, 10, 6

Since the Debian changelog version is parsed as a Unix timestamp (integer
seconds since 1970-01-01), I think it should be safe to request that the 'date'
command emit an output that is localized to the UTC timezone, creating a stable
output:

  $ TZ='Etc/GMT+12' date --utc --date=@$(dpkg-parsechangelog --show-field 
Timestamp) +"%Y, %-m, %-d"
  2023, 10, 5
  $ TZ='Etc/GMT-14' date --utc --date=@$(dpkg-parsechangelog --show-field 
Timestamp) +"%Y, %-m, %-d"
  2023, 10, 5

Please find attached a patch to achieve this result for the package.

Thank you,
James

[0] - https://reproducible-builds.org/
diff --git a/debian/rules b/debian/rules
index d534751..05a29a5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -54,7 +54,7 @@ override_dh_install:
          sed -i 
's%https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML%http://localhost/javascript/mathjax/MathJax.js%'
 $$f; \
        done
        # modify the version number
-       date=$$(date --date="@$$(dpkg-parsechangelog --show-field Timestamp)" 
+"(%Y, %-m, %-d)"); \
+       date=$$(date --utc --date="@$$(dpkg-parsechangelog --show-field 
Timestamp)" +"(%Y, %-m, %-d)"); \
        version=$$(dpkg-parsechangelog --show-field Version); \
        fileToChange=debian/geophar/usr/share/geophar/wxgeometrie/version.py; \
        echo version = $$version, date_version = $$date; \

--- End Message ---
--- Begin Message ---
So, I close the bug report.

-- 
Georges KHAZNADAR et Jocelyne FOURNIER
22 rue des mouettes, 59240 Dunkerque France.
Téléphone +33 (0)3 28 29 17 70

Attachment: signature.asc
Description: PGP signature


--- End Message ---

Reply via email to