Bug#1115999: openrgb: please make the build reproducible
Chris Lamb
lamby at debian.org
Mon Sep 22 20:38:45 BST 2025
Source: openrgb
Version: 0.9+git20250413+ds-2
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
openrgb could not be built reproducibly. It's currently unreproducible
for two reasons:
1. The build system embeds the current time into the binary. Whilst
the value is seeded from SOURCE_DATE_EPOCH if it exists, the
value generated still varied on the build system timezone. This
can be fixed by using date(1)'s --utc flag.
2. When generating the udev rules, the build-udev-rules.sh script
iterates over files via:
find ${CONTROLLER_PATH} -name "RGBController_*.cpp" | sort
However, due to the sorting collation used at build time, files
under, say, ZETEdgeAirProController and ZalmanZSyncController will
be sorted differently due to the different rules for where capital
letters sort. Using LC_ALL=C for sort(1) will address that.
Patch attached.
[0] https://reproducible-builds.org/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
--- a/debian/patches/6-use-utc-timezone-for-timestamp.patch 1969-12-31 16:00:00.000000000 -0800
--- b/debian/patches/6-use-utc-timezone-for-timestamp.patch 2025-09-22 10:55:13.956177533 -0700
@@ -0,0 +1,15 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2025-09-22
+
+--- openrgb-0.9+git20250413+ds.orig/OpenRGB.pro
++++ openrgb-0.9+git20250413+ds/OpenRGB.pro
+@@ -69,7 +69,7 @@ message("VERSION_RPM: "$$VERSION_RPM)
+ # Automatically generated build information #
+ #-----------------------------------------------------------------------------------------------#
+ win32:BUILDDATE = $$system(date /t)
+-linux:BUILDDATE = $$system(date -R -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}")
++linux:BUILDDATE = $$system(date -u -R -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}")
+ freebsd:BUILDDATE = $$system(date -j -R -r "${SOURCE_DATE_EPOCH:-$(date +%s)}")
+ macx:BUILDDATE = $$system(date -j -R -r "${SOURCE_DATE_EPOCH:-$(date +%s)}")
+ GIT_COMMIT_ID = $$(DEB_UPSTREAM_COMMIT)
--- a/debian/patches/7-use-C-collation-when-generating-udev-scripts.patch 1969-12-31 16:00:00.000000000 -0800
--- b/debian/patches/7-use-C-collation-when-generating-udev-scripts.patch 2025-09-22 11:56:29.959273195 -0700
@@ -0,0 +1,15 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2025-09-22
+
+--- openrgb-0.9+git20250413+ds.orig/scripts/build-udev-rules.sh
++++ openrgb-0.9+git20250413+ds/scripts/build-udev-rules.sh
+@@ -61,7 +61,7 @@ DUMMY_LIST=$(grep -hR -e DUMMY_DEVICE_DE
+ # Create a list of RGBController.cpp classes including path #
+ #-----------------------------------------------------------------------------#
+ echo -e "Creating file list to parse metadata"
+-FILE_LIST=$(find ${CONTROLLER_PATH} -name "RGBController_*.cpp" | sort)
++FILE_LIST=$(find ${CONTROLLER_PATH} -name "RGBController_*.cpp" | LC_ALL=C sort)
+
+ #Check the output of the file_list
+ # echo -e "$FILE_LIST" >> "file_list.txt"
--- a/debian/patches/series 2025-09-22 09:59:17.353906658 -0700
--- b/debian/patches/series 2025-09-22 11:35:10.835045955 -0700
@@ -2,3 +2,5 @@
2-use-external-libs.patch
4-change-hueplusplus-header-include.patch
5-desktop-entry-keywords.patch
+6-use-utc-timezone-for-timestamp.patch
+7-use-C-collation-when-generating-udev-scripts.patch
More information about the Reproducible-bugs
mailing list