]>
Commit | Line | Data |
---|---|---|
986ae374 | 1 | # TODO: (maybe ;) |
2 | # - pgsql support | |
3 | # - sqlite support | |
e591aab5 | 4 | Summary: ULOGD - the Userspace Logging Daemon for iptables |
1c6019ce | 5 | Summary(pl.UTF-8): Demon logujący w trybie użytkownika dla iptables |
e591aab5 | 6 | Name: ulogd |
f7932426 JB |
7 | Version: 1.24 |
8 | Release: 1 | |
e591aab5 JR |
9 | License: GPL |
10 | Group: Networking/Daemons | |
9144cd7c | 11 | Source0: ftp://ftp.netfilter.org/pub/ulogd/%{name}-%{version}.tar.bz2 |
f7932426 | 12 | # Source0-md5: 05b4ed2926b9a22aaeaf642917bbf8ff |
264b4e4b | 13 | Source1: %{name}.init |
14 | Source2: %{name}.sysconfig | |
15 | Source3: %{name}.logrotate | |
125558c8 | 16 | Patch0: %{name}-includes.patch |
4dc26ca3 | 17 | URL: http://gnumonks.org/projects/ulogd/ |
864d9b85 JB |
18 | BuildRequires: autoconf |
19 | BuildRequires: mysql-devel | |
d277fbc6 | 20 | BuildRequires: rpmbuild(macros) >= 1.268 |
0bcb27d5 | 21 | BuildRequires: sed >= 4.0 |
489f1be6 | 22 | Requires(post): fileutils |
d277fbc6 | 23 | Requires(post,preun): /sbin/chkconfig |
e591aab5 | 24 | Requires: iptables |
d277fbc6 ER |
25 | #Requires: kernel >= 2.4.0test9 |
26 | Requires: rc-scripts | |
e591aab5 JR |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
28 | ||
e591aab5 | 29 | %description |
264b4e4b | 30 | This packages is intended for passing packets from the kernel to |
31 | userspace to do some logging there. It should work like that: | |
6b8250e8 | 32 | - register a target called ULOG with netfilter |
e591aab5 | 33 | - if the target is hit: |
6b8250e8 JB |
34 | - send the packet out using netlink multicast facility |
35 | - return NF_ACCEPT immediately. | |
36 | ||
f5250371 JR |
37 | %description -l pl.UTF-8 |
38 | Ten pakiet ma służyć do wysyłania pakietów z jądra do przestrzeni | |
39 | użytkownika w celu logowania. Powinien działać tak: | |
40 | - zarejestrować w netfilterze cel o nazwie ULOG | |
41 | - jeżeli cel został osiągnięty: | |
42 | - wysłać pakiet poprzez netlink | |
43 | - zwrócić natychmiast NF_ACCEPT. | |
e591aab5 JR |
44 | |
45 | %package mysql | |
6b8250e8 | 46 | Summary: MySQL plugin for ulogd |
1c6019ce | 47 | Summary(pl.UTF-8): Wtyczka MySQL dla ulogd |
e591aab5 | 48 | Group: Networking/Daemons |
e591aab5 JR |
49 | Obsoletes: iptables-ulogd-mysql |
50 | ||
51 | %description mysql | |
6b8250e8 JB |
52 | MySQL plugin for ulogd. |
53 | ||
f5250371 | 54 | %description mysql -l pl.UTF-8 |
6b8250e8 | 55 | Wtyczka MySQL dla ulogd. |
e591aab5 JR |
56 | |
57 | %prep | |
58 | %setup -q | |
125558c8 | 59 | %patch0 -p1 |
e591aab5 JR |
60 | |
61 | %build | |
a42c2f75 | 62 | %if "%{_lib}" != "lib" |
63 | sed -e 's@lib/@%{_lib}/@g' -i configure.in | |
64 | sed -e 's@${MYSQLLIBS}@%{_libdir}@g' -i configure.in | |
65 | %endif | |
66 | ||
756cea0e | 67 | %{__autoconf} |
264b4e4b | 68 | %configure \ |
69 | --with-mysql | |
e591aab5 JR |
70 | %{__make} |
71 | ||
72 | %install | |
73 | rm -rf $RPM_BUILD_ROOT | |
2d74e793 | 74 | install -d $RPM_BUILD_ROOT{%{_sbindir},/etc/{sysconfig,logrotate.d,rc.d/init.d,ulogd}} \ |
264b4e4b | 75 | $RPM_BUILD_ROOT/var/log |
e591aab5 | 76 | |
c03f2abf JB |
77 | %{__make} install \ |
78 | DESTDIR=$RPM_BUILD_ROOT | |
e591aab5 | 79 | |
264b4e4b | 80 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ulogd |
81 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ulogd | |
82 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/ulogd | |
0d6eb63b | 83 | install -D %{name}.8 $RPM_BUILD_ROOT%{_mandir}/man8/%{name}.8 |
e591aab5 | 84 | |
e591aab5 JR |
85 | touch $RPM_BUILD_ROOT/var/log/ulogd{,.pktlog} |
86 | ||
87 | %clean | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
90 | %post | |
91 | if [ ! -f /var/log/ulogd ]; then | |
92 | touch /var/log/ulogd{,.pktlog} | |
93 | chmod 640 /var/log/ulogd{,.pktlog} | |
94 | fi | |
250be24e | 95 | |
96 | /sbin/chkconfig --add ulogd | |
d277fbc6 | 97 | %service ulogd restart "ulogd daemon" |
e591aab5 JR |
98 | |
99 | %preun | |
250be24e | 100 | if [ "$1" = "0" ]; then |
d277fbc6 | 101 | %service ulogd stop |
250be24e | 102 | /sbin/chkconfig --del ulogd |
103 | fi | |
e591aab5 JR |
104 | |
105 | %files | |
106 | %defattr(644,root,root,755) | |
92e90e35 | 107 | %doc Changes doc/*.{ps,txt,html} |
125558c8 JB |
108 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ulogd |
109 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ulogd.conf | |
110 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/ulogd | |
7052bb1c | 111 | %attr(750,root,root) %dir %{_sysconfdir}/ulogd |
e591aab5 JR |
112 | %attr(754,root,root) /etc/rc.d/init.d/ulogd |
113 | ||
114 | %attr(755,root,root) %{_sbindir}/* | |
125558c8 JB |
115 | %dir %{_libdir}/ulogd |
116 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_[BLOPS]*.so | |
e591aab5 JR |
117 | |
118 | %attr(640,root,root) %ghost /var/log/* | |
09deed62 | 119 | %{_mandir}/man?/%{name}.* |
e591aab5 JR |
120 | |
121 | %files mysql | |
264b4e4b | 122 | %defattr(644,root,root,755) |
e591aab5 JR |
123 | %doc doc/mysql* |
124 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_MYSQL.so |