]>
Commit | Line | Data |
---|---|---|
1751a89a | 1 | %define beta beta4 |
e591aab5 | 2 | Summary: ULOGD - the Userspace Logging Daemon for iptables |
1c6019ce | 3 | Summary(pl.UTF-8): Demon logujący w trybie użytkownika dla iptables |
e591aab5 | 4 | Name: ulogd |
1751a89a SP |
5 | Version: 2.0.0 |
6 | Release: 0.1 | |
e591aab5 JR |
7 | License: GPL |
8 | Group: Networking/Daemons | |
9144cd7c | 9 | Source0: ftp://ftp.netfilter.org/pub/ulogd/%{name}-%{version}.tar.bz2 |
1751a89a | 10 | # Source0-md5: 211e68781e3860959606fc94b97cf22e |
264b4e4b | 11 | Source1: %{name}.init |
12 | Source2: %{name}.sysconfig | |
13 | Source3: %{name}.logrotate | |
125558c8 | 14 | Patch0: %{name}-includes.patch |
1751a89a | 15 | Patch1: %{name}-ac.patch |
ea09d17d | 16 | URL: http://netfilter.org/projects/ulogd/ |
864d9b85 | 17 | BuildRequires: autoconf |
1751a89a SP |
18 | BuildRequires: libdbi-devel |
19 | BuildRequires: libnetfilter_acct-devel >= 1.0.0 | |
20 | BuildRequires: libnetfilter_conntrack-devel >= 0.0.95 | |
21 | BuildRequires: libnetfilter_log-devel >= 0.0.15 | |
22 | BuildRequires: libnfnetlink-devel >= 0.0.39 | |
c019e55d | 23 | BuildRequires: libpcap-devel |
864d9b85 | 24 | BuildRequires: mysql-devel |
b53e9612 | 25 | BuildRequires: postgresql-devel |
d277fbc6 | 26 | BuildRequires: rpmbuild(macros) >= 1.268 |
0bcb27d5 | 27 | BuildRequires: sed >= 4.0 |
1751a89a | 28 | BuildRequires: sqlite3-devel |
489f1be6 | 29 | Requires(post): fileutils |
d277fbc6 | 30 | Requires(post,preun): /sbin/chkconfig |
e591aab5 | 31 | Requires: iptables |
d277fbc6 ER |
32 | #Requires: kernel >= 2.4.0test9 |
33 | Requires: rc-scripts | |
e591aab5 JR |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
35 | ||
e591aab5 | 36 | %description |
264b4e4b | 37 | This packages is intended for passing packets from the kernel to |
38 | userspace to do some logging there. It should work like that: | |
6b8250e8 | 39 | - register a target called ULOG with netfilter |
e591aab5 | 40 | - if the target is hit: |
6b8250e8 | 41 | - send the packet out using netlink multicast facility |
0a968105 | 42 | - return NF_CONTINUE immediately. |
6b8250e8 | 43 | |
f5250371 JR |
44 | %description -l pl.UTF-8 |
45 | Ten pakiet ma służyć do wysyłania pakietów z jądra do przestrzeni | |
46 | użytkownika w celu logowania. Powinien działać tak: | |
47 | - zarejestrować w netfilterze cel o nazwie ULOG | |
48 | - jeżeli cel został osiągnięty: | |
49 | - wysłać pakiet poprzez netlink | |
0a968105 | 50 | - zwrócić natychmiast NF_CONTINUE. |
e591aab5 | 51 | |
1751a89a SP |
52 | %package devel |
53 | Summary: Header files for %{name} | |
54 | Summary(pl.UTF-8): Pliki nagłówkowe %{name} | |
55 | Group: Development/Libraries | |
56 | Requires: %{name} = %{version}-%{release} | |
57 | ||
58 | %description devel | |
59 | Header files for %{name}. | |
60 | ||
61 | %description devel -l pl.UTF-8 | |
62 | Pliki nagłówkowe %{name}. | |
63 | ||
64 | %package dbi | |
65 | Summary: DBI plugin for ulogd | |
66 | Summary(pl.UTF-8): Wtyczka DBI dla ulogd | |
67 | Group: Networking/Daemons | |
68 | ||
69 | %description dbi | |
70 | DBI plugin for ulogd. | |
71 | ||
72 | %description dbi -l pl.UTF-8 | |
73 | Wtyczka DBI dla ulogd. | |
74 | ||
e591aab5 | 75 | %package mysql |
6b8250e8 | 76 | Summary: MySQL plugin for ulogd |
1c6019ce | 77 | Summary(pl.UTF-8): Wtyczka MySQL dla ulogd |
e591aab5 | 78 | Group: Networking/Daemons |
e591aab5 JR |
79 | Obsoletes: iptables-ulogd-mysql |
80 | ||
81 | %description mysql | |
6b8250e8 JB |
82 | MySQL plugin for ulogd. |
83 | ||
f5250371 | 84 | %description mysql -l pl.UTF-8 |
6b8250e8 | 85 | Wtyczka MySQL dla ulogd. |
e591aab5 | 86 | |
1751a89a SP |
87 | %package pcap |
88 | Summary: PCAP plugin for ulogd | |
89 | Summary(pl.UTF-8): Wtyczka PCAP dla ulogd | |
90 | Group: Networking/Daemons | |
91 | ||
92 | %description pcap | |
93 | PCAP plugin for ulogd. | |
94 | ||
95 | %description pcap -l pl.UTF-8 | |
96 | Wtyczka PCAP dla ulogd. | |
97 | ||
b53e9612 TP |
98 | %package pgsql |
99 | Summary: PostgreSQL plugin for ulogd | |
100 | Summary(pl.UTF-8): Wtyczka PostgreSQL dla ulogd | |
101 | Group: Networking/Daemons | |
102 | ||
103 | %description pgsql | |
104 | PostgreSQL plugin for ulogd. | |
105 | ||
106 | %description pgsql -l pl.UTF-8 | |
107 | Wtyczka PostgreSQL dla ulogd. | |
108 | ||
109 | %package sqlite | |
110 | Summary: SQLite plugin for ulogd | |
111 | Summary(pl.UTF-8): Wtyczka SQLite dla ulogd | |
112 | Group: Networking/Daemons | |
113 | ||
114 | %description sqlite | |
115 | SQLite plugin for ulogd. | |
116 | ||
117 | %description sqlite -l pl.UTF-8 | |
118 | Wtyczka SQLite dla ulogd. | |
119 | ||
e591aab5 JR |
120 | %prep |
121 | %setup -q | |
125558c8 | 122 | %patch0 -p1 |
b53e9612 | 123 | %patch1 -p0 |
e591aab5 JR |
124 | |
125 | %build | |
1751a89a SP |
126 | #%if "%{_lib}" != "lib" |
127 | #sed -e 's@lib/@%{_lib}/@g' -i configure.in | |
128 | #%endif | |
a42c2f75 | 129 | |
756cea0e | 130 | %{__autoconf} |
264b4e4b | 131 | %configure \ |
1751a89a SP |
132 | --with-dbi \ |
133 | --with-dbi-lib=%{_libdir} \ | |
b53e9612 | 134 | --with-mysql \ |
1751a89a | 135 | --with-pgsql |
e00d9c09 | 136 | %{__make} -j1 |
e591aab5 JR |
137 | |
138 | %install | |
139 | rm -rf $RPM_BUILD_ROOT | |
2d74e793 | 140 | install -d $RPM_BUILD_ROOT{%{_sbindir},/etc/{sysconfig,logrotate.d,rc.d/init.d,ulogd}} \ |
264b4e4b | 141 | $RPM_BUILD_ROOT/var/log |
e591aab5 | 142 | |
e00d9c09 | 143 | %{__make} install -j1 \ |
c03f2abf | 144 | DESTDIR=$RPM_BUILD_ROOT |
e591aab5 | 145 | |
264b4e4b | 146 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ulogd |
147 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ulogd | |
148 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/ulogd | |
1751a89a | 149 | install %{name}.conf $RPM_BUILD_ROOT/etc/%{name}.conf |
0d6eb63b | 150 | install -D %{name}.8 $RPM_BUILD_ROOT%{_mandir}/man8/%{name}.8 |
e591aab5 | 151 | |
e591aab5 JR |
152 | touch $RPM_BUILD_ROOT/var/log/ulogd{,.pktlog} |
153 | ||
154 | %clean | |
155 | rm -rf $RPM_BUILD_ROOT | |
156 | ||
157 | %post | |
158 | if [ ! -f /var/log/ulogd ]; then | |
159 | touch /var/log/ulogd{,.pktlog} | |
160 | chmod 640 /var/log/ulogd{,.pktlog} | |
161 | fi | |
250be24e | 162 | |
163 | /sbin/chkconfig --add ulogd | |
d277fbc6 | 164 | %service ulogd restart "ulogd daemon" |
e591aab5 JR |
165 | |
166 | %preun | |
250be24e | 167 | if [ "$1" = "0" ]; then |
d277fbc6 | 168 | %service ulogd stop |
250be24e | 169 | /sbin/chkconfig --del ulogd |
170 | fi | |
e591aab5 JR |
171 | |
172 | %files | |
173 | %defattr(644,root,root,755) | |
1751a89a | 174 | #%doc Changes doc/*.{ps,txt,html} |
125558c8 JB |
175 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ulogd |
176 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ulogd.conf | |
177 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/ulogd | |
7052bb1c | 178 | %attr(750,root,root) %dir %{_sysconfdir}/ulogd |
e591aab5 JR |
179 | %attr(754,root,root) /etc/rc.d/init.d/ulogd |
180 | ||
181 | %attr(755,root,root) %{_sbindir}/* | |
125558c8 | 182 | %dir %{_libdir}/ulogd |
1751a89a SP |
183 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_filter_HWHDR.so |
184 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_filter_IFINDEX.so | |
185 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_filter_IP2BIN.so | |
186 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_filter_IP2HBIN.so | |
187 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_filter_IP2STR.so | |
188 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_filter_MARK.so | |
189 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_filter_PRINTFLOW.so | |
190 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_filter_PRINTPKT.so | |
191 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_filter_PWSNIFF.so | |
192 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_inpflow_NFACCT.so | |
193 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_inpflow_NFCT.so | |
194 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_inppkt_NFLOG.so | |
195 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_inppkt_ULOG.so | |
196 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_inppkt_UNIXSOCK.so | |
197 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_output_GPRINT.so | |
198 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_output_LOGEMU.so | |
199 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_output_NACCT.so | |
200 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_output_OPRINT.so | |
201 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_output_SYSLOG.so | |
202 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_output_XML.so | |
203 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_raw2packet_BASE.so | |
e591aab5 JR |
204 | |
205 | %attr(640,root,root) %ghost /var/log/* | |
1751a89a SP |
206 | %{_mandir}/man8/%{name}.* |
207 | ||
208 | %files devel | |
209 | %defattr(644,root,root,755) | |
210 | %{_libdir}/ulogd/*.la | |
211 | ||
212 | %files dbi | |
213 | %defattr(644,root,root,755) | |
214 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_output_DBI.so | |
e591aab5 JR |
215 | |
216 | %files mysql | |
264b4e4b | 217 | %defattr(644,root,root,755) |
e591aab5 | 218 | %doc doc/mysql* |
1751a89a SP |
219 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_output_MYSQL.so |
220 | ||
221 | %files pcap | |
222 | %defattr(644,root,root,755) | |
223 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_output_PCAP.so | |
b53e9612 TP |
224 | |
225 | %files pgsql | |
226 | %defattr(644,root,root,755) | |
227 | %doc doc/pgsql* | |
1751a89a | 228 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_output_PGSQL.so |
b53e9612 TP |
229 | |
230 | %files sqlite | |
231 | %defattr(644,root,root,755) | |
232 | %doc doc/sqlite* | |
1751a89a | 233 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_output_SQLITE3.so |