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