]>
Commit | Line | Data |
---|---|---|
0e79507b | 1 | # |
f0f3ff9d | 2 | # TODO: |
c0ae8513 | 3 | # - update BR to real required llh version |
11e85ced | 4 | # - check if kernel-headers are still required to properly build iptabels for dist kernel |
83394586 | 5 | # - fix makefile (-D_UNKNOWN_KERNEL_POINTER_SIZE issue) |
a540a457 JK |
6 | # - think what to do with the useless 'ebtables' wrapper. The original old |
7 | # ebtables is still needed e.g. for libvirt's nwfilter | |
f0f3ff9d | 8 | # |
0e79507b | 9 | # Conditional build: |
c322322e TP |
10 | %bcond_without doc # without documentation (HOWTOS) which needed TeX |
11 | %bcond_without dist_kernel # without distribution kernel | |
1a1801c3 | 12 | %bcond_without nftables # nftables compatibility |
61d2127f | 13 | %bcond_without pcap # pcap-dependend utils (nfbpf_compile, nfsynproxy) |
c0ae8513 | 14 | %bcond_with vserver # build xt_owner module for non-dist kernel with vserver support |
d67a1056 | 15 | %bcond_with batch # build iptables-batch |
a0c2c091 | 16 | %bcond_with static # build static libraries, no dynamic modules (all linked into binaries) |
c0ae8513 | 17 | %bcond_with ipt_IPV4OPTSSTRIP # enable ipt_IPV4OPTSSTRIP for non-dist kernel |
11e85ced JB |
18 | %bcond_with ipt_rpc # enable ipt_rpc for non-dist kernel |
19 | %bcond_with xt_layer7 # enable xt_layer7 for non-dist kernel | |
c0ae8513 JB |
20 | %bcond_with usekernelsrc # include kernel headers from %{_kernelsrcdir} |
21 | ||
22 | %if %{with dist_kernel} | |
23 | %define with_ipt_IPV4OPTSSTRIP 1 | |
24 | %define with_ipt_rpc 1 | |
25 | %define with_xt_layer7 1 | |
c0ae8513 | 26 | %endif |
655beef5 | 27 | |
511b0491 AM |
28 | %define orgname iptables |
29 | ||
0e79507b | 30 | Summary: Extensible packet filtering system && extensible NAT system |
e8c37038 ER |
31 | Summary(pl.UTF-8): System filtrowania pakietów oraz system translacji adresów (NAT) |
32 | Summary(pt_BR.UTF-8): Ferramenta para controlar a filtragem de pacotes no kernel-2.6.x | |
33 | Summary(ru.UTF-8): Утилиты для управления пакетными фильтрами ядра Linux | |
34 | Summary(uk.UTF-8): Утиліти для керування пакетними фільтрами ядра Linux | |
35 | Summary(zh_CN.UTF-8): Linux内核包过滤管理工具 | |
4869bea7 | 36 | Name: iptables%{?with_vserver:-vserver} |
ab87c7d0 | 37 | Version: 1.8.4 |
705102f6 | 38 | Release: 1 |
a0c2c091 | 39 | License: GPL v2 |
07594664 | 40 | Group: Networking/Admin |
8280a5f8 | 41 | Source0: https://netfilter.org/projects/iptables/files/%{orgname}-%{version}.tar.bz2 |
ab87c7d0 | 42 | # Source0-md5: 9b201107957fbf62709c3d8226239b0d |
511b0491 | 43 | Source1: cvs://cvs.samba.org/netfilter/%{orgname}-howtos.tar.bz2 |
0e79507b | 44 | # Source1-md5: 2ed2b452daefe70ededd75dc0061fd07 |
705102f6 JB |
45 | Source2: iptables.init |
46 | Source3: ip6tables.init | |
47 | Source6: iptables-config | |
48 | Source7: ip6tables-config | |
49 | Source8: iptables.service | |
50 | Source9: ip6tables.service | |
a540a457 | 51 | # these are not compatible with this package! there are no ebtables-save and ebtables-restore here |
9ec3dc4d JR |
52 | Source10: ebtables.init |
53 | Source11: ebtables-config | |
54 | Source12: ebtables.service | |
c0ae8513 | 55 | # --- GENERAL CHANGES (patches<10): |
511b0491 | 56 | Patch0: %{orgname}-man.patch |
d973e24a | 57 | # additional utils; off by default |
511b0491 | 58 | Patch1: %{orgname}-batch.patch |
4e86922f | 59 | Patch2: no-libiptc.patch |
511b0491 | 60 | Patch3: %{orgname}-aligned_u64.patch |
d13a1305 | 61 | Patch4: %{orgname}-link.patch |
6461831b | 62 | |
a2f3cd63 | 63 | Patch5: ebtables-X.patch |
c0ae8513 | 64 | # --- ADDITIONAL/CHANGED EXTENSIONS: |
d973e24a | 65 | # just ipt_IPV4OPTSSTRIP now |
511b0491 | 66 | Patch10: %{orgname}-20070806.patch |
a0c2c091 | 67 | # xt_layer7; almost based on iptables-1.4-for-kernel-2.6.20forward-layer7-2.18.patch |
92b2e10a | 68 | # http://downloads.sourceforge.net/l7-filter/netfilter-layer7-v2.18.tar.gz |
511b0491 | 69 | Patch11: %{orgname}-layer7.patch |
a0c2c091 | 70 | # ipt_rpc |
511b0491 | 71 | Patch12: %{orgname}-old-1.3.7.patch |
efecc54e | 72 | # xt_IMQ; http://linuximq.net/patchs/iptables-1.4.12-IMQ-test4.diff |
511b0491 | 73 | Patch13: %{orgname}-imq.patch |
92b2e10a | 74 | # enhances ipt_owner/ip6t_owner; http://people.linux-vserver.org/~dhozac/p/m/iptables-1.3.5-owner-xid.patch (currently disabled, needs update for xt_owner) |
511b0491 | 75 | Patch14: %{orgname}-owner-xid.patch |
d973e24a | 76 | # adjusts xt_owner for vserver-enabled kernel |
511b0491 | 77 | Patch15: %{orgname}-owner-struct-size-vs.patch |
8280a5f8 | 78 | URL: https://netfilter.org/ |
d973e24a | 79 | BuildRequires: autoconf >= 2.50 |
6dc7a739 | 80 | BuildRequires: automake |
1a1801c3 JB |
81 | %{?with_nftables:BuildRequires: bison} |
82 | %{?with_nftables:BuildRequires: flex} | |
92a25fae | 83 | BuildRequires: groff |
1a1801c3 JB |
84 | %{?with_nftables:BuildRequires: libmnl-devel >= 1.0} |
85 | BuildRequires: libnetfilter_conntrack-devel >= 1.0.6 | |
a0c2c091 | 86 | BuildRequires: libnfnetlink-devel >= 1.0 |
ab87c7d0 | 87 | %{?with_nftables:BuildRequires: libnftnl-devel >= 1.1.3} |
61d2127f | 88 | %{?with_pcap:BuildRequires: libpcap-devel} |
78e5603d | 89 | BuildRequires: libtool |
d973e24a | 90 | BuildRequires: pkgconfig >= 1:0.9.0 |
63a6c82f | 91 | BuildRequires: rpmbuild(macros) >= 1.647 |
0e79507b | 92 | %if %{with doc} |
c7a0fe01 | 93 | BuildRequires: sed >= 4.0 |
0e79507b PS |
94 | BuildRequires: sgml-tools |
95 | BuildRequires: sgmls | |
c322322e | 96 | BuildRequires: tetex-dvips |
6d30ffc5 | 97 | BuildRequires: tetex-format-latex |
c588d6c8 | 98 | BuildRequires: tetex-latex |
0e79507b | 99 | BuildRequires: tetex-tex-babel |
90b6f30d | 100 | BuildRequires: texlive-fonts-cmsuper |
122b99b3 | 101 | BuildRequires: texlive-fonts-jknappen |
199610f3 | 102 | %endif |
c0ae8513 | 103 | %if %{with dist_kernel} |
c0ae8513 | 104 | BuildRequires: kernel%{_alt_kernel}-headers(netfilter) |
0e79507b | 105 | %endif |
c0ae8513 | 106 | BuildRequires: linux-libc-headers >= 7:2.6.22.1 |
511b0491 | 107 | Requires: %{orgname}-libs = %{version}-%{release} |
1a1801c3 JB |
108 | %{?with_nftables:Requires: libmnl >= 1.0} |
109 | Requires: libnetfilter_conntrack >= 1.0.6 | |
d973e24a | 110 | Requires: libnfnetlink >= 1.0 |
ab87c7d0 | 111 | %{?with_nftables:Requires: libnftnl >= 1.1.3} |
8417cd8c | 112 | Provides: arptables |
c322322e | 113 | Provides: firewall-userspace-tool |
ad92b1cf | 114 | %{?with_vserver:Provides: iptables = %{version}-%{release}} |
037d4c5e | 115 | Obsoletes: arptables |
0e79507b | 116 | Obsoletes: ipchains |
e51026eb | 117 | Obsoletes: iptables24-compat |
c7a0fe01 | 118 | Obsoletes: netfilter |
149c216c | 119 | Conflicts: xtables-addons < 1.25 |
6461831b | 120 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
0e79507b PS |
121 | |
122 | %description | |
123 | An extensible NAT system, and an extensible packet filtering system. | |
cc6a4371 | 124 | Replacement of ipchains in 2.4 and higher kernels. |
0e79507b | 125 | |
30bd20eb JR |
126 | %description -l pl.UTF-8 |
127 | Wydajny system translacji adresów (NAT) oraz system filtrowania | |
128 | pakietów. Zamiennik ipchains w jądrach 2.4 i nowszych. | |
0e79507b | 129 | |
30bd20eb JR |
130 | %description -l pt_BR.UTF-8 |
131 | Esta é a ferramenta que controla o código de filtragem de pacotes do | |
132 | kernel 2.4, obsoletando ipchains. Com esta ferramenta você pode | |
0e79507b | 133 | configurar filtros de pacotes, NAT, mascaramento (masquerading), |
30bd20eb | 134 | regras dinâmicas (stateful inspection), etc. |
0e79507b | 135 | |
30bd20eb JR |
136 | %description -l ru.UTF-8 |
137 | iptables управляют кодом фильтрации сетевых пакетов в ядре Linux. Они | |
138 | позволяют вам устанавливать межсетевые экраны (firewalls) и IP | |
139 | маскарадинг, и т.п. | |
0e79507b | 140 | |
30bd20eb JR |
141 | %description -l uk.UTF-8 |
142 | iptables управляють кодом фільтрації пакетів мережі в ядрі Linux. Вони | |
143 | дозволяють вам встановлювати міжмережеві екрани (firewalls) та IP | |
144 | маскарадинг, тощо. | |
0e79507b | 145 | |
dfc0441a AM |
146 | %package libs |
147 | Summary: iptables libraries | |
148 | Summary(pl.UTF-8): Biblioteki iptables | |
e4e1bc3c | 149 | Group: Libraries |
ae000808 | 150 | Conflicts: iptables < 1.4.3-1 |
dfc0441a AM |
151 | |
152 | %description libs | |
153 | iptables libraries. | |
154 | ||
155 | %description libs -l pl.UTF-8 | |
156 | Biblioteki iptables. | |
157 | ||
0e79507b PS |
158 | %package devel |
159 | Summary: Libraries and headers for developing iptables extensions | |
e8c37038 | 160 | Summary(pl.UTF-8): Biblioteki i nagłówki do tworzenia rozszerzeń iptables |
0e79507b | 161 | Group: Development/Libraries |
511b0491 | 162 | Requires: %{orgname}-libs = %{epoch}:%{version}-%{release} |
e51026eb | 163 | Obsoletes: iptables24-devel |
0e79507b PS |
164 | |
165 | %description devel | |
166 | Libraries and headers for developing iptables extensions. | |
167 | ||
30bd20eb JR |
168 | %description devel -l pl.UTF-8 |
169 | Biblioteki i pliki nagłówkowe niezbędne do tworzenia rozszerzeń dla | |
0e79507b PS |
170 | iptables. |
171 | ||
dfc0441a AM |
172 | %package static |
173 | Summary: Static iptables libraries | |
174 | Summary(pl.UTF-8): Biblioteki statyczne iptables | |
175 | Group: Development/Libraries | |
705102f6 | 176 | Requires: %{orgname}-devel = %{epoch}:%{version}-%{release} |
dfc0441a AM |
177 | |
178 | %description static | |
179 | Static iptables libraries. | |
180 | ||
dbbdf4ad | 181 | %description static -l pl.UTF-8 |
dfc0441a AM |
182 | Biblioteki statyczne iptables. |
183 | ||
0e79507b PS |
184 | %package init |
185 | Summary: Iptables init (RedHat style) | |
e8c37038 | 186 | Summary(pl.UTF-8): Iptables init (w stylu RedHata) |
0e79507b | 187 | Group: Networking/Admin |
c322322e | 188 | Requires(post,preun): /sbin/chkconfig |
63a6c82f | 189 | Requires(post,preun,postun): systemd-units >= 38 |
ad92b1cf | 190 | Requires: %{name} = %{version}-%{release} |
655beef5 | 191 | Requires: rc-scripts >= 0.4.3.0 |
63a6c82f | 192 | Requires: systemd-units >= 38 |
0e79507b | 193 | Obsoletes: firewall-init |
52d89633 | 194 | Obsoletes: firewall-init-ipchains |
e51026eb | 195 | Obsoletes: iptables24-init |
022edc63 | 196 | %{?with_vserver:Provides: iptables-init = %{version}-%{release}} |
0e79507b PS |
197 | |
198 | %description init | |
199 | Iptables-init is meant to provide an alternate way than firewall-init | |
200 | to start and stop packet filtering through iptables(8). | |
201 | ||
30bd20eb JR |
202 | %description init -l pl.UTF-8 |
203 | Iptables-init ma na celu udostępnienie alternatywnego w stosunku do | |
204 | firewall-init sposobu włączania i wyłączania filtrów IP jądra poprzez | |
0e79507b PS |
205 | iptables(8). |
206 | ||
a540a457 JK |
207 | %package ebtables |
208 | Summary: Ethernet Bridge Tables - xtables compatibility wrapper | |
209 | Summary(pl.UTF-8): Ethernet Bridge Tables – nakładka kompatybilności na xtables | |
210 | Group: Networking/Admin | |
211 | Requires(post,preun): /sbin/chkconfig | |
212 | Requires(post,preun,postun): systemd-units >= 38 | |
213 | Requires: %{name} | |
214 | Requires: rc-scripts >= 0.4.3.0 | |
215 | Requires: systemd-units >= 38 | |
216 | # do not 'provide' something this is not really compatible with | |
217 | #Provides: ebtables | |
218 | Obsoletes: ebtables | |
ad92b1cf | 219 | %{?with_vserver:Provides: ebtables = %{version}-%{release}} |
a540a457 JK |
220 | |
221 | %description ebtables | |
e026a282 JB |
222 | ebtables is a tool for managing Linux 2.5.x (and above) Link Layer |
223 | firewalling subsystem. | |
a540a457 | 224 | |
e026a282 JB |
225 | This package contains a compatibility wrapper over xtables providing |
226 | some functionality of the original ebtables tool. | |
a540a457 JK |
227 | |
228 | Note: this is not really a fully-compatible drop-in replacement! | |
229 | ||
e026a282 JB |
230 | %description ebtables -l pl.UTF-8 |
231 | ebtables to narzędzie do zarządzania podsystemem firewalla warstwy | |
232 | połączenia (Link Layer) Linuksa 2.5.x (i nowszych). | |
233 | ||
234 | Ten pakiet zawiera warstwę zgodności dla xtables zapewniającą część | |
235 | funkcjonalności oryginalnego narzędzia ebtables. | |
236 | ||
237 | Uwaga: nie jest to w pełni zgodny zamiennik! | |
238 | ||
0e79507b | 239 | %prep |
511b0491 | 240 | %setup -q -n iptables-%{version} -a1 |
65ffbe22 | 241 | %patch0 -p1 |
d973e24a | 242 | %if %{with batch} |
65ffbe22 | 243 | %patch1 -p1 |
93ad9851 | 244 | %endif |
4e86922f | 245 | %patch2 -p1 |
534f47dd | 246 | %patch3 -p1 |
d13a1305 | 247 | %patch4 -p1 |
a2f3cd63 | 248 | %patch5 -p1 |
e803115b | 249 | |
c0ae8513 JB |
250 | %{?with_ipt_IPV4OPTSSTRIP:%patch10 -p1} |
251 | %{?with_xt_layer7:%patch11 -p1} | |
252 | %{?with_ipt_rpc:%patch12 -p1} | |
efecc54e | 253 | %patch13 -p1 |
d973e24a | 254 | %if %{with vserver} |
52cee3e3 | 255 | %patch14 -p1 |
d973e24a | 256 | %patch15 -p1 |
dfc0441a | 257 | %endif |
6c13dbc4 | 258 | |
0e79507b | 259 | %build |
78e5603d | 260 | %{__libtoolize} |
0a44bfb5 | 261 | %{__aclocal} -I m4 |
03ece50a | 262 | %{__autoconf} |
c0ae8513 | 263 | %{__autoheader} |
6dc7a739 | 264 | %{__automake} |
265 | %configure \ | |
b0abf64e | 266 | CFLAGS="%{rpmcflags} %{rpmcppflags} -D%{!?debug:N}DEBUG" \ |
c0ae8513 | 267 | %{?with_usekernelsrc:--with-kernel=%{_kernelsrcdir}} \ |
61d2127f | 268 | %{?with_pcap:--enable-bpf-compiler} \ |
6dc7a739 | 269 | --enable-libipq \ |
61d2127f | 270 | %{?with_pcap:--enable-nfsynproxy} \ |
1a1801c3 | 271 | %{!?with_nftables:--disable-nftables} \ |
a0c2c091 | 272 | %{?with_static:--enable-static} |
6dc7a739 | 273 | |
8b34696c | 274 | %{__make} -j1 all \ |
a0c2c091 | 275 | V=1 |
0e79507b | 276 | |
199610f3 | 277 | %if %{with doc} |
2958d7d0 | 278 | %{__make} -j1 -C iptables-howtos |
199610f3 PG |
279 | sed -i 's:$(HTML_HOWTOS)::g; s:$(PSUS_HOWTOS)::g' iptables-howtos/Makefile |
280 | %endif | |
0e79507b PS |
281 | |
282 | %install | |
283 | rm -rf $RPM_BUILD_ROOT | |
a94df067 | 284 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \ |
63a6c82f JR |
285 | $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_mandir}/man3} \ |
286 | $RPM_BUILD_ROOT%{systemdunitdir} | |
0e79507b | 287 | |
6dc7a739 | 288 | %{__make} install \ |
0e79507b PS |
289 | DESTDIR=$RPM_BUILD_ROOT \ |
290 | BINDIR=%{_sbindir} \ | |
291 | MANDIR=%{_mandir} \ | |
292 | LIBDIR=%{_libdir} | |
293 | ||
ab87c7d0 | 294 | # use ld script for -liptc backward compat (see no-libiptc.patch for source) |
7cf640e1 JB |
295 | %{__sed} \ |
296 | %ifarch %{x8664} alpha aarch64 hppa64 mips64 ppc64 s390x sparc64 | |
297 | -e 's,@BITS@,64,' \ | |
298 | %else | |
299 | -e 's,@BITS@,32,' \ | |
300 | %endif | |
19456050 | 301 | -e 's,@LIBDIR@,%{_libdir},g' \ |
7cf640e1 | 302 | -e "s,@ARCH@,$(echo "%{_build_arch}" | tr _ -)," libiptc/libiptc.ld.in >$RPM_BUILD_ROOT%{_libdir}/libiptc.so |
f9caff1e | 303 | |
705102f6 JB |
304 | install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/iptables |
305 | install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/ip6tables | |
c322322e | 306 | |
705102f6 JB |
307 | install -p %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/iptables-config |
308 | install -p %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/ip6tables-config | |
a94df067 | 309 | |
705102f6 JB |
310 | install -p %{SOURCE8} $RPM_BUILD_ROOT%{systemdunitdir}/iptables.service |
311 | install -p %{SOURCE9} $RPM_BUILD_ROOT%{systemdunitdir}/ip6tables.service | |
63a6c82f | 312 | |
a540a457 JK |
313 | # these won't work as they are now |
314 | #install -p %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/ebtables | |
315 | #install -p %{SOURCE11} $RPM_BUILD_ROOT/etc/sysconfig/ebtables-config | |
316 | #install -p %{SOURCE12} $RPM_BUILD_ROOT%{systemdunitdir}/ebtables.service | |
9ec3dc4d | 317 | |
0e79507b PS |
318 | %clean |
319 | rm -rf $RPM_BUILD_ROOT | |
320 | ||
a0c2c091 JB |
321 | %post libs -p /sbin/ldconfig |
322 | %postun libs -p /sbin/ldconfig | |
dfc0441a | 323 | |
0e79507b | 324 | %post init |
705102f6 JB |
325 | /sbin/chkconfig --add iptables |
326 | /sbin/chkconfig --add ip6tables | |
327 | %systemd_post iptables.service ip6tables.service | |
0e79507b PS |
328 | |
329 | %preun init | |
330 | if [ "$1" = "0" ]; then | |
705102f6 JB |
331 | /sbin/chkconfig --del iptables |
332 | /sbin/chkconfig --del ip6tables | |
0e79507b | 333 | fi |
705102f6 | 334 | %systemd_preun iptables.service ip6tables.service |
63a6c82f JR |
335 | |
336 | %postun init | |
337 | %systemd_reload | |
338 | ||
705102f6 JB |
339 | %triggerpostun init -- iptables-init < 1.4.13-2 |
340 | %systemd_trigger iptables.service ip6tables.service | |
0e79507b PS |
341 | |
342 | %files | |
343 | %defattr(644,root,root,755) | |
0e79507b | 344 | %{?with_doc:%doc iptables-howtos/{NAT,networking-concepts,packet-filtering}-HOWTO*} |
6dc7a739 | 345 | %attr(755,root,root) %{_bindir}/iptables-xml |
037d4c5e | 346 | %attr(755,root,root) %{_sbindir}/arptables |
afae2af1 AG |
347 | %attr(755,root,root) %{_sbindir}/arptables-nft |
348 | %attr(755,root,root) %{_sbindir}/arptables-nft-restore | |
349 | %attr(755,root,root) %{_sbindir}/arptables-nft-save | |
350 | %attr(755,root,root) %{_sbindir}/arptables-restore | |
351 | %attr(755,root,root) %{_sbindir}/arptables-save | |
c7a0fe01 | 352 | %attr(755,root,root) %{_sbindir}/ip6tables |
6461831b AM |
353 | %attr(755,root,root) %{_sbindir}/ip6tables-legacy |
354 | %attr(755,root,root) %{_sbindir}/ip6tables-legacy-restore | |
355 | %attr(755,root,root) %{_sbindir}/ip6tables-legacy-save | |
c7a0fe01 ER |
356 | %attr(755,root,root) %{_sbindir}/ip6tables-restore |
357 | %attr(755,root,root) %{_sbindir}/ip6tables-save | |
6461831b AM |
358 | %attr(755,root,root) %{_sbindir}/iptables |
359 | %attr(755,root,root) %{_sbindir}/iptables-legacy | |
360 | %attr(755,root,root) %{_sbindir}/iptables-legacy-restore | |
361 | %attr(755,root,root) %{_sbindir}/iptables-legacy-save | |
362 | %attr(755,root,root) %{_sbindir}/iptables-restore | |
363 | %attr(755,root,root) %{_sbindir}/iptables-save | |
364 | %attr(755,root,root) %{_sbindir}/xtables-legacy-multi | |
dfc0441a AM |
365 | %if %{with batch} |
366 | %attr(755,root,root) %{_sbindir}/iptables-batch | |
367 | %attr(755,root,root) %{_sbindir}/ip6tables-batch | |
368 | %endif | |
d67a1056 | 369 | %attr(755,root,root) %{_sbindir}/nfnl_osf |
61d2127f JB |
370 | %if %{with pcap} |
371 | %attr(755,root,root) %{_sbindir}/nfbpf_compile | |
372 | %attr(755,root,root) %{_sbindir}/nfsynproxy | |
373 | %endif | |
1a1801c3 | 374 | %if %{with nftables} |
6461831b AM |
375 | %attr(755,root,root) %{_sbindir}/ip6tables-nft |
376 | %attr(755,root,root) %{_sbindir}/ip6tables-nft-restore | |
377 | %attr(755,root,root) %{_sbindir}/ip6tables-nft-save | |
378 | %attr(755,root,root) %{_sbindir}/iptables-nft | |
379 | %attr(755,root,root) %{_sbindir}/iptables-nft-restore | |
380 | %attr(755,root,root) %{_sbindir}/iptables-nft-save | |
381 | %attr(755,root,root) %{_sbindir}/xtables-monitor | |
382 | %attr(755,root,root) %{_sbindir}/xtables-nft-multi | |
1a1801c3 JB |
383 | %attr(755,root,root) %{_sbindir}/iptables-restore-translate |
384 | %attr(755,root,root) %{_sbindir}/iptables-translate | |
1a1801c3 JB |
385 | %attr(755,root,root) %{_sbindir}/ip6tables-restore-translate |
386 | %attr(755,root,root) %{_sbindir}/ip6tables-translate | |
6461831b | 387 | %attr(755,root,root) %{_libdir}/xtables/libarpt_mangle.so |
6461831b AM |
388 | %attr(755,root,root) %{_libdir}/xtables/libebt_mark.so |
389 | %attr(755,root,root) %{_libdir}/xtables/libebt_nflog.so | |
1a1801c3 | 390 | %endif |
d67a1056 | 391 | %{_datadir}/xtables |
a0c2c091 | 392 | %dir %{_libdir}/xtables |
037d4c5e | 393 | %attr(755,root,root) %{_libdir}/xtables/libebt_802_3.so |
ab87c7d0 | 394 | %attr(755,root,root) %{_libdir}/xtables/libebt_among.so |
6461831b | 395 | %attr(755,root,root) %{_libdir}/xtables/libebt_arp.so |
54750b58 | 396 | %attr(755,root,root) %{_libdir}/xtables/libebt_arpreply.so |
6461831b AM |
397 | %attr(755,root,root) %{_libdir}/xtables/libebt_dnat.so |
398 | %attr(755,root,root) %{_libdir}/xtables/libebt_ip6.so | |
037d4c5e | 399 | %attr(755,root,root) %{_libdir}/xtables/libebt_ip.so |
037d4c5e | 400 | %attr(755,root,root) %{_libdir}/xtables/libebt_log.so |
037d4c5e | 401 | %attr(755,root,root) %{_libdir}/xtables/libebt_mark_m.so |
6461831b AM |
402 | %attr(755,root,root) %{_libdir}/xtables/libebt_pkttype.so |
403 | %attr(755,root,root) %{_libdir}/xtables/libebt_redirect.so | |
404 | %attr(755,root,root) %{_libdir}/xtables/libebt_snat.so | |
405 | %attr(755,root,root) %{_libdir}/xtables/libebt_stp.so | |
406 | %attr(755,root,root) %{_libdir}/xtables/libebt_vlan.so | |
a0c2c091 JB |
407 | %attr(755,root,root) %{_libdir}/xtables/libip6t_HL.so |
408 | %attr(755,root,root) %{_libdir}/xtables/libip6t_LOG.so | |
409 | %attr(755,root,root) %{_libdir}/xtables/libip6t_REJECT.so | |
6dc7a739 | 410 | %attr(755,root,root) %{_libdir}/xtables/libip6t_ah.so |
411 | %attr(755,root,root) %{_libdir}/xtables/libip6t_dst.so | |
412 | %attr(755,root,root) %{_libdir}/xtables/libip6t_eui64.so | |
413 | %attr(755,root,root) %{_libdir}/xtables/libip6t_frag.so | |
414 | %attr(755,root,root) %{_libdir}/xtables/libip6t_hbh.so | |
415 | %attr(755,root,root) %{_libdir}/xtables/libip6t_hl.so | |
6dc7a739 | 416 | %attr(755,root,root) %{_libdir}/xtables/libip6t_icmp6.so |
6dc7a739 | 417 | %attr(755,root,root) %{_libdir}/xtables/libip6t_ipv6header.so |
6dc7a739 | 418 | %attr(755,root,root) %{_libdir}/xtables/libip6t_mh.so |
6dc7a739 | 419 | %attr(755,root,root) %{_libdir}/xtables/libip6t_rt.so |
6dc7a739 | 420 | %attr(755,root,root) %{_libdir}/xtables/libipt_CLUSTERIP.so |
421 | %attr(755,root,root) %{_libdir}/xtables/libipt_DNAT.so | |
6dc7a739 | 422 | %attr(755,root,root) %{_libdir}/xtables/libipt_ECN.so |
6dc7a739 | 423 | %attr(755,root,root) %{_libdir}/xtables/libipt_LOG.so |
424 | %attr(755,root,root) %{_libdir}/xtables/libipt_MASQUERADE.so | |
6dc7a739 | 425 | %attr(755,root,root) %{_libdir}/xtables/libipt_NETMAP.so |
6dc7a739 | 426 | %attr(755,root,root) %{_libdir}/xtables/libipt_REDIRECT.so |
427 | %attr(755,root,root) %{_libdir}/xtables/libipt_REJECT.so | |
6dc7a739 | 428 | %attr(755,root,root) %{_libdir}/xtables/libipt_SNAT.so |
6dc7a739 | 429 | %attr(755,root,root) %{_libdir}/xtables/libipt_TTL.so |
430 | %attr(755,root,root) %{_libdir}/xtables/libipt_ULOG.so | |
a0c2c091 | 431 | %attr(755,root,root) %{_libdir}/xtables/libipt_ah.so |
a0c2c091 | 432 | %attr(755,root,root) %{_libdir}/xtables/libipt_icmp.so |
a0c2c091 | 433 | %attr(755,root,root) %{_libdir}/xtables/libipt_realm.so |
a0c2c091 | 434 | %attr(755,root,root) %{_libdir}/xtables/libipt_ttl.so |
df84948a AM |
435 | %attr(755,root,root) %{_libdir}/xtables/libip6t_DNAT.so |
436 | %attr(755,root,root) %{_libdir}/xtables/libip6t_DNPT.so | |
437 | %attr(755,root,root) %{_libdir}/xtables/libip6t_MASQUERADE.so | |
438 | %attr(755,root,root) %{_libdir}/xtables/libip6t_NETMAP.so | |
439 | %attr(755,root,root) %{_libdir}/xtables/libip6t_REDIRECT.so | |
440 | %attr(755,root,root) %{_libdir}/xtables/libip6t_SNAT.so | |
441 | %attr(755,root,root) %{_libdir}/xtables/libip6t_SNPT.so | |
ae8403cd | 442 | %attr(755,root,root) %{_libdir}/xtables/libip6t_srh.so |
9b1e8e39 | 443 | %attr(755,root,root) %{_libdir}/xtables/libxt_AUDIT.so |
0a44bfb5 | 444 | %attr(755,root,root) %{_libdir}/xtables/libxt_CHECKSUM.so |
6dc7a739 | 445 | %attr(755,root,root) %{_libdir}/xtables/libxt_CLASSIFY.so |
a0c2c091 JB |
446 | %attr(755,root,root) %{_libdir}/xtables/libxt_CONNMARK.so |
447 | %attr(755,root,root) %{_libdir}/xtables/libxt_CONNSECMARK.so | |
448 | %attr(755,root,root) %{_libdir}/xtables/libxt_CT.so | |
449 | %attr(755,root,root) %{_libdir}/xtables/libxt_DSCP.so | |
2c2ecb60 | 450 | %attr(755,root,root) %{_libdir}/xtables/libxt_HMARK.so |
a0c2c091 JB |
451 | %attr(755,root,root) %{_libdir}/xtables/libxt_IDLETIMER.so |
452 | %attr(755,root,root) %{_libdir}/xtables/libxt_IMQ.so | |
453 | %attr(755,root,root) %{_libdir}/xtables/libxt_LED.so | |
454 | %attr(755,root,root) %{_libdir}/xtables/libxt_MARK.so | |
455 | %attr(755,root,root) %{_libdir}/xtables/libxt_NFLOG.so | |
456 | %attr(755,root,root) %{_libdir}/xtables/libxt_NFQUEUE.so | |
457 | %attr(755,root,root) %{_libdir}/xtables/libxt_NOTRACK.so | |
458 | %attr(755,root,root) %{_libdir}/xtables/libxt_RATEEST.so | |
459 | %attr(755,root,root) %{_libdir}/xtables/libxt_SECMARK.so | |
460 | %attr(755,root,root) %{_libdir}/xtables/libxt_SET.so | |
61d2127f | 461 | %attr(755,root,root) %{_libdir}/xtables/libxt_SYNPROXY.so |
a0c2c091 JB |
462 | %attr(755,root,root) %{_libdir}/xtables/libxt_TCPMSS.so |
463 | %attr(755,root,root) %{_libdir}/xtables/libxt_TCPOPTSTRIP.so | |
464 | %attr(755,root,root) %{_libdir}/xtables/libxt_TEE.so | |
465 | %attr(755,root,root) %{_libdir}/xtables/libxt_TOS.so | |
466 | %attr(755,root,root) %{_libdir}/xtables/libxt_TPROXY.so | |
467 | %attr(755,root,root) %{_libdir}/xtables/libxt_TRACE.so | |
f5742d8d | 468 | %attr(755,root,root) %{_libdir}/xtables/libxt_addrtype.so |
488dc05d | 469 | %attr(755,root,root) %{_libdir}/xtables/libxt_bpf.so |
037d4c5e | 470 | %attr(755,root,root) %{_libdir}/xtables/libxt_cgroup.so |
ab1d9cfc | 471 | %attr(755,root,root) %{_libdir}/xtables/libxt_cluster.so |
6dc7a739 | 472 | %attr(755,root,root) %{_libdir}/xtables/libxt_comment.so |
473 | %attr(755,root,root) %{_libdir}/xtables/libxt_connbytes.so | |
488dc05d | 474 | %attr(755,root,root) %{_libdir}/xtables/libxt_connlabel.so |
6dc7a739 | 475 | %attr(755,root,root) %{_libdir}/xtables/libxt_connlimit.so |
476 | %attr(755,root,root) %{_libdir}/xtables/libxt_connmark.so | |
6dc7a739 | 477 | %attr(755,root,root) %{_libdir}/xtables/libxt_conntrack.so |
0a44bfb5 | 478 | %attr(755,root,root) %{_libdir}/xtables/libxt_cpu.so |
6dc7a739 | 479 | %attr(755,root,root) %{_libdir}/xtables/libxt_dccp.so |
9b1e8e39 | 480 | %attr(755,root,root) %{_libdir}/xtables/libxt_devgroup.so |
6dc7a739 | 481 | %attr(755,root,root) %{_libdir}/xtables/libxt_dscp.so |
f5742d8d | 482 | %attr(755,root,root) %{_libdir}/xtables/libxt_ecn.so |
6dc7a739 | 483 | %attr(755,root,root) %{_libdir}/xtables/libxt_esp.so |
484 | %attr(755,root,root) %{_libdir}/xtables/libxt_hashlimit.so | |
485 | %attr(755,root,root) %{_libdir}/xtables/libxt_helper.so | |
037d4c5e | 486 | %attr(755,root,root) %{_libdir}/xtables/libxt_ipcomp.so |
6dc7a739 | 487 | %attr(755,root,root) %{_libdir}/xtables/libxt_iprange.so |
0a44bfb5 | 488 | %attr(755,root,root) %{_libdir}/xtables/libxt_ipvs.so |
6dc7a739 | 489 | %attr(755,root,root) %{_libdir}/xtables/libxt_length.so |
490 | %attr(755,root,root) %{_libdir}/xtables/libxt_limit.so | |
491 | %attr(755,root,root) %{_libdir}/xtables/libxt_mac.so | |
492 | %attr(755,root,root) %{_libdir}/xtables/libxt_mark.so | |
6dc7a739 | 493 | %attr(755,root,root) %{_libdir}/xtables/libxt_multiport.so |
f5742d8d | 494 | %attr(755,root,root) %{_libdir}/xtables/libxt_nfacct.so |
d67a1056 | 495 | %attr(755,root,root) %{_libdir}/xtables/libxt_osf.so |
a0c2c091 | 496 | %attr(755,root,root) %{_libdir}/xtables/libxt_owner.so |
6dc7a739 | 497 | %attr(755,root,root) %{_libdir}/xtables/libxt_physdev.so |
498 | %attr(755,root,root) %{_libdir}/xtables/libxt_pkttype.so | |
ab1d9cfc | 499 | %attr(755,root,root) %{_libdir}/xtables/libxt_policy.so |
6dc7a739 | 500 | %attr(755,root,root) %{_libdir}/xtables/libxt_quota.so |
75dcc0ed | 501 | %attr(755,root,root) %{_libdir}/xtables/libxt_rateest.so |
a0c2c091 | 502 | %attr(755,root,root) %{_libdir}/xtables/libxt_recent.so |
f5742d8d | 503 | %attr(755,root,root) %{_libdir}/xtables/libxt_rpfilter.so |
6dc7a739 | 504 | %attr(755,root,root) %{_libdir}/xtables/libxt_sctp.so |
ec60ce35 | 505 | %attr(755,root,root) %{_libdir}/xtables/libxt_set.so |
6dc7a739 | 506 | %attr(755,root,root) %{_libdir}/xtables/libxt_socket.so |
507 | %attr(755,root,root) %{_libdir}/xtables/libxt_standard.so | |
508 | %attr(755,root,root) %{_libdir}/xtables/libxt_state.so | |
509 | %attr(755,root,root) %{_libdir}/xtables/libxt_statistic.so | |
510 | %attr(755,root,root) %{_libdir}/xtables/libxt_string.so | |
6dc7a739 | 511 | %attr(755,root,root) %{_libdir}/xtables/libxt_tcp.so |
a0c2c091 | 512 | %attr(755,root,root) %{_libdir}/xtables/libxt_tcpmss.so |
6dc7a739 | 513 | %attr(755,root,root) %{_libdir}/xtables/libxt_time.so |
514 | %attr(755,root,root) %{_libdir}/xtables/libxt_tos.so | |
6dc7a739 | 515 | %attr(755,root,root) %{_libdir}/xtables/libxt_u32.so |
516 | %attr(755,root,root) %{_libdir}/xtables/libxt_udp.so | |
c0ae8513 JB |
517 | %{?with_ipt_IPV4OPTSSTRIP:%attr(755,root,root) %{_libdir}/xtables/libipt_IPV4OPTSSTRIP.so} |
518 | %{?with_ipt_rpc:%attr(755,root,root) %{_libdir}/xtables/libipt_rpc.so} | |
519 | %{?with_xt_layer7:%attr(755,root,root) %{_libdir}/xtables/libxt_layer7.so} | |
6461831b | 520 | %{?with_nftables:%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ethertypes} |
b4dea9ed | 521 | %{_mandir}/man1/iptables-xml.1* |
a0c2c091 JB |
522 | %{_mandir}/man8/ip6tables.8* |
523 | %{_mandir}/man8/ip6tables-restore.8* | |
524 | %{_mandir}/man8/ip6tables-save.8* | |
525 | %{_mandir}/man8/iptables.8* | |
f59ad890 | 526 | %{_mandir}/man8/iptables-extensions.8* |
a0c2c091 JB |
527 | %{_mandir}/man8/iptables-restore.8* |
528 | %{_mandir}/man8/iptables-save.8* | |
ae8403cd | 529 | %{_mandir}/man8/nfnl_osf.8* |
6461831b AM |
530 | %{_mandir}/man8/xtables-legacy.8* |
531 | %{_mandir}/man8/xtables-monitor.8* | |
60b0efb2 JB |
532 | %if %{with nftables} |
533 | %{_mandir}/man8/arptables-nft.8* | |
534 | %{_mandir}/man8/arptables-nft-restore.8* | |
535 | %{_mandir}/man8/arptables-nft-save.8* | |
536 | %{_mandir}/man8/ebtables-nft.8* | |
ab87c7d0 | 537 | %{_mandir}/man8/ip6tables-restore-translate.8* |
60b0efb2 | 538 | %{_mandir}/man8/ip6tables-translate.8* |
ab87c7d0 | 539 | %{_mandir}/man8/iptables-restore-translate.8* |
60b0efb2 | 540 | %{_mandir}/man8/iptables-translate.8* |
6461831b AM |
541 | %{_mandir}/man8/xtables-nft.8* |
542 | %{_mandir}/man8/xtables-translate.8* | |
60b0efb2 JB |
543 | %endif |
544 | %if %{with pcap} | |
545 | %{_mandir}/man8/nfbpf_compile.8* | |
546 | %endif | |
0e79507b | 547 | |
dfc0441a AM |
548 | %files libs |
549 | %defattr(644,root,root,755) | |
a0c2c091 | 550 | %attr(755,root,root) %{_libdir}/libip4tc.so.*.*.* |
60b0efb2 | 551 | %attr(755,root,root) %ghost %{_libdir}/libip4tc.so.2 |
a0c2c091 | 552 | %attr(755,root,root) %{_libdir}/libip6tc.so.*.*.* |
60b0efb2 | 553 | %attr(755,root,root) %ghost %{_libdir}/libip6tc.so.2 |
a0c2c091 JB |
554 | %attr(755,root,root) %{_libdir}/libipq.so.*.*.* |
555 | %attr(755,root,root) %ghost %{_libdir}/libipq.so.0 | |
a0c2c091 | 556 | %attr(755,root,root) %{_libdir}/libxtables.so.*.*.* |
1a1801c3 | 557 | %attr(755,root,root) %ghost %{_libdir}/libxtables.so.12 |
dfc0441a | 558 | |
0e79507b PS |
559 | %files devel |
560 | %defattr(644,root,root,755) | |
561 | %{?with_doc:%doc iptables-howtos/netfilter-hacking-HOWTO*} | |
a0c2c091 JB |
562 | %attr(755,root,root) %{_libdir}/libip4tc.so |
563 | %attr(755,root,root) %{_libdir}/libip6tc.so | |
564 | %attr(755,root,root) %{_libdir}/libipq.so | |
f9caff1e | 565 | %attr(755,root,root) %{_libdir}/libiptc.so |
a0c2c091 JB |
566 | %attr(755,root,root) %{_libdir}/libxtables.so |
567 | %{_libdir}/libip4tc.la | |
568 | %{_libdir}/libip6tc.la | |
569 | %{_libdir}/libipq.la | |
a0c2c091 JB |
570 | %{_libdir}/libxtables.la |
571 | %{_includedir}/libipq.h | |
572 | %{_includedir}/xtables.h | |
f59ad890 | 573 | %{_includedir}/xtables-version.h |
dfc0441a | 574 | %{_includedir}/libiptc |
e803115b AM |
575 | %{_pkgconfigdir}/libip4tc.pc |
576 | %{_pkgconfigdir}/libip6tc.pc | |
9a5acd07 | 577 | %{_pkgconfigdir}/libipq.pc |
a0c2c091 JB |
578 | %{_pkgconfigdir}/libiptc.pc |
579 | %{_pkgconfigdir}/xtables.pc | |
580 | %{_mandir}/man3/ipq_*.3* | |
581 | %{_mandir}/man3/libipq.3* | |
0e79507b | 582 | |
d67a1056 | 583 | %if %{with static} |
dfc0441a AM |
584 | %files static |
585 | %defattr(644,root,root,755) | |
a0c2c091 JB |
586 | %{_libdir}/libip4tc.a |
587 | %{_libdir}/libip6tc.a | |
588 | %{_libdir}/libipq.a | |
a0c2c091 | 589 | %{_libdir}/libxtables.a |
d67a1056 | 590 | %endif |
dfc0441a | 591 | |
0e79507b PS |
592 | %files init |
593 | %defattr(644,root,root,755) | |
705102f6 JB |
594 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/iptables-config |
595 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ip6tables-config | |
c7a0fe01 ER |
596 | %attr(754,root,root) /etc/rc.d/init.d/iptables |
597 | %attr(754,root,root) /etc/rc.d/init.d/ip6tables | |
705102f6 JB |
598 | %{systemdunitdir}/iptables.service |
599 | %{systemdunitdir}/ip6tables.service | |
a540a457 JK |
600 | |
601 | %files ebtables | |
602 | %defattr(644,root,root,755) | |
603 | %attr(755,root,root) %{_sbindir}/ebtables | |
afae2af1 AG |
604 | %attr(755,root,root) %{_sbindir}/ebtables-nft |
605 | %attr(755,root,root) %{_sbindir}/ebtables-nft-restore | |
606 | %attr(755,root,root) %{_sbindir}/ebtables-nft-save | |
607 | %attr(755,root,root) %{_sbindir}/ebtables-restore | |
608 | %attr(755,root,root) %{_sbindir}/ebtables-save |