RPM Community Forums

Mailing List Message of <rpm-devel>

Re: chroot(2) <-> db-4.6.19 problems

From: Mark Hatle <mark.hatle@windriver.com>
Date: Mon 24 Sep 2007 - 17:05:49 CEST
Message-ID: <46F7D24D.40704@windriver.com>
Jeff Johnson wrote:
> Because of the often requested feature to be able to install using rpm
> --root as an
> unprivileged user (chroot(2) is limited to uid=0), the forward looking
> development
> answer will be to attempt to emulate chroot prefixing for unprivileged
> users,
> but that too is a largish change that assumes that all file paths pass only
> through a syscall wrapper, not through the syscall itself.

We actually do this.  We have three programs that work as intercepters:

fakeroot (from Debian)
fakechroot (from Debian)
fakepw (I wrote this)

Basically fakeroot, makes the system think it's root and has a backend
database to capture file information such as mode, user, group, device,
fifo, etc..

fakechroot, intercepts all of the filesystem calls and maps them into a
fakeroot environment.  Short of one bug I found in the lua support on
Friday this works properly w/ RPM.

fakepw, intercepts all of the group and password commands and checks the
filesystem and avoids nss lookups.

I can write up some basic instructions in a couple of week (when I get
back from business trips) if anyone is interested.  While I'd prefer to
be able to do some of this right inside of RPM, this was the only way I
could think of to deal w/ special files and lua scripts.

--Mark
Received on Mon Sep 24 17:05:55 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.