]> git.pld-linux.org Git - packages/logrotate.git/blame - logrotate.spec
- rel 2; prefix output with config name: https://fedorahosted.org/logrotate/ticket/37
[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
52b55435 22Version: 3.8.7
4aa05ed1 23Release: 2
971f6ad2 24License: GPL v2
4ebceb10 25Group: Applications/System
12d0b792 26Source0: https://fedorahosted.org/releases/l/o/logrotate/%{name}-%{version}.tar.gz
52b55435 27# Source0-md5: 99e08503ef24c3e2e3ff74cc5f3be213
876d3ef4 28Source1: %{name}.conf
7edee911 29Source2: %{name}.sysconfig
715253b2 30Source3: %{name}.cron
287810e7 31Source4: %{name}.crontab
736e97b1 32Patch1: %{name}-man.patch
cee13d63 33Patch2: tabooext.patch
4aa05ed1 34Patch3: logrotate-print-prog-name.patch
12d0b792 35URL: https://fedorahosted.org/logrotate/
c1a84c5a 36%{?with_acl:BuildRequires: acl-devel}
ba301319
JB
37%if %{with selinux}
38BuildRequires: libselinux-devel
39%{?with_tests:BuildRequires: libselinux-utils}
40%endif
99e01202 41BuildRequires: popt-devel >= 1.3
e3a1a7ab 42Requires: coreutils
cda4bc19 43Requires: crondaemon
b3a5c230 44Requires: filesystem >= 4.0-4
6b20ff2b 45Requires: gzip
015fb5e8 46Requires: setup >= 2.4.6
2ba54a5a 47Suggests: /bin/mail
5deb0f04 48BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
e80fc1f7 49
1bd207cb 50%define statdir /var/lib/misc
287810e7 51%define _libexecdir %{_prefix}/lib
1bd207cb 52
e80fc1f7 53%description
48058559 54The logrotate utility is designed to simplify the administration of
55log files on a system which generates a lot of log files. Logrotate
56allows for the automatic rotation compression, removal and mailing of
57log files. Logrotate can be set to handle a log file daily, weekly,
58monthly or when the log file gets to a certain size. Normally,
59logrotate runs as a daily cron job.
e80fc1f7 60
7afa4f64 61%description -l de.UTF-8
e80fc1f7 62Logrotate vereinfacht die Verwaltung von Systemen, die sehr viele
48058559 63Log-Dateien erzeugen, indem es das automatische Rotieren,
7afa4f64
JR
64Komprimieren, Entfernen, und Senden von Log-Dateien ermöglicht. Jede
65Log-Datei kann täglich, wöchentlich oder monatlich verarbeitet werden,
66wenn sie zu groß wird.
67
68%description -l es.UTF-8
69Logrotate fue proyectado para facilitar la administración de sistemas
70que generan gran número de archivos de log. Permite automatización en
71la rotación, compresión, remoción y envío de mail de archivos de logs.
4ebceb10 72Cada archivo de log puede ser tratado diariamente, semanalmente,
73mensualmente o cuanto crezca demasiado.
6a0a66b5 74
7afa4f64
JR
75%description -l fr.UTF-8
76Logrotate est conçu pour faciliter l'administration de systèmes qui
77générent un grand nombre de fichiers de \"log\". Il permet le
78roulement, la suppréssion la compression et l'envoi automatiques de
79ces fichiers. Chaque fichier de \"log\" peut être pris en charge de
80manière quotidienne, hebdomadaire, mensuelle, ou quand il devient trop
48058559 81volumineux.
e80fc1f7 82
7afa4f64
JR
83%description -l pl.UTF-8
84Logrotate jest przeznaczony do łatwej administracji plikami logów.
85Program ten pozwala na automatyczną kompresję logów. Może kontrolować
86logi raz dziennie, raz na miesiąc, raz na tydzień lub wtedy kiedy
87pliki z logami systemowymi są już duże.
e80fc1f7 88
7afa4f64
JR
89%description -l pt_BR.UTF-8
90Logrotate foi projetado para facilitar a administração de sistemas que
91geram grande número de arquivos de log. Permite automatização na
92rotação, compressão, remoção e envio de mail de arquivos de logs. Cada
894360d3 93arquivo de log pode ser tratado diariamente, semanalmente, mensalmente
94ou quanto crescer demais.
82588add 95
7afa4f64
JR
96%description -l ru.UTF-8
97Logrotate предназначен для облегчения администрирования системы,
98которая генерирует большое количество файлов с логами. Он позволяет
99автоматически ротировать, компрессировать, удалять и посылать файлы с
100логами по e-mail. Каждый лог может обрабатываться ежедневно,
101еженедельно, ежемесячно или по достижении определенного размера.
102
103%description -l tr.UTF-8
104logrotate çok fazla sayıda günlük dosyası üreten sistemlerin
105yönetimini kolaylaştırmak için tasarlanmıştır. Kayıt dosyalarının
106otomatik olarak yönlendirilmesini, sıkıştırılmasını, silinmesinı ve
107mektup olarak yollanmasını sağlar. Her dosya günlük, haftalık, aylık
108olarak ya da çok büyük boyutlara ulaştığında işlenebilir.
109
110%description -l uk.UTF-8
111Logrotate призначений для полегшення адміністрування системи, яка
112генерує велику кількість файлів з логами. Він дозволяє автоматично
113ротувати, компресувати, видаляти та посилати поштою лог-файли. Кожен
114лог може оброблятися щоденно, щотижня, щомісяця або по досягненні
115визначеного розміру.
82588add 116
e80fc1f7 117%prep
dc6f0c74 118%setup -q
736e97b1 119%patch1 -p1
cee13d63 120%patch2 -p1
4aa05ed1 121%patch3 -p2
e80fc1f7 122
123%build
1bd207cb 124%{__make} \
eded0803 125 CC="%{__cc}" \
4aa05ed1 126 RPM_OPT_FLAGS="%{rpmcflags} %{rpmcppflags}" \
c1a84c5a 127 WITH_ACL=%{?with_acl:yes}%{!?with_acl:no} \
e37ea7b1 128 WITH_SELINUX=%{?with_selinux:yes}%{!?with_selinux:no} \
1bd207cb 129 STATEFILE="%{statdir}/logrotate.status"
e80fc1f7 130
9853feb5
ER
131%if %{with tests}
132%{__make} test
133%endif
134
e80fc1f7 135%install
136rm -rf $RPM_BUILD_ROOT
287810e7
ER
137install -d $RPM_BUILD_ROOT/etc/{cron.d,logrotate.d,sysconfig} \
138 $RPM_BUILD_ROOT{%{_libexecdir},%{_mandir},%{statdir}}
e80fc1f7 139
0a863b0d 140%{__make} install \
a9077c2d 141 BINDIR=$RPM_BUILD_ROOT%{_sbindir} \
142 MANDIR=$RPM_BUILD_ROOT%{_mandir}
01a0c524 143
cee13d63 144cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.conf
287810e7
ER
145cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
146install -p %{SOURCE3} $RPM_BUILD_ROOT%{_libexecdir}/%{name}
147cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}
148> $RPM_BUILD_ROOT%{statdir}/%{name}.status
e80fc1f7 149
150%clean
151rm -rf $RPM_BUILD_ROOT
152
287810e7
ER
153%triggerun -- %{name} < 3.8.6-1
154# if previous install had /etc/cron.daily/* files unlink (missingok), disable the cronjob
155if [ ! -e /etc/cron.daily/%{name} ]; then
156 echo DISABLE_LOGROTATE_CRON=yes >> /etc/sysconfig/%{name}
157fi
158
82be549b 159%triggerpostun -- %{name} < 3.7.8-4
287810e7 160%{__sed} -i -e 's,olddir /var/log/archiv$,olddir /var/log/archive,' %{_sysconfdir}/%{name}.conf %{_sysconfdir}/logrotate.d/* || :
82be549b 161
007c1a92 162%post
1bd207cb
JB
163if [ -f /var/lib/logrotate.status ]; then
164 mv -f /var/lib/logrotate.status %{statdir}/logrotate.status
165else
166 touch %{statdir}/logrotate.status
167 chmod 000 %{statdir}/logrotate.status
e2aefaf5 168 chown root:root %{statdir}/logrotate.status
1bd207cb
JB
169 chmod 640 %{statdir}/logrotate.status
170fi
007c1a92 171
e80fc1f7 172%files
696caff4 173%defattr(644,root,root,755)
82588add 174%doc CHANGES
4f94bac4 175%attr(755,root,root) %{_sbindir}/logrotate
287810e7
ER
176%attr(755,root,root) %{_libexecdir}/logrotate
177%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
c859e311 178%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
287810e7 179%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
1bd207cb 180%attr(640,root,root) %ghost %{statdir}/logrotate.status
4ec7f55f 181%{_mandir}/man5/logrotate.conf.5*
e3a1a7ab 182%{_mandir}/man8/logrotate.8*
This page took 0.094116 seconds and 4 git commands to generate.