Source: petitboot
Version: 13.05.29.14.00-g4dc604b-1.1
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: timestamps
X-Debbugs-Cc: [email protected]
Hi,
Whilst working on the Reproducible Builds effort [0] we noticed that
petitboot could not be built reproducibly.
This is because it used the build date when working out the package
version.
Patch attached that uses SOURCE_DATE_EPOCH if its available, although
it does prefer the Git checkout if that exists.
[0] https://reproducible-builds.org/
[1] https://reproducible-builds.org/specs/source-date-epoch/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` [email protected] / chris-lamb.co.uk
`---- a/debian/patches/reproducible-build.patch 1970-01-01 01:00:00.000000000
+0100
--- b/debian/patches/reproducible-build.patch 2020-06-19 11:09:53.187101587
+0100
@@ -0,0 +1,17 @@
+Description: Make the build reproducible
+Author: Chris Lamb <[email protected]>
+Last-Update: 2020-06-19
+
+--- petitboot-13.05.29.14.00-g4dc604b.orig/bootstrap
++++ petitboot-13.05.29.14.00-g4dc604b/bootstrap
+@@ -27,6 +27,10 @@ elif head=$(git rev-parse --short --veri
+ if git diff-index HEAD | read dummy; then
+ version=`printf '%s%s' ${version} -dirty`
+ fi
++elif test -n "${SOURCE_DATE_EPOCH}"; then
++ # Use SOURCE_DATE_EPOCH
<https://reproducible-builds.org/specs/source-date-epoch/>
++
++ version="dev-$(date --utc --date="@${SOURCE_DATE_EPOCH}"
+%y.%m.%d-%H.%M.%S)"
+ else
+ # Default to current date and time.
+
--- a/debian/patches/series 2020-06-19 10:58:14.090474738 +0100
--- b/debian/patches/series 2020-06-19 11:05:54.918183177 +0100
@@ -1 +1,2 @@
fix-automake-warnings.patch
+reproducible-build.patch