Source: nautilus Version: 46.2-1 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: timestamps X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
Hi, Whilst working on the Reproducible Builds effort [0], we noticed that nautilus could not be built reproducibly. This is because the org.gnome.Nautilus.metainfo.xml file contains the current build date: │ │ │ │ ├── ./usr/share/metainfo/org.gnome.Nautilus.metainfo.xml │ │ │ │ │ @@ -291,15 +291,15 @@ │ │ │ │ │ # For stable releases: │ │ │ │ │ <release version="46.2" type="stable" date="YYYY-MM-DD"/> │ │ │ │ │ │ │ │ │ │ # For Unstable (alpha, beta, rc) releases: │ │ │ │ │ <release version="46.2" type="development" date="YYYY-MM-DD"/> │ │ │ │ │ │ │ │ │ │ # Between releases (at post-release version bump): │ │ │ │ │ - <release version="46.2" date="2024-07-14"/> │ │ │ │ │ + <release version="46.2" date="2025-08-17"/> │ │ │ │ │ --> │ │ │ │ │ <releases> │ │ │ │ │ <release version="46.2" type="stable" date="2024-05-26"/> │ │ │ │ │ </releases> │ │ │ │ │ <project_group>GNOME</project_group> │ │ │ │ │ <project_license>GPL-3.0-or-later</project_license> │ │ │ │ │ <developer id="org.gnome"> A patch is attached that seeds this date from SOURCE_DATE_EPOCH if it is available in the environment. [0] https://reproducible-builds.org/ Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
--- a/debian/patches/Reproducible-Build.patch 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/Reproducible-Build.patch 2024-07-15 08:58:55.528527841 +0100 @@ -0,0 +1,20 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2024-07-15 + +--- nautilus-46.2.orig/data/meson.build ++++ nautilus-46.2/data/meson.build +@@ -45,7 +45,12 @@ desktop_autorun_software = i18n.merge_fi + 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-07-15 08:46:55.181572119 +0100 --- b/debian/patches/series 2024-07-15 08:58:54.552534342 +0100 @@ -1,3 +1,4 @@ skip-tracker-test.patch Reapply-grid-view-Workaround-weakref-bug.patch Revert-build-Bump-gtk-dependency.patch +Reproducible-Build.patch