Bug#1066083: gnome-maps: please make the build reproducible
Chris Lamb
lamby at debian.org
Tue Mar 12 10:27:20 GMT 2024
Source: gnome-maps
Version: 46~beta-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
gnome-maps could not be built reproducibly.
This is because it embedded the current build date in an XML file:
│ │ │ │ ├── ./usr/share/metainfo/org.gnome.Maps.appdata.xml
│ │ │ │ │ </screenshots>
│ │ │ │ │ <releases>
│ │ │ │ │ - <release date="2025-04-14" version="46.beta"/>
│ │ │ │ │ + <release date="2024-03-12" version="46.beta"/>
Patch attached that updates the Meson build file to use the
SOURCE_DATE_EPOCH environment variable if it exists.
[0] https://reproducible-builds.org/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
--- a/debian/patches/reproducible-build.patch 1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/reproducible-build.patch 2024-03-12 10:25:05.728519725 +0000
@@ -0,0 +1,20 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2024-03-12
+
+--- gnome-maps-46~beta.orig/data/meson.build
++++ gnome-maps-46~beta/data/meson.build
+@@ -39,7 +39,12 @@ install_data(
+ today = 'unknown'
+ date = find_program('date', required: false)
+ if date.found()
+- r = run_command(date, '-I')
++ cmd = run_command('sh', '-c', 'echo $SOURCE_DATE_EPOCH')
++ source_date_epoch = cmd.stdout().strip()
++ if source_date_epoch == ''
++ source_date_epoch = run_command(date, '+%s').stdout().strip()
++ endif
++ r = run_command(date, '-u', '-d', '@' + source_date_epoch, '-I')
+ if r.returncode() == 0
+ today = r.stdout().strip()
+ endif
--- a/debian/patches/series 2024-03-12 10:05:04.804812036 +0000
--- b/debian/patches/series 2024-03-12 10:25:04.932516349 +0000
@@ -0,0 +1 @@
+reproducible-build.patch
More information about the pkg-gnome-maintainers
mailing list