Make builds reproducible.
Use the Debian changelog details to derive a build number and date, so that we can make reproducible binaries.
This commit is contained in:
32
debian/patches/14-make-builds-reproducible.patch
vendored
Normal file
32
debian/patches/14-make-builds-reproducible.patch
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
From: Carlos Maddela <e7appew@gmail.com>
|
||||
Date: Mon, 19 Dec 2016 09:39:49 +1100
|
||||
Subject: Make builds reproducible.
|
||||
|
||||
Description: Make builds reproducible.
|
||||
Use the Debian changelog details to derive a build number and date,
|
||||
so that we can make reproducible binaries.
|
||||
Author: Carlos Maddela <e7appew@gmail.com>
|
||||
Origin: vendor
|
||||
Forwarded: not-needed
|
||||
Last-Update: 2016-12-19
|
||||
---
|
||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
---
|
||||
scripts/time-stamper.bash | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/scripts/time-stamper.bash b/scripts/time-stamper.bash
|
||||
index fd28794..60fe91a 100755
|
||||
--- a/scripts/time-stamper.bash
|
||||
+++ b/scripts/time-stamper.bash
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
-build=$(grep BUILD $1 | cut -d\ -f3)
|
||||
-build=$((build+1))
|
||||
+# Use Debian changelog details to derive build number and date.
|
||||
+build=$(dpkg-parsechangelog -S Version | sed 's/.*-\([0-9]\+\).*/\1/')
|
||||
echo "#define BUILD $build" >$1
|
||||
-date=$(date +"%d.%m.%y (%A, %H:%M)")
|
||||
+date=$(date --date="$(dpkg-parsechangelog -S Date)" +"%d.%m.%y (%A, %H:%M)")
|
||||
echo "#define BDATE \"$date\"" >>$1
|
||||
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@@ -10,3 +10,4 @@
|
||||
11-no-cruft.patch
|
||||
12-fix-spelling-of-up-to.patch
|
||||
13-fix-missing-language-field-in-po-files.patch
|
||||
14-make-builds-reproducible.patch
|
||||
|
||||
Reference in New Issue
Block a user