[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: pbuilder - root privileges? (was: Re: Orig tarball naming)

On Mon, 19 Aug 2002 21:40:16 -0400
David Z Maze <dmaze@debian.org> wrote:

> >> I think you need root privileges to actually enter the chroot jail.
> >> Other than that, it does seem like it should be possible to build the
> >> chroot image entirely in a fakeroot world, but I remember having tried
> >> this and failing.

pbuilder requires root to install the packages inside chroot to
satisfy dependencies, and to actually move into the chroot.

To be able to satisfy build-dependencies without root privilage,
one will need to run dpkg with a different target than /,
which in turn requires postinst scripts to run with a different
target than /. I've started writing "fakechroot" to try and run dpkg with
a different root directory by overriding libc functions, but it isn't yet
working fully, and it's probably going to take a pretty long time,
because there is a lot of functions to override.

pbuilder tries to switch to a normal user privilage inside the chroot,
and run fakeroot inside it, if you specify that in the pbuilder config file.

> (I could see packages within the chroot wanting to do things like
> start daemons when installed, though, and that might require real root
> privileges.  I don't know if or how pbuilder/debootstrap deals with
> this.)

A fake start-stop-daemon, and pray that it works.


dancer@debian.org  http://www.netfort.gr.jp/~dancer

Reply to: