[debian-mysql] Bug#782318: mylvmbackup: please make the build reproducible

Vagrant Cascadian vagrant at reproducible-builds.org
Thu Sep 22 18:25:23 BST 2022


Control: tags 782318 pending

On 2015-04-10, Reiner Herrmann wrote:
> While working on Debian's “reproducible builds” effort [1], we have
> noticed that mylvmbackup doesn't build reproducibly.
> It embeds the current date into the mylvmbackup script.
>
> The attached patch fixes this by using the last changelog date
> as a timestamp that will be embedded.

Uploaded an NMU fixing this to DELAYED/10 with a slightly updated patch
using SOURCE_DATE_EPOCH:

diff -Nru mylvmbackup-0.15/debian/changelog mylvmbackup-0.15/debian/changelog
--- mylvmbackup-0.15/debian/changelog   2022-04-21 06:42:15.000000000 -0700
+++ mylvmbackup-0.15/debian/changelog   2022-09-22 10:11:19.000000000 -0700
@@ -1,3 +1,11 @@
+mylvmbackup (0.15-1.3) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * debian/rules: Use SOURCE_DATE_EPOCH to set consistent build
+    date. (Closes: #782318)
+
+ -- Vagrant Cascadian <vagrant at reproducible-builds.org>  Thu, 22 Sep 2022 10:11:19 -0700
+
 mylvmbackup (0.15-1.2) unstable; urgency=medium

   * Non-maintainer upload.
diff -Nru mylvmbackup-0.15/debian/rules mylvmbackup-0.15/debian/rules
--- mylvmbackup-0.15/debian/rules       2014-05-22 10:27:25.000000000 -0700
+++ mylvmbackup-0.15/debian/rules       2022-09-22 10:11:19.000000000 -0700
@@ -3,9 +3,15 @@
 export DH_VERBOSE=1
 export DH_OPTIONS=-v

+# Use consistent date for reproducible builds
+BUILDDATE=$(shell date -u "+%Y-%m-%d" -d "@$(SOURCE_DATE_EPOCH)")
+
 %:
        dh  $@

+override_dh_auto_build:
+       dh_auto_build -- BUILDDATE=$(BUILDDATE)
+
 override_dh_auto_install:
        dh_auto_install -- prefix=/usr


live well,
  vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-mysql-maint/attachments/20220922/4bbd2beb/attachment.sig>


More information about the pkg-mysql-maint mailing list