logrotate/logrotate.spec
Tomáš Chvátal c75ec88e18 Accepting request 562011 from home:pmonrealgonzalez:branches:Base:System
- Version update to 3.13.0:
  * make distribution tarballs report logrotate version properly
  * make (un)compress work even if stdin and/or stdout are closed (#154)
  * remove -s from DEFAULT_MAIL_COMMAND and improve its documenation (#152)
  * uncompress logs before mailing them even if delaycompress is enabled (#151)
  * handle unlink of a non-existing log file as a warning only (#144)
  * include compile-time options in the output of logrotate --version (#145)
  * make logrotate --version print to stdout instead of stderr (#145)
  * flush write buffers before syncing state file (#148)
  * specify (un)compress utility explicitly in tests (#137)
  * enable running tests in parallel (#132)
  * explicitly map root UID/GID to 0 on Cygwin (#133)
  * add .dpkg-bak and .dpkg-del to default tabooext list (#134)

OBS-URL: https://build.opensuse.org/request/show/562011
OBS-URL: https://build.opensuse.org/package/show/Base:System/logrotate?expand=0&rev=65
2018-01-06 06:57:55 +00:00

101 lines
3.2 KiB
RPMSpec

#
# spec file for package logrotate
#
# Copyright (c) 2018 SUSE LINUX 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/
#
Name: logrotate
Version: 3.13.0
Release: 0
Summary: Rotate, compress, remove, and mail system log files
License: GPL-2.0+
Group: System/Base
Url: https://github.com/logrotate/logrotate
Source0: https://github.com/logrotate/logrotate/releases/download/%{version}/logrotate-%{version}.tar.xz
# SUSE specific logrotate configurations
Source1: logrotate.wtmp
Source2: logrotate.default
Source100: %{name}-rpmlintrc
BuildRequires: acl
BuildRequires: libacl-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libselinux)
BuildRequires: pkgconfig(popt)
BuildRequires: pkgconfig(systemd) >= 197
Requires: xz
%{?systemd_requires}
%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
%build
%configure \
--disable-silent-rules \
--with-state-file-path=%{_localstatedir}/lib/misc/logrotate.status \
--disable-werror
make %{?_smp_mflags}
%check
make %{?_smp_mflags} check
%install
%make_install
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/wtmp
install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.conf
install -D -m 0644 examples/%{name}.service %{buildroot}%{_unitdir}/%{name}.service
install -D -m 0644 examples/%{name}.timer %{buildroot}%{_unitdir}/%{name}.timer
ln -s service %{buildroot}%{_sbindir}/rc%{name}
%pre
#only the timer can be enabled/disabled/masked !
%service_add_pre %{name}.service %{name}.timer
%post
%{remove_and_set MAX_DAYS_FOR_LOG_FILES}
# Move /var/lib/logrotate.status
if [ -f %{_localstatedir}/lib/logrotate.status -a ! -f %{_localstatedir}/lib/misc/logrotate.status ]; then
mv %{_localstatedir}/lib/logrotate.status %{_localstatedir}/lib/misc/logrotate.status ||:
fi
%service_add_post %{name}.service %{name}.timer
%preun
%service_del_preun %{name}.service %{name}.timer
%postun
%service_del_postun %{name}.service %{name}.timer
%files
%doc COPYING ChangeLog.md README.md
%{_sbindir}/logrotate
%{_sbindir}/rc%{name}
%{_mandir}/man8/logrotate.8*
%{_mandir}/man5/logrotate.conf.5*
%config %{_sysconfdir}/logrotate.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/wtmp
%{_unitdir}/%{name}.service
%{_unitdir}/%{name}.timer
%changelog