Bug#1098350: rocdbgapi: please make the build reproducible

Chris Lamb lamby at debian.org
Wed Feb 19 11:44:51 GMT 2025


Source: rocdbgapi
Version: 5.7.1-2
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps user
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed that
rocdbgapi could not be built reproducibly.

This is because it embedded the a timezone-varying date (fixed by passing
"UTC" in CMakeLists.txt) as well as the build username (fixed by exporting
a fixed value of the "USER" environment variable).

Patch attached.

 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/patches/reproducible-build.patch	1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/reproducible-build.patch	2025-02-19 11:41:20.774040209 +0000
@@ -0,0 +1,15 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2025-02-19
+
+--- rocdbgapi-5.7.1.orig/CMakeLists.txt
++++ rocdbgapi-5.7.1/CMakeLists.txt
+@@ -144,7 +144,7 @@ if(DEFINED ENV{ROCM_BUILD_ID})
+   # ROCM_BUILD_ID is set by the ROCm-CI build environment.
+   set(build_info $ENV{ROCM_BUILD_ID})
+ else()
+-  string(TIMESTAMP NOW "%Y%m%dT%H%M%S")
++  string(TIMESTAMP NOW "%Y%m%dT%H%M%S" UTC)
+   set(build_info developer-build-${NOW})
+ 
+   if(DEFINED ENV{USER})
--- a/debian/patches/series	2025-02-19 11:33:55.332975661 +0000
--- b/debian/patches/series	2025-02-19 11:41:18.334012860 +0000
@@ -1,2 +1,3 @@
 pkgconfig-multiarch.patch
 1000-portable-int-sizes.patch
+reproducible-build.patch
--- a/debian/rules	2025-02-19 11:33:55.332975661 +0000
--- b/debian/rules	2025-02-19 11:41:08.277901545 +0000
@@ -1,6 +1,7 @@
 #!/usr/bin/make -f
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 export VERBOSE=1
+export USER=debian
 
 %:
 	dh $@ -Scmake


More information about the Reproducible-bugs mailing list