2 # - without gssapi still generates dep on heimdal-libs
5 %bcond_without dbi # database support via libdbi
6 %bcond_without gssapi # GSSAPI Kerberos 5 support
7 %bcond_without mysql # MySQL database support
8 %bcond_without pgsql # PostgreSQL database support
9 %bcond_without snmp # SNMP support
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
23 Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz
24 # Source0-md5: c46db0496066b82faf735bd4222208d7
27 Source3: %{name}.sysconfig
28 Source4: %{name}.logrotate
29 Patch0: rsyslog-systemd.patch
30 URL: http://www.rsyslog.com/
31 %{?with_gssapi:BuildRequires: heimdal-devel}
32 %{?with_mysql:BuildRequires: mysql-devel}
33 %{?with_snmp:BuildRequires: net-snmp-devel}
34 BuildRequires: pkgconfig
35 %{?with_pgsql:BuildRequires: postgresql-devel}
36 BuildRequires: libnet-devel
37 BuildRequires: gnutls-devel
38 BuildRequires: rpmbuild(macros) >= 1.626
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
44 Requires(pre): /bin/id
45 Requires(pre): /usr/bin/getgid
46 Requires(pre): /usr/lib/rpm/user_group.sh
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)
54 Requires: logrotate >= 3.2-3
55 Requires: psmisc >= 20.1
56 Requires: systemd-units >= 37-0.10
57 Provides: group(syslog)
58 Provides: service(klogd)
59 Provides: service(syslog)
60 Provides: syslogdaemon
61 Provides: user(syslog)
65 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68 Rsyslog is an enhanced multi-threaded syslogd supporting, among
69 others, MySQL, syslog/tcp, RFC 3195, permitted sender lists, filtering
70 on any message part, and fine grain output format control. It is quite
71 compatible to stock sysklogd and can be used as a drop-in replacement.
72 Its advanced features make it suitable for enterprise-class,
73 encryption protected syslog relay chains while at the same time being
74 very easy to setup for the novice user.
76 %description -l pl.UTF-8
77 rsyslog to zaawansowany, wielowątkowy syslogd obsługujący m.in.
78 MySQL-a, syslog/tcp, RFC 3195, listy dopuszczalnych nadawców,
79 filtrowanie po częściach komunikatów i szczegółową kontrolę formatu
80 wyjściowego. Jest w miarę kompatybilny ze zwykłym sysklogd i może być
81 używany jako jego zamiennik. Jego zaawansowane możliwości czynią go
82 odpowiednim do produkcyjnych, szyfrowanych łańcuchów przekazywania
83 logów, a jednocześnie jest przy tym łatwy do skonfigurowania dla
84 początkującego użytkownika.
87 Summary: MySQL support for rsyslog
88 Summary(pl.UTF-8): Obsługa MySQL-a do rsysloga
90 Requires: %{name} = %{version}-%{release}
93 The rsyslog-mysql package contains a dynamic shared object that will
94 add MySQL database support to rsyslog.
96 %description mysql -l pl.UTF-8
97 Pakiet rsyslog-mysql zawiera moduł dynamiczny dodający obsługę bazy
98 danych MySQL do rsysloga.
101 Summary: PostgresSQL support for rsyslog
102 Summary(pl.UTF-8): Obsługa PostgreSQL-a dla rsysloga
104 Requires: %{name} = %{version}-%{release}
107 The rsyslog-pgsql package contains a dynamic shared object that will
108 add PostgreSQL database support to rsyslog.
110 %description pgsql -l pl.UTF-8
111 Pakiet rsyslog-pgsql zawiera moduł dynamiczny dodający obsługę bazy
112 danych PostgreSQL do rsysloga.
115 Summary: GSSAPI authentication and encryption support for rsyslog
116 Summary(pl.UTF-8): Obsługa uwierzytelniania GSSAPI i szyfrowania dla rsysloga
118 Requires: %{name} = %{version}-%{release}
121 The rsyslog-gssapi package contains the rsyslog plugins which support
122 GSSAPI authentication and secure connections. GSSAPI is commonly used
123 for Kerberos authentication.
125 %description gssapi -l pl.UTF-8
126 Pakiet rsyslog-gssapi zawiera wtyczki rsysloga obsługujące
127 uwierzytelnianie GSSAPI i bezpieczne połączenia. GSSAPI jest
128 powszechnie używane do uwierzytelniania Kerberos.
131 Summary: libdbi database support for rsyslog
133 Requires: %{name} = %{version}-%{release}
136 This module supports a large number of database systems via
137 libdbi. Libdbi abstracts the database layer and provides drivers for
138 many systems. Drivers are available via the libdbi-drivers project.
141 Summary: Provides the omudpspoof module
143 Requires: %{name} = %{version}-%{release}
145 %description udpspoof
146 This module is similar to the regular UDP forwarder, but permits to
147 spoof the sender address. Also, it enables to circle through a number
151 Summary: SNMP protocol support for rsyslog
153 Requires: %{name} = %{version}-%{release}
156 The rsyslog-snmp package contains the rsyslog plugin that provides the
157 ability to send syslog messages as SNMPv1 and SNMPv2c traps.
160 Summary: TLS protocol support for rsyslog
162 Requires: %{name} = %{version}-%{release}
165 The rsyslog-gnutls package contains the rsyslog plugins that provide the
166 ability to receive syslog messages via upcoming syslog-transport-tls
167 IETF standard protocol.
175 --disable-silent-rules \
181 --enable-imtemplate \
183 --enable-mmsnmptrapd \
184 --enable-omdbalerting \
187 --enable-omtemplate \
188 --enable-omudpspoof \
190 --enable-pmaixforwardedfrom \
191 --enable-pmcisconames \
193 --enable-pmrfc3164sd \
195 --enable-smcustbindcdr \
196 --enable-unlimited-select \
197 %{?with_gssapi:--enable-gssapi-krb5} \
198 %{?with_mysql:--enable-mysql} \
199 %{?with_pgsql:--enable-pgsql} \
200 %{?with_snmp:--enable-snmp} \
201 %{?with_dbi:--enable-libdbi} \
202 --with-systemdsystemunitdir=/lib/systemd/system
207 rm -rf $RPM_BUILD_ROOT
208 install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d,logrotate.d,rsyslog.d} \
209 $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man{5,8},%{_bindir}} \
210 $RPM_BUILD_ROOT/{dev,var/log}
213 DESTDIR=$RPM_BUILD_ROOT
215 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/rsyslog
216 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/rsyslog.conf
217 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/rsyslog
218 cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/rsyslog
220 for n in debug kernel maillog messages secure syslog user spooler lpr daemon; do
221 > $RPM_BUILD_ROOT/var/log/$n
224 %{__rm} $RPM_BUILD_ROOT%{_libdir}/rsyslog/*.la
227 rm -rf $RPM_BUILD_ROOT
230 %groupadd -P syslog -g 18 syslog
231 %useradd -P syslog -u 18 -g syslog -c "Syslog User" syslog
232 %addusertogroup syslog logs
235 for n in /var/log/{cron,daemon,debug,kernel,lpr,maillog,messages,secure,spooler,syslog,user}; do
247 /sbin/chkconfig --add %{name}
248 %service rsyslog restart "%{name} daemon"
250 %systemd_post rsyslog.service
253 if [ "$1" = "0" ]; then
254 %service %{name} stop
255 /sbin/chkconfig --del %{name}
257 %systemd_preun rsyslog.service
260 if [ "$1" = "0" ]; then
266 %triggerpostun -- %{name} < 5.8.6-4
267 %systemd_trigger rsyslog.service
269 %triggerpostun -- inetutils-syslogd
270 /sbin/chkconfig --del syslog
271 /sbin/chkconfig --add syslog
272 if [ -f /etc/syslog.conf.rpmsave ]; then
273 mv -f /etc/syslog.conf{,.rpmnew}
274 mv -f /etc/syslog.conf{.rpmsave,}
275 echo "Moved /etc/syslog.conf.rpmsave to /etc/syslog.conf"
276 echo "Original file from package is available as /etc/syslog.conf.rpmnew"
280 %defattr(644,root,root,755)
281 %doc AUTHORS ChangeLog NEWS README
282 %dir %{_sysconfdir}/rsyslog.d
283 %attr(640,root,syslog) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rsyslog.conf
284 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rsyslog
285 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/rsyslog
286 %attr(754,root,root) /etc/rc.d/init.d/rsyslog
287 %attr(640,root,root) %ghost /var/log/*
288 /lib/systemd/system/rsyslog.service
289 %attr(755,root,root) %{_sbindir}/rsyslogd
290 %dir %{_libdir}/rsyslog
291 %attr(755,root,root) %{_libdir}/rsyslog/imfile.so
292 %attr(755,root,root) %{_libdir}/rsyslog/imklog.so
293 %attr(755,root,root) %{_libdir}/rsyslog/immark.so
294 %attr(755,root,root) %{_libdir}/rsyslog/imtcp.so
295 %attr(755,root,root) %{_libdir}/rsyslog/imudp.so
296 %attr(755,root,root) %{_libdir}/rsyslog/imuxsock.so
297 %attr(755,root,root) %{_libdir}/rsyslog/lmnet.so
298 %attr(755,root,root) %{_libdir}/rsyslog/lmnetstrms.so
299 %attr(755,root,root) %{_libdir}/rsyslog/lmnsd_ptcp.so
300 %attr(755,root,root) %{_libdir}/rsyslog/lmregexp.so
301 %attr(755,root,root) %{_libdir}/rsyslog/lmstrmsrv.so
302 %attr(755,root,root) %{_libdir}/rsyslog/lmtcpclt.so
303 %attr(755,root,root) %{_libdir}/rsyslog/lmtcpsrv.so
304 %attr(755,root,root) %{_libdir}/rsyslog/lmzlibw.so
305 %attr(755,root,root) %{_libdir}/rsyslog/omruleset.so
306 %attr(755,root,root) %{_libdir}/rsyslog/omtesting.so
307 %attr(755,root,root) %{_libdir}/rsyslog/imdiag.so
308 %attr(755,root,root) %{_libdir}/rsyslog/impstats.so
309 %attr(755,root,root) %{_libdir}/rsyslog/imptcp.so
310 %attr(755,root,root) %{_libdir}/rsyslog/imtemplate.so
311 %attr(755,root,root) %{_libdir}/rsyslog/mmsnmptrapd.so
312 %attr(755,root,root) %{_libdir}/rsyslog/omdbalerting.so
313 %attr(755,root,root) %{_libdir}/rsyslog/ommail.so
314 %attr(755,root,root) %{_libdir}/rsyslog/omprog.so
315 %attr(755,root,root) %{_libdir}/rsyslog/omstdout.so
316 %attr(755,root,root) %{_libdir}/rsyslog/omtemplate.so
317 %attr(755,root,root) %{_libdir}/rsyslog/omuxsock.so
318 %attr(755,root,root) %{_libdir}/rsyslog/pmaixforwardedfrom.so
319 %attr(755,root,root) %{_libdir}/rsyslog/pmcisconames.so
320 %attr(755,root,root) %{_libdir}/rsyslog/pmlastmsg.so
321 %attr(755,root,root) %{_libdir}/rsyslog/pmrfc3164sd.so
322 %attr(755,root,root) %{_libdir}/rsyslog/pmsnare.so
323 %attr(755,root,root) %{_libdir}/rsyslog/sm_cust_bindcdr.so
329 %defattr(644,root,root,755)
330 %doc plugins/ommysql/createDB.sql
331 %attr(755,root,root) %{_libdir}/rsyslog/ommysql.so
336 %defattr(644,root,root,755)
337 %doc plugins/ompgsql/createDB.sql
338 %attr(755,root,root) %{_libdir}/rsyslog/ompgsql.so
343 %defattr(644,root,root,755)
344 %attr(755,root,root) %{_libdir}/rsyslog/imgssapi.so
345 %attr(755,root,root) %{_libdir}/rsyslog/lmgssutil.so
346 %attr(755,root,root) %{_libdir}/rsyslog/omgssapi.so
351 %defattr(644,root,root,755)
352 %attr(755,root,root) %{_libdir}/rsyslog/omlibdbi.so
356 %defattr(644,root,root,755)
357 %attr(755,root,root) %{_libdir}/rsyslog/omudpspoof.so
361 %defattr(644,root,root,755)
362 %attr(755,root,root) %{_libdir}/rsyslog/omsnmp.so
366 %defattr(644,root,root,755)
367 %attr(755,root,root) %{_libdir}/rsyslog/lmnsd_gtls.so