[Rpm-maint] installroot and NSS modules

Colin Walters walters at verbum.org
Wed Jan 8 20:06:22 UTC 2014


I'm working on
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

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.

More information about the Rpm-maint mailing list