]> git.pld-linux.org Git - packages/rsyslog.git/blame - rsyslog.spec
- updated to 3.16.2
[packages/rsyslog.git] / rsyslog.spec
CommitLineData
5997e750
SP
1#
2# Conditional build:
3%bcond_without mysql # Enable MySql database support
4%bcond_without pgsql # Enable PostgreSQL database support
5%bcond_without snmp # Enable SNMP support
6
284a559d
PG
7Summary: Linux system and kernel logger
8Summary(de.UTF-8): Linux-System- und Kerner-Logger
9Summary(es.UTF-8): Registrador de log del sistema linux
10Summary(fr.UTF-8): Le système Linux et le logger du noyau
11Summary(pl.UTF-8): Programy logujące zdarzenia w systemie i jądrze Linuksa
12Summary(pt_BR.UTF-8): Registrador de log do sistema linux
13Summary(tr.UTF-8): Linux sistem ve çekirdek kayıt süreci
14Name: rsyslog
5997e750 15Version: 3.16.2
284a559d 16Release: 0.1
3714e2e4 17License: GPL v3
284a559d
PG
18Group: Daemons
19Source0: http://download.rsyslog.com/rsyslog/%{name}-%{version}.tar.gz
5997e750
SP
20# Source0-md5: 568d0ad73a149974b9bcfcb9e64bfc0b
21%{?with_mysql:BuildRequires: mysql-devel}
22%{?with_pgsql:BuildRequires: postgresql-devel}
23%{?with_snmp:BuildRequires: net-snmp-devel}
284a559d
PG
24#Source1: syslog.conf
25#Source2: syslog.init
26#Source3: syslog.logrotate
27#Source4: syslog.sysconfig
28#Source5: klogd.init
29#Source6: klogd.sysconfig
30#Source7: syslogd-listfiles.sh
31#Source8: syslogd-listfiles.8
32URL: http://www.rsyslog.com/
284a559d
PG
33Requires(post): fileutils
34Requires(post,preun): /sbin/chkconfig
35Requires(post,preun): rc-scripts >= 0.2.0
36Requires(postun): /usr/sbin/groupdel
37Requires(postun): /usr/sbin/userdel
38Requires(pre): /usr/lib/rpm/user_group.sh
39Requires(pre): /bin/id
40Requires(pre): /usr/bin/getgid
41Requires(pre): /usr/sbin/groupadd
42Requires(pre): /usr/sbin/useradd
43Requires(pre): /usr/sbin/usermod
44Requires(triggerpostun): sed >= 4.0
45# for vservers we don't need klogd and syslog works without klogd
46# (just it doesn't log kernel buffer into syslog)
47# Requires: klogd
48Requires: logrotate >= 3.2-3
49Requires: psmisc >= 20.1
50Provides: group(syslog)
51Provides: syslogdaemon
52Provides: user(syslog)
53Obsoletes: msyslog
54Obsoletes: sysklogd
55Obsoletes: syslog-ng
3714e2e4 56BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
284a559d 57
3714e2e4
PG
58#%define _exec_prefix /
59#%define _bindir /usr/sbin
60#%define _sbindir /sbin
284a559d 61
3714e2e4
PG
62%description
63Rsyslog is an enhanced multi-threaded syslogd supporting, among others,
64MySQL, syslog/tcp, RFC 3195, permitted sender lists, filtering on any
65message part, and fine grain output format control. It is quite compatible
66to stock sysklogd and can be used as a drop-in replacement. Its advanced
67features make it suitable for enterprise-class, encryption protected
68syslog relay chains while at the same time being very easy to setup for
69the novice user.
284a559d 70
3714e2e4 71%package klogd
284a559d
PG
72Summary: Linux kernel logger
73Summary(de.UTF-8): Linux-Kerner-Logger
74Summary(pl.UTF-8): Program logujący zdarzenia w jądrze Linuksa
75Group: Daemons
76Requires(post,preun): /sbin/chkconfig
77Requires(post,preun): rc-scripts >= 0.2.0
78Requires(postun): /usr/sbin/groupdel
79Requires(postun): /usr/sbin/userdel
80Requires(pre): /usr/lib/rpm/user_group.sh
81Requires(pre): /bin/id
82Requires(pre): /usr/bin/getgid
83Requires(pre): /usr/sbin/groupadd
84Requires(pre): /usr/sbin/useradd
85Requires(pre): /usr/sbin/usermod
86Provides: group(syslog)
87Provides: user(syslog)
88Obsoletes: sysklogd
89
3714e2e4 90%description klogd
284a559d
PG
91This is the Linux kernel logging program. It is run as a daemon
92(background process) to log messages from kernel.
93
3714e2e4 94%description -l pl.UTF-8
284a559d
PG
95Pakiet ten zawiera program, który jest uruchamiany jako demon i służy
96do logowania komunikatów jądra Linuksa.
97
98%prep
99%setup -q
284a559d
PG
100
101%build
5997e750
SP
102%configure \
103%{?with_mysql:--enable-mysql} \
104%{?with_pgsql:--enable-pgsql} \
105%{?with_snmp:--enable-snmp}
106
3714e2e4 107%{__make}
284a559d
PG
108
109%install
110rm -rf $RPM_BUILD_ROOT
111install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d,logrotate.d} \
112 $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man{5,8},%{_bindir}} \
113 $RPM_BUILD_ROOT/{dev,var/log}
114
115%{__make} install \
3714e2e4 116 DESTDIR=$RPM_BUILD_ROOT%{_sbindir}
284a559d 117
3714e2e4 118#install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/syslog.conf
284a559d 119
3714e2e4
PG
120#install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/syslog
121#install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/syslog
122#install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/syslog
123#install %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/klogd
124#install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/klogd
284a559d 125
3714e2e4
PG
126#install %{SOURCE7} $RPM_BUILD_ROOT%{_bindir}/syslogd-listfiles
127#install %{SOURCE8} $RPM_BUILD_ROOT%{_mandir}/man8
284a559d
PG
128
129for n in debug kernel maillog messages secure syslog user spooler lpr daemon
130do
131 > $RPM_BUILD_ROOT/var/log/$n
132done
133
3714e2e4 134%pre
284a559d
PG
135%groupadd -P syslog -g 18 syslog
136%useradd -P syslog -u 18 -g syslog -c "Syslog User" syslog
137%addusertogroup syslog logs
138
3714e2e4 139%post
284a559d
PG
140for n in /var/log/{cron,daemon,debug,kernel,lpr,maillog,messages,secure,spooler,syslog,user}; do
141 if [ -f $n ]; then
142 chown syslog:syslog $n
143 continue
144 else
145 touch $n
146 chmod 000 $n
147 chown syslog:syslog $n
148 chmod 640 $n
149 fi
150done
151
3714e2e4
PG
152/sbin/chkconfig --add %{name}
153%service syslog restart "%{name} daemon"
154%service -q %{name}-klogd restart
284a559d 155
3714e2e4 156%preun
284a559d 157if [ "$1" = "0" ]; then
3714e2e4
PG
158 %service %{name} stop
159 /sbin/chkconfig --del %{name}
284a559d
PG
160fi
161
3714e2e4 162%postun
284a559d
PG
163if [ "$1" = "0" ]; then
164 %userremove syslog
165 %groupremove syslog
166fi
167
3714e2e4 168%pre klogd
284a559d
PG
169%groupadd -P klogd -g 18 syslog
170%useradd -P klogd -u 18 -g syslog -c "Syslog User" syslog
171%addusertogroup syslog logs
172
3714e2e4
PG
173%post klogd
174/sbin/chkconfig --add %{name}-klogd
175%service %{name}-klogd restart "kernel logger daemon"
284a559d 176
3714e2e4 177%preun klogd
284a559d 178if [ "$1" = "0" ]; then
3714e2e4
PG
179 %service %{name}-klogd stop
180 /sbin/chkconfig --del %{name}-klogd
284a559d
PG
181fi
182
3714e2e4 183%postun klogd
284a559d
PG
184if [ "$1" = "0" ]; then
185 %userremove syslog
186 %groupremove syslog
187fi
188
189%triggerpostun -- inetutils-syslogd
190/sbin/chkconfig --del syslog
191/sbin/chkconfig --add syslog
192if [ -f /etc/syslog.conf.rpmsave ]; then
193 mv -f /etc/syslog.conf{,.rpmnew}
194 mv -f /etc/syslog.conf{.rpmsave,}
195 echo "Moved /etc/syslog.conf.rpmsave to /etc/syslog.conf"
196 echo "Original file from package is available as /etc/syslog.conf.rpmnew"
197fi
198
284a559d
PG
199%clean
200rm -rf $RPM_BUILD_ROOT
201
3714e2e4 202%files
284a559d 203%defattr(644,root,root,755)
5997e750 204%doc AUTHORS ChangeLog NEWS README
3714e2e4
PG
205#%attr(640,root,syslog) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
206#%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/syslog
207#%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/syslog
208#%attr(754,root,root) /etc/rc.d/init.d/syslog
284a559d 209%attr(640,root,root) %ghost /var/log/*
3714e2e4
PG
210%attr(755,root,root) %{_sbindir}/rsyslogd
211#%attr(755,root,root) %{_bindir}/syslogd-listfiles
212#%{_mandir}/man5/*
213#%{_mandir}/man8/sys*
284a559d 214
3714e2e4 215%files klogd
284a559d 216%defattr(644,root,root,755)
3714e2e4
PG
217#%attr(754,root,root) /etc/rc.d/init.d/klogd
218#%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/klogd
219#%attr(755,root,root) %{_sbindir}/klogd
220#%{_mandir}/man8/klog*
This page took 0.110192 seconds and 4 git commands to generate.