Will the openpkg fix be MFC'd into the 2.20060622 stable release as an
UPD?  It would be nice if it was.

On Fri, 2006-09-29 at 08:54 +0200, Ralf S. Engelschall wrote:
> On Thu, Sep 28, 2006, Mark Keller wrote:
> 
> > I have a feature request or bug fix as I see it.
> >
> > We use LDAP for NSS/PAM and we have about 50,000 user accounts and 50,000
> > groups. Each user has a group. I have noticed that our LDAP servers were
> > having some performance problems from time to time. I narrowed it down to
> > openpkg causing severe LDAP lookups during cron routines and other types of
> > openpkg commands.
> >
> > I found the following three shell scripts calling getent in a horribly
> > inefficient way. Basically causing a complete dump of the password and
> > group file for certain operations.
> >
> > /usr/local/etc/openpkg/rpmmacros
> >
> > Several lines like this:
> > %l_suid                  %((getent passwd; cat /etc/passwd; ypcat passwd;
> > nidump passwd .) 2>/dev/null | grep "^ %{l_susr}:" | sed -e 'q' |
> > awk -F: '{ print $3; }')
> >
> > /usr/local/lib/openpkg/shtool
> >
> > This one as the following:
> > groupname=`(getent group) 2>/dev/null | \
> > grep "^[^:]*:[^:]*:${groupid}:" | \
> >                            sed -e 's/:.*$//'`
> >
> > /usr/local/libexec/openpkg-tools/dev.sh
> >
> > This one has the following:
> > realname=`(getent passwd; cat /etc/passwd; ypcat passwd; nidump passwd .)
> > 2>/dev/null |\
> >           grep "^${username}:" | awk -F: '{ print $5; }'`
> >
> > Ideally these would have something like:
> > getent passwd ${username} ; grep ^${username} /etc/passwd; ypmatch
> > ${username} passwd; nidump passwd
> >
> > I am sure NIS+ has a similar command, but I don't use it.
> >
> > I see that this has been done is a few of the scripts, but those there seem
> > to still have problems. Anyhow, that would certainly make things way more
> > efficient.
> 
> Yes, good catch. Although we cannot make it more efficient for those
> cases where we have to map from ID to name, we at least can make
> it more efficient in those cases where we have to map from name to
> anything else (which is 90% of all cases).
> 
> This is now fixed in openpkg-tools-0.8.75-20060929 for "openpkg dev" and
> in openpkg-20060929-20060929 for the bootstrap package. Please give them
> a try and test it to make sure it doesn't break in any new way.
> 
>                                        Ralf S. Engelschall
>                                        [EMAIL PROTECTED]
>                                        www.engelschall.com
> 
> ______________________________________________________________________
> The OpenPKG Project                                    www.openpkg.org
> Developer Communication List                   openpkg-dev@openpkg.org
> 
-- 
David M. Fetter - Portland State University - UNIX Systems Administrator
"Reality is merely an illusion, albeit a very persistent one." ~Einstein

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to