found 1043644 1:20.0.0-3
tags 1043644 patch
thanks
Hello.
In the next days/weeks I plan to reopen bugs like this one, because
either they were not properly fixed, or they were but the fix is not
effective anymore.
Fortunately many of the affected packages are cut by the same pattern,
so I hope that the following explanations will apply to many of them
as well.
When I try to build the source of barbican after a binary build, this
is what I get currently:
dpkg-source: info: local changes detected, the modified files are:
barbican/.pybuild/cpython3_3.13/.pydistutils.cfg
barbican/.pybuild/cpython3_3.14/.pydistutils.cfg
barbican/AUTHORS
barbican/ChangeLog
barbican/etc/barbican/barbican.conf
The package is using debhelper and dh-python, which already know how
to clean those .pybuild directories, but it's not working here because
debian/rules is like this:
override_dh_auto_clean:
rm -f debian/*.init debian/*.service debian/*.upstart
rm -rf build
rm -rf barbican.sqlite debian/po debian/barbican-api.templates
debian/barbican-common.templates
rm -f debian/barbican-api.postinst debian/barbican-api.config
debian/barbican-common.postinst debian/barbican-common.config
debian/barbican-common.postrm
find $(CURDIR) -type f -iname '*.pyc' -delete || true
find $(CURDIR) -type d -iname __pycache__ -exec rm -rf {} \; || true
rm -rf *.egg-info
rm -f doc/source/_static/barbican.conf.sample
doc/source/_static/barbican.policy.yaml.sample
which does not include the default dh_auto_clean anywhere.
I'm attaching a patch which fixes all the issues in the way I believe
it makes most sense, using the default dh_auto_clean "as is", as it
already takes care of removing *.pyc, __pycache__ and the .pybuild
directories, and moving everything else to debian/clean, which is a
lot easier to update, as you don't have to use "rm -f" or "rm -rf".
Thanks.
commit da8ba0e4ed0d94e8538efeac8eec2b04738eb25b
Author: Santiago Vila <[email protected]>
Date: Tue Jan 20 20:10:00 2026 +0100
Fix clean target. Closes: #1043644.
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 00000000..fa47edfb
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1,15 @@
+AUTHORS
+ChangeLog
+debian/*.init
+debian/*.service
+debian/barbican-api.config
+debian/barbican-api.postinst
+debian/barbican-api.templates
+debian/barbican-common.config
+debian/barbican-common.postinst
+debian/barbican-common.postrm
+debian/barbican-common.templates
+debian/po/
+doc/source/_static/barbican.conf.sample
+doc/source/_static/barbican.policy.yaml.sample
+etc/barbican/barbican.conf
diff --git a/debian/rules b/debian/rules
index 11af11f8..cd80a78f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,16 +8,6 @@ export
OS_SIMPLE_CRYPTO_PLUGIN__KEK=Fh7icUmGHeaI0FmoArBt6OUxiAwDPmYFzCJJv5M8CIY=
%:
dh $@ --buildsystem=pybuild --with python3,sphinxdoc
-override_dh_auto_clean:
- rm -f debian/*.init debian/*.service debian/*.upstart
- rm -rf build
- rm -rf barbican.sqlite debian/po debian/barbican-api.templates
debian/barbican-common.templates
- rm -f debian/barbican-api.postinst debian/barbican-api.config
debian/barbican-common.postinst debian/barbican-common.config
debian/barbican-common.postrm
- find $(CURDIR) -type f -iname '*.pyc' -delete || true
- find $(CURDIR) -type d -iname __pycache__ -exec rm -rf {} \; || true
- rm -rf *.egg-info
- rm -f doc/source/_static/barbican.conf.sample
doc/source/_static/barbican.policy.yaml.sample
-
override_dh_auto_build:
/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func
barbican-api.postinst
/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func
barbican-api.config