[workaround] gbp buildpackage - Failed extracting the source

Need help with C, C++, perl, python, etc?

[workaround] gbp buildpackage - Failed extracting the source

Postby GuillaumeBrochu » 2018-10-26 00:52

Hi,

I'm trying to build the geneweb package with gbp buildpackage using the command:

Code: Select all
gbp buildpackage --git-export-dir=../result --git-pbuilder --git-pbuilder-options=--debug


I get this error and I don't understand why:

Code: Select all
I: Extracting source
+ echo 'chown pbuilder:pbuilder /build /build/*'
+ chroot /var/cache/pbuilder/build/cow.31392 cow-shell /bin/bash
+ :
+ unshare -n -- /usr/lib/pbuilder/pbuilder-unshare-wrapper chroot /var/cache/pbuilder/build/cow.31392 cow-shell env LD_PRELOAD= LOGNAME=pbuilder USER=pbuilder /sbin/start-stop-daemon --start --pidfile /dev/null --chuid pbuilder --startas /bin/sh
++ basename /home/user/result/geneweb_6.08+git20181019+dfsg-1.dsc
+ echo '( cd /build; env PATH="/usr/sbin:/usr/bin:/sbin:/bin" dpkg-source -x geneweb_6.08+git20181019+dfsg-1.dsc geneweb-6.08+git20181019+dfsg )'
/sbin/start-stop-daemon: unable to start /bin/sh (Permission denied)
+ log.e 'pbuilder: Failed extracting the source'
+ case "${LOGLEVEL-I}" in
+ log 'E: pbuilder: Failed extracting the source'
+ set +x
E: pbuilder: Failed extracting the source


I'm using Debian stretch.

Code: Select all
apt-cache policy git-buildpackage
git-buildpackage:
  Installé : 0.8.12.2
  Candidat : 0.8.12.2
 Table de version :
 *** 0.8.12.2 700
        700 http://ftp.ca.debian.org/debian stretch/main amd64 Packages
        100 /var/lib/dpkg/status

apt-cache policy cowbuilder
cowbuilder:
  Installé : 0.87~bpo9+1
  Candidat : 0.87~bpo9+1
 Table de version :
 *** 0.87~bpo9+1 700
        700 http://ftp.ca.debian.org/debian stretch-backports/main amd64 Packages
        100 /var/lib/dpkg/status
     0.85 700
        700 http://ftp.ca.debian.org/debian stretch/main amd64 Packages

apt-cache policy pbuilder
pbuilder:
  Installé : 0.229.3~bpo9+1
  Candidat : 0.229.3~bpo9+1
 Table de version :
 *** 0.229.3~bpo9+1 700
        700 http://ftp.ca.debian.org/debian stretch-backports/main amd64 Packages
        100 /var/lib/dpkg/status
     0.228.7 700
        700 http://ftp.ca.debian.org/debian stretch/main amd64 Packages


Any idea/comment/suggestion/advice?

Thank you.
Last edited by GuillaumeBrochu on 2018-11-11 21:47, edited 1 time in total.
User avatar
GuillaumeBrochu
 
Posts: 4
Joined: 2018-10-26 00:17
Location: Lévis, Québec, Canada

Re: Problem with gbp buildpackage - Failed extracting the so

Postby GuillaumeBrochu » 2018-10-26 01:12

I think it corresponds to this piece of code in /usr/lib/pbuilder/pbuilder-buildpackage (line 134):

Code: Select all
log.i "Extracting source"
if echo "chown $BUILDUSERNAME:$BUILDUSERNAME $BUILDDIR $BUILDDIR/*" | $CHROOTEXEC /bin/bash; then
    : # success
else
    log.e "pbuilder: Failed chowning to $BUILDUSERNAME:$BUILDUSERNAME"
    exit 1;
fi
if echo "( cd $BUILDDIR; env PATH=\"$PATH\" dpkg-source -x $(basename "$PACKAGENAME") "$BUILDSUBDIR" )" | $UNSHARE $CHROOTEXEC env $SUTOUSER ; then
    : # success
else
    log.e "pbuilder: Failed extracting the source"
    exit 1;
fi
User avatar
GuillaumeBrochu
 
Posts: 4
Joined: 2018-10-26 00:17
Location: Lévis, Québec, Canada

Re: Problem with gbp buildpackage - Failed extracting the so

Postby stevepusser » 2018-10-26 23:02

When I use pbuilder, it asks for a password (my root and sudo password are the same, since this is a laptop, so I don't know which one it uses). Does it ask you?

Have you been able to use the same procedure in the past to build packages from git, or is this the first time you've tried?

Does it work with the standard Stretch cowbuilder instead of the backported one?
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Quod Libet 4.2.0, Pale Moon 28.2.0, wine-staging 3.20, GIMP 2.10.8, Liquorix kernel 4.18-22, Midori 6.0
User avatar
stevepusser
 
Posts: 10126
Joined: 2009-10-06 05:53

Re: Problem with gbp buildpackage - Failed extracting the so

Postby GuillaumeBrochu » 2018-10-27 00:47

.
.
Thank you for your feedback.

stevepusser wrote:When I use pbuilder, it asks for a password (my root and sudo password are the same, since this is a laptop, so I don't know which one it uses). Does it ask you?


Yes. sudo password.

I also tried to changed my umask to 002, but I still get the same error.

stevepusser wrote:Have you been able to use the same procedure in the past to build packages from git, or is this the first time you've tried?


First time with Stretch.

With Jessie, I was using :
Code: Select all
git-buildpackage --git-export-dir=../result -S
sudo pbuilder build --buildresult ../result ../result/*.dsc

but the first command no longer works with Stretch.

Actually, if I start to build the package with the procedure described in my first message (with gbp buildpackage), and when the described failure happens (after the completion of the build of the source package), if I use:
Code: Select all
sudo pbuilder build --buildresult ../result ../result/*.dsc

to complete the build of the .deb, it works!

It's only cowbuilder (called by gbp buildpackage) that doesn't work. It looks like a bug in gbp buildpackage or cowbuilder or pbuilder.

stevepusser wrote:Does it work with the standard Stretch cowbuilder instead of the backported one?


I will try to downgrade these packages, to see if it helps.
User avatar
GuillaumeBrochu
 
Posts: 4
Joined: 2018-10-26 00:17
Location: Lévis, Québec, Canada

Re: Problem with gbp buildpackage - Failed extracting the so

Postby GuillaumeBrochu » 2018-11-11 21:44

Finally, I was able to build with
Code: Select all
gbp buildpackage --git-export-dir=../result -d -S --force-sign
sudo pbuilder build --buildresult ../result ../result/*.dsc


The problem is probably related to cowbuilder. I have not tried to downgrade the packages from backports to stable.
User avatar
GuillaumeBrochu
 
Posts: 4
Joined: 2018-10-26 00:17
Location: Lévis, Québec, Canada


Return to Programming

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable