2007-01-16 00:24:09 +01:00
|
|
|
#
|
2011-05-19 09:46:17 +02:00
|
|
|
# spec file for package logrotate
|
2007-01-16 00:24:09 +01:00
|
|
|
#
|
2011-05-19 09:46:17 +02:00
|
|
|
# Copyright (c) 2011 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
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
|
2011-09-13 11:24:51 +02:00
|
|
|
Version: 3.8.1
|
2011-09-13 12:37:58 +02:00
|
|
|
Release: 1
|
2010-08-24 17:44:55 +02:00
|
|
|
License: GPLv2+
|
2011-05-18 19:37:01 +02:00
|
|
|
Summary: Rotate, compress, remove, and mail system log files
|
2007-01-16 00:24:09 +01:00
|
|
|
Group: System/Base
|
2011-09-13 11:24:51 +02:00
|
|
|
Source: %{name}-%{version}.tar.gz
|
2010-08-24 17:44:55 +02:00
|
|
|
Source100: %{name}-rpmlintrc
|
2011-05-18 19:37:01 +02:00
|
|
|
Patch0: logrotate-3.7.8-suse.patch
|
2010-08-24 17:44:55 +02:00
|
|
|
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
|
2011-09-13 11:24:51 +02:00
|
|
|
# PATCH-FIX-UPSTREAM allow separated compressoptions (bnc#711780)
|
2011-09-07 16:34:08 +02:00
|
|
|
Patch8: logrotate-3.7.9-compressoptions.patch
|
2011-05-18 19:37:01 +02:00
|
|
|
BuildRequires: libselinux-devel
|
|
|
|
BuildRequires: popt-devel
|
|
|
|
PreReq: %fillup_prereq
|
|
|
|
PreReq: /bin/mv
|
|
|
|
PreReq: /bin/rm
|
2011-08-12 21:00:30 +02:00
|
|
|
Requires: xz
|
2011-05-18 19:37:01 +02:00
|
|
|
Requires: cron
|
2007-01-16 00:24:09 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%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
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2011-05-18 19:37:01 +02:00
|
|
|
%patch0
|
2007-01-16 00:24:09 +01:00
|
|
|
%patch1
|
|
|
|
%patch2
|
|
|
|
%patch3
|
2008-02-01 00:45:45 +01:00
|
|
|
%patch4
|
2011-09-07 16:34:08 +02:00
|
|
|
%patch8 -p1
|
2007-01-16 00:24:09 +01:00
|
|
|
|
|
|
|
%build
|
2011-05-18 19:37:01 +02:00
|
|
|
make %{?_smp_mflags} RPM_OPT_FLAGS="%{optflags}" WITH_SELINUX=yes
|
2008-08-15 00:58:09 +02:00
|
|
|
|
|
|
|
%check
|
2007-01-16 00:24:09 +01:00
|
|
|
make test
|
|
|
|
|
|
|
|
%install
|
2011-05-18 19:37:01 +02:00
|
|
|
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
|
2007-01-16 00:24:09 +01:00
|
|
|
|
|
|
|
%post
|
|
|
|
%{remove_and_set MAX_DAYS_FOR_LOG_FILES}
|
|
|
|
if [ -f /etc/logrotate.d/aaa_base ] ; then
|
2011-09-13 11:24:51 +02:00
|
|
|
echo "Saving old logrotate system configuration"
|
2007-01-16 00:24:09 +01:00
|
|
|
mv -v /etc/logrotate.d/aaa_base /etc/logrotate.d.aaa_base.save
|
|
|
|
fi
|
|
|
|
|
|
|
|
%clean
|
2011-05-18 19:37:01 +02:00
|
|
|
rm -rf %{buildroot}
|
2007-01-16 00:24:09 +01:00
|
|
|
|
|
|
|
%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*
|
2011-05-18 19:37:01 +02:00
|
|
|
%{_sysconfdir}/cron.daily/logrotate
|
|
|
|
%config %{_sysconfdir}/logrotate.conf
|
2007-01-16 00:24:09 +01:00
|
|
|
%config(noreplace)/etc/logrotate.d/wtmp
|
2008-02-01 00:45:45 +01:00
|
|
|
|
2007-08-16 18:19:25 +02:00
|
|
|
%changelog
|