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