Bug#526471: pbuilder: pdebuild-internal fails to execute hook scripts

Francesco Poli (t1000) frx at firenze.linux.it
Fri May 1 14:00:12 UTC 2009


Package: pbuilder
Version: 0.187
Severity: normal

Hi and thanks for maintaining pbuilder!

I have a problem with pdebuild in the use-pdebuild-internal mode of
operation.

With the following configuration file:

  $ cat ~/.pbuilder/sid.conf
  DISTRIBUTION="sid"
  COMPONENTS="main"
  MIRRORSITE="http://ftp.it.debian.org/debian"
  APTCACHE="${HOME}/var/cache/pbuilder/aptcache/${DISTRIBUTION}/"
  APTCACHEHARDLINK="no"
  BASETGZ="${HOME}/var/cache/pbuilder/${DISTRIBUTION}-base.tgz"
  BUILDPLACE="${HOME}/var/cache/pbuilder/build/"
  BUILDRESULT="${HOME}/var/cache/pbuilder/result/${DISTRIBUTION}/"
  HOOKDIR=""
  DEBBUILDOPTS="-i -I"
  BINDMOUNTS=""
  USE_PDEBUILD_INTERNAL="yes"
  DEBOOTSTRAPOPTS[0]="--variant=buildd"
  DEBOOTSTRAP="cdebootstrap"
  EXTRAPACKAGES="gnupg debian-archive-keyring"
  USEPROC="yes"
  USEDEVPTS="yes"
  USEDEVFS="no"
  REMOVEPACKAGES="lilo elilo grub grub2"
  BUILDSOURCEROOTCMD="fakeroot"
  PBUILDERROOTCMD="sudo"
  BUILDUSERID="9999"
  BUILDUSERNAME="pbuilder"
  export DEBIAN_FRONTEND="noninteractive"
  AUTO_DEBSIGN="yes"
  PKGNAME_LOGFILE="yes"
  PKGNAME_LOGFILE_EXTENTION=".buildlog"
  export debian_chroot="pbuild$$"

and with some hook scripts, such as:

  $ cat ~/.pbuilder/pdeb-hooks-sid/B95shell_pdeb 
  #!/bin/bash
  
  # invoke shell (from a pdebuild environment)
  apt-get install -y --force-yes vim less
  cd ${HOME}
  /bin/bash < /dev/tty > /dev/tty 2> /dev/tty

which do have execution permissions:

  $ if test -x ~/.pbuilder/pdeb-hooks-sid/B95shell_pdeb 
    then
        echo "yes, the hook script is executable..."
    fi
  yes, the hook script is executable...

I fail to get a shell, when building a package:

  $ pdebuild --configfile ~/.pbuilder/sid.conf --debbuildopts "-i -I" \
    -- --hookdir ~/.pbuilder/pdeb-hooks-sid

The package is correctly built and signed, but no hook script seems
to be executed.


Now the good news: I think I found out what's wrong, and I am right now
working on a patch.
Please stay tuned...  ;-)



-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (800, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages pbuilder depends on:
ii  cdebootstrap                  0.5.4      Bootstrap a Debian system
ii  coreutils                     7.2-1      The GNU core utilities
ii  debconf [debconf-2.0]         1.5.26     Debian configuration management sy
ii  debianutils                   3.0.1      Miscellaneous utilities specific t
ii  wget                          1.11.4-2   retrieves files from the web

Versions of packages pbuilder recommends:
ii  devscripts                    2.10.48    scripts to make the life of a Debi
ii  fakeroot                      1.12.2     Gives a fake root environment
ii  sudo                          1.7.0-1    Provide limited super user privile

Versions of packages pbuilder suggests:
pn  cowdancer                     <none>     (no description available)
pn  gdebi                         <none>     (no description available)
pn  pbuilder-uml                  <none>     (no description available)

-- debconf information:
* pbuilder/mirrorsite: http://ftp.it.debian.org/debian/
* pbuilder/nomirror:
  pbuilder/rewrite: false





More information about the Pbuilder-maint mailing list