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