Bug#1083053: muon-meson: please make the build reproducible
Chris Lamb
lamby at debian.org
Mon Sep 30 17:25:32 BST 2024
Source: muon-meson
Version: 0.3.0-3
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
muon-meson could not be built reproducibly. This is because the docs
embed a timezone-dependent date:
│ │ │ ├── ./usr/share/man/man3/meson-reference.3.gz
│ │ │ │ ├── meson-reference.3
│ │ │ │ │ @@ -1,9 +1,9 @@
│ │ │ │ │ .P
│ │ │ │ │ -.TH "meson-reference" "3" "2024-09-27"
│ │ │ │ │ +.TH "meson-reference" "3" "2024-09-28"
│ │ │ │ │ .P
It's based on SOURCE_DATE_EPOCH, but it does not take into account the
build system's timezone.
Patch attached.
[0] https://reproducible-builds.org/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
--- a/debian/patches/0005-Reproducible-build.patch 1969-12-31 16:00:00.000000000 -0800
--- b/debian/patches/0005-Reproducible-build.patch 2024-09-30 09:19:39.273933042 -0700
@@ -0,0 +1,15 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2024-09-30
+
+--- muon-meson-0.3.0.orig/meson-docs/docs/refman/generatorman.py
++++ muon-meson-0.3.0/meson-docs/docs/refman/generatorman.py
+@@ -27,7 +27,7 @@ class ManPage:
+ import time
+ from os import environ
+
+- date = datetime.date.fromtimestamp(int(environ.get('SOURCE_DATE_EPOCH', time.time())))
++ date = datetime.datetime.fromtimestamp(int(environ.get('SOURCE_DATE_EPOCH', time.time())), tz=datetime.timezone.utc).date()
+ self.reset_font()
+ self.text += f'.TH "{name}" "{section}" "{date}"\n'
+
--- a/debian/patches/series 2024-09-30 09:01:58.020542069 -0700
--- b/debian/patches/series 2024-09-30 09:19:31.354090742 -0700
@@ -2,3 +2,4 @@
0002-Never-use-git.patch
0003-Make-meson_reference.3-generation-reproducible.patch
0004-Fix-has_function-test-on-hurd.patch
+0005-Reproducible-build.patch
More information about the Reproducible-bugs
mailing list