From 26b0f93188328051356b600d0d36de57026ec277 Mon Sep 17 00:00:00 2001 From: Matthew Palmer Date: Sat, 11 Dec 2010 10:08:00 +1100 Subject: 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 (no description available) pn pbuilder-uml (no description available) -- debconf information excluded --- pbuilder-buildpackage | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pbuilder-buildpackage') 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 -- cgit v1.2.3