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