Bug#725434: pbuilder fails with cryptic message when $TMPDIR is set to dir that does not exist in chroot

Robert Luberda robert at debian.org
Sat Oct 5 20:01:19 UTC 2013


Package: pbuilder
Version: 0.215
Severity: important

Hi,

I've just wasted some time to find out why pbuilder had stopped working,
and fails with this strange message:

  I: policy-rc.d already exists
  I: Installing the build-deps
  I: user script /var/cache/pbuilder/build/cow.10311/tmp/hooks/D80no-man-db-rebuild starting
  I: Preseed man-db/auto-update to false
  I: user script /var/cache/pbuilder/build/cow.10311/tmp/hooks/D80no-man-db-rebuild finished
   -> Attempting to satisfy build-dependencies
   -> Creating pbuilder-satisfydepends-dummy package
  Package: pbuilder-satisfydepends-dummy
  Version: 0.invalid.0
  Architecture: i386
  Maintainer: Debian Pbuilder Team <pbuilder-maint at lists.alioth.debian.org>
  Description: Dummy package to satisfy dependencies with aptitude - created by pbuilder
   This package was created automatically by pbuilder to satisfy the
   build-dependencies of the package being currently built.
  Depends: debhelper (>= 9), dh-apache2, po4a (>= 0.22)
  dpkg-deb: building package `pbuilder-satisfydepends-dummy' in `/tmp/satisfydepends-aptitude/pbuilder-satisfydepends-dummy.deb'.
  dpkg-deb: error: failed to make temporary file (control member): No such file or directory
  E: pbuilder-satisfydepends failed.

I've noticed that `cowbuilder --update' also has stopped working:
  pbuilder update failed
  E: could not update with cowdancer, try --no-cowdancer-update option
    forking: rm -rf /var/cache/pbuilder/build//cow.11010
And no, --no-cowdancer-update didn't fix anything.


Anyway, it turned out that I've recently installed libpam-tmpdir, which caused
TMPDIR to be set to /tmp/user/0 inside the chroot. But nothing in the 
pbuilder log indicates this fact. Moreover the final error message:
  dpkg-deb: building package `pbuilder-satisfydepends-dummy' in `/tmp/satisfydepends-aptitude/pbuilder-satisfydepends-dummy.deb'.
suggests that  /tmp is used for storing temporary files!



I've just found the fact is documented in pbuilder's documentation:
   6. Notes on usage of $TMPDIR

   If you are setting $TMPDIR to an unusual value, of other than /tmp, you will find that some errors may occur
   inside the chroot, such as dpkg-source failing.
   There are two options, you may install a hook to create that directory, or set
     export TMPDIR=/tmp
   in pbuilderrc. Take your pick.
   An example script is provided as examples/D10tmp with pbuilder.

But in my opinion documenting it is not enough! If something worked perfectly fine for a few years, and than suddenly 
has stopped working, I guess, nobody will look into documentation.

To fix this bug, please do one of the following things:

- check if $TMPDIR exists in chroot at very first step of pbuilder's
  processing, and fail with a clear message (possibly referring to 
  the above documentation) in case it doesn't
OR:
- add the `export TMPDIR=/tmp' to  /etc/pbuilderrc installed by default by the package
OR:
- always internally create the $TMPDIR if it does not exists
  (note: this is not the same as installing the D10tmp hook by default,
  as this hook does not work for `cowbuilder --update')
OR:
- use value of $TMPDIR internally by pbuilder itself, so the processing
  would most probably fail at:
  "I user script /var/cache/pbuilder/build/cow.10311/tmp/user/0/hooks/D80no-man-db-rebuild"
                                                    ^^^^^^^^^^^^ 
  (but still such a failure would require some user's investigation)

Regards,
robert 


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (200, 'testing')
Architecture: i386 (i686)

Kernel: Linux 3.10-2-686-pae (SMP w/1 CPU core)
Locale: LANG=pl_PL, LC_CTYPE=pl_PL (charmap=ISO-8859-2)
Shell: /bin/sh linked to /bin/dash

Versions of packages pbuilder depends on:
ii  cdebootstrap           0.5.10
ii  coreutils              8.21-1
ii  debconf [debconf-2.0]  1.5.51
ii  debianutils            4.4
ii  debootstrap            1.0.53
ii  dpkg-dev               1.17.1
ii  wget                   1.14-4

Versions of packages pbuilder recommends:
ii  devscripts  2.13.4
ii  fakeroot    1.20-1
ii  sudo        1.8.8-1

Versions of packages pbuilder suggests:
ii  cowdancer     0.73
pn  gdebi-core    <none>
pn  pbuilder-uml  <none>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pbuilder-maint/attachments/20131005/b756c6e2/attachment.sig>


More information about the Pbuilder-maint mailing list