Hi, Quoting Aurélien COUDERC (2024-11-26 08:44:29) > sbuild starting with 0.87.1 fails when build dependencies are missing > from the host system. > > E.g. building kde-spectacle: > > dpkg-source: info: using options from spectacle/debian/source/local-options: > --abort-on-upstream-changes > dpkg-buildpackage: info: source package kde-spectacle > dpkg-buildpackage: info: source version 24.08.0-2 > dpkg-buildpackage: info: source distribution unstable > dpkg-buildpackage: info: source changed by Aurélien COUDERC > <couc...@debian.org> > dpkg-checkbuilddeps: error: Unmet build dependencies: libkcolorpicker-qt6-dev > libkimageannotator-qt6-dev libopencv-core-dev libopencv-dev > libopencv-imgproc-dev libzxing-dev qt6-declarative-private-dev (>= 6.6.0~) > dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting > dpkg-buildpackage: warning: (Use -d flag to override.) > E: Failed to clean source directory > /home/coucouf/hack/debian/kde/gear/spectacle > (/home/coucouf/hack/debian/kde/gear/kde-spectacle_24.08.0-2.dsc) > > > Reverting to 0.87.0 fixes the issue. > > I’m running sbuild from inside a git clone of the repo [1]. > I have : > $chroot_mode = "schroot"; > $schroot = "schroot"; > in my ~/.config/sbuild/config.pl. > > Maybe I’m missing something so I’ve set the severity as important but > AFAIC this should be RC.
this is the result of a bug fix. In the past, sbuild ran this to clean the source package before running "dpkg-source -b .": fakeroot debian/rules clean This is problematic because a) fakeroot should not be needed for packages with Rules-Requires-Root b) fakeroot is buggy and should be avoided c) we want to get rid of fakeroot in the long run d) running the clean target requires some packages being installed to run the tools that do the cleaning, and there was no check if that is the case So now what sbuild does is this: dpkg-buildpackage --target clean This takes care of all of the above by only selectively running fakeroot and by checking for missing build dependencies. You have several options to work around this: a) don't run the clean target. Either by running sbuild with --no-clean or by putting $clean_source=0; into your ~/.config/sbuild/config.pl Doing this is especially useful if you are running sbuild from a packaging git and you thus already know that your source is clean, either becaus you ran "git clean -fdx" yourself or because git-buildpackage stops you from building a package in a not-clean state. b) Avoid putting packages in Build-Depends. I've had a look at your package kde-spectacle and I'm quite sure that you do not need all these *-dev packages to run the clean target. This patch would fix it for you: --- a/debian/control +++ b/debian/control @@ -3,8 +3,8 @@ Section: kde Priority: optional Maintainer: Debian Qt/KDE Maintainers <debian-qt-...@lists.debian.org> Uploaders: Aurélien COUDERC <couc...@debian.org>, -Build-Depends: cmake (>= 3.16~), - debhelper-compat (= 13), +Build-Depends: debhelper-compat (= 13), +Build-Depends-Arch: cmake (>= 3.16~), dh-sequence-kf6, dh-sequence-qmldeps, extra-cmake-modules (>= 6.3.0~), Have a look at Debian policy §7.7. To run the clean target, only B-D and B-C must be satisfied. So you can move what is actually needed for the build-arch target into B-D-A instead. c) Convince me that sbuild should instead run the clean target of the packages it builds without making sure that the required dependencies to do so are satisfied. d) Convince me that disabling running the clean target by default is a good idea. There is this MR for that: https://salsa.debian.org/debian/sbuild/-/merge_requests/71 Thanks! cheers, josch
signature.asc
Description: signature