]> git.pld-linux.org Git - packages/logrotate.git/blame - logrotate.spec
up to 3.11.0 (2016-12-02)
[packages/logrotate.git] / logrotate.spec
CommitLineData
c859e311
ER
1# TODO
2# - bug: when logrotate.status is written truncated (due disk getting full) and
3# the line is partial, it will complain erronously that the line is too long
4# while it just doesn't have the second DATE column. and that error should be
5# ignored as warning not fatal as error.
99e01202 6#
360d9203 7# Conditional build:
c1a84c5a 8%bcond_without acl # build without ACLs support
971f6ad2 9%bcond_without selinux # build without SELinux support
ba301319 10%bcond_without tests # do not perform "make test"
9853feb5 11
a9077c2d 12Summary: Rotates, compresses, removes and mails system log files
fc062c54
ER
13Summary(de.UTF-8): Rotiert, komprimiert und verschickt Systemlogs
14Summary(es.UTF-8): Hace el rutado, comprime y envía mail de logs del sistema
15Summary(fr.UTF-8): Fait tourner, compresse, et envoie par mail les connexions au système
16Summary(pl.UTF-8): System rotacji i kompresowania logów
17Summary(pt_BR.UTF-8): Rotaciona, comprime e envia mail de logs do sistema
18Summary(ru.UTF-8): Ротирует, компрессирует, удаляет и отправляет по почте лог-файлы
19Summary(tr.UTF-8): Sistem günlüklerini yönlendirir, sıkıştırır ve mektup olarak yollar
20Summary(uk.UTF-8): Ротує, компресує, видаляє та відправляє поштою лог-файли
696caff4 21Name: logrotate
59870e99 22Version: 3.11.0
fc097ee8 23Release: 1
59870e99 24License: GPL v2+
4ebceb10 25Group: Applications/System
9628a6df 26Source0: https://github.com/logrotate/logrotate/releases/download/%{version}/%{name}-%{version}.tar.xz
59870e99 27# Source0-md5: 3a9280e4caeb837427a2d54518fbcdac
876d3ef4 28Source1: %{name}.conf
7edee911 29Source2: %{name}.sysconfig
715253b2 30Source3: %{name}.cron
287810e7 31Source4: %{name}.crontab
59870e99 32Patch0: tabooext.patch
736e97b1 33Patch1: %{name}-man.patch
fc097ee8 34URL: https://github.com/logrotate/logrotate
c1a84c5a 35%{?with_acl:BuildRequires: acl-devel}
2a839977 36BuildRequires: autoconf >= 2.50
565310a7 37BuildRequires: automake >= 1:1.13
ba301319
JB
38%if %{with selinux}
39BuildRequires: libselinux-devel
40%{?with_tests:BuildRequires: libselinux-utils}
41%endif
99e01202 42BuildRequires: popt-devel >= 1.3
dfeedfd9
JB
43BuildRequires: tar >= 1:1.22
44BuildRequires: xz
95ccc9b2 45Requires(post): coreutils
e3a1a7ab 46Requires: coreutils
cda4bc19 47Requires: crondaemon
b3a5c230 48Requires: filesystem >= 4.0-4
6b20ff2b 49Requires: gzip
015fb5e8 50Requires: setup >= 2.4.6
2ba54a5a 51Suggests: /bin/mail
5deb0f04 52BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
e80fc1f7 53
1bd207cb 54%define statdir /var/lib/misc
287810e7 55%define _libexecdir %{_prefix}/lib
1bd207cb 56
e80fc1f7 57%description
48058559 58The logrotate utility is designed to simplify the administration of
59log files on a system which generates a lot of log files. Logrotate
60allows for the automatic rotation compression, removal and mailing of
61log files. Logrotate can be set to handle a log file daily, weekly,
62monthly or when the log file gets to a certain size. Normally,
63logrotate runs as a daily cron job.
e80fc1f7 64
7afa4f64 65%description -l de.UTF-8
e80fc1f7 66Logrotate vereinfacht die Verwaltung von Systemen, die sehr viele
48058559 67Log-Dateien erzeugen, indem es das automatische Rotieren,
7afa4f64
JR
68Komprimieren, Entfernen, und Senden von Log-Dateien ermöglicht. Jede
69Log-Datei kann täglich, wöchentlich oder monatlich verarbeitet werden,
70wenn sie zu groß wird.
71
72%description -l es.UTF-8
73Logrotate fue proyectado para facilitar la administración de sistemas
74que generan gran número de archivos de log. Permite automatización en
75la rotación, compresión, remoción y envío de mail de archivos de logs.
4ebceb10 76Cada archivo de log puede ser tratado diariamente, semanalmente,
77mensualmente o cuanto crezca demasiado.
6a0a66b5 78
7afa4f64
JR
79%description -l fr.UTF-8
80Logrotate est conçu pour faciliter l'administration de systèmes qui
81générent un grand nombre de fichiers de \"log\". Il permet le
82roulement, la suppréssion la compression et l'envoi automatiques de
83ces fichiers. Chaque fichier de \"log\" peut être pris en charge de
84manière quotidienne, hebdomadaire, mensuelle, ou quand il devient trop
48058559 85volumineux.
e80fc1f7 86
7afa4f64
JR
87%description -l pl.UTF-8
88Logrotate jest przeznaczony do łatwej administracji plikami logów.
89Program ten pozwala na automatyczną kompresję logów. Może kontrolować
90logi raz dziennie, raz na miesiąc, raz na tydzień lub wtedy kiedy
91pliki z logami systemowymi są już duże.
e80fc1f7 92
7afa4f64
JR
93%description -l pt_BR.UTF-8
94Logrotate foi projetado para facilitar a administração de sistemas que
95geram grande número de arquivos de log. Permite automatização na
96rotação, compressão, remoção e envio de mail de arquivos de logs. Cada
894360d3 97arquivo de log pode ser tratado diariamente, semanalmente, mensalmente
98ou quanto crescer demais.
82588add 99
7afa4f64
JR
100%description -l ru.UTF-8
101Logrotate предназначен для облегчения администрирования системы,
102которая генерирует большое количество файлов с логами. Он позволяет
103автоматически ротировать, компрессировать, удалять и посылать файлы с
104логами по e-mail. Каждый лог может обрабатываться ежедневно,
105еженедельно, ежемесячно или по достижении определенного размера.
106
107%description -l tr.UTF-8
108logrotate çok fazla sayıda günlük dosyası üreten sistemlerin
109yönetimini kolaylaştırmak için tasarlanmıştır. Kayıt dosyalarının
110otomatik olarak yönlendirilmesini, sıkıştırılmasını, silinmesinı ve
111mektup olarak yollanmasını sağlar. Her dosya günlük, haftalık, aylık
112olarak ya da çok büyük boyutlara ulaştığında işlenebilir.
113
114%description -l uk.UTF-8
115Logrotate призначений для полегшення адміністрування системи, яка
116генерує велику кількість файлів з логами. Він дозволяє автоматично
117ротувати, компресувати, видаляти та посилати поштою лог-файли. Кожен
118лог може оброблятися щоденно, щотижня, щомісяця або по досягненні
119визначеного розміру.
82588add 120
e80fc1f7 121%prep
dc6f0c74 122%setup -q
59870e99 123%patch0 -p1
736e97b1 124%patch1 -p1
6e5446f3 125
e80fc1f7 126%build
6e5446f3
AM
127%{__aclocal}
128%{__autoconf}
129%{__automake}
130
131%configure \
132 --disable-silent-rules \
133 --with%{!?with_acl:out}-acl \
134 --with%{!?with_selinux:out}-selinux \
59870e99 135 --with-state-file-path=%{statdir}/logrotate.status
6e5446f3
AM
136
137%{__make}
e80fc1f7 138
9853feb5
ER
139%if %{with tests}
140%{__make} test
141%endif
142
e80fc1f7 143%install
144rm -rf $RPM_BUILD_ROOT
287810e7
ER
145install -d $RPM_BUILD_ROOT/etc/{cron.d,logrotate.d,sysconfig} \
146 $RPM_BUILD_ROOT{%{_libexecdir},%{_mandir},%{statdir}}
e80fc1f7 147
0a863b0d 148%{__make} install \
6e5446f3 149 DESTDIR=$RPM_BUILD_ROOT
01a0c524 150
cee13d63 151cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.conf
287810e7
ER
152cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
153install -p %{SOURCE3} $RPM_BUILD_ROOT%{_libexecdir}/%{name}
154cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}
155> $RPM_BUILD_ROOT%{statdir}/%{name}.status
e80fc1f7 156
157%clean
158rm -rf $RPM_BUILD_ROOT
159
287810e7 160%triggerun -- %{name} < 3.8.6-1
89d3133d 161# if previous install had /etc/cron.daily/* files removed (missingok), disable the cronjob
287810e7
ER
162if [ ! -e /etc/cron.daily/%{name} ]; then
163 echo DISABLE_LOGROTATE_CRON=yes >> /etc/sysconfig/%{name}
164fi
165
82be549b 166%triggerpostun -- %{name} < 3.7.8-4
287810e7 167%{__sed} -i -e 's,olddir /var/log/archiv$,olddir /var/log/archive,' %{_sysconfdir}/%{name}.conf %{_sysconfdir}/logrotate.d/* || :
82be549b 168
007c1a92 169%post
1bd207cb
JB
170if [ -f /var/lib/logrotate.status ]; then
171 mv -f /var/lib/logrotate.status %{statdir}/logrotate.status
172else
173 touch %{statdir}/logrotate.status
174 chmod 000 %{statdir}/logrotate.status
e2aefaf5 175 chown root:root %{statdir}/logrotate.status
1bd207cb
JB
176 chmod 640 %{statdir}/logrotate.status
177fi
007c1a92 178
e80fc1f7 179%files
696caff4 180%defattr(644,root,root,755)
59870e99 181%doc README.md ChangeLog.md
4f94bac4 182%attr(755,root,root) %{_sbindir}/logrotate
287810e7
ER
183%attr(755,root,root) %{_libexecdir}/logrotate
184%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
c859e311 185%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
287810e7 186%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
1bd207cb 187%attr(640,root,root) %ghost %{statdir}/logrotate.status
4ec7f55f 188%{_mandir}/man5/logrotate.conf.5*
e3a1a7ab 189%{_mandir}/man8/logrotate.8*
This page took 0.083797 seconds and 4 git commands to generate.