Bug#1056649: vectorscan: please make the build reproducible
Chris Lamb
lamby at debian.org
Fri Nov 24 11:23:39 GMT 2023
Source: vectorscan
Version: 5.4.11-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org
Hi,
Whilst working on the Reproducible Builds effort [0], we noticed that
vectorscan could not be built reproducibly.
This is because it embeds a timezone-sensitive date via CMake's
string(TIMESTAMP …) functionality:
string (TIMESTAMP BUILD_DATE "%Y-%m-%d")
Since version 3.8.0, CMake has seeded the underlying value of these
timestamps from SOURCE_DATE_EPOCH. However, the lack of the optional
"UTC" argument means that this deterministic date will still be
rendered nondeterministically under different timezones.
For example:
├── ./usr/include/hs/hs_version.h
│ @@ -28,15 +28,15 @@
│
│ #ifndef HS_VERSION_H_C6428FAF8E3713
│ #define HS_VERSION_H_C6428FAF8E3713
│
│ /**
│ * A version string to identify this release of Hyperscan.
│ */
│ -#define HS_VERSION_STRING "5.4.11 2023-11-20"
│ +#define HS_VERSION_STRING "5.4.11 2023-11-21"
This string is also included in various vectorscan binaries as well.
A patch attached that simply adds "UTC" to the TIMESTAMP call.
[0] https://reproducible-builds.org/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
--- a/debian/patches/reproducible-builds.patch 1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/reproducible-builds.patch 2023-11-24 10:14:29.621651931 +0000
@@ -0,0 +1,15 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2023-11-24
+
+--- vectorscan-5.4.11.orig/CMakeLists.txt
++++ vectorscan-5.4.11/CMakeLists.txt
+@@ -7,7 +7,7 @@ set (HS_MINOR_VERSION 4)
+ set (HS_PATCH_VERSION 11)
+ set (HS_VERSION ${HS_MAJOR_VERSION}.${HS_MINOR_VERSION}.${HS_PATCH_VERSION})
+
+-string (TIMESTAMP BUILD_DATE "%Y-%m-%d")
++string (TIMESTAMP BUILD_DATE "%Y-%m-%d" UTC)
+ message(STATUS "Build date: ${BUILD_DATE}")
+
+ # Dependencies check
--- a/debian/patches/series 1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/series 2023-11-24 10:14:28.081648884 +0000
@@ -0,0 +1 @@
+reproducible-builds.patch
More information about the Reproducible-bugs
mailing list