RPM Community Forums

Mailing List Message of <rpm-devel>

Emulating rootdir for non-root chroot(2) emulation.

From: Jeff Johnson <n3npq@mac.com>
Date: Fri 02 Nov 2007 - 13:56:08 CET
Message-Id: <F79BF173-76A7-45AC-A280-6A0AB7682C12@mac.com>
Since the discussion this week is on --root, there are
several other related issues and/or implementations.

The core feature request related to --root is how to
permit non-root installs into home directories.

Since chroot(2) is root-only, that means (to me) that all
system calls which mention a path will need wrapping
in order to prefix an emulated chroot path.

It also means that the wrapped system calls must be used
consistently throughout rpm.

The issue of prefixing current working directory to change
a relative into an absolute path is a closely related problem
(without the root-only showstopper flaw) and likely should be attempted
at the same time.

There have also been suggestions about fakeroot emulation
using rpmlib which are closely related.

FInally, there is the choice of names for the syscall wrappers.
Currently, rpm is changing the first letter to uppercase, as in
the Open() system wrapper. That's fine for rpm code itself, but will
not permit applications to use an emulated chroot(2) as non-root.

So the eventual implementation of an emulated chroot(2) and
fakeroot will have to replace the system calls in libc much like
current implementations of fakeroot do.

Whether rpm should attempt chroot(2) emulation at all is an open  
question.

The RFE for the ability to be able to install using --root as non-root
user has been around forever, and (imho) an implementation needs
to be attempted somewhen.

73 de Jeff
Received on Fri Nov 2 13:56:20 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.