# # spec file for package logrotate # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Url: https://fedorahosted.org/releases/l/o/logrotate Name: logrotate Version: 3.8.1 Release: 21.1 License: GPL-2.0+ Summary: Rotate, compress, remove, and mail system log files Group: System/Base Source: %{name}-%{version}.tar.gz Source100: %{name}-rpmlintrc Patch0: logrotate-3.7.8-suse.patch Patch1: logrotate-3.7.8-conf.patch Patch2: logrotate-3.7.8-autoext.patch Patch3: logrotate-3.7.8-addextension.patch Patch4: logrotate-3.7.8-mess_err.patch # PATCH-FIX-UPSTREAM allow separated compressoptions (bnc#711780) Patch8: logrotate-3.7.9-compressoptions.patch #BuildRequires: libselinux-devel #BuildRequires: popt-devel #PreReq: %fillup_prereq #PreReq: /bin/mv #PreReq: /bin/rm Requires: xz Requires: cron BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: i486 %description The logrotate utility is designed to simplify the administration of log files on a system that generates a lot of log files. Logrotate allows the automatic rotation, compression, removal, and mailing of log files. Logrotate can be set to handle a log file daily, weekly, monthly, or when the log file reaches a certain size. Normally, logrotate runs as a daily cron job. %prep %setup -q %patch0 %patch1 %patch2 %patch3 %patch4 %patch8 -p1 %build make CC="%__cc" RPM_OPT_FLAGS="%{optflags}" %check make test %install make PREFIX=%{buildroot} install mkdir -p %{buildroot}%{_sysconfdir}/{logrotate.d,cron.daily} mkdir -p %{buildroot}%{_prefix}/sbin install -m 644 examples/logrotate-default %{buildroot}%{_sysconfdir}/logrotate.conf install -m 755 examples/logrotate.cron %{buildroot}%{_sysconfdir}/cron.daily/logrotate install -m 644 examples/logrotate.wtmp %{buildroot}%{_sysconfdir}/logrotate.d/wtmp %post %{remove_and_set MAX_DAYS_FOR_LOG_FILES} if [ -f /etc/logrotate.d/aaa_base ] ; then echo "Saving old logrotate system configuration" mv -v /etc/logrotate.d/aaa_base /etc/logrotate.d.aaa_base.save fi %clean rm -rf %{buildroot} %files %defattr(-,root,root) %doc CHANGES %{_sbindir}/logrotate %{_mandir}/man8/logrotate.8* %{_mandir}/man5/logrotate.conf.5* %{_sysconfdir}/cron.daily/logrotate %config %{_sysconfdir}/logrotate.conf %config(noreplace)/etc/logrotate.d/wtmp %changelog * Fri Sep 30 2011 uli@suse.com - cross-build fix: use %%__cc macro * Wed Sep 7 2011 vcizek@suse.com - update to 3.8.1 - dropped CVE patches as they were merged to upstream - changelog - fixed 1 memory leak in prerotateSingleLog - do not redirect logrotate errors to /dev/null in cron script - fixed "size" directive parsing - handle situation when acl_get_fd is supported, but acl_set_fd is not - added "maxsize" directive (see man page) - added "dateyesterday" option (see man page) - fixed crash when config file had exactly 4096*N bytes - added WITH_ACL make option to link against -lacl and preserve ACLs during rotation - added "su" option to define user/group for rotation. Logrotate now skips directories which are world writable or writable by group which is not "root" unless "su" directive is used. - fixed CVE-2011-1098: race condition by creation of new files - fixed possible shell injection when using "shred" directive (CVE-2011-1154) - fixed escaping of file names within 'write state' action (CVE-2011-1155) - better 'size' directive description - fixed possible buffer-overflow when reading config files * Wed Sep 7 2011 vcizek@suse.com - allow whitespace separated options in compressoptions (bnc#711780) * Mon Jul 25 2011 jengelh@medozas.de - Change compression scheme to xz * Tue May 10 2011 puzel@novell.com - add logrotate-CVE-2011-1098.patch (bnc#677336) - add logrotate-shred-CVE-2011-1154.patch (bnc#679661) - add logrotate-CVE-2011-1155.patch (bnc#679662) - use spec-cleaner * Thu Nov 18 2010 lnussel@suse.de - also rotate /var/log/btmp * Tue Sep 14 2010 puzel@novell.com - use proper syslog facility/priority in logrotate cron script (bnc#636236) * Tue Aug 17 2010 puzel@novell.com - update to logrotate-3.7.9 - don't copy config files on the stack -- mmap them instead (fixes segfaults with too large/invalid config files) - symlinked conf file man page as requested by Fedora guidelines - added rotating (copying) non-writable, readable files - fixed missingok problem with globs - fixed bug when log files could be removed even there was some error in rotation process. - allow setting size greater than 4.2GB in configuration file - pass currently rotated file to postrotate/prerotate script in nosharedscripts mode - added new TabooExts: ".disabled", ".dpkg-old", ".dpkg-dist", ".dpkg-new", ".cfsaved", ".ucf-old", ".ucf-dist", ".ucf-new" - Don't change utime atime/mtime when compressing files - Better *rotate scripts parser. - Allow 'include' directive in log file definitions - merge logrotate-3.7.8-cron-check-for-another-instance.patch into logrotate-3.7.8-suse.patch - add logrotate-rpmlintrc: suppress false-positive rpmlint warning * Sun Dec 20 2009 jengelh@medozas.de - enable parallel build * Fri Mar 6 2009 puzel@suse.cz - update to 3.7.8 - do not exit on status file errors - limit config file inclusion nesting - use hashes for status file handling - dateformat to allow unixtime - manual page corrections - drop hashes patch (upstream) * Wed Dec 10 2008 schwab@suse.de - Fix compresscmd default. * Tue Oct 21 2008 puzel@suse.cz - logrotate-3.7.7-hashes.patch (bnc#415072) * Tue Sep 30 2008 puzel@suse.cz - use chekcproc in logrotate.cron script instead of pgrep (bnc#426162) * Wed Sep 3 2008 puzel@suse.cz - update to 3.7.7 - dateformat - fix possible buffer overflows in strings handling - change logInfo handling - fix compile warnings - tabooext honor wildcards - fix selinux support with dateext - various minor bugfixes - removed logrotate-3.7.5-errorHandling.patch, logrotate-3.7.5-shred.patch, logrotate-3.7.5-cfengine.patch, logrotate-3.7.5-date.patch, logrotate-3.7.5-logfn.patch - merged to upstream * Mon Aug 25 2008 prusnak@suse.cz - enabled SELinux support [Fate#303662] * Wed Aug 20 2008 puzel@suse.cz - added logrotate-3.7.5-cron-check-for-another-instance.patch - cronjob exits immediately if there is another logrotate instance running - fixes (bnc#415072) * Thu Aug 14 2008 puzel@suse.cz - fix rpmlint warnings: - make test moved to %%check section - require cron * Thu Jan 31 2008 ro@suse.de - log error if target file already exists (upgrade from MESS_DEBUG to MESS_ERROR) * Wed Oct 31 2007 ro@suse.de - added bzip2 as dependency since it's used as default compressor (#334555) * Thu Aug 16 2007 ro@suse.de - update to 3.7.5 with some bugfixes containing: - 251040 config option size not handled correctly - added the current fedora patchkit which adds shred support * Mon Aug 7 2006 ro@suse.de - try adding new option "addextension" which provides what some users expected the old "extension" keyword to do * Wed Jun 21 2006 ro@suse.de - update to 3.7.4 - adds the "minsize" option - clean up comments in sample logrotate.conf (#183440) * Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires * Wed Jan 11 2006 ro@suse.de - fixed segfault in autoext patch (#142021) * Fri Dec 9 2005 ro@suse.de - updated to 3.7.3 - removed upstreamed patches - added autoext patch for determining file extension from used compression program * Tue Oct 18 2005 ro@suse.de - update to upstream patchkit * Tue Oct 11 2005 ro@suse.de - update to 3.7.2 and some upstream patches * Mon Oct 10 2005 ro@suse.de - fix else case in maxage patch (thanks to pvrabec) * Tue Jul 26 2005 ro@suse.de - added noTMPDIR and selinux patches * Thu May 19 2005 ro@suse.de - update to 3.7.1 * Wed Apr 20 2005 ro@suse.de - cron-script: give some more details when things fail * Mon Sep 6 2004 ro@suse.de - changed patch sequence, simple ones first - added one-liner fix from cvs - fix mail call - fix uninitialized variable when mailing out first rotation - fix number of logs kept with dateext * Thu Mar 25 2004 ro@suse.de - adapted logger path (#36947) * Mon Feb 23 2004 ro@suse.de - update to version 3.7 * Fri Oct 17 2003 ro@suse.de - don't build as root - use defattr * Mon Oct 13 2003 ro@suse.de - updated to 3.6.10 and ported patches * Thu Jun 12 2003 kukuk@suse.de - /etc/logrotate.d is part of filesystem * Thu Jan 23 2003 ro@suse.de - update to 3.6.6 (some tmpfile fixes, new options supported) - remove system-config /etc/logrotate.d/aaa_base and all code messing with it (all logrotate configs have been moved to their respective packages) - add /etc/logrotate.d/wtmp * Wed Jan 22 2003 ro@suse.de - remove mgetty logfiles * Mon Jan 20 2003 ro@suse.de - remove i4l logfiles * Wed Jan 15 2003 ro@suse.de - removed xdm logfile from main config (in XFree86 now) * Wed Jan 15 2003 ro@suse.de - removed more files from main config and moved to their packages * Sun Nov 10 2002 ro@suse.de - fix deprecated multiline string literals * Mon Oct 14 2002 ro@suse.de - remove postgresql logfile from config on update (#20860) * Mon Oct 14 2002 ro@suse.de - moved syslog logrotation config to syslogd package * Mon Sep 23 2002 ro@suse.de - mark logrotate.del as missingok * Mon Sep 9 2002 ro@suse.de - remove handling of /var/account/pacct (moved to acct package) * Fri Aug 16 2002 ro@suse.de - dropped insserv from prereq (not used) * Mon Aug 5 2002 kukuk@suse.de - Add rm and mv to PreRequires * Tue Jul 30 2002 ro@suse.de - fixed typo in specfile - added comment in config-file about bzip2 usage * Mon Jul 29 2002 ro@suse.de - removed fetchmail logrotate entry (#17279) * Mon Jul 29 2002 ro@suse.de - removed apache,smail,perforce,abuild components - remove old entries also from logrotate.d/aaa_base on update * Mon Jul 29 2002 ro@suse.de - squid components removed (done in squid package now) (#17278) * Fri Jul 19 2002 gd@suse.de - fixed samba log paths * Fri Jul 12 2002 kukuk@suse.de - Fix post-install script for the case that there is no rc.config * Mon Jun 24 2002 ro@suse.de - fixed squid log paths (#16557) * Wed May 8 2002 ro@suse.de - uucp-logfiles are handled by own config * Mon Mar 18 2002 ro@suse.de - don't rotate any file for /var/log/news.* * Thu Feb 28 2002 ro@suse.de - don't overwrite logfiles with dateext if run more than once a day (partial solution for #13202) * Mon Feb 25 2002 ro@suse.de - install etc_logfiles as 644 * Mon Feb 18 2002 ro@suse.de - removed yast from logrotate.d * Sat Feb 16 2002 ro@suse.de - removed postgresql logfile (handled by package) * Sun Jan 6 2002 ro@suse.de - take wtmp out of default config * Fri Dec 14 2001 ro@suse.de - really remove old variable from rc.config * Wed Dec 12 2001 ro@suse.de - mark files in /etc/logrotate.d as noreplace * Tue Dec 11 2001 ro@suse.de - implement maxage if dateext is not used - uncompress log for mail if maillast is used * Mon Dec 10 2001 ro@suse.de - added etc_logfiles as reminder to sources - moved convert script into postinstall and try to find old etc/logfiles and use etc_logfiles as fallback - added yast and syslog to /etc/logrotate.d as config files * Mon Dec 10 2001 ro@suse.de - added maxage extension * Thu Dec 6 2001 ro@suse.de - split patches for purpose * Tue Dec 4 2001 ro@suse.de - archiving option changed to "dateext" and works completely transparent otherwise * Tue Nov 27 2001 ro@suse.de - added multiple rotation criteria can be selected at one time - added/completed implementation for days (max days) * Mon Nov 26 2001 ro@suse.de - added archiving option - added script to convert /etc/logfiles * Tue Nov 13 2001 ro@suse.de - initial package for SuSE Linux (version 3.5.9)