]>
Commit | Line | Data |
---|---|---|
e591aab5 JR |
1 | Summary: ULOGD - the Userspace Logging Daemon for iptables |
2 | Name: ulogd | |
3 | Version: 0.91 | |
4 | Release: 1 | |
5 | License: GPL | |
6 | Group: Networking/Daemons | |
7 | Group(pl): Sieciowe/Serwery | |
8 | Source0: ftp://ftp.sunbeam.franken.de/pub/netfilter/%{name}-%{version}.tar.gz | |
9 | Source1: ulogd.init | |
10 | Source2: ulogd.sysconfig | |
11 | Source3: ulogd.logrotate | |
12 | Source4: ulogd.conf | |
13 | Patch0: %{name}-DESTDIR.patch | |
14 | BuildRequires: sgml-tools | |
15 | BuildRequires: sgmls | |
16 | BuildRequires: mysql-devel | |
17 | #Requires: kernel >= 2.4.0test9 | |
18 | Requires: iptables | |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
20 | ||
21 | %define _sysconfdir /etc | |
22 | ||
23 | %description | |
24 | This packages is intended for passing packets from the kernel to userspace | |
25 | to do some logging there. It should work like that: | |
26 | ||
27 | - Register a target called ULOG with netfilter | |
28 | - if the target is hit: | |
29 | - send the packet out using netlink multicast facility | |
30 | - return NF_ACCEPT immediately | |
31 | ||
32 | %package mysql | |
33 | Summary: Mysql plugin for ulogd | |
34 | Group: Networking/Daemons | |
35 | Group(pl): Sieciowe/Serwery | |
36 | Requires: mysql | |
37 | Obsoletes: iptables-ulogd-mysql | |
38 | ||
39 | %description mysql | |
40 | mysql plugin for ulogd | |
41 | ||
42 | %prep | |
43 | %setup -q | |
44 | %patch0 -p1 | |
45 | ||
46 | %build | |
47 | %configure --with-mysql | |
48 | %{__make} | |
49 | ||
50 | %install | |
51 | rm -rf $RPM_BUILD_ROOT | |
52 | install -d $RPM_BUILD_ROOT%{_sbindir} | |
53 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/{sysconfig,logrotate.d,rc.d/init.d} | |
54 | install -d $RPM_BUILD_ROOT/var/log | |
55 | ||
56 | %{__make} install DESTDIR=$RPM_BUILD_ROOT | |
57 | ||
58 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/ulogd | |
59 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ulogd | |
60 | install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/ulogd | |
61 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/ | |
62 | ||
63 | gzip -9nf Changes doc/*.{ps,txt,table} | |
64 | ||
65 | touch $RPM_BUILD_ROOT/var/log/ulogd{,.pktlog} | |
66 | ||
67 | %clean | |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | ||
70 | %post | |
71 | if [ ! -f /var/log/ulogd ]; then | |
72 | touch /var/log/ulogd{,.pktlog} | |
73 | chmod 640 /var/log/ulogd{,.pktlog} | |
74 | fi | |
75 | ||
76 | /sbin/chkconfig --add ulogd | |
77 | if [ -f /var/lock/subsys/ulogd ]; then | |
78 | /etc/rc.d/init.d/ulogd restart 1>&2 | |
79 | else | |
80 | echo "Run \"/etc/rc.d/init.d/ulogd start\" to start ulogd daemon." 1>&2 | |
81 | fi | |
82 | ||
83 | %preun | |
84 | if [ "$1" = "0" ]; then | |
85 | if [ -f /var/lock/subsys/ulogd ]; then | |
86 | /etc/rc.d/init.d/ulogd stop 1>&2 | |
87 | fi | |
88 | /sbin/chkconfig --del ulogd | |
89 | fi | |
90 | ||
91 | %files | |
92 | %defattr(644,root,root,755) | |
93 | %doc Changes.gz doc/*.{ps,txt}.gz | |
94 | %attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) /etc/sysconfig/ulogd | |
95 | %attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) /etc/ulogd.conf | |
96 | %attr(640,root,root) /etc/logrotate.d/ulogd | |
97 | %attr(754,root,root) /etc/rc.d/init.d/ulogd | |
98 | ||
99 | %attr(755,root,root) %{_sbindir}/* | |
100 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_[BLOP]*.so | |
101 | ||
102 | %attr(640,root,root) %ghost /var/log/* | |
103 | ||
104 | %files mysql | |
105 | %doc doc/mysql* | |
106 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_MYSQL.so |