[Rpm-maint] installroot and NSS modules
Panu Matilainen
pmatilai at laiskiainen.org
Tue Jan 28 09:16:46 UTC 2014
On 01/08/2014 10:06 PM, Colin Walters wrote:
> Hi,
>
> I'm working on
> https://mail.gnome.org/archives/ostree-list/2014-January/msg00000.html
> and it has some code that uses yum --installroot. However, the system
> requires a custom "nss-altfiles" NSS module that causes
> "/usr/sbin/useradd -r" to write to /usr/lib/passwd.
>
> But rpm from the host side is not correctly detecting these users. If I
> chroot in, I can run "getent" OK. I note in the RPM CHANGES file a
> note:
>
> 2.4.4 -> 2.4.5:
>
> "call getpwnam()/endpwent() once before a chroot(), forcing name
> service shared libs to be loaded from outside of the root path"
>
> Then later:
>
> 4.2.2 -> 4.2.3:
>
> "fix: do getpwnam/getgrnam to load correct modules before chroot"
>
> Which is correct? Does yum --installroot require the same NSS
> configuration on the external host and in the chroot now? If it is not
> intended to be required, where is the code in RPM to initialize NSS from
> inside the chroot? I looked but couldn't find it offhand.
Rpm 4.6 - 4.11.0 are buggy on non-trivial nsswitch setups due to my
less-than-brilliant idea (wish I knew what I was thinking at the
time...) See
http://rpm.org/gitweb?p=rpm.git;a=commitdiff;h=abbf4897db217b4977b4c21eb09929c797ee015d.
- Panu -
More information about the Rpm-maint
mailing list