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