[git-buildpackage] Permission denied when building package

Guido Günther agx at sigxcpu.org
Wed Sep 29 09:47:51 CEST 2021


Hi,
On Tue, Sep 28, 2021 at 05:24:18PM -0400, Travis Wrightsman wrote:
> Hello everyone,
> 
> I'm fairly new to Debian packaging and I've been trying to learn how to
> use git-buildpackage as part of the process. I can't seem to get
> cowbuilder working properly, which is unfortunate because I'd like to
> eventually cross-build for my Pinephone (arm64) from my laptop (amd64).
> 
> Here are the exact commands I'm running to test packaging yad, followed
> by the error:
> 
> wget https://github.com/v1cont/yad/releases/download/v10.1/yad-10.1.tar.xz
> tar -xvf yad-10.1.tar.xz
> cd yad-10.1
> git init
> gbp import-orig -u 10.1 --pristine-tar ../yad-10.1.tar.xz
> debmake -zx
> git add debian/
> git commit -m "Initial packaging"
> sudo DIST=bullseye ARCH=amd64 git-pbuilder create
> sudo gbp buildpackage --git-pbuilder --git-dist=bullseye --git-arch=amd64

Don't use sudo in either of these. This should happen transparently and using
sudo might already trigger the problem. You can remove the create chroot
in /var/cache/pbuilder/base-bullseye

> 
> [...]
> I: Extracting source
> /sbin/start-stop-daemon: unable to start /bin/sh (Permission denied)
> E: pbuilder: Failed extracting the source
> [...]

That's pbuilder/cowbuilder failing (which gets invoked by `gbp
buildpackage so it should be reproducible without gbp when
using cowbuilder to build (just to remove some layers of indirection
for debuggins).

Look at the chroot generated in `/var/cache/pbuilder/base-bullseye` if
the `/bin/sh` there looks sane. You can also enter the chroot via
`cowbuilder login` and looks around there (e.g. run the command
manually). Also check logs in case a security module interferes.

Cheers,
 -- Guido

> 
> Any guidance on this would be much appreciated. I can build the package
> just fine with a simple "debuild".
> 
> Best,
> Travis
> _______________________________________________
> git-buildpackage mailing list
> git-buildpackage at lists.sigxcpu.org
> http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage


More information about the git-buildpackage mailing list