forked from pool/logrotate
- update to 3.8.5 * dropped logrotate-3.7.9-compressoptions.patch (upstream) * refreshed other patches Changelog: - Improved rotation during daylight saving time and between timezone changes. - Fixed ACL setting problem caused by ext3 erroneously reporting ENOSYS instead of ENOSUP. - Do not continue with rotation if state file is corrupted. - Make logrotate.status creation atomic. - Allow "hourly" rotation. See manpage for more information. - Use "/bin/echo" in tests. Fixes tests execution in Dash. - Do no try to parse config files bigger than 16MB. - Improved manpage consistency and formatting. - Fix race condition between acl_set_fd() and fchmod(). - Added --version command line option - Disable ACL tests if logrotate is not compiled WITH_ACL support or if ACLs are not supported by the system running tests - Disable SELinux tests if logrotate is not compiled WITH_SELINUX support or if SELinux is not supported by the system running tests - Fixed bug which prevented skipping particular log file config if the config contained errors. - Fixed skipping of configs containing firstaction/lastaction scripts with '}' character in case of error before these scripts. - Support also 'K' unit for *size directives. - Added preremove option to let admin to do something with the old logs before they are removed by logrotate. - Fixed possible loop in tabooext parsing. - Move code to set SELinux context before compressLogFile calls to create compressed log files with the proper context. OBS-URL: https://build.opensuse.org/request/show/184333 OBS-URL: https://build.opensuse.org/package/show/Base:System/logrotate?expand=0&rev=24
94 lines
2.9 KiB
RPMSpec
94 lines
2.9 KiB
RPMSpec
#
|
|
# spec file for package logrotate
|
|
#
|
|
# Copyright (c) 2013 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.5
|
|
Release: 0
|
|
Summary: Rotate, compress, remove, and mail system log files
|
|
License: GPL-2.0+
|
|
Group: System/Base
|
|
Source: https://fedorahosted.org/releases/l/o/%{name}/%{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
|
|
BuildRequires: libselinux-devel
|
|
BuildRequires: popt-devel
|
|
PreReq: %fillup_prereq
|
|
PreReq: /bin/mv
|
|
PreReq: /bin/rm
|
|
Requires: cron
|
|
Requires: xz
|
|
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
|
|
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
|
|
|
|
%build
|
|
make %{?_smp_mflags} CC="%__cc" RPM_OPT_FLAGS="%{optflags}" WITH_SELINUX=yes
|
|
|
|
%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
|