]>
Commit | Line | Data |
---|---|---|
1 | %define beta beta4 | |
2 | Summary: ULOGD - the Userspace Logging Daemon for iptables | |
3 | Summary(pl.UTF-8): Demon logujący w trybie użytkownika dla iptables | |
4 | Name: ulogd | |
5 | Version: 2.0.0 | |
6 | Release: 0.1 | |
7 | License: GPL | |
8 | Group: Networking/Daemons | |
9 | Source0: ftp://ftp.netfilter.org/pub/ulogd/%{name}-%{version}.tar.bz2 | |
10 | # Source0-md5: 211e68781e3860959606fc94b97cf22e | |
11 | Source1: %{name}.init | |
12 | Source2: %{name}.sysconfig | |
13 | Source3: %{name}.logrotate | |
14 | Patch0: %{name}-includes.patch | |
15 | Patch1: %{name}-ac.patch | |
16 | URL: http://netfilter.org/projects/ulogd/ | |
17 | BuildRequires: autoconf | |
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 | |
23 | BuildRequires: libpcap-devel | |
24 | BuildRequires: mysql-devel | |
25 | BuildRequires: postgresql-devel | |
26 | BuildRequires: rpmbuild(macros) >= 1.268 | |
27 | BuildRequires: sed >= 4.0 | |
28 | BuildRequires: sqlite3-devel | |
29 | Requires(post): fileutils | |
30 | Requires(post,preun): /sbin/chkconfig | |
31 | Requires: iptables | |
32 | #Requires: kernel >= 2.4.0test9 | |
33 | Requires: rc-scripts | |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
35 | ||
36 | %description | |
37 | This packages is intended for passing packets from the kernel to | |
38 | userspace to do some logging there. It should work like that: | |
39 | - register a target called ULOG with netfilter | |
40 | - if the target is hit: | |
41 | - send the packet out using netlink multicast facility | |
42 | - return NF_CONTINUE immediately. | |
43 | ||
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 | |
50 | - zwrócić natychmiast NF_CONTINUE. | |
51 | ||
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 | ||
75 | %package mysql | |
76 | Summary: MySQL plugin for ulogd | |
77 | Summary(pl.UTF-8): Wtyczka MySQL dla ulogd | |
78 | Group: Networking/Daemons | |
79 | Obsoletes: iptables-ulogd-mysql | |
80 | ||
81 | %description mysql | |
82 | MySQL plugin for ulogd. | |
83 | ||
84 | %description mysql -l pl.UTF-8 | |
85 | Wtyczka MySQL dla ulogd. | |
86 | ||
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 | ||
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 | ||
120 | %prep | |
121 | %setup -q | |
122 | %patch0 -p1 | |
123 | %patch1 -p0 | |
124 | ||
125 | %build | |
126 | #%if "%{_lib}" != "lib" | |
127 | #sed -e 's@lib/@%{_lib}/@g' -i configure.in | |
128 | #%endif | |
129 | ||
130 | %{__autoconf} | |
131 | %configure \ | |
132 | --with-dbi \ | |
133 | --with-dbi-lib=%{_libdir} \ | |
134 | --with-mysql \ | |
135 | --with-pgsql | |
136 | %{__make} -j1 | |
137 | ||
138 | %install | |
139 | rm -rf $RPM_BUILD_ROOT | |
140 | install -d $RPM_BUILD_ROOT{%{_sbindir},/etc/{sysconfig,logrotate.d,rc.d/init.d,ulogd}} \ | |
141 | $RPM_BUILD_ROOT/var/log | |
142 | ||
143 | %{__make} install -j1 \ | |
144 | DESTDIR=$RPM_BUILD_ROOT | |
145 | ||
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 | |
149 | install %{name}.conf $RPM_BUILD_ROOT/etc/%{name}.conf | |
150 | install -D %{name}.8 $RPM_BUILD_ROOT%{_mandir}/man8/%{name}.8 | |
151 | ||
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 | |
162 | ||
163 | /sbin/chkconfig --add ulogd | |
164 | %service ulogd restart "ulogd daemon" | |
165 | ||
166 | %preun | |
167 | if [ "$1" = "0" ]; then | |
168 | %service ulogd stop | |
169 | /sbin/chkconfig --del ulogd | |
170 | fi | |
171 | ||
172 | %files | |
173 | %defattr(644,root,root,755) | |
174 | #%doc Changes doc/*.{ps,txt,html} | |
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 | |
178 | %attr(750,root,root) %dir %{_sysconfdir}/ulogd | |
179 | %attr(754,root,root) /etc/rc.d/init.d/ulogd | |
180 | ||
181 | %attr(755,root,root) %{_sbindir}/* | |
182 | %dir %{_libdir}/ulogd | |
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 | |
204 | ||
205 | %attr(640,root,root) %ghost /var/log/* | |
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 | |
215 | ||
216 | %files mysql | |
217 | %defattr(644,root,root,755) | |
218 | %doc doc/mysql* | |
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 | |
224 | ||
225 | %files pgsql | |
226 | %defattr(644,root,root,755) | |
227 | %doc doc/pgsql* | |
228 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_output_PGSQL.so | |
229 | ||
230 | %files sqlite | |
231 | %defattr(644,root,root,755) | |
232 | %doc doc/sqlite* | |
233 | %attr(755,root,root) %{_libdir}/ulogd/ulogd_output_SQLITE3.so |