]>
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 | |
5997e750 | 16 | Version: 3.16.2 |
f16b19a4 | 17 | Release: 0.2 |
3714e2e4 | 18 | License: GPL v3 |
284a559d PG |
19 | Group: Daemons |
20 | Source0: http://download.rsyslog.com/rsyslog/%{name}-%{version}.tar.gz | |
5997e750 | 21 | # Source0-md5: 568d0ad73a149974b9bcfcb9e64bfc0b |
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, | |
f16b19a4 SP |
67 | filtrowanie po częściach komunikatów i szczegółową kontrolę |
68 | formatu wyjściowego. Jest w miarę kompatybilny ze zwykłym sysklogd | |
69 | i może być używany jako jego zamiennik. Jego zaawansowane | |
70 | możliwości czynią go odpowiednim do produkcyjnych, szyfrowanych | |
71 | łańcuchów przekazywania logów, a jednocześnie jest przy tym | |
72 | łatwy do skonfigurowania dla 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 |
f16b19a4 SP |
98 | Pakiet ten zawiera program, który jest uruchamiany jako demon i |
99 | służy 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 |
f16b19a4 SP |
112 | Pakiet rsyslog-mysql zawiera moduł dynamiczny dodający obsługę |
113 | bazy 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 |
f16b19a4 SP |
126 | Pakiet rsyslog-pgsql zawiera moduł dynamiczny dodający obsługę |
127 | bazy 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 | ||
284a559d PG |
145 | %prep |
146 | %setup -q | |
284a559d PG |
147 | |
148 | %build | |
5997e750 | 149 | %configure \ |
73b56bd9 JB |
150 | %{?with_gssapi:--enable-gssapi-krb5} \ |
151 | %{?with_mysql:--enable-mysql} \ | |
152 | %{?with_pgsql:--enable-pgsql} \ | |
153 | %{?with_snmp:--enable-snmp} | |
5997e750 | 154 | |
3714e2e4 | 155 | %{__make} |
284a559d PG |
156 | |
157 | %install | |
158 | rm -rf $RPM_BUILD_ROOT | |
f16b19a4 | 159 | install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d,logrotate.d,rsyslog.d} \ |
284a559d PG |
160 | $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man{5,8},%{_bindir}} \ |
161 | $RPM_BUILD_ROOT/{dev,var/log} | |
162 | ||
163 | %{__make} install \ | |
4fffed3f | 164 | DESTDIR=$RPM_BUILD_ROOT |
284a559d | 165 | |
a097ef7f | 166 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/rsyslog |
f16b19a4 | 167 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/rsyslog.d/rsyslog.conf |
a097ef7f SP |
168 | install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/rsyslog |
169 | install redhat/rsyslog.log $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/rsyslog | |
170 | ||
284a559d PG |
171 | for n in debug kernel maillog messages secure syslog user spooler lpr daemon |
172 | do | |
173 | > $RPM_BUILD_ROOT/var/log/$n | |
174 | done | |
175 | ||
3714e2e4 | 176 | %pre |
284a559d PG |
177 | %groupadd -P syslog -g 18 syslog |
178 | %useradd -P syslog -u 18 -g syslog -c "Syslog User" syslog | |
179 | %addusertogroup syslog logs | |
180 | ||
3714e2e4 | 181 | %post |
284a559d PG |
182 | for n in /var/log/{cron,daemon,debug,kernel,lpr,maillog,messages,secure,spooler,syslog,user}; do |
183 | if [ -f $n ]; then | |
184 | chown syslog:syslog $n | |
185 | continue | |
186 | else | |
187 | touch $n | |
188 | chmod 000 $n | |
189 | chown syslog:syslog $n | |
190 | chmod 640 $n | |
191 | fi | |
192 | done | |
193 | ||
3714e2e4 | 194 | /sbin/chkconfig --add %{name} |
f16b19a4 | 195 | %service rsyslog restart "%{name} daemon" |
3714e2e4 | 196 | %service -q %{name}-klogd restart |
284a559d | 197 | |
3714e2e4 | 198 | %preun |
284a559d | 199 | if [ "$1" = "0" ]; then |
3714e2e4 PG |
200 | %service %{name} stop |
201 | /sbin/chkconfig --del %{name} | |
284a559d PG |
202 | fi |
203 | ||
3714e2e4 | 204 | %postun |
284a559d PG |
205 | if [ "$1" = "0" ]; then |
206 | %userremove syslog | |
207 | %groupremove syslog | |
208 | fi | |
209 | ||
3714e2e4 | 210 | %pre klogd |
284a559d PG |
211 | %groupadd -P klogd -g 18 syslog |
212 | %useradd -P klogd -u 18 -g syslog -c "Syslog User" syslog | |
213 | %addusertogroup syslog logs | |
214 | ||
3714e2e4 PG |
215 | %post klogd |
216 | /sbin/chkconfig --add %{name}-klogd | |
217 | %service %{name}-klogd restart "kernel logger daemon" | |
284a559d | 218 | |
3714e2e4 | 219 | %preun klogd |
284a559d | 220 | if [ "$1" = "0" ]; then |
3714e2e4 PG |
221 | %service %{name}-klogd stop |
222 | /sbin/chkconfig --del %{name}-klogd | |
284a559d PG |
223 | fi |
224 | ||
3714e2e4 | 225 | %postun klogd |
284a559d PG |
226 | if [ "$1" = "0" ]; then |
227 | %userremove syslog | |
228 | %groupremove syslog | |
229 | fi | |
230 | ||
231 | %triggerpostun -- inetutils-syslogd | |
232 | /sbin/chkconfig --del syslog | |
233 | /sbin/chkconfig --add syslog | |
234 | if [ -f /etc/syslog.conf.rpmsave ]; then | |
235 | mv -f /etc/syslog.conf{,.rpmnew} | |
236 | mv -f /etc/syslog.conf{.rpmsave,} | |
237 | echo "Moved /etc/syslog.conf.rpmsave to /etc/syslog.conf" | |
238 | echo "Original file from package is available as /etc/syslog.conf.rpmnew" | |
239 | fi | |
240 | ||
284a559d PG |
241 | %clean |
242 | rm -rf $RPM_BUILD_ROOT | |
243 | ||
3714e2e4 | 244 | %files |
284a559d | 245 | %defattr(644,root,root,755) |
5997e750 | 246 | %doc AUTHORS ChangeLog NEWS README |
f16b19a4 SP |
247 | %dir %{_sysconfdir}/rsyslog.d |
248 | %attr(640,root,syslog) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rsyslog.d/rsyslog.conf | |
a097ef7f SP |
249 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rsyslog |
250 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/rsyslog | |
251 | %attr(754,root,root) /etc/rc.d/init.d/rsyslog | |
284a559d | 252 | %attr(640,root,root) %ghost /var/log/* |
3714e2e4 | 253 | %attr(755,root,root) %{_sbindir}/rsyslogd |
d30c8748 | 254 | %dir %{_libdir}/rsyslog |
73b56bd9 JB |
255 | %attr(755,root,root) %{_libdir}/rsyslog/omsnmp.so |
256 | %attr(755,root,root) %{_libdir}/rsyslog/imklog.so | |
257 | %attr(755,root,root) %{_libdir}/rsyslog/immark.so | |
258 | %attr(755,root,root) %{_libdir}/rsyslog/imtcp.so | |
259 | %attr(755,root,root) %{_libdir}/rsyslog/imudp.so | |
260 | %attr(755,root,root) %{_libdir}/rsyslog/imuxsock.so | |
261 | %attr(755,root,root) %{_libdir}/rsyslog/lmgssutil.so | |
262 | %attr(755,root,root) %{_libdir}/rsyslog/lmnet.so | |
263 | %attr(755,root,root) %{_libdir}/rsyslog/lmregexp.so | |
264 | %attr(755,root,root) %{_libdir}/rsyslog/lmtcpclt.so | |
265 | %attr(755,root,root) %{_libdir}/rsyslog/lmtcpsrv.so | |
266 | %attr(755,root,root) %{_libdir}/rsyslog/omtesting.so | |
4fffed3f SP |
267 | %{_mandir}/man5/* |
268 | %{_mandir}/man8/* | |
284a559d | 269 | |
73b56bd9 JB |
270 | #%files klogd |
271 | #%defattr(644,root,root,755) | |
3714e2e4 PG |
272 | #%attr(754,root,root) /etc/rc.d/init.d/klogd |
273 | #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/klogd | |
274 | #%attr(755,root,root) %{_sbindir}/klogd | |
4fffed3f | 275 | |
bd9b9208 | 276 | %if %{with mysql} |
4fffed3f SP |
277 | %files mysql |
278 | %defattr(644,root,root,755) | |
279 | %doc plugins/ommysql/createDB.sql | |
73b56bd9 | 280 | %attr(755,root,root) %{_libdir}/rsyslog/ommysql.so |
bd9b9208 | 281 | %endif |
4fffed3f | 282 | |
bd9b9208 | 283 | %if %{with pgsql} |
4fffed3f SP |
284 | %files pgsql |
285 | %defattr(644,root,root,755) | |
286 | %doc plugins/ompgsql/createDB.sql | |
73b56bd9 | 287 | %attr(755,root,root) %{_libdir}/rsyslog/ompgsql.so |
bd9b9208 | 288 | %endif |
4fffed3f | 289 | |
bd9b9208 | 290 | %if %{with gssapi} |
4fffed3f SP |
291 | %files gssapi |
292 | %defattr(644,root,root,755) | |
73b56bd9 JB |
293 | %attr(755,root,root) %{_libdir}/rsyslog/imgssapi.so |
294 | %attr(755,root,root) %{_libdir}/rsyslog/omgssapi.so | |
bd9b9208 | 295 | %endif |