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