Source: dracut
Version: 040+1-1
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps

Hi!

While working on the “reproducible builds” effort [1], we have noticed
that dracut could not be built reproducibly.

The attached patch adds a revision date to the manpages. Once
applied, dracut can be built reproducibly in our current experimental
framework.

 [1]: https://wiki.debian.org/ReproducibleBuilds

-- 
Lunar                                .''`. 
lu...@debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   
From 3dfa4445639b1b53735113c9afd37be1fdc46f75 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Bobbio?= <lu...@debian.org>
Date: Wed, 22 Apr 2015 17:52:50 +0000
Subject: [PATCH] Make the package build reproducibly

Add a patch adding a revision date to manpages to get them a deterministic
date.
---
 debian/changelog                                   |   7 +
 .../0001-Add-revision-date-to-manpages.patch       | 235 +++++++++++++++++++++
 debian/patches/series                              |   1 +
 3 files changed, 243 insertions(+)
 create mode 100644 debian/patches/0001-Add-revision-date-to-manpages.patch

diff --git a/debian/changelog b/debian/changelog
index e3cd53e..e47ca8c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+dracut (040+1-1.0~reproducible1) UNRELEASED; urgency=low
+
+  * Make the package build reproducibly:
+    - Add revision date to manpages.
+
+ -- Jérémy Bobbio <lu...@debian.org>  Wed, 22 Apr 2015 17:52:09 +0000
+
 dracut (040+1-1) unstable; urgency=low
 
   * new upstream, Closes: #739794, #758655, #754062, #755271
diff --git a/debian/patches/0001-Add-revision-date-to-manpages.patch b/debian/patches/0001-Add-revision-date-to-manpages.patch
new file mode 100644
index 0000000..bd47a04
--- /dev/null
+++ b/debian/patches/0001-Add-revision-date-to-manpages.patch
@@ -0,0 +1,235 @@
+From 5bf66e84c5b90527c06b460588f339ee6d5b2fcf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Bobbio?= <lu...@debian.org>
+Date: Wed, 22 Apr 2015 17:48:03 +0000
+Subject: [PATCH] Add revision date to manpages
+
+Otherwise the current date is picked, making the build unreproducible.
+
+Magic command-line to pick the right date from Git:
+
+    for i in $(git grep -L ':revdate:' -- '**/*.[0-9].asc'); do
+        revdate=$(git log -1 --date=short --pretty='%cd' $i); \
+        sed -e "3i:revdate: $revdate" -i $i; \ \ \ \
+    done
+---
+ dracut-catimages.8.asc                               | 1 +
+ dracut.8.asc                                         | 1 +
+ dracut.bootup.7.asc                                  | 1 +
+ dracut.cmdline.7.asc                                 | 1 +
+ dracut.conf.5.asc                                    | 1 +
+ dracut.modules.7.asc                                 | 1 +
+ dracut.usage.asc                                     | 1 +
+ lsinitrd.1.asc                                       | 1 +
+ mkinitrd-suse.8.asc                                  | 1 +
+ mkinitrd.8.asc                                       | 1 +
+ modules.d/98systemd/dracut-cmdline.service.8.asc     | 1 +
+ modules.d/98systemd/dracut-initqueue.service.8.asc   | 1 +
+ modules.d/98systemd/dracut-mount.service.8.asc       | 1 +
+ modules.d/98systemd/dracut-pre-mount.service.8.asc   | 1 +
+ modules.d/98systemd/dracut-pre-pivot.service.8.asc   | 1 +
+ modules.d/98systemd/dracut-pre-trigger.service.8.asc | 1 +
+ modules.d/98systemd/dracut-pre-udev.service.8.asc    | 1 +
+ modules.d/98systemd/dracut-shutdown.service.8.asc    | 1 +
+ 18 files changed, 18 insertions(+)
+
+diff --git a/dracut-catimages.8.asc b/dracut-catimages.8.asc
+index 57f422c..0ca3d04 100644
+--- a/dracut-catimages.8.asc
++++ b/dracut-catimages.8.asc
+@@ -1,5 +1,6 @@
+ DRACUT-CATIMAGES(8)
+ ===================
++:revdate: 2012-03-14
+ :doctype: manpage
+ :man source:   dracut
+ :man manual:   dracut
+diff --git a/dracut.8.asc b/dracut.8.asc
+index 7d11f43..7ea4d10 100644
+--- a/dracut.8.asc
++++ b/dracut.8.asc
+@@ -1,5 +1,6 @@
+ DRACUT(8)
+ =========
++:revdate: 2014-09-11
+ :doctype: manpage
+ :man source:   dracut
+ :man manual:   dracut
+diff --git a/dracut.bootup.7.asc b/dracut.bootup.7.asc
+index d7edc1e..4c8e70f 100644
+--- a/dracut.bootup.7.asc
++++ b/dracut.bootup.7.asc
+@@ -1,5 +1,6 @@
+ DRACUT.BOOTUP(7)
+ ================
++:revdate: 2014-01-13
+ :doctype: manpage
+ :man source:   dracut
+ :man manual:   dracut
+diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
+index 48356c7..d863b84 100644
+--- a/dracut.cmdline.7.asc
++++ b/dracut.cmdline.7.asc
+@@ -1,5 +1,6 @@
+ DRACUT.CMDLINE(7)
+ =================
++:revdate: 2014-09-08
+ :doctype: manpage
+ :man source:   dracut
+ :man manual:   dracut
+diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc
+index 0531a49..66a2a7a 100644
+--- a/dracut.conf.5.asc
++++ b/dracut.conf.5.asc
+@@ -1,5 +1,6 @@
+ DRACUT.CONF(5)
+ ==============
++:revdate: 2014-09-11
+ :doctype: manpage
+ :man source:   dracut
+ :man manual:   dracut
+diff --git a/dracut.modules.7.asc b/dracut.modules.7.asc
+index e94670f..986afc6 100644
+--- a/dracut.modules.7.asc
++++ b/dracut.modules.7.asc
+@@ -1,5 +1,6 @@
+ DRACUT.MODULES(7)
+ =================
++:revdate: 2014-01-13
+ :doctype: manpage
+ :man source:   dracut
+ :man manual:   dracut
+diff --git a/dracut.usage.asc b/dracut.usage.asc
+index 9e788c1..a786d31 100644
+--- a/dracut.usage.asc
++++ b/dracut.usage.asc
+@@ -1,5 +1,6 @@
+ To create a initramfs image, the most simple command is:
+ ----
++:revdate: 2014-09-09
+ # dracut
+ ----
+ 
+diff --git a/lsinitrd.1.asc b/lsinitrd.1.asc
+index 4293910..808f17a 100644
+--- a/lsinitrd.1.asc
++++ b/lsinitrd.1.asc
+@@ -1,5 +1,6 @@
+ LSINITRD(1)
+ =========
++:revdate: 2013-04-16
+ :doctype: manpage
+ :man source:   dracut
+ :man manual:   dracut
+diff --git a/mkinitrd-suse.8.asc b/mkinitrd-suse.8.asc
+index 9eb8fc9..a58c2d7 100644
+--- a/mkinitrd-suse.8.asc
++++ b/mkinitrd-suse.8.asc
+@@ -1,5 +1,6 @@
+ MKINITRD(8)
+ ===========
++:revdate: 2013-12-05
+ :doctype: manpage
+ :man source:   dracut
+ :man manual:   dracut
+diff --git a/mkinitrd.8.asc b/mkinitrd.8.asc
+index 146a6d0..708d083 100644
+--- a/mkinitrd.8.asc
++++ b/mkinitrd.8.asc
+@@ -1,5 +1,6 @@
+ MKINITRD(8)
+ =========
++:revdate: 2014-01-13
+ :doctype: manpage
+ :man source:   dracut
+ :man manual:   dracut
+diff --git a/modules.d/98systemd/dracut-cmdline.service.8.asc b/modules.d/98systemd/dracut-cmdline.service.8.asc
+index 859448e..16cb1ac 100644
+--- a/modules.d/98systemd/dracut-cmdline.service.8.asc
++++ b/modules.d/98systemd/dracut-cmdline.service.8.asc
+@@ -1,5 +1,6 @@
+ DRACUT-CMDLINE.SERVICE(8)
+ =========================
++:revdate: 2013-03-25
+ :doctype: manpage
+ :man source:   dracut
+ :man manual:   dracut
+diff --git a/modules.d/98systemd/dracut-initqueue.service.8.asc b/modules.d/98systemd/dracut-initqueue.service.8.asc
+index 66f2d33..691d3bc 100644
+--- a/modules.d/98systemd/dracut-initqueue.service.8.asc
++++ b/modules.d/98systemd/dracut-initqueue.service.8.asc
+@@ -1,5 +1,6 @@
+ DRACUT-INITQUEUE.SERVICE(8)
+ ===========================
++:revdate: 2013-03-25
+ :doctype: manpage
+ :man source:   dracut
+ :man manual:   dracut
+diff --git a/modules.d/98systemd/dracut-mount.service.8.asc b/modules.d/98systemd/dracut-mount.service.8.asc
+index 969123f..7ed529c 100644
+--- a/modules.d/98systemd/dracut-mount.service.8.asc
++++ b/modules.d/98systemd/dracut-mount.service.8.asc
+@@ -1,5 +1,6 @@
+ DRACUT-MOUNT.SERVICE(8)
+ =======================
++:revdate: 2013-03-25
+ :doctype: manpage
+ :man source:   dracut
+ :man manual:   dracut
+diff --git a/modules.d/98systemd/dracut-pre-mount.service.8.asc b/modules.d/98systemd/dracut-pre-mount.service.8.asc
+index 9aa671a..fdd8846 100644
+--- a/modules.d/98systemd/dracut-pre-mount.service.8.asc
++++ b/modules.d/98systemd/dracut-pre-mount.service.8.asc
+@@ -1,5 +1,6 @@
+ DRACUT-PRE-MOUNT.SERVICE(8)
+ ===========================
++:revdate: 2013-03-25
+ :doctype: manpage
+ :man source:   dracut
+ :man manual:   dracut
+diff --git a/modules.d/98systemd/dracut-pre-pivot.service.8.asc b/modules.d/98systemd/dracut-pre-pivot.service.8.asc
+index df500ac..8663d72 100644
+--- a/modules.d/98systemd/dracut-pre-pivot.service.8.asc
++++ b/modules.d/98systemd/dracut-pre-pivot.service.8.asc
+@@ -1,5 +1,6 @@
+ DRACUT-PRE-PIVOT.SERVICE(8)
+ ===========================
++:revdate: 2013-03-25
+ :doctype: manpage
+ :man source:   dracut
+ :man manual:   dracut
+diff --git a/modules.d/98systemd/dracut-pre-trigger.service.8.asc b/modules.d/98systemd/dracut-pre-trigger.service.8.asc
+index 5b0cc7f..9b5eedb 100644
+--- a/modules.d/98systemd/dracut-pre-trigger.service.8.asc
++++ b/modules.d/98systemd/dracut-pre-trigger.service.8.asc
+@@ -1,5 +1,6 @@
+ DRACUT-PRE-TRIGGER.SERVICE(8)
+ =============================
++:revdate: 2013-03-25
+ :doctype: manpage
+ :man source:   dracut
+ :man manual:   dracut
+diff --git a/modules.d/98systemd/dracut-pre-udev.service.8.asc b/modules.d/98systemd/dracut-pre-udev.service.8.asc
+index c91c8e2..9a74a7b 100644
+--- a/modules.d/98systemd/dracut-pre-udev.service.8.asc
++++ b/modules.d/98systemd/dracut-pre-udev.service.8.asc
+@@ -1,5 +1,6 @@
+ DRACUT-PRE-UDEV.SERVICE(8)
+ ==========================
++:revdate: 2013-03-25
+ :doctype: manpage
+ :man source:   dracut
+ :man manual:   dracut
+diff --git a/modules.d/98systemd/dracut-shutdown.service.8.asc b/modules.d/98systemd/dracut-shutdown.service.8.asc
+index f4fbb61..8a4fcb7 100644
+--- a/modules.d/98systemd/dracut-shutdown.service.8.asc
++++ b/modules.d/98systemd/dracut-shutdown.service.8.asc
+@@ -1,5 +1,6 @@
+ DRACUT-SHUTDOWN.SERVICE(8)
+ ===========================
++:revdate: 2013-06-13
+ :doctype: manpage
+ :man source:   dracut
+ :man manual:   dracut
+-- 
+2.1.4
+
diff --git a/debian/patches/series b/debian/patches/series
index 3956bac..169806a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 initramfs-restore
 dev-shm-mount
 aufs
+0001-Add-revision-date-to-manpages.patch
-- 
2.1.4

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to