Bug#606687: ccache support fails in the face of su PATH mangling

2012-01-12 Thread Junichi Uekawa
Looks reasonable, applied.

This fell through the cracks (I haven't been reading all the mail
backlogs during my MIA period last year, so if you find good bug
reports that need triaging, it might be helpful to just raise the
subject).

At Wed, 28 Dec 2011 17:24:34 +1300,
Dean Evans wrote:
 
 Is there any chance this patch could be included in a future release?
 
 The ability to use ccache in pbuilder is extremely handy so it would be
 great if it could be.
 
 
 Thanks,
 Dean
 
 
 
 ___
 Pbuilder-maint mailing list
 pbuilder-ma...@lists.alioth.debian.org
 http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pbuilder-maint
 



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#606687: ccache support fails in the face of su PATH mangling

2011-12-27 Thread Dean Evans
Is there any chance this patch could be included in a future release?

The ability to use ccache in pbuilder is extremely handy so it would be
great if it could be.


Thanks,
Dean



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#606687: ccache support fails in the face of su PATH mangling

2011-11-08 Thread Simon Ruggier
I can confirm that this bug affects me, and the supplied patch fixes it.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#606687: ccache support fails in the face of su PATH mangling

2010-12-10 Thread Matthew Palmer
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  coreutils6.10-6  The GNU core utilities
ii  debconf [debconf-2.0]1.5.24  Debian configuration management sy
ii  debianutils  2.30Miscellaneous utilities specific t
ii  debootstrap  1.0.10lenny1Bootstrap 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-3Provide limited super user privile

Versions of packages pbuilder suggests:
ii  cowdancer 0.47   Copy-on-write directory tree utili
pn  gdebi-corenone (no description available)
pn  pbuilder-uml  none (no description available)

-- debconf information excluded
--- pbuilder-buildpackage.orig  2010-12-10 23:07:09.0 +1100
+++ pbuilder-buildpackage   2010-12-10 23:13:08.0 +1100
@@ -105,7 +105,7 @@
 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
@@ -116,7 +116,7 @@
 
 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
Dec 10 22:30:14 womblelool: I'd be interested to know how the path
modifications made for ccache in pbuilder-checkparams are ever supposed to
survive the call to su -p.  I just don't see how it's possible, and without
it I can't see how your ccache support could possibly work.

Dec 10 22:46:43 lool  womble: su -p preserves PATH in my testing here

Dec 10 22:47:05 lool  womble: PATH=foo:$PATH su -p -c env | grep PATH

Dec 10 22:47:09 womblelool: What version of su are you running?

Dec 10 22:47:33 lool  womble: 1:4.1.4.2-1ubuntu3

Dec 10 22:47:45 womblelool: That su command line gives me my path
back here

Dec 10 22:48:50 womblelool: login 1:4.1.4.2+svn3283-2 and
1:4.1.1-6+lenny1 both fail to preserve PATH, and the manpage says that's how
it's supposed to behave.

Dec 10 22:49:36 womble--preserve-environment  Preserve the
current environment, except for: $PATH [...] $IFS

Dec 10 22:49:55 lool  womble: the man page says it follows
/etc/login.defs; this has been fixed on 2010-08-28 apparently

Dec 10 22:50:13 lool  womble: http://paste.debian.net/102039/
-8-
2010-08-28  Nicolas François  nicolas.franc...@centraliens.net

* src/su.c: Fix handling of environment variables when
the environment is not changed. In particular, this makes su
behave as documented regarding PATH and IFS (i.e. they are reset)
when -p is provided.
-8-

Dec 10 22:51:42 lool  I guess the PATH setting oculd be moved to
pbuilder-buildpackage