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