Hello. > would it be possible to get dh-builtusing backported for bookworm? We > want to use dh-builtusing in ghdl (as you know ;), but I run my > package builds on bookworm, inside an sbuild chroot, but gbp breaks > when building the source package it's going to hand to the chroot.
Please first consider a simple solution that I have been using for years. Dpkg-buildpackage --build=source (run by $tool) cleans the source tree before preparing the .dsc (that $tool then copies into the chroot). The motivation for the cleaning was probably to prevent objects embedded into the .dsc, but * dpkg-buildpackage now (source format 3.0) aborts when it detects a file present in the source tree but missing or different in the .orig tarball * chroot users rarely build objects locally * git users (keeping away from .gitignore) rarely forget objects in the source tree. The clean step may even be harmful. * It requires build dependencies outside the chroot (your issue with dh-builtusing). * Even if these are installed, the versions and behaviour may differ. (probable cause of your issue with dh-ada-library) * The upstream clean process may execute surprising commands like find . -name '*~' -delete git reset --hard or make applied debian/patches hard to revert. * Various packages require incompatible Build-Dependencies. * ... You can disable the clean with # dpkg-buildpackage -nc # pdebuild --debbuildopts -nc or a similar gbp-buildpackage option. In case you want to keep a basic check of the clean target, the right place is a pbuilder script cleaning inside the chroot after the build, then reporting any difference between the source and the .dsc. The output is almost always either * trivial to work-around in Debian (echo '*.o' > debian/clean) (fixing upstream may be another story) * short enough to be easily ignored (./configure), * or a real issue.