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