File libpgm-5.2.122-reproducible-architecture.patch of Package openpgm
30
1
Author: Luca Boccassi <bluca@debian.org>
2
Description: version_generator.py: make build reproducible
3
If SOURCE_DATE_EPOCH is defined then the user is most likely interested
4
in building the library in a reproducible way. So in that case use fixed
5
"BuildSystem" and "BuildMachine" strings instead of the operating system
6
and architecture.
7
Origin: https://github.com/steve-o/openpgm/pull/58
8
--- pgm.orig/version_generator.py
9
+++ pgm/version_generator.py
10
11
build_date = time.strftime ("%Y-%m-%d", timestamp)
12
build_time = time.strftime ("%H:%M:%S", timestamp)
13
build_rev = filter (str.isdigit, "$Revision$")
14
+build_system = platform.system()
15
+build_machine = platform.machine()
16
+if 'SOURCE_DATE_EPOCH' in os.environ:
17
+ build_system = 'BuildSystem'
18
+ build_machine = 'BuildMachine'
19
20
print """
21
/* vim:ts=8:sts=8:sw=4:noai:noexpandtab
22
23
24
25
/* eof */
26
-"""%(build_date, build_time, platform.system(), platform.machine(), build_rev)
27
+"""%(build_date, build_time, build_system, build_machine, build_rev)
28
29
# end of file
30