automatic version update by autodist [release 3.8.7-1mamba;Sat Oct 19 2013]
This commit is contained in:
parent
534f08b8b4
commit
d429e1abbd
@ -1,2 +1,9 @@
|
|||||||
# logrotate
|
# logrotate
|
||||||
|
|
||||||
|
The logrotate utility is designed to simplify the administration of log files on a system which generates a lot of log files.
|
||||||
|
Logrotate allows for 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 gets to a certain size.
|
||||||
|
Normally, logrotate runs as a daily cron job and once at boot time.
|
||||||
|
|
||||||
|
Install the logrotate package if you need a utility to deal with the log files on your system.
|
||||||
|
|
||||||
|
35
logrotate-init
Normal file
35
logrotate-init
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# logrotate - launches logrotate at boot time to ensure logs are rotated on machine that are
|
||||||
|
# usually not up when the cron job would be executed
|
||||||
|
#
|
||||||
|
# chkconfig: 2345 99 01
|
||||||
|
# description: launches logrotate at boot time to ensure logs are rotated on machine that are
|
||||||
|
# usually not up when the cron job would be executed
|
||||||
|
#
|
||||||
|
. /etc/sysconfig/rc
|
||||||
|
. $rc_functions
|
||||||
|
|
||||||
|
NAME=logrotate
|
||||||
|
DAEMON=/usr/sbin/$NAME
|
||||||
|
DAEMONPID=/var/run/$NAME.pid
|
||||||
|
DAEMONLOCK=/var/lock/subsys/$NAME
|
||||||
|
OPTIONS=/etc/logrotate.conf
|
||||||
|
|
||||||
|
[ -x $DAEMON ] || exit 0
|
||||||
|
|
||||||
|
[ -r /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
echo -n $"Starting"" $NAME: "
|
||||||
|
daemon --pidfile=$DAEMONPID $DAEMON $OPTIONS
|
||||||
|
echo
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo $"Usage: ""/etc/init.d/$NAME {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
30
logrotate.conf
Normal file
30
logrotate.conf
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
# see "man logrotate" for details
|
||||||
|
# rotate log files weekly
|
||||||
|
weekly
|
||||||
|
|
||||||
|
# keep 4 weeks worth of backlogs
|
||||||
|
rotate 4
|
||||||
|
|
||||||
|
# create new (empty) log files after rotating old ones
|
||||||
|
create
|
||||||
|
|
||||||
|
# uncomment this if you want your log files compressed
|
||||||
|
compress
|
||||||
|
|
||||||
|
# RPM packages drop log rotation information into this directory
|
||||||
|
include /etc/logrotate.d
|
||||||
|
|
||||||
|
# no packages own lastlog or wtmp -- we'll rotate them here
|
||||||
|
/var/log/wtmp {
|
||||||
|
monthly
|
||||||
|
create 0664 root utmp
|
||||||
|
rotate 1
|
||||||
|
nocompress
|
||||||
|
}
|
||||||
|
|
||||||
|
/var/log/lastlog {
|
||||||
|
monthly
|
||||||
|
rotate 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# system-specific logs may be configured here
|
3
logrotate.cron
Normal file
3
logrotate.cron
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
/usr/sbin/logrotate /etc/logrotate.conf
|
139
logrotate.spec
Normal file
139
logrotate.spec
Normal file
@ -0,0 +1,139 @@
|
|||||||
|
Name: logrotate
|
||||||
|
Version: 3.8.7
|
||||||
|
Release: 1mamba
|
||||||
|
Summary: Rotates, compresses, removes and mails system log files
|
||||||
|
Group: System/Tools
|
||||||
|
Vendor: openmamba
|
||||||
|
Distribution: openmamba
|
||||||
|
Packager: Davide Madrisan <davide.madrisan@gmail.com>
|
||||||
|
URL: ftp://download.fedora.redhat.com/pub/fedora/linux/core/development/SRPMS
|
||||||
|
Source0: https://fedorahosted.org/releases/l/o/logrotate/logrotate-%{version}.tar.gz
|
||||||
|
Source1: %{name}.conf
|
||||||
|
Source2: %{name}.cron
|
||||||
|
Source3: %{name}-init
|
||||||
|
License: GPL
|
||||||
|
## AUTOBUILDREQ-BEGIN
|
||||||
|
BuildRequires: glibc-devel
|
||||||
|
BuildRequires: libpopt-devel
|
||||||
|
BuildRequires: libselinux-devel
|
||||||
|
## AUTOBUILDREQ-END
|
||||||
|
Requires(pre): initscripts
|
||||||
|
Requires(post):chkconfig
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||||
|
|
||||||
|
%description
|
||||||
|
The logrotate utility is designed to simplify the administration of log files on a system which generates a lot of log files.
|
||||||
|
Logrotate allows for 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 gets to a certain size.
|
||||||
|
Normally, logrotate runs as a daily cron job and once at boot time.
|
||||||
|
|
||||||
|
Install the logrotate package if you need a utility to deal with the log files on your system.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
|
||||||
|
%build
|
||||||
|
%make WITH_SELINUX=yes CC=%{_host}-gcc
|
||||||
|
|
||||||
|
%install
|
||||||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
make install PREFIX=%{buildroot} MANDIR=%{_mandir}
|
||||||
|
|
||||||
|
install -D -m 644 %{S:1} %{buildroot}%{_sysconfdir}/logrotate.conf
|
||||||
|
install -D -m 755 %{S:2} %{buildroot}%{_sysconfdir}/cron.daily/logrotate
|
||||||
|
install -D -m 744 %{S:3} %{buildroot}%{_initrddir}/logrotate
|
||||||
|
install -d %{buildroot}%{_sysconfdir}/logrotate.d/
|
||||||
|
install -d %{buildroot}/var/lib
|
||||||
|
touch %{buildroot}/var/lib/logrotate.status
|
||||||
|
|
||||||
|
%post
|
||||||
|
if [ $1 -ge 1 ]; then
|
||||||
|
# new install
|
||||||
|
chkconfig --add logrotate
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
%preun
|
||||||
|
if [ $1 -eq 0 ]; then
|
||||||
|
# erase
|
||||||
|
chkconfig --del logrotate
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
%clean
|
||||||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_sbindir}/logrotate
|
||||||
|
%dir %{_sysconfdir}/logrotate.d
|
||||||
|
%{_sysconfdir}/cron.daily/logrotate
|
||||||
|
%config(noreplace) %{_sysconfdir}/logrotate.conf
|
||||||
|
%config(noreplace) %{_localstatedir}/lib/logrotate.status
|
||||||
|
%{_initrddir}/logrotate
|
||||||
|
%{_mandir}/man5/*
|
||||||
|
%{_mandir}/man8/*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Sat Oct 19 2013 Automatic Build System <autodist@mambasoft.it> 3.8.7-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Mon Aug 12 2013 Automatic Build System <autodist@mambasoft.it> 3.8.6-1mamba
|
||||||
|
- automatic update by autodist
|
||||||
|
|
||||||
|
* Thu Jun 13 2013 Automatic Build System <autodist@mambasoft.it> 3.8.5-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Fri May 03 2013 Automatic Build System <autodist@mambasoft.it> 3.8.4-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Fri Oct 12 2012 Automatic Build System <autodist@mambasoft.it> 3.8.3-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Fri Aug 10 2012 Automatic Build System <autodist@mambasoft.it> 3.8.2-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Sat Jun 25 2011 Automatic Build System <autodist@mambasoft.it> 3.8.0-1mamba
|
||||||
|
- automatic update by autodist
|
||||||
|
|
||||||
|
* Fri Aug 13 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 3.7.9-2mamba
|
||||||
|
- use macro %_initrddir to install initscript
|
||||||
|
|
||||||
|
* Mon Aug 09 2010 Automatic Build System <autodist@mambasoft.it> 3.7.9-1mamba
|
||||||
|
- automatic update by autodist
|
||||||
|
|
||||||
|
* Fri May 28 2010 Davide Madrisan <davide.madrisan@gmail.com> 3.7.8-1mamba
|
||||||
|
- update to 3.7.8
|
||||||
|
- update package Source and URL
|
||||||
|
|
||||||
|
* Sun Dec 27 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 3.7.5-4mamba
|
||||||
|
- rebuilt to remove executable requirements
|
||||||
|
|
||||||
|
* Sun Feb 22 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 3.7.5-3mamba
|
||||||
|
- fixed initscript header and added stop command
|
||||||
|
- use chkconfig command to enable/disable initscript on install/uninstall
|
||||||
|
- rename source script to logrotate-init
|
||||||
|
|
||||||
|
* Fri Jan 06 2009 Ercole 'ercolinux' Carpanetto <ercole69@gmail.com> 3.7.5-2mamba
|
||||||
|
- added a reference in rc.local to launch logrotate at boot time
|
||||||
|
|
||||||
|
* Tue Jan 15 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 3.7.5-1mamba
|
||||||
|
- update to 3.7.5
|
||||||
|
- do not create utmp group
|
||||||
|
- remove yearly_rotation patch applied upstream
|
||||||
|
- remove sharedscript patch applied upstream
|
||||||
|
|
||||||
|
* Wed Jun 13 2007 Aleph0 <aleph0@openmamba.org> 3.7.2-2mamba
|
||||||
|
- do not compress wtmp rotated files
|
||||||
|
|
||||||
|
* Tue Sep 13 2005 Davide Madrisan <davide.madrisan@qilinux.it> 3.7.2-1qilnx
|
||||||
|
- update to version 3.7.2 by autospec
|
||||||
|
- enabled selinux
|
||||||
|
- specfile fixes
|
||||||
|
- applied patches from fedora package
|
||||||
|
|
||||||
|
* Mon May 26 2003 Silvan Calarco <silvan.calarco> 3.6.8-2qilnx
|
||||||
|
- creation of needed group utmp
|
||||||
|
|
||||||
|
* Mon May 12 2003 Alessandro Ramazzina <alessandro.ramazzina@qinet.it> 3.6.8-1qilnx
|
||||||
|
- creation of logrotate package
|
Loading…
Reference in New Issue
Block a user