File: reproducible-dates.patch

package info (click to toggle)
keynav 0.20180421~git6505bd0d-3.1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 320 kB
  • sloc: ansic: 1,509; sh: 48; makefile: 48
file content (20 lines) | stat: -rw-r--r-- 677 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: Use upstream version number for snapshot builds
 Date based version numbers cause snapshot builds to become
 non-reproducible and the date of the most recent changelog entry
 doesn't make sense as version number.
Author: Axel Beckert <abe@debian.org>
Forwarded: not-needed

--- a/version.sh
+++ b/version.sh
@@ -6,8 +6,8 @@
 
 if [ -z "$MAJOR" -o -z "$RELEASE" -o -z "$REVISION" ] ; then
   MAJOR="0"
-  RELEASE="$(date +%Y%m%d)"
-  REVISION=0
+  RELEASE="$(dpkg-parsechangelog -SVersion | sed -e 's/^0\.\([0-9]*\)\~git.*$/\1/')"
+  REVISION="$(dpkg-parsechangelog -SVersion | sed -e 's/^.*\~\(git[^-]*\)-[0-9].*$/\1/')"
 fi
 
 VERSION="$MAJOR.$RELEASE.$REVISION"