Source: libreoffice-dictionaries
Version: 1:26.2.3.2-3
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: timestamps
X-Debbugs-Cc: [email protected]
Hi,
Whilst working on the Reproducible Builds effort [0], we noticed that
libreoffice-dictionaries could not be built reproducibly.
This is because executing dictionaries/pt_BR/test_compile_rules.py in
the dh_auto_test target generates a __pycache__ directory that is not
removed afterwards and creating this directory bumps the modification
time of the surrounding directory.
This last means that if the tests are *skipped* via nocheck, then this
directory will retain its original, upstream timestamp.
A patch is attached that deletes this __pycache__ directory and then
always sets the mtime of this directory to a deterministic value (which
is easier than trying to save and restore upstream's timestamp).
[0] https://reproducible-builds.org/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` [email protected] / chris-lamb.co.uk
`-
--- a/debian/rules 2026-05-14 12:31:09.070863724 -0700
--- b/debian/rules 2026-05-14 12:48:45.743917590 -0700
@@ -37,6 +37,7 @@
done
execute_before_dh_install: install_files
+ touch -d@$(SOURCE_DATE_EPOCH) dictionaries/pt_BR/pythonpath
execute_after_dh_install:
$(call rename_hunspell_files, gug, gug, gug_PY )
@@ -145,6 +146,7 @@
override_dh_auto_test:
cd dictionaries/pt_BR && \
python3 test_compile_rules.py
+ find dictionaries -type d -name __pycache__ -print0 | xargs -0r rm -rf
execute_before_dh_clean:
find dictionaries/ -type f -name '*.idx' -delete