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