Bug#1150439: kicad-library-utils: please make the build reproducible
Chris Lamb
lamby at debian.org
Fri Oct 9 18:57:00 BST 2026
Source: kicad-library-utils
Version: 0.0~git20260724.8a0f223-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: nocheck
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org
Hi,
Whilst working on the Reproducible Builds effort [0], we noticed that
kicad-library-utils could not be built reproducibly.
This is because the testsuite bumps the modification time of two
directories to the current time (which later get clamped *back* to
SOURCE_DATE_EPOCH), so if the tests are skipped via nocheck,
then these directories will retain their original, upstream timestamp.
Also, the testsuite additionally did not tidy up after itself completely,
leading to a similar issue whereby the binary package differed if the
tests were run or not.
Patch attached that ensures these directories always have the same
timestamp, regardless of whether the tests are run, and additionally
tidies up this file.
[0] https://reproducible-builds.org/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
--- a/debian/rules 2026-10-09 10:30:54.628638687 -0700
--- b/debian/rules 2026-10-09 10:49:53.662814175 -0700
@@ -35,6 +35,13 @@
ln -s /usr/share/fonts/truetype/roboto/unhinted/RobotoCondensed-Regular.ttf \
debian/kicad-library-utils/usr/share/kicad-library-utils/tools/fonts/Roboto/RobotoCondensed-Regular.ttf
+ # If we ran the tests, we adjusted the mtimes of these dirs, so always force them
+ # to a fixed time for reproducibility
+ touch \
+ -d@$(SOURCE_DATE_EPOCH) \
+ debian/kicad-library-utils/usr/share/kicad-library-utils/klc-check/rules_footprint \
+ debian/kicad-library-utils/usr/share/kicad-library-utils/klc-check/rules_symbol
+
# The upstream Makefile test target does all kinds of stuff we don't care about
# (e.g. spellchecking and formatting the code) so only run the test targets we
# really want to call.
@@ -44,3 +51,5 @@
test-klc-footprints \
test-klc-symbols \
test-comparelibs-symbols
+ # Cleanup
+ rm -f symbol-generators/BQ24004-example.kicad_sym
More information about the Reproducible-bugs
mailing list