Package: dvdisaster / 0.79.5-10

14-make-builds-reproducible.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
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>
Forwarded: not-needed
Last-Update: 2017-08-14
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---
 build.c                   | 2 +-
 closure.c                 | 2 +-
 dvdisaster.h              | 2 +-
 locale/cs.po              | 4 ++--
 locale/pt_BR.po           | 4 ++--
 locale/ru.po              | 4 ++--
 scripts/time-stamper.bash | 8 ++++----
 7 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/build.c b/build.c
index 1666795..05a3b24 100644
--- a/build.c
+++ b/build.c
@@ -25,4 +25,4 @@
 /* build is incremented at each make;
    make recompile of dependent file as fast as possible */
 
-int  buildCount = BUILD;
+const char *const buildCount = BUILD;
diff --git a/closure.c b/closure.c
index 7568cba..51e91a2 100644
--- a/closure.c
+++ b/closure.c
@@ -433,7 +433,7 @@ void InitClosure()
   #define BITNESS_STRING ""
 #endif
 
-   Closure->versionString = g_strdup_printf("dvdisaster %s build %d, %s%s",
+   Closure->versionString = g_strdup_printf("dvdisaster %s build %s, %s%s",
 					    Closure->cookedVersion, buildCount, SYS_NAME, BITNESS_STRING);
 
    /* Replace the dot with a locale-resistant separator */
diff --git a/dvdisaster.h b/dvdisaster.h
index db2031e..bcfd4f5 100644
--- a/dvdisaster.h
+++ b/dvdisaster.h
@@ -450,7 +450,7 @@ void FreeBitmap(Bitmap*);
  *** build.h
  ***/
 
-int buildCount;
+extern const char *const buildCount;
 
 /***
  *** cacheprobe.h
diff --git a/locale/cs.po b/locale/cs.po
index ed1fc65..24b1e7c 100644
--- a/locale/cs.po
+++ b/locale/cs.po
@@ -6476,11 +6476,11 @@ msgstr "<i>Novinky v této verzi:</i>"
 
 #~ msgid ""
 #~ "\n"
-#~ "dvdisaster version %s build %d\n"
+#~ "dvdisaster version %s build %s\n"
 #~ "\n"
 #~ msgstr ""
 #~ "\n"
-#~ "dvdisaster verze %s sestavení %d\n"
+#~ "dvdisaster verze %s sestavení %s\n"
 #~ "\n"
 
 #~ msgid "--prefetch-sectors must be in range 32...8096"
diff --git a/locale/pt_BR.po b/locale/pt_BR.po
index 04b33b5..012ce9e 100644
--- a/locale/pt_BR.po
+++ b/locale/pt_BR.po
@@ -6200,11 +6200,11 @@ msgstr "<i>Novidades dessa versão:</i>"
 
 #~ msgid ""
 #~ "\n"
-#~ "dvdisaster version %s build %d\n"
+#~ "dvdisaster version %s build %s\n"
 #~ "\n"
 #~ msgstr ""
 #~ "\n"
-#~ "dvdisaster, versão %s build %d\n"
+#~ "dvdisaster, versão %s build %s\n"
 
 #~ msgid "--cache-size maximum is 8192MiB."
 #~ msgstr "--cache-size máximo é 8192MiB."
diff --git a/locale/ru.po b/locale/ru.po
index 6cd3789..912d6fb 100644
--- a/locale/ru.po
+++ b/locale/ru.po
@@ -6215,11 +6215,11 @@ msgstr "<i>Новое в этой версии:</i>"
 
 #~ msgid ""
 #~ "\n"
-#~ "dvdisaster version %s build %d\n"
+#~ "dvdisaster version %s build %s\n"
 #~ "\n"
 #~ msgstr ""
 #~ "\n"
-#~ "dvdisaster версия %s сборка %d\n"
+#~ "dvdisaster версия %s сборка %s\n"
 #~ "\n"
 
 #~ msgid "--cache-size maximum is 8192MiB."
diff --git a/scripts/time-stamper.bash b/scripts/time-stamper.bash
index fd28794..4ec3e60 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))
-echo "#define BUILD $build" >$1
-date=$(date +"%d.%m.%y (%A, %H:%M)")
+# Use Debian changelog details to derive build number and date.
+build=$(echo "${DEB_VERSION}" | cut -f2 -d-)
+echo "#define BUILD \"$build\"" >$1
+date=$(date --date="@${SOURCE_DATE_EPOCH}" --utc +"%d.%m.%y (%A, %H:%M)")
 echo "#define BDATE \"$date\"" >>$1