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