Bug#1121076: ansible-lint: please make the build reproducible

Chris Lamb lamby at debian.org
Thu Nov 20 15:05:39 GMT 2025


Source: ansible-lint
Version: 25.6.1+really25.2.1-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
ansible-lint could not be built reproducibly.

This was because it ships a different binary package depending
on whether the tests are run or not, which was caused by the
PYBUILD_AFTER_TEST invocation missing a reference to remove:

   {build_dir}/collections/ansible_collections/local/testcollection

(This directory appears to be created during the testsuite
run.)

Patch attached.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/rules	2025-11-19 13:09:46.596073598 -0800
--- b/debian/rules	2025-11-19 13:14:53.797523671 -0800
@@ -3,7 +3,7 @@
 include /usr/share/dpkg/default.mk
 export LC_ALL=C.UTF-8
 export PYBUILD_BEFORE_TEST=cp --recursive {dir}/playbook.yml {dir}/examples {dir}/conftest.py {dir}/.pre-commit-config.yaml {dir}/.ansible-lint {dir}/collections {build_dir}/
-export PYBUILD_AFTER_TEST=rm -Rf {build_dir}/playbook.yml {build_dir}/examples {build_dir}/conftest.py {build_dir}/.pre-commit-config.yaml {build_dir}/.ansible-lint
+export PYBUILD_AFTER_TEST=rm -Rf {build_dir}/playbook.yml {build_dir}/examples {build_dir}/conftest.py {build_dir}/.pre-commit-config.yaml {build_dir}/.ansible-lint {build_dir}/collections/ansible_collections/local/testcollection
 
 export PYBUILD_TEST_ARGS=$(DEB_BUILD_OPTION_PARALLEL:%=-n %) -k "not (test_spdx or test_args_module_pass or test_risky_file_permissions or test_fqcn_builtin_fail or test_fqcn_builtin_pass or test_transformer or test_call_from_outside_venv or test_schema_moves or test_rules_id_format or test_yamllint or test_example or test_example_custom_module or test_verbosity or test_task_hook_import_playbook or test_request_timeouterror_handling or test_requests_uses_timeout or test_schema_refresh_cli or test_refresh_schemas or test_jinja_transform or test_no_tabs_rule or test_nodeps[1] or test_nodeps[2] or test_import_playbook_from_collection or test_broken_ansible_cfg or test_find_children_in_module or test_args_module_relative_import or test_find_children_in_playbook)"
 # test_spdx: requires the yet-to-be-packaged https://pypi.org/project/spdx/


More information about the Reproducible-bugs mailing list