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