Source: maildir-utils Version: 1.10.8-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 maildir-utils could not be built reproducibly: ├── ./usr/share/man/man1/mu-add.1.gz │ ├── mu-add.1 │ │ @@ -85,15 +85,15 @@ │ │ Dirk-Jan C. Binnema <d...@djcbsoftware.nl> │ │ │ │ .SH "COPYRIGHT" │ │ .PP │ │ This manpage is part of \fBmu\fP 1.10.8. │ │ │ │ .PP │ │ -Copyright © 2022-2024 Dirk-Jan C. Binnema. License GPLv3+: GNU GPL version 3 │ │ +Copyright © 2022-2023 Dirk-Jan C. Binnema. License GPLv3+: GNU GPL version 3 │ │ or later \fIhttps://gnu.org/licenses/gpl.html\fP. This is free software: you are A patch is attached that seeds this value from the SOURCE_DATE_EPOCH environment variable. [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 2023-11-23 10:29:51.399821031 +0000 @@ -0,0 +1,21 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2023-11-23 + +--- maildir-utils-1.10.8.orig/man/meson.build ++++ maildir-utils-1.10.8/man/meson.build +@@ -66,7 +66,13 @@ man_orgs=[ + + env = environment() + env.set('LANG', 'C') +-yearmonth = run_command('date', '+%B %Y', check:true, capture:true, env: env) ++cmd = run_command('sh', '-c', 'echo $SOURCE_DATE_EPOCH') ++# https://reproducible-builds.org/docs/source-date-epoch/#meson ++source_date_epoch = cmd.stdout().strip() ++if source_date_epoch == '' ++ source_date_epoch = run_command('date', '+%s').stdout().strip() ++endif ++yearmonth = run_command('date', '-u', '-d', '@' + source_date_epoch, '+%B %Y', check:true, capture:true, env: env) + ym=yearmonth.stdout().strip() + + foreach src : man_orgs --- a/debian/patches/series 2023-11-23 10:05:00.063724061 +0000 --- b/debian/patches/series 2023-11-23 10:29:50.287802884 +0000 @@ -5,3 +5,4 @@ more-man-page-fixes.patch typo-fixes.patch remove-mu4e-builddir.patch +reproducible-build.patch