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