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