]>
Commit | Line | Data |
---|---|---|
5997e750 SP |
1 | # |
2 | # Conditional build: | |
73b56bd9 JB |
3 | %bcond_without gssapi # GSSAPI Kerberos 5 support |
4 | %bcond_without mysql # MySQL database support | |
5 | %bcond_without pgsql # PostgreSQL database support | |
6 | %bcond_without snmp # SNMP support | |
7 | # | |
284a559d PG |
8 | Summary: Linux system and kernel logger |
9 | Summary(de.UTF-8): Linux-System- und Kerner-Logger | |
10 | Summary(es.UTF-8): Registrador de log del sistema linux | |
11 | Summary(fr.UTF-8): Le système Linux et le logger du noyau | |
12 | Summary(pl.UTF-8): Programy logujące zdarzenia w systemie i jądrze Linuksa | |
13 | Summary(pt_BR.UTF-8): Registrador de log do sistema linux | |
14 | Summary(tr.UTF-8): Linux sistem ve çekirdek kayıt süreci | |
15 | Name: rsyslog | |
c60135cd | 16 | Version: 3.18.2 |
5cf93ee6 | 17 | Release: 1 |
3714e2e4 | 18 | License: GPL v3 |
284a559d PG |
19 | Group: Daemons |
20 | Source0: http://download.rsyslog.com/rsyslog/%{name}-%{version}.tar.gz | |
c60135cd | 21 | # Source0-md5: 34b371f304a8c3222f89c3d0af7a2489 |
a097ef7f SP |
22 | Source1: %{name}.init |
23 | Source2: %{name}.conf | |
24 | Source3: %{name}.sysconfig | |
f0da554a | 25 | URL: http://www.rsyslog.com/ |
73b56bd9 JB |
26 | %{?with_gssapi:BuildRequires: krb5-devel} |
27 | %{?with_mysql:BuildRequires: mysql-devel} | |
28 | %{?with_snmp:BuildRequires: net-snmp-devel} | |
29 | %{?with_pgsql:BuildRequires: postgresql-devel} | |
284a559d PG |
30 | Requires(post): fileutils |
31 | Requires(post,preun): /sbin/chkconfig | |
32 | Requires(post,preun): rc-scripts >= 0.2.0 | |
33 | Requires(postun): /usr/sbin/groupdel | |
34 | Requires(postun): /usr/sbin/userdel | |
284a559d PG |
35 | Requires(pre): /bin/id |
36 | Requires(pre): /usr/bin/getgid | |
707ea13f | 37 | Requires(pre): /usr/lib/rpm/user_group.sh |
284a559d PG |
38 | Requires(pre): /usr/sbin/groupadd |
39 | Requires(pre): /usr/sbin/useradd | |
40 | Requires(pre): /usr/sbin/usermod | |
41 | Requires(triggerpostun): sed >= 4.0 | |
42 | # for vservers we don't need klogd and syslog works without klogd | |
43 | # (just it doesn't log kernel buffer into syslog) | |
44 | # Requires: klogd | |
45 | Requires: logrotate >= 3.2-3 | |
46 | Requires: psmisc >= 20.1 | |
47 | Provides: group(syslog) | |
48 | Provides: syslogdaemon | |
49 | Provides: user(syslog) | |
50 | Obsoletes: msyslog | |
51 | Obsoletes: sysklogd | |
52 | Obsoletes: syslog-ng | |
3714e2e4 | 53 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
284a559d | 54 | |
3714e2e4 | 55 | %description |
707ea13f SP |
56 | Rsyslog is an enhanced multi-threaded syslogd supporting, among |
57 | others, MySQL, syslog/tcp, RFC 3195, permitted sender lists, filtering | |
58 | on any message part, and fine grain output format control. It is quite | |
59 | compatible to stock sysklogd and can be used as a drop-in replacement. | |
60 | Its advanced features make it suitable for enterprise-class, | |
61 | encryption protected syslog relay chains while at the same time being | |
62 | very easy to setup for the novice user. | |
284a559d | 63 | |
73b56bd9 JB |
64 | %description -l pl.UTF-8 |
65 | rsyslog to zaawansowany, wielowątkowy syslogd obsługujący m.in. | |
66 | MySQL-a, syslog/tcp, RFC 3195, listy dopuszczalnych nadawców, | |
0ca0cfed ER |
67 | filtrowanie po częściach komunikatów i szczegółową kontrolę formatu |
68 | wyjściowego. Jest w miarę kompatybilny ze zwykłym sysklogd i może być | |
69 | używany jako jego zamiennik. Jego zaawansowane możliwości czynią go | |
70 | odpowiednim do produkcyjnych, szyfrowanych łańcuchów przekazywania | |
71 | logów, a jednocześnie jest przy tym łatwy do skonfigurowania dla | |
72 | początkującego użytkownika. | |
73b56bd9 | 73 | |
3714e2e4 | 74 | %package klogd |
284a559d PG |
75 | Summary: Linux kernel logger |
76 | Summary(de.UTF-8): Linux-Kerner-Logger | |
77 | Summary(pl.UTF-8): Program logujący zdarzenia w jądrze Linuksa | |
78 | Group: Daemons | |
79 | Requires(post,preun): /sbin/chkconfig | |
80 | Requires(post,preun): rc-scripts >= 0.2.0 | |
81 | Requires(postun): /usr/sbin/groupdel | |
82 | Requires(postun): /usr/sbin/userdel | |
284a559d PG |
83 | Requires(pre): /bin/id |
84 | Requires(pre): /usr/bin/getgid | |
707ea13f | 85 | Requires(pre): /usr/lib/rpm/user_group.sh |
284a559d PG |
86 | Requires(pre): /usr/sbin/groupadd |
87 | Requires(pre): /usr/sbin/useradd | |
88 | Requires(pre): /usr/sbin/usermod | |
89 | Provides: group(syslog) | |
90 | Provides: user(syslog) | |
91 | Obsoletes: sysklogd | |
92 | ||
3714e2e4 | 93 | %description klogd |
284a559d PG |
94 | This is the Linux kernel logging program. It is run as a daemon |
95 | (background process) to log messages from kernel. | |
96 | ||
73b56bd9 | 97 | %description klogd -l pl.UTF-8 |
0ca0cfed ER |
98 | Pakiet ten zawiera program, który jest uruchamiany jako demon i służy |
99 | do logowania komunikatów jądra Linuksa. | |
284a559d | 100 | |
4fffed3f | 101 | %package mysql |
f0da554a | 102 | Summary: MySQL support for rsyslog |
73b56bd9 | 103 | Summary(pl.UTF-8): Obsługa MySQL-a do rsysloga |
f0da554a | 104 | Group: Daemons |
d820c9a0 | 105 | Requires: %{name} = %{version}-%{release} |
4fffed3f SP |
106 | |
107 | %description mysql | |
f0da554a SP |
108 | The rsyslog-mysql package contains a dynamic shared object that will |
109 | add MySQL database support to rsyslog. | |
4fffed3f | 110 | |
73b56bd9 | 111 | %description mysql -l pl.UTF-8 |
0ca0cfed ER |
112 | Pakiet rsyslog-mysql zawiera moduł dynamiczny dodający obsługę bazy |
113 | danych MySQL do rsysloga. | |
73b56bd9 | 114 | |
4fffed3f | 115 | %package pgsql |
f0da554a | 116 | Summary: PostgresSQL support for rsyslog |
73b56bd9 | 117 | Summary(pl.UTF-8): Obsługa PostgreSQL-a dla rsysloga |
f0da554a | 118 | Group: Daemons |
d820c9a0 | 119 | Requires: %{name} = %{version}-%{release} |
4fffed3f SP |
120 | |
121 | %description pgsql | |
f0da554a SP |
122 | The rsyslog-pgsql package contains a dynamic shared object that will |
123 | add PostgreSQL database support to rsyslog. | |
4fffed3f | 124 | |
73b56bd9 | 125 | %description pgsql -l pl.UTF-8 |
0ca0cfed ER |
126 | Pakiet rsyslog-pgsql zawiera moduł dynamiczny dodający obsługę bazy |
127 | danych PostgreSQL do rsysloga. | |
73b56bd9 | 128 | |
4fffed3f | 129 | %package gssapi |
f0da554a | 130 | Summary: GSSAPI authentication and encryption support for rsyslog |
73b56bd9 | 131 | Summary(pl.UTF-8): Obsługa uwierzytelniania GSSAPI i szyfrowania dla rsysloga |
f0da554a | 132 | Group: Daemons |
d820c9a0 | 133 | Requires: %{name} = %{version}-%{release} |
4fffed3f SP |
134 | |
135 | %description gssapi | |
f0da554a SP |
136 | The rsyslog-gssapi package contains the rsyslog plugins which support |
137 | GSSAPI authentication and secure connections. GSSAPI is commonly used | |
138 | for Kerberos authentication. | |
4fffed3f | 139 | |
73b56bd9 JB |
140 | %description gssapi -l pl.UTF-8 |
141 | Pakiet rsyslog-gssapi zawiera wtyczki rsysloga obsługujące | |
142 | uwierzytelnianie GSSAPI i bezpieczne połączenia. GSSAPI jest | |
143 | powszechnie używane do uwierzytelniania Kerberos. | |
144 | ||
c60135cd SP |
145 | %package devel |
146 | Summary: Header files for rsyslog | |
147 | Summary(pl.UTF-8): Pliki nagłówkowe dla rsyslog | |
148 | Group: Development/Libraries | |
149 | Requires: %{name} = %{version}-%{release} | |
150 | ||
151 | %description devel | |
152 | Header files for rsyslog. | |
153 | ||
154 | %description devel -l pl.UTF-8 | |
155 | Pliki nagłówkowe dla rsyslog. | |
156 | ||
284a559d PG |
157 | %prep |
158 | %setup -q | |
284a559d PG |
159 | |
160 | %build | |
5997e750 | 161 | %configure \ |
73b56bd9 JB |
162 | %{?with_gssapi:--enable-gssapi-krb5} \ |
163 | %{?with_mysql:--enable-mysql} \ | |
164 | %{?with_pgsql:--enable-pgsql} \ | |
165 | %{?with_snmp:--enable-snmp} | |
5997e750 | 166 | |
3714e2e4 | 167 | %{__make} |
284a559d PG |
168 | |
169 | %install | |
170 | rm -rf $RPM_BUILD_ROOT | |
f16b19a4 | 171 | install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d,logrotate.d,rsyslog.d} \ |
284a559d PG |
172 | $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man{5,8},%{_bindir}} \ |
173 | $RPM_BUILD_ROOT/{dev,var/log} | |
174 | ||
175 | %{__make} install \ | |
4fffed3f | 176 | DESTDIR=$RPM_BUILD_ROOT |
284a559d | 177 | |
a097ef7f | 178 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/rsyslog |
f16b19a4 | 179 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/rsyslog.d/rsyslog.conf |
e1f75880 ER |
180 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/rsyslog |
181 | install redhat/rsyslog.log $RPM_BUILD_ROOT/etc/logrotate.d/rsyslog | |
a097ef7f | 182 | |
284a559d PG |
183 | for n in debug kernel maillog messages secure syslog user spooler lpr daemon |
184 | do | |
185 | > $RPM_BUILD_ROOT/var/log/$n | |
186 | done | |
187 | ||
3714e2e4 | 188 | %pre |
284a559d PG |
189 | %groupadd -P syslog -g 18 syslog |
190 | %useradd -P syslog -u 18 -g syslog -c "Syslog User" syslog | |
191 | %addusertogroup syslog logs | |
192 | ||
3714e2e4 | 193 | %post |
284a559d PG |
194 | for n in /var/log/{cron,daemon,debug,kernel,lpr,maillog,messages,secure,spooler,syslog,user}; do |
195 | if [ -f $n ]; then | |
196 | chown syslog:syslog $n | |
197 | continue | |
198 | else | |
199 | touch $n | |
200 | chmod 000 $n | |
201 | chown syslog:syslog $n | |
202 | chmod 640 $n | |
203 | fi | |
204 | done | |
205 | ||
3714e2e4 | 206 | /sbin/chkconfig --add %{name} |
f16b19a4 | 207 | %service rsyslog restart "%{name} daemon" |
3714e2e4 | 208 | %service -q %{name}-klogd restart |
284a559d | 209 | |
3714e2e4 | 210 | %preun |
284a559d | 211 | if [ "$1" = "0" ]; then |
3714e2e4 PG |
212 | %service %{name} stop |
213 | /sbin/chkconfig --del %{name} | |
284a559d PG |
214 | fi |
215 | ||
3714e2e4 | 216 | %postun |
284a559d PG |
217 | if [ "$1" = "0" ]; then |
218 | %userremove syslog | |
219 | %groupremove syslog | |
220 | fi | |
221 | ||
3714e2e4 | 222 | %pre klogd |
284a559d PG |
223 | %groupadd -P klogd -g 18 syslog |
224 | %useradd -P klogd -u 18 -g syslog -c "Syslog User" syslog | |
225 | %addusertogroup syslog logs | |
226 | ||
3714e2e4 PG |
227 | %post klogd |
228 | /sbin/chkconfig --add %{name}-klogd | |
229 | %service %{name}-klogd restart "kernel logger daemon" | |
284a559d | 230 | |
3714e2e4 | 231 | %preun klogd |
284a559d | 232 | if [ "$1" = "0" ]; then |
3714e2e4 PG |
233 | %service %{name}-klogd stop |
234 | /sbin/chkconfig --del %{name}-klogd | |
284a559d PG |
235 | fi |
236 | ||
3714e2e4 | 237 | %postun klogd |
284a559d PG |
238 | if [ "$1" = "0" ]; then |
239 | %userremove syslog | |
240 | %groupremove syslog | |
241 | fi | |
242 | ||
243 | %triggerpostun -- inetutils-syslogd | |
244 | /sbin/chkconfig --del syslog | |
245 | /sbin/chkconfig --add syslog | |
246 | if [ -f /etc/syslog.conf.rpmsave ]; then | |
247 | mv -f /etc/syslog.conf{,.rpmnew} | |
248 | mv -f /etc/syslog.conf{.rpmsave,} | |
249 | echo "Moved /etc/syslog.conf.rpmsave to /etc/syslog.conf" | |
250 | echo "Original file from package is available as /etc/syslog.conf.rpmnew" | |
251 | fi | |
252 | ||
284a559d PG |
253 | %clean |
254 | rm -rf $RPM_BUILD_ROOT | |
255 | ||
3714e2e4 | 256 | %files |
284a559d | 257 | %defattr(644,root,root,755) |
5997e750 | 258 | %doc AUTHORS ChangeLog NEWS README |
f16b19a4 SP |
259 | %dir %{_sysconfdir}/rsyslog.d |
260 | %attr(640,root,syslog) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rsyslog.d/rsyslog.conf | |
a097ef7f SP |
261 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rsyslog |
262 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/rsyslog | |
263 | %attr(754,root,root) /etc/rc.d/init.d/rsyslog | |
284a559d | 264 | %attr(640,root,root) %ghost /var/log/* |
3714e2e4 | 265 | %attr(755,root,root) %{_sbindir}/rsyslogd |
d30c8748 | 266 | %dir %{_libdir}/rsyslog |
73b56bd9 JB |
267 | %attr(755,root,root) %{_libdir}/rsyslog/omsnmp.so |
268 | %attr(755,root,root) %{_libdir}/rsyslog/imklog.so | |
269 | %attr(755,root,root) %{_libdir}/rsyslog/immark.so | |
270 | %attr(755,root,root) %{_libdir}/rsyslog/imtcp.so | |
271 | %attr(755,root,root) %{_libdir}/rsyslog/imudp.so | |
272 | %attr(755,root,root) %{_libdir}/rsyslog/imuxsock.so | |
273 | %attr(755,root,root) %{_libdir}/rsyslog/lmgssutil.so | |
274 | %attr(755,root,root) %{_libdir}/rsyslog/lmnet.so | |
275 | %attr(755,root,root) %{_libdir}/rsyslog/lmregexp.so | |
276 | %attr(755,root,root) %{_libdir}/rsyslog/lmtcpclt.so | |
277 | %attr(755,root,root) %{_libdir}/rsyslog/lmtcpsrv.so | |
278 | %attr(755,root,root) %{_libdir}/rsyslog/omtesting.so | |
4fffed3f SP |
279 | %{_mandir}/man5/* |
280 | %{_mandir}/man8/* | |
284a559d | 281 | |
73b56bd9 JB |
282 | #%files klogd |
283 | #%defattr(644,root,root,755) | |
3714e2e4 PG |
284 | #%attr(754,root,root) /etc/rc.d/init.d/klogd |
285 | #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/klogd | |
286 | #%attr(755,root,root) %{_sbindir}/klogd | |
4fffed3f | 287 | |
bd9b9208 | 288 | %if %{with mysql} |
4fffed3f SP |
289 | %files mysql |
290 | %defattr(644,root,root,755) | |
291 | %doc plugins/ommysql/createDB.sql | |
73b56bd9 | 292 | %attr(755,root,root) %{_libdir}/rsyslog/ommysql.so |
bd9b9208 | 293 | %endif |
4fffed3f | 294 | |
bd9b9208 | 295 | %if %{with pgsql} |
4fffed3f SP |
296 | %files pgsql |
297 | %defattr(644,root,root,755) | |
298 | %doc plugins/ompgsql/createDB.sql | |
73b56bd9 | 299 | %attr(755,root,root) %{_libdir}/rsyslog/ompgsql.so |
bd9b9208 | 300 | %endif |
4fffed3f | 301 | |
bd9b9208 | 302 | %if %{with gssapi} |
4fffed3f SP |
303 | %files gssapi |
304 | %defattr(644,root,root,755) | |
73b56bd9 JB |
305 | %attr(755,root,root) %{_libdir}/rsyslog/imgssapi.so |
306 | %attr(755,root,root) %{_libdir}/rsyslog/omgssapi.so | |
bd9b9208 | 307 | %endif |
c60135cd SP |
308 | |
309 | %files devel | |
310 | %defattr(644,root,root,755) | |
311 | %{_libdir}/rsyslog/*.la |