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