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