RPM Community Forums

Mailing List Message of <rpm-devel>

Re: A setup <-> filesystem loop because of parentdir ordering

From: Mark Hatle <mark.hatle@windriver.com>
Date: Tue 12 May 2009 - 21:18:48 CEST
Message-ID: <4A09CB98.9080906@windriver.com>
We handle this by doing installs in the following order:
*) passwd/group (rpm2cpio)
*) filesystem/basesystem/setup
*) "Everything else"

This appeared to be the only safe way to setup the environment (even prior to us 
using RPM5.)

--Mark

Jeff Johnson wrote:
> This issue was reported on #rpm, and is likely gonna be commonly 
> encountered.
> 
> Traditionally, RPM dependency relations order packages on bootstrap 
> installs like this:
> 
>     setup        contains /etc/passwd and nothing else
>     basesystem    no files, the version was "supposed" to be the distro 
> release
>     filesystem    containing the directory skeleton for the file systems.
> 
> But note that when parentdir relations are used for ordering (as in 
> rpm-5.1.7+), that
> setup implicitly acquires an ordering hint equivalent to
>     Requires: /etc
> because setup contains the file /etc/passwd, which will depend on its 
> parentdir.
> 
> Since /etc is contained in the filesystem package, the filesystem
> package is ordered before setup. That's almost perfectly OK, but
> the file system package also needs to look up users/groups, which
> need /etc/passwd installed, so ideally setup (or whatever installs
> /etc/passwd) must be first. OTOH, the filesystem package (or
> whatever carries the directory skeleton) typically has root:root
> ownership which is hardwired within rpmio/ugid.c cached lookups.
> 
> But if anything whatsoever in the filesystem package depends on
> the setup package, then there's a loop, and rpmtsOrder() will delay
> attempting to install order either setup <-> filesystem until its way
> way too late. The failure symptom will include many obscure messages 
> from lots of
> other packages. The flaw is that setup/filesystem _MUST_ be installed
> as early as possible.
> 
> One can either fix setup/filesystem packages to not loop, or
> one can add dependency ordering whiteout to specify which
> of setup or filesystem should be installed first.
> 
> hth
> 
> 73 de Jeff
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> Developer Communication List                        rpm-devel@rpm5.org
Received on Tue May 12 21:19:13 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.