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