]>
Commit | Line | Data |
---|---|---|
5997e750 SP |
1 | # |
2 | # Conditional build: | |
4fffed3f | 3 | %bcond_without gssapi # Enable GSSAPI Kerberos 5 support |
5997e750 SP |
4 | %bcond_without mysql # Enable MySql database support |
5 | %bcond_without pgsql # Enable PostgreSQL database support | |
6 | %bcond_without snmp # Enable 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 |
284a559d | 17 | Release: 0.1 |
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 |
f0da554a SP |
22 | URL: http://www.rsyslog.com/ |
23 | %{?with_gssapi:BuildRequires: krb5-devel} | |
5997e750 | 24 | %{?with_mysql:BuildRequires: mysql-devel} |
707ea13f | 25 | %{?with_snmp:BuildRequires: net-snmp-devel} |
5997e750 | 26 | %{?with_pgsql:BuildRequires: postgresql-devel} |
284a559d PG |
27 | Requires(post): fileutils |
28 | Requires(post,preun): /sbin/chkconfig | |
29 | Requires(post,preun): rc-scripts >= 0.2.0 | |
30 | Requires(postun): /usr/sbin/groupdel | |
31 | Requires(postun): /usr/sbin/userdel | |
284a559d PG |
32 | Requires(pre): /bin/id |
33 | Requires(pre): /usr/bin/getgid | |
707ea13f | 34 | Requires(pre): /usr/lib/rpm/user_group.sh |
284a559d PG |
35 | Requires(pre): /usr/sbin/groupadd |
36 | Requires(pre): /usr/sbin/useradd | |
37 | Requires(pre): /usr/sbin/usermod | |
38 | Requires(triggerpostun): sed >= 4.0 | |
39 | # for vservers we don't need klogd and syslog works without klogd | |
40 | # (just it doesn't log kernel buffer into syslog) | |
41 | # Requires: klogd | |
42 | Requires: logrotate >= 3.2-3 | |
43 | Requires: psmisc >= 20.1 | |
44 | Provides: group(syslog) | |
45 | Provides: syslogdaemon | |
46 | Provides: user(syslog) | |
47 | Obsoletes: msyslog | |
48 | Obsoletes: sysklogd | |
49 | Obsoletes: syslog-ng | |
3714e2e4 | 50 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
284a559d | 51 | |
3714e2e4 | 52 | %description |
707ea13f SP |
53 | Rsyslog is an enhanced multi-threaded syslogd supporting, among |
54 | others, MySQL, syslog/tcp, RFC 3195, permitted sender lists, filtering | |
55 | on any message part, and fine grain output format control. It is quite | |
56 | compatible to stock sysklogd and can be used as a drop-in replacement. | |
57 | Its advanced features make it suitable for enterprise-class, | |
58 | encryption protected syslog relay chains while at the same time being | |
59 | very easy to setup for the novice user. | |
284a559d | 60 | |
3714e2e4 | 61 | %package klogd |
284a559d PG |
62 | Summary: Linux kernel logger |
63 | Summary(de.UTF-8): Linux-Kerner-Logger | |
64 | Summary(pl.UTF-8): Program logujący zdarzenia w jądrze Linuksa | |
65 | Group: Daemons | |
66 | Requires(post,preun): /sbin/chkconfig | |
67 | Requires(post,preun): rc-scripts >= 0.2.0 | |
68 | Requires(postun): /usr/sbin/groupdel | |
69 | Requires(postun): /usr/sbin/userdel | |
284a559d PG |
70 | Requires(pre): /bin/id |
71 | Requires(pre): /usr/bin/getgid | |
707ea13f | 72 | Requires(pre): /usr/lib/rpm/user_group.sh |
284a559d PG |
73 | Requires(pre): /usr/sbin/groupadd |
74 | Requires(pre): /usr/sbin/useradd | |
75 | Requires(pre): /usr/sbin/usermod | |
76 | Provides: group(syslog) | |
77 | Provides: user(syslog) | |
78 | Obsoletes: sysklogd | |
79 | ||
3714e2e4 | 80 | %description klogd |
284a559d PG |
81 | This is the Linux kernel logging program. It is run as a daemon |
82 | (background process) to log messages from kernel. | |
83 | ||
3714e2e4 | 84 | %description -l pl.UTF-8 |
f0da554a SP |
85 | Pakiet ten zawiera program, który jest uruchamiany jako demon i służy |
86 | do logowania komunikatów jądra Linuksa. | |
284a559d | 87 | |
4fffed3f | 88 | %package mysql |
f0da554a SP |
89 | Summary: MySQL support for rsyslog |
90 | Group: Daemons | |
91 | Requires: %name = %version-%release | |
4fffed3f SP |
92 | |
93 | %description mysql | |
f0da554a SP |
94 | The rsyslog-mysql package contains a dynamic shared object that will |
95 | add MySQL database support to rsyslog. | |
4fffed3f SP |
96 | |
97 | %package pgsql | |
f0da554a SP |
98 | Summary: PostgresSQL support for rsyslog |
99 | Group: Daemons | |
100 | Requires: %name = %version-%release | |
4fffed3f SP |
101 | |
102 | %description pgsql | |
f0da554a SP |
103 | The rsyslog-pgsql package contains a dynamic shared object that will |
104 | add PostgreSQL database support to rsyslog. | |
4fffed3f SP |
105 | |
106 | %package gssapi | |
f0da554a SP |
107 | Summary: GSSAPI authentication and encryption support for rsyslog |
108 | Group: Daemons | |
109 | Requires: %name = %version-%release | |
4fffed3f SP |
110 | |
111 | %description gssapi | |
f0da554a SP |
112 | The rsyslog-gssapi package contains the rsyslog plugins which support |
113 | GSSAPI authentication and secure connections. GSSAPI is commonly used | |
114 | for Kerberos authentication. | |
4fffed3f | 115 | |
284a559d PG |
116 | %prep |
117 | %setup -q | |
284a559d PG |
118 | |
119 | %build | |
5997e750 | 120 | %configure \ |
4fffed3f | 121 | %{?with_gssapi:--enable-gssapi-krb5} \ |
5997e750 SP |
122 | %{?with_mysql:--enable-mysql} \ |
123 | %{?with_pgsql:--enable-pgsql} \ | |
124 | %{?with_snmp:--enable-snmp} | |
125 | ||
3714e2e4 | 126 | %{__make} |
284a559d PG |
127 | |
128 | %install | |
129 | rm -rf $RPM_BUILD_ROOT | |
130 | install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d,logrotate.d} \ | |
131 | $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man{5,8},%{_bindir}} \ | |
132 | $RPM_BUILD_ROOT/{dev,var/log} | |
133 | ||
134 | %{__make} install \ | |
4fffed3f | 135 | DESTDIR=$RPM_BUILD_ROOT |
284a559d PG |
136 | |
137 | for n in debug kernel maillog messages secure syslog user spooler lpr daemon | |
138 | do | |
139 | > $RPM_BUILD_ROOT/var/log/$n | |
140 | done | |
141 | ||
3714e2e4 | 142 | %pre |
284a559d PG |
143 | %groupadd -P syslog -g 18 syslog |
144 | %useradd -P syslog -u 18 -g syslog -c "Syslog User" syslog | |
145 | %addusertogroup syslog logs | |
146 | ||
3714e2e4 | 147 | %post |
284a559d PG |
148 | for n in /var/log/{cron,daemon,debug,kernel,lpr,maillog,messages,secure,spooler,syslog,user}; do |
149 | if [ -f $n ]; then | |
150 | chown syslog:syslog $n | |
151 | continue | |
152 | else | |
153 | touch $n | |
154 | chmod 000 $n | |
155 | chown syslog:syslog $n | |
156 | chmod 640 $n | |
157 | fi | |
158 | done | |
159 | ||
3714e2e4 PG |
160 | /sbin/chkconfig --add %{name} |
161 | %service syslog restart "%{name} daemon" | |
162 | %service -q %{name}-klogd restart | |
284a559d | 163 | |
3714e2e4 | 164 | %preun |
284a559d | 165 | if [ "$1" = "0" ]; then |
3714e2e4 PG |
166 | %service %{name} stop |
167 | /sbin/chkconfig --del %{name} | |
284a559d PG |
168 | fi |
169 | ||
3714e2e4 | 170 | %postun |
284a559d PG |
171 | if [ "$1" = "0" ]; then |
172 | %userremove syslog | |
173 | %groupremove syslog | |
174 | fi | |
175 | ||
3714e2e4 | 176 | %pre klogd |
284a559d PG |
177 | %groupadd -P klogd -g 18 syslog |
178 | %useradd -P klogd -u 18 -g syslog -c "Syslog User" syslog | |
179 | %addusertogroup syslog logs | |
180 | ||
3714e2e4 PG |
181 | %post klogd |
182 | /sbin/chkconfig --add %{name}-klogd | |
183 | %service %{name}-klogd restart "kernel logger daemon" | |
284a559d | 184 | |
3714e2e4 | 185 | %preun klogd |
284a559d | 186 | if [ "$1" = "0" ]; then |
3714e2e4 PG |
187 | %service %{name}-klogd stop |
188 | /sbin/chkconfig --del %{name}-klogd | |
284a559d PG |
189 | fi |
190 | ||
3714e2e4 | 191 | %postun klogd |
284a559d PG |
192 | if [ "$1" = "0" ]; then |
193 | %userremove syslog | |
194 | %groupremove syslog | |
195 | fi | |
196 | ||
197 | %triggerpostun -- inetutils-syslogd | |
198 | /sbin/chkconfig --del syslog | |
199 | /sbin/chkconfig --add syslog | |
200 | if [ -f /etc/syslog.conf.rpmsave ]; then | |
201 | mv -f /etc/syslog.conf{,.rpmnew} | |
202 | mv -f /etc/syslog.conf{.rpmsave,} | |
203 | echo "Moved /etc/syslog.conf.rpmsave to /etc/syslog.conf" | |
204 | echo "Original file from package is available as /etc/syslog.conf.rpmnew" | |
205 | fi | |
206 | ||
284a559d PG |
207 | %clean |
208 | rm -rf $RPM_BUILD_ROOT | |
209 | ||
3714e2e4 | 210 | %files |
284a559d | 211 | %defattr(644,root,root,755) |
5997e750 | 212 | %doc AUTHORS ChangeLog NEWS README |
3714e2e4 PG |
213 | #%attr(640,root,syslog) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf |
214 | #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/syslog | |
215 | #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/syslog | |
216 | #%attr(754,root,root) /etc/rc.d/init.d/syslog | |
284a559d | 217 | %attr(640,root,root) %ghost /var/log/* |
3714e2e4 PG |
218 | %attr(755,root,root) %{_sbindir}/rsyslogd |
219 | #%attr(755,root,root) %{_bindir}/syslogd-listfiles | |
4fffed3f SP |
220 | %{_libdir}/rsyslog/omsnmp.so |
221 | %{_libdir}/rsyslog/imklog.so | |
222 | %{_libdir}/rsyslog/immark.so | |
223 | %{_libdir}/rsyslog/imtcp.so | |
224 | %{_libdir}/rsyslog/imudp.so | |
225 | %{_libdir}/rsyslog/imuxsock.so | |
226 | %{_libdir}/rsyslog/lmgssutil.so | |
227 | %{_libdir}/rsyslog/lmnet.so | |
228 | %{_libdir}/rsyslog/lmregexp.so | |
229 | %{_libdir}/rsyslog/lmtcpclt.so | |
230 | %{_libdir}/rsyslog/lmtcpsrv.so | |
231 | %{_libdir}/rsyslog/omtesting.so | |
232 | %{_mandir}/man5/* | |
233 | %{_mandir}/man8/* | |
284a559d | 234 | |
3714e2e4 | 235 | %files klogd |
284a559d | 236 | %defattr(644,root,root,755) |
3714e2e4 PG |
237 | #%attr(754,root,root) /etc/rc.d/init.d/klogd |
238 | #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/klogd | |
239 | #%attr(755,root,root) %{_sbindir}/klogd | |
4fffed3f SP |
240 | |
241 | %files mysql | |
242 | %defattr(644,root,root,755) | |
243 | %doc plugins/ommysql/createDB.sql | |
244 | %{_libdir}/rsyslog/ommysql.so | |
245 | ||
246 | %files pgsql | |
247 | %defattr(644,root,root,755) | |
248 | %doc plugins/ompgsql/createDB.sql | |
249 | %{_libdir}/rsyslog/ompgsql.so | |
250 | ||
251 | %files gssapi | |
252 | %defattr(644,root,root,755) | |
253 | %{_libdir}/rsyslog/imgssapi.so | |
254 | %{_libdir}/rsyslog/omgssapi.so |