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