diff options
author | Matthew Palmer <mpalmer@debian.org> | 2010-12-11 10:08:00 +1100 |
---|---|---|
committer | Junichi Uekawa <dancer@netfort.gr.jp> | 2011-12-31 10:40:00 +0900 |
commit | 26b0f93188328051356b600d0d36de57026ec277 (patch) | |
tree | 8fe5844fe3077f9842ecb81456e65572393c73b9 /pbuilder-buildpackage | |
parent | fc783f9736b9df0c3d0d090ae3ae25c1fa43ac36 (diff) | |
download | pbuilder-26b0f93188328051356b600d0d36de57026ec277.tar pbuilder-26b0f93188328051356b600d0d36de57026ec277.tar.gz |
Bug#606687: ccache support fails in the face of su PATH mangling
Package: pbuilder
Version: 0.199
Severity: normal
Tags: patch
pbuilder's ccache support relies on being able to modify PATH when building
packages. Unfortunately, su's documented behaviour is to reset PATH to a
known safe setting (in login.defs), which breaks this (along with any other
attempts to manually set PATH in pbuilderrc).
Apparently (see irc-log.txt) su has had a bug in it that has failed to
mangle PATH, which has kept this bug "hidden". However, the version of
login in squeeze definitely resets PATH.
The attached patch adjusts the way that commands are called in the su
session, preserving the environment and making ccache work.
-- System Information:
Debian Release: 5.0.3
APT prefers stable
APT policy: (500, 'stable'), (1, 'experimental'), (1, 'unstable'), (1, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.26-2-686 (SMP w/2 CPU cores)
Locale: LANG=en_AU, LC_CTYPE=en_AU (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash
Versions of packages pbuilder depends on:
ii cdebootstrap 0.5.4 Bootstrap a Debian system
ii coreutils 6.10-6 The GNU core utilities
ii debconf [debconf-2.0] 1.5.24 Debian configuration management sy
ii debianutils 2.30 Miscellaneous utilities specific t
ii debootstrap 1.0.10lenny1 Bootstrap a basic Debian system
ii wget 1.11.4-2+lenny2 retrieves files from the web
Versions of packages pbuilder recommends:
ii devscripts 2.10.35lenny7 scripts to make the life of a Debi
ii fakeroot 1.11 Gives a fake root environment
ii sudo 1.6.9p17-3 Provide limited super user privile
Versions of packages pbuilder suggests:
ii cowdancer 0.47 Copy-on-write directory tree utili
pn gdebi-core <none> (no description available)
pn pbuilder-uml <none> (no description available)
-- debconf information excluded
Diffstat (limited to 'pbuilder-buildpackage')
-rwxr-xr-x | pbuilder-buildpackage | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage index b711934..8203268 100755 --- a/pbuilder-buildpackage +++ b/pbuilder-buildpackage @@ -111,7 +111,7 @@ else log "E: pbuilder: Failed chowning to $BUILDUSERNAME:$BUILDUSERNAME" exit 1; fi -if echo "( cd tmp/buildd; /usr/bin/dpkg-source -x $(basename $PACKAGENAME) )" | $CHROOTEXEC $SUTOUSER ; then +if echo "( cd tmp/buildd; env PATH=$PATH /usr/bin/dpkg-source -x $(basename $PACKAGENAME) )" | $CHROOTEXEC $SUTOUSER ; then : # success else log "E: pbuilder: Failed extracting the source" @@ -122,7 +122,7 @@ log "I: Building the package" executehooks "A" -DPKG_COMMANDLINE="dpkg-buildpackage -us -uc ${DEBEMAIL:+\"-e$DEBEMAIL\"} $DEBBUILDOPTS" +DPKG_COMMANDLINE="env PATH=$PATH dpkg-buildpackage -us -uc ${DEBEMAIL:+\"-e$DEBEMAIL\"} $DEBBUILDOPTS" ( : Build process |