[Yum] yum logrotate...

Robert G. Brown rgb at phy.duke.edu
Wed Jul 3 12:00:08 UTC 2002


This isn't really a bug per se, but...

Red Hat seems to want root's group to be ORroot, not root.  (Does
anybody know if there is a real rationale for this?  Given that either
one of these is just a label used in a mapping to the gid, which is
where all functionality resides, it struck me as being yet another
annoying/idiotic/pointless Red Hatism when I first saw it.)

However, in /etc/logrotate.d/yum in the yum rpm you use

/var/log/yum.log {
    missingok
    create 0600 root root
}

which then fails in cron nightly because the root group doesn't exist.

There are three solutions.  One is not to fight RH's renaming of what was
very likely the very first group name ever invented in Unix and change
this to 

/var/log/yum.log {
    missingok
    create 0600 root ORroot
}

which will then work transparently for vanilla RH systems (where the
annoyed sysadmin hasn't changed the root group name back to root).  One
is to do nothing, and require yum-users to either endure log rotation
failure indefinitely or figure out what's going wrong and either make
the change to the yum logrotate script themselves or strike a blow for
all that is decent and right and change /etc/group to match yum.  The
last one (which, alas, is probably the "right" thing to do given that
yum will need to be usable here, where at least one annoyed sysadmin has
changed the root group back to root globally, and usable elsewhere
without logrotation failure) is to change the %post so that it parses
out the local root group name (whatever it might be -- after all, there
is nothing but convention that prevents somebody from naming it
"rootgroup" or "fruitloop" instead of root, or ORroot, or toor) and
patches the logrotate script to match.

Well, I suppose one could ALSO be more democratic, split the difference,
and just add another groupname -> gid mapping to /etc/group:

ORroot:x:0:root
root:x:0:root

which is what I did, so that any RH scripts that presume ORroot don't
break while chown -R root.root whatever does the right thing...

Anyway, I'd suggest doing one of the latter two just so that the rpm is
truly portable to a vanilla RH system.

    rgb

Robert G. Brown	                       http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567  Fax: 919-660-2525     email:rgb at phy.duke.edu






More information about the Yum mailing list