[PLUG] Testing alpha version of logrotate

Keith Lofstrom keithl at kl-ic.com
Mon Oct 13 10:24:01 UTC 2003


I could use some volunteer testing help so we can unfork some code:

logrotate (/usr/sbin/logrotate on RH9) is the program (launched by
cron at night) that trims and moves logfiles in /var/log .  logrotate
does things like move /var/log/messages to /var/log/messages.1 and
discarding /var/log/messages.9 .

I am using some new backup methods that are more efficient if files
are not being renamed all the time.  The Suse version of logrotate has
an option,  "dateext", which appends YYMMDD to the log files rather
than renumber them every night, so the log files get only one renaming.

I am lobbying Elliot Lee at Redhat (sopwith at redhat.com) to patch
this useful feature into the main branch of logrotate development.  
Meanwhile, Ruediger Oertel at Suse (ro at suse.de) has generated a patch
on the latest rawhide/Severn release:

> updated patches for 3.6.10 should be done now,
> a src-rpm will appear at ftp.suse.com/pub/people/ro/logrotate
> as soon as the sync to the outside is done. I've got that
> version running on my machine now, but it's basically untested ATM.

This should be decent code - both branches of logrotate development are
pretty stable.  However, there is nothing like a good test in multiple
environments.   Who's up for a bit of alpha testing?


To get the file, download the file  "logrotate-3.6.10-0.src.rpm" from
Suse, and (as root) do:  "rpm -ivh logrotate-3.6.10-0.src.rpm"

Under Redhat, this will create /usr/src/redhat/SPECS/logrotate.spec .
This is a Suse spec file, I have to diddle it a bit for Redhat.  Edit
the file, and remove line 27:  "PreReq:  %fillup_prereq /bin/rm /bin/mv"
which Redhat rpmbuild doesn't like.  

Now do:  "rpmbuild -bp logrotate.spec" This puts a source directory
in /usr/src/redhat/BUILD/logrotate-3.6.10 .  You are ready to compile
and install in that directory, but first you probably want to save a
copy of your original logrotate and man page.  Do something like: 
   cp  /usr/sbin/logrotate  /usr/sbin/logrotate.orig
   cp  /usr/share/man/man8/logrotate.8 /usr/share/man/man8/logrotate.8.orig

Go to /usr/src/redhat/BUILD/logrotate-3.6.10, and do a "make" and a
"make install".   You now have a new version of logrotate, with the 
extra features.  You also have the sources, so you can check for nasties.

The testing consists of using the new logrotate with your existing config
files ( /etc/logrotate.conf and /etc/logrotate.d/* on redhat) unchanged.
There should be no changes in behavior.  Scream at me, or ro at suse.de , if
you see problems.  Later, you redhat folk can modify the config files to
make use of the dateext capabilities.  

Keith

-- 
Keith Lofstrom           keithl at ieee.org         Voice (503)-520-1993
KLIC --- Keith Lofstrom Integrated Circuits --- "Your Ideas in Silicon"
Design Contracting in Bipolar and CMOS - Analog, Digital, and Scan ICs




More information about the PLUG mailing list