]>
Commit | Line | Data |
---|---|---|
88d746d2 | 1 | # TODO |
88d746d2 | 2 | # - without gssapi still generates dep on heimdal-libs |
5997e750 SP |
3 | # |
4 | # Conditional build: | |
5c2c427c | 5 | %bcond_without dbi # database support via libdbi |
73b56bd9 | 6 | %bcond_without gssapi # GSSAPI Kerberos 5 support |
88d746d2 | 7 | %bcond_without mysql # MySQL database support |
73b56bd9 JB |
8 | %bcond_without pgsql # PostgreSQL database support |
9 | %bcond_without snmp # SNMP support | |
88d746d2 | 10 | |
284a559d PG |
11 | Summary: Linux system and kernel logger |
12 | Summary(de.UTF-8): Linux-System- und Kerner-Logger | |
13 | Summary(es.UTF-8): Registrador de log del sistema linux | |
14 | Summary(fr.UTF-8): Le système Linux et le logger du noyau | |
15 | Summary(pl.UTF-8): Programy logujące zdarzenia w systemie i jądrze Linuksa | |
16 | Summary(pt_BR.UTF-8): Registrador de log do sistema linux | |
17 | Summary(tr.UTF-8): Linux sistem ve çekirdek kayıt süreci | |
18 | Name: rsyslog | |
5c2c427c AF |
19 | Version: 5.8.6 |
20 | Release: 1 | |
8b647ddd | 21 | License: GPL v3+ |
284a559d | 22 | Group: Daemons |
d7a7c8fb | 23 | Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz |
5c2c427c | 24 | # Source0-md5: c46db0496066b82faf735bd4222208d7 |
a097ef7f SP |
25 | Source1: %{name}.init |
26 | Source2: %{name}.conf | |
27 | Source3: %{name}.sysconfig | |
5b253f29 | 28 | Source4: %{name}.logrotate |
5c2c427c | 29 | Patch0: rsyslog-systemd.patch |
f0da554a | 30 | URL: http://www.rsyslog.com/ |
2bf17689 | 31 | %{?with_gssapi:BuildRequires: heimdal-devel} |
73b56bd9 JB |
32 | %{?with_mysql:BuildRequires: mysql-devel} |
33 | %{?with_snmp:BuildRequires: net-snmp-devel} | |
d594a7b2 | 34 | BuildRequires: pkgconfig |
73b56bd9 | 35 | %{?with_pgsql:BuildRequires: postgresql-devel} |
5c2c427c AF |
36 | BuildRequires: libnet-devel |
37 | BuildRequires: gnutls-devel | |
284a559d PG |
38 | Requires(post): fileutils |
39 | Requires(post,preun): /sbin/chkconfig | |
40 | Requires(post,preun): rc-scripts >= 0.2.0 | |
41 | Requires(postun): /usr/sbin/groupdel | |
42 | Requires(postun): /usr/sbin/userdel | |
284a559d PG |
43 | Requires(pre): /bin/id |
44 | Requires(pre): /usr/bin/getgid | |
707ea13f | 45 | Requires(pre): /usr/lib/rpm/user_group.sh |
284a559d PG |
46 | Requires(pre): /usr/sbin/groupadd |
47 | Requires(pre): /usr/sbin/useradd | |
48 | Requires(pre): /usr/sbin/usermod | |
49 | Requires(triggerpostun): sed >= 4.0 | |
50 | # for vservers we don't need klogd and syslog works without klogd | |
51 | # (just it doesn't log kernel buffer into syslog) | |
52 | # Requires: klogd | |
53 | Requires: logrotate >= 3.2-3 | |
54 | Requires: psmisc >= 20.1 | |
55 | Provides: group(syslog) | |
56 | Provides: syslogdaemon | |
57 | Provides: user(syslog) | |
58 | Obsoletes: msyslog | |
59 | Obsoletes: sysklogd | |
60 | Obsoletes: syslog-ng | |
3714e2e4 | 61 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
284a559d | 62 | |
3714e2e4 | 63 | %description |
707ea13f SP |
64 | Rsyslog is an enhanced multi-threaded syslogd supporting, among |
65 | others, MySQL, syslog/tcp, RFC 3195, permitted sender lists, filtering | |
66 | on any message part, and fine grain output format control. It is quite | |
67 | compatible to stock sysklogd and can be used as a drop-in replacement. | |
68 | Its advanced features make it suitable for enterprise-class, | |
69 | encryption protected syslog relay chains while at the same time being | |
70 | very easy to setup for the novice user. | |
284a559d | 71 | |
73b56bd9 JB |
72 | %description -l pl.UTF-8 |
73 | rsyslog to zaawansowany, wielowątkowy syslogd obsługujący m.in. | |
74 | MySQL-a, syslog/tcp, RFC 3195, listy dopuszczalnych nadawców, | |
0ca0cfed ER |
75 | filtrowanie po częściach komunikatów i szczegółową kontrolę formatu |
76 | wyjściowego. Jest w miarę kompatybilny ze zwykłym sysklogd i może być | |
77 | używany jako jego zamiennik. Jego zaawansowane możliwości czynią go | |
78 | odpowiednim do produkcyjnych, szyfrowanych łańcuchów przekazywania | |
79 | logów, a jednocześnie jest przy tym łatwy do skonfigurowania dla | |
80 | początkującego użytkownika. | |
73b56bd9 | 81 | |
5c2c427c AF |
82 | %package systemd |
83 | Summary: systemd units for rsyslog | |
284a559d | 84 | Group: Daemons |
5c2c427c | 85 | Requires: %{name} = %{version}-%{release} |
284a559d | 86 | |
5c2c427c AF |
87 | %description systemd |
88 | systemd units for rsyslog. | |
284a559d | 89 | |
4fffed3f | 90 | %package mysql |
f0da554a | 91 | Summary: MySQL support for rsyslog |
73b56bd9 | 92 | Summary(pl.UTF-8): Obsługa MySQL-a do rsysloga |
f0da554a | 93 | Group: Daemons |
d820c9a0 | 94 | Requires: %{name} = %{version}-%{release} |
4fffed3f SP |
95 | |
96 | %description mysql | |
f0da554a SP |
97 | The rsyslog-mysql package contains a dynamic shared object that will |
98 | add MySQL database support to rsyslog. | |
4fffed3f | 99 | |
73b56bd9 | 100 | %description mysql -l pl.UTF-8 |
0ca0cfed ER |
101 | Pakiet rsyslog-mysql zawiera moduł dynamiczny dodający obsługę bazy |
102 | danych MySQL do rsysloga. | |
73b56bd9 | 103 | |
4fffed3f | 104 | %package pgsql |
f0da554a | 105 | Summary: PostgresSQL support for rsyslog |
73b56bd9 | 106 | Summary(pl.UTF-8): Obsługa PostgreSQL-a dla rsysloga |
f0da554a | 107 | Group: Daemons |
d820c9a0 | 108 | Requires: %{name} = %{version}-%{release} |
4fffed3f SP |
109 | |
110 | %description pgsql | |
f0da554a SP |
111 | The rsyslog-pgsql package contains a dynamic shared object that will |
112 | add PostgreSQL database support to rsyslog. | |
4fffed3f | 113 | |
73b56bd9 | 114 | %description pgsql -l pl.UTF-8 |
0ca0cfed ER |
115 | Pakiet rsyslog-pgsql zawiera moduł dynamiczny dodający obsługę bazy |
116 | danych PostgreSQL do rsysloga. | |
73b56bd9 | 117 | |
4fffed3f | 118 | %package gssapi |
f0da554a | 119 | Summary: GSSAPI authentication and encryption support for rsyslog |
73b56bd9 | 120 | Summary(pl.UTF-8): Obsługa uwierzytelniania GSSAPI i szyfrowania dla rsysloga |
f0da554a | 121 | Group: Daemons |
d820c9a0 | 122 | Requires: %{name} = %{version}-%{release} |
4fffed3f SP |
123 | |
124 | %description gssapi | |
f0da554a SP |
125 | The rsyslog-gssapi package contains the rsyslog plugins which support |
126 | GSSAPI authentication and secure connections. GSSAPI is commonly used | |
127 | for Kerberos authentication. | |
4fffed3f | 128 | |
73b56bd9 JB |
129 | %description gssapi -l pl.UTF-8 |
130 | Pakiet rsyslog-gssapi zawiera wtyczki rsysloga obsługujące | |
131 | uwierzytelnianie GSSAPI i bezpieczne połączenia. GSSAPI jest | |
132 | powszechnie używane do uwierzytelniania Kerberos. | |
133 | ||
5c2c427c AF |
134 | %package dbi |
135 | Summary: libdbi database support for rsyslog | |
136 | Group: Daemons | |
137 | Requires: %{name} = %{version}-%{release} | |
138 | ||
139 | %description dbi | |
140 | This module supports a large number of database systems via | |
141 | libdbi. Libdbi abstracts the database layer and provides drivers for | |
142 | many systems. Drivers are available via the libdbi-drivers project. | |
143 | ||
144 | %package udpspoof | |
145 | Summary: Provides the omudpspoof module | |
146 | Group: Daemons | |
147 | Requires: %{name} = %{version}-%{release} | |
148 | ||
149 | %description udpspoof | |
150 | This module is similar to the regular UDP forwarder, but permits to | |
151 | spoof the sender address. Also, it enables to circle through a number | |
152 | of source ports. | |
153 | ||
154 | %package snmp | |
155 | Summary: SNMP protocol support for rsyslog | |
156 | Group: Daemons | |
157 | Requires: %{name} = %{version}-%{release} | |
158 | ||
159 | %description snmp | |
160 | The rsyslog-snmp package contains the rsyslog plugin that provides the | |
161 | ability to send syslog messages as SNMPv1 and SNMPv2c traps. | |
162 | ||
163 | %package gnutls | |
164 | Summary: TLS protocol support for rsyslog | |
165 | Group: Daemons | |
166 | Requires: %{name} = %{version}-%{release} | |
167 | ||
168 | %description gnutls | |
169 | The rsyslog-gnutls package contains the rsyslog plugins that provide the | |
170 | ability to receive syslog messages via upcoming syslog-transport-tls | |
171 | IETF standard protocol. | |
172 | ||
284a559d PG |
173 | %prep |
174 | %setup -q | |
5c2c427c | 175 | %patch0 -p1 |
284a559d PG |
176 | |
177 | %build | |
5997e750 | 178 | %configure \ |
5c2c427c AF |
179 | --disable-silent-rules \ |
180 | --enable-gnutls \ | |
181 | --enable-imdiag \ | |
ec96f36f | 182 | --enable-imfile \ |
5c2c427c AF |
183 | --enable-impstats \ |
184 | --enable-imptcp \ | |
185 | --enable-imtemplate \ | |
186 | --enable-mail \ | |
187 | --enable-mmsnmptrapd \ | |
188 | --enable-omdbalerting \ | |
189 | --enable-omprog \ | |
190 | --enable-omstdout \ | |
191 | --enable-omtemplate \ | |
192 | --enable-omudpspoof \ | |
193 | --enable-omuxsock \ | |
194 | --enable-pmaixforwardedfrom \ | |
195 | --enable-pmcisconames \ | |
196 | --enable-pmlastmsg \ | |
197 | --enable-pmrfc3164sd \ | |
198 | --enable-pmsnare \ | |
199 | --enable-smcustbindcdr \ | |
200 | --enable-unlimited-select \ | |
73b56bd9 JB |
201 | %{?with_gssapi:--enable-gssapi-krb5} \ |
202 | %{?with_mysql:--enable-mysql} \ | |
203 | %{?with_pgsql:--enable-pgsql} \ | |
5c2c427c AF |
204 | %{?with_snmp:--enable-snmp} \ |
205 | %{?with_dbi:--enable-libdbi} \ | |
206 | --with-systemdsystemunitdir=/lib/systemd/system | |
5997e750 | 207 | |
3714e2e4 | 208 | %{__make} |
284a559d PG |
209 | |
210 | %install | |
211 | rm -rf $RPM_BUILD_ROOT | |
f16b19a4 | 212 | install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d,logrotate.d,rsyslog.d} \ |
284a559d PG |
213 | $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man{5,8},%{_bindir}} \ |
214 | $RPM_BUILD_ROOT/{dev,var/log} | |
215 | ||
216 | %{__make} install \ | |
4fffed3f | 217 | DESTDIR=$RPM_BUILD_ROOT |
284a559d | 218 | |
88d746d2 ER |
219 | install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/rsyslog |
220 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/rsyslog.conf | |
221 | cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/rsyslog | |
222 | cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/rsyslog | |
a097ef7f | 223 | |
88d746d2 | 224 | for n in debug kernel maillog messages secure syslog user spooler lpr daemon; do |
284a559d PG |
225 | > $RPM_BUILD_ROOT/var/log/$n |
226 | done | |
227 | ||
00340333 JB |
228 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/rsyslog/*.la |
229 | ||
230 | %clean | |
231 | rm -rf $RPM_BUILD_ROOT | |
232 | ||
3714e2e4 | 233 | %pre |
284a559d PG |
234 | %groupadd -P syslog -g 18 syslog |
235 | %useradd -P syslog -u 18 -g syslog -c "Syslog User" syslog | |
236 | %addusertogroup syslog logs | |
237 | ||
3714e2e4 | 238 | %post |
284a559d PG |
239 | for n in /var/log/{cron,daemon,debug,kernel,lpr,maillog,messages,secure,spooler,syslog,user}; do |
240 | if [ -f $n ]; then | |
ec96f36f | 241 | chown root:logs $n |
284a559d PG |
242 | continue |
243 | else | |
244 | touch $n | |
245 | chmod 000 $n | |
ec96f36f | 246 | chown root:logs $n |
284a559d PG |
247 | chmod 640 $n |
248 | fi | |
249 | done | |
250 | ||
3714e2e4 | 251 | /sbin/chkconfig --add %{name} |
f16b19a4 | 252 | %service rsyslog restart "%{name} daemon" |
3714e2e4 | 253 | %service -q %{name}-klogd restart |
284a559d | 254 | |
3714e2e4 | 255 | %preun |
284a559d | 256 | if [ "$1" = "0" ]; then |
3714e2e4 PG |
257 | %service %{name} stop |
258 | /sbin/chkconfig --del %{name} | |
284a559d PG |
259 | fi |
260 | ||
3714e2e4 | 261 | %postun |
284a559d PG |
262 | if [ "$1" = "0" ]; then |
263 | %userremove syslog | |
264 | %groupremove syslog | |
265 | fi | |
266 | ||
284a559d PG |
267 | %triggerpostun -- inetutils-syslogd |
268 | /sbin/chkconfig --del syslog | |
269 | /sbin/chkconfig --add syslog | |
270 | if [ -f /etc/syslog.conf.rpmsave ]; then | |
271 | mv -f /etc/syslog.conf{,.rpmnew} | |
272 | mv -f /etc/syslog.conf{.rpmsave,} | |
273 | echo "Moved /etc/syslog.conf.rpmsave to /etc/syslog.conf" | |
274 | echo "Original file from package is available as /etc/syslog.conf.rpmnew" | |
275 | fi | |
276 | ||
3714e2e4 | 277 | %files |
284a559d | 278 | %defattr(644,root,root,755) |
5997e750 | 279 | %doc AUTHORS ChangeLog NEWS README |
f16b19a4 | 280 | %dir %{_sysconfdir}/rsyslog.d |
ec96f36f | 281 | %attr(640,root,syslog) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rsyslog.conf |
a097ef7f SP |
282 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rsyslog |
283 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/rsyslog | |
284 | %attr(754,root,root) /etc/rc.d/init.d/rsyslog | |
284a559d | 285 | %attr(640,root,root) %ghost /var/log/* |
3714e2e4 | 286 | %attr(755,root,root) %{_sbindir}/rsyslogd |
d30c8748 | 287 | %dir %{_libdir}/rsyslog |
ec96f36f | 288 | %attr(755,root,root) %{_libdir}/rsyslog/imfile.so |
73b56bd9 JB |
289 | %attr(755,root,root) %{_libdir}/rsyslog/imklog.so |
290 | %attr(755,root,root) %{_libdir}/rsyslog/immark.so | |
291 | %attr(755,root,root) %{_libdir}/rsyslog/imtcp.so | |
292 | %attr(755,root,root) %{_libdir}/rsyslog/imudp.so | |
293 | %attr(755,root,root) %{_libdir}/rsyslog/imuxsock.so | |
73b56bd9 | 294 | %attr(755,root,root) %{_libdir}/rsyslog/lmnet.so |
5b253f29 AM |
295 | %attr(755,root,root) %{_libdir}/rsyslog/lmnetstrms.so |
296 | %attr(755,root,root) %{_libdir}/rsyslog/lmnsd_ptcp.so | |
73b56bd9 | 297 | %attr(755,root,root) %{_libdir}/rsyslog/lmregexp.so |
17f8b5ba | 298 | %attr(755,root,root) %{_libdir}/rsyslog/lmstrmsrv.so |
73b56bd9 JB |
299 | %attr(755,root,root) %{_libdir}/rsyslog/lmtcpclt.so |
300 | %attr(755,root,root) %{_libdir}/rsyslog/lmtcpsrv.so | |
17f8b5ba | 301 | %attr(755,root,root) %{_libdir}/rsyslog/lmzlibw.so |
22573281 | 302 | %attr(755,root,root) %{_libdir}/rsyslog/omruleset.so |
73b56bd9 | 303 | %attr(755,root,root) %{_libdir}/rsyslog/omtesting.so |
5c2c427c AF |
304 | %attr(755,root,root) %{_libdir}/rsyslog/imdiag.so |
305 | %attr(755,root,root) %{_libdir}/rsyslog/impstats.so | |
306 | %attr(755,root,root) %{_libdir}/rsyslog/imptcp.so | |
307 | %attr(755,root,root) %{_libdir}/rsyslog/imtemplate.so | |
308 | %attr(755,root,root) %{_libdir}/rsyslog/mmsnmptrapd.so | |
309 | %attr(755,root,root) %{_libdir}/rsyslog/omdbalerting.so | |
310 | %attr(755,root,root) %{_libdir}/rsyslog/ommail.so | |
311 | %attr(755,root,root) %{_libdir}/rsyslog/omprog.so | |
312 | %attr(755,root,root) %{_libdir}/rsyslog/omstdout.so | |
313 | %attr(755,root,root) %{_libdir}/rsyslog/omtemplate.so | |
314 | %attr(755,root,root) %{_libdir}/rsyslog/omuxsock.so | |
315 | %attr(755,root,root) %{_libdir}/rsyslog/pmaixforwardedfrom.so | |
316 | %attr(755,root,root) %{_libdir}/rsyslog/pmcisconames.so | |
317 | %attr(755,root,root) %{_libdir}/rsyslog/pmlastmsg.so | |
318 | %attr(755,root,root) %{_libdir}/rsyslog/pmrfc3164sd.so | |
319 | %attr(755,root,root) %{_libdir}/rsyslog/pmsnare.so | |
320 | %attr(755,root,root) %{_libdir}/rsyslog/sm_cust_bindcdr.so | |
4fffed3f SP |
321 | %{_mandir}/man5/* |
322 | %{_mandir}/man8/* | |
284a559d | 323 | |
5c2c427c AF |
324 | %files systemd |
325 | %defattr(644,root,root,755) | |
326 | /lib/systemd/system/rsyslog.service | |
4fffed3f | 327 | |
bd9b9208 | 328 | %if %{with mysql} |
4fffed3f SP |
329 | %files mysql |
330 | %defattr(644,root,root,755) | |
331 | %doc plugins/ommysql/createDB.sql | |
73b56bd9 | 332 | %attr(755,root,root) %{_libdir}/rsyslog/ommysql.so |
bd9b9208 | 333 | %endif |
4fffed3f | 334 | |
bd9b9208 | 335 | %if %{with pgsql} |
4fffed3f SP |
336 | %files pgsql |
337 | %defattr(644,root,root,755) | |
338 | %doc plugins/ompgsql/createDB.sql | |
73b56bd9 | 339 | %attr(755,root,root) %{_libdir}/rsyslog/ompgsql.so |
bd9b9208 | 340 | %endif |
4fffed3f | 341 | |
bd9b9208 | 342 | %if %{with gssapi} |
4fffed3f SP |
343 | %files gssapi |
344 | %defattr(644,root,root,755) | |
73b56bd9 | 345 | %attr(755,root,root) %{_libdir}/rsyslog/imgssapi.so |
c1934518 | 346 | %attr(755,root,root) %{_libdir}/rsyslog/lmgssutil.so |
73b56bd9 | 347 | %attr(755,root,root) %{_libdir}/rsyslog/omgssapi.so |
bd9b9208 | 348 | %endif |
5c2c427c AF |
349 | |
350 | %if %{with dbi} | |
351 | %files dbi | |
352 | %defattr(644,root,root,755) | |
353 | %attr(755,root,root) %{_libdir}/rsyslog/omlibdbi.so | |
354 | %endif | |
355 | ||
356 | %files udpspoof | |
357 | %defattr(644,root,root,755) | |
358 | %attr(755,root,root) %{_libdir}/rsyslog/omudpspoof.so | |
359 | ||
360 | %if %{with snmp} | |
361 | %files snmp | |
362 | %defattr(644,root,root,755) | |
363 | %attr(755,root,root) %{_libdir}/rsyslog/omsnmp.so | |
364 | %endif | |
365 | ||
366 | %files gnutls | |
367 | %defattr(644,root,root,755) | |
368 | %attr(755,root,root) %{_libdir}/rsyslog/lmnsd_gtls.so |