File: 31_reproducible-build.patch

package info (click to toggle)
xloadimage 4.1-27
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,880 kB
  • sloc: ansic: 36,063; makefile: 306; asm: 284; sh: 144
file content (19 lines) | stat: -rw-r--r-- 535 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Description: Make the build reproducible
Author: Chris Lamb <lamby@debian.org>
Last-Update: 2016-07-18

--- a/build-info
+++ b/build-info
@@ -30,6 +30,12 @@ else
   uname='char *BuildSystem= "<unknown system>";'
 fi
 
+if [ -n "$SOURCE_DATE_EPOCH" ]; then
+  date='char *BuildDate= "'$(LC_ALL=C date --utc --date="@${SOURCE_DATE_EPOCH}")'";'
+  user='char *BuildUser= (char *)0;'
+  uname='char *BuildSystem= (char *)0;'
+fi
+
 echo '/* THIS FILE IS AUTOMATICALLY GENERATED */' > build.c
 echo $uname >> build.c
 echo $date >> build.c