Hi,

On sam, aoû 27, 2005, Junichi Uekawa wrote:
> Is the problem because zsh sets SHELL to zsh, and
> zsh is not available inside chroot?

 Yes.


 In general, I think that pbuilder should clean as many things as
 possible when used, for example:
 - pbuilder login should run a login shell instead of a simple shell
   (when you login, you land in / instead of /root)
 - all pbuilder executions should call "env -i".

 But I'm not the author of pbuilder, so I'm only concerned with actual
 issues such as the $SHELL breakage I mentionned.  I'm surprized no-one
 complained about it until now.

> Why does one want to execute $SHELL anyway? 

 Looking a bit closer at the issue, it seems more and more related to
 pbuilder itself, here's what happens:
 - sbp
 - pbuilder setups the environment and goes to the point where it
   fetches and installs build-depends
 - pbuilder copies the source files and extracts them:

 -> new cache content libpspell-dev_0.60.3-5_i386.deb added
 -> new cache content libxslt1.1_1.1.14-1_i386.deb added
Copying source file
    -> copying [../gedit_2.10.5-1.dsc]
    -> copying [../gedit_2.10.5.orig.tar.gz]
    -> copying [../gedit_2.10.5-1.diff.gz]
Extracting source
No shell
pbuilder: Failed extracting the source
 -> Aborting with an error
 -> unmounting dev/pts filesystem

 This is from pbuilder-buildpackage:

if echo "( cd tmp/buildd; /usr/bin/dpkg-source -x $(basename $PACKAGENAME) )" | 
$CHROOTEXEC $SUTOUSER ; then
    : # success
else
    echo "pbuilder: Failed extracting the source" >&2.

 I think the problem is with $SUTOUSER which is set to "su -p
 $BUILDUSERNAME".  As su(1) explains, su will clean environment things
 up, such as $SHELL, unless -p is used.

  -m, -p, --preserve-environment
        do not reset environment variables, and keep the same shell

 The current issue is with $SHELL, but you might want to address issues
 with the other vars too and reset them to sane values too.

   Bye,

-- 
Loïc Minier <[EMAIL PROTECTED]>
Come, your destiny awaits!

Reply via email to