Source: libpgm
Version: 5.2.122~dfsg-2
Severity: normal
Tags: patch
Control: tags 920259 patch

Dear Maintainer,

The library currently fails to build reproducibly because the version
script embeds the operating system and architecture strings.

The attached patch, merged upstream, pins them to fixed strings in case
SOURCE_DATE_EPOCH is defined.

https://github.com/steve-o/openpgm/pull/58

Thanks!

-- 
Kind regards,
Luca Boccassi
Author: Luca Boccassi <[email protected]>
Description: version_generator.py: make build reproducible
 If SOURCE_DATE_EPOCH is defined then the user is most likely interested
 in building the library in a reproducible way. So in that case use fixed
 "BuildSystem" and "BuildMachine" strings instead of the operating system
 and architecture.
Origin: https://github.com/steve-o/openpgm/pull/58
--- a/openpgm/pgm/version_generator.py
+++ b/openpgm/pgm/version_generator.py
@@ -8,6 +8,11 @@ timestamp = time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))
 build_date = time.strftime ("%Y-%m-%d", timestamp)
 build_time = time.strftime ("%H:%M:%S", timestamp)
 build_rev = ''.join (list (filter (str.isdigit, "$Revision$")))
+build_system = platform.system()
+build_machine = platform.machine()
+if 'SOURCE_DATE_EPOCH' in os.environ:
+        build_system = 'BuildSystem'
+        build_machine = 'BuildMachine'
 
 print ("""
 /* vim:ts=8:sts=8:sw=4:noai:noexpandtab
@@ -51,7 +56,7 @@ const char* pgm_build_revision = "{4}";
 
 
 /* eof */
-""".format (build_date, build_time, platform.system(), platform.machine(), build_rev))
+""".format (build_date, build_time, build_system, build_machine, build_rev))
 
 # end of file
 

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to