2007-01-16 00:24:09 +01:00
|
|
|
#
|
2010-08-24 17:44:55 +02:00
|
|
|
# spec file for package logrotate (Version 3.7.9)
|
2007-01-16 00:24:09 +01:00
|
|
|
#
|
2010-01-14 16:32:06 +01:00
|
|
|
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-16 00:24:09 +01:00
|
|
|
#
|
2008-08-15 00:58:09 +02:00
|
|
|
# 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.
|
|
|
|
|
2007-01-16 00:24:09 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
2008-08-15 00:58:09 +02:00
|
|
|
Url: https://fedorahosted.org/releases/l/o/logrotate
|
|
|
|
|
2007-01-16 00:24:09 +01:00
|
|
|
Name: logrotate
|
|
|
|
BuildRequires: popt-devel
|
2008-08-26 02:14:45 +02:00
|
|
|
BuildRequires: libselinux-devel
|
2007-01-16 00:24:09 +01:00
|
|
|
Summary: Rotate, Compress, Remove, and Mail System Log Files
|
2010-08-24 17:44:55 +02:00
|
|
|
Version: 3.7.9
|
|
|
|
Release: 1
|
|
|
|
License: GPLv2+
|
2007-01-16 00:24:09 +01:00
|
|
|
Group: System/Base
|
2008-09-06 00:08:20 +02:00
|
|
|
Source: %{name}-%{version}.tar.bz2
|
2010-08-24 17:44:55 +02:00
|
|
|
Source100: %{name}-rpmlintrc
|
|
|
|
Patch: 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
|
2007-01-16 00:24:09 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
PreReq: %fillup_prereq /bin/rm /bin/mv
|
2008-08-15 00:58:09 +02:00
|
|
|
Requires: bzip2 cron
|
2007-01-16 00:24:09 +01:00
|
|
|
|
|
|
|
%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
|
2007-08-16 18:19:25 +02:00
|
|
|
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.
|
2007-01-16 00:24:09 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Erik Troan <ewt@redhat.com>
|
|
|
|
Matt Wilson <msw@redhat.com>
|
|
|
|
Preston Brown <pbrown@redhat.com>
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
%patch
|
|
|
|
%patch1
|
|
|
|
%patch2
|
|
|
|
%patch3
|
2008-02-01 00:45:45 +01:00
|
|
|
%patch4
|
2007-01-16 00:24:09 +01:00
|
|
|
|
|
|
|
%build
|
2010-01-14 16:32:06 +01:00
|
|
|
make %{?_smp_mflags} RPM_OPT_FLAGS="$RPM_OPT_FLAGS" WITH_SELINUX=yes
|
2008-08-15 00:58:09 +02:00
|
|
|
|
|
|
|
%check
|
2007-01-16 00:24:09 +01:00
|
|
|
make test
|
|
|
|
|
|
|
|
%install
|
|
|
|
make PREFIX=$RPM_BUILD_ROOT install
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/{logrotate.d,cron.daily}
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/usr/sbin
|
|
|
|
install -m 644 examples/logrotate-default $RPM_BUILD_ROOT/etc/logrotate.conf
|
|
|
|
install -m 755 examples/logrotate.cron $RPM_BUILD_ROOT/etc/cron.daily/logrotate
|
|
|
|
install -m 644 examples/logrotate.wtmp $RPM_BUILD_ROOT/etc/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 confguration"
|
|
|
|
mv -v /etc/logrotate.d/aaa_base /etc/logrotate.d.aaa_base.save
|
|
|
|
fi
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc CHANGES
|
2008-09-06 00:08:20 +02:00
|
|
|
%{_sbindir}/logrotate
|
2007-01-16 00:24:09 +01:00
|
|
|
%{_mandir}/man8/logrotate.8*
|
2010-08-24 17:44:55 +02:00
|
|
|
%{_mandir}/man5/logrotate.conf.5*
|
2007-01-16 00:24:09 +01:00
|
|
|
/etc/cron.daily/logrotate
|
|
|
|
%config /etc/logrotate.conf
|
|
|
|
%config(noreplace)/etc/logrotate.d/wtmp
|
2008-02-01 00:45:45 +01:00
|
|
|
|
2007-08-16 18:19:25 +02:00
|
|
|
%changelog
|