]> git.pld-linux.org Git - packages/iptables.git/blame - iptables.spec
- updated to 1.4.4
[packages/iptables.git] / iptables.spec
CommitLineData
0e79507b 1#
f0f3ff9d 2# TODO:
83394586 3# - fix makefile (-D_UNKNOWN_KERNEL_POINTER_SIZE issue)
75dcc0ed 4# - owner needs rewrite to xt
75dcc0ed 5# - add manual sections from xtable-addons
6dc7a739 6# - ACCOUNT has been removed from iptables-20070806.patch, now should be taken
7# from http://www.intra2net.com/de/produkte/opensource/ipt_account/libipt_ACCOUNT-1.3.tar.gz
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
b64f0e10 12%bcond_without vserver # kernel build without vserver
2be18163 13%bcond_without batch # build iptables-batch
0e79507b 14#
c7a0fe01 15%define netfilter_snap 20070806
65ffbe22 16%define llh_version 7:2.6.22.1
740f0f65 17%define name6 ip6tables
0e79507b 18Summary: Extensible packet filtering system && extensible NAT system
e8c37038
ER
19Summary(pl.UTF-8): System filtrowania pakietów oraz system translacji adresów (NAT)
20Summary(pt_BR.UTF-8): Ferramenta para controlar a filtragem de pacotes no kernel-2.6.x
21Summary(ru.UTF-8): Утилиты для управления пакетными фильтрами ядра Linux
22Summary(uk.UTF-8): Утиліти для керування пакетними фільтрами ядра Linux
23Summary(zh_CN.UTF-8): Linux内核包过滤管理工具
0e79507b 24Name: iptables
ab1d9cfc 25Version: 1.4.4
2be18163 26Release: 1
0e79507b
PS
27License: GPL
28Group: Networking/Daemons
78e5603d 29Source0: ftp://ftp.netfilter.org/pub/iptables/%{name}-%{version}.tar.bz2
ab1d9cfc 30# Source0-md5: 08cd9196881657ea0615d926334cb7e9
0e79507b
PS
31Source1: cvs://cvs.samba.org/netfilter/%{name}-howtos.tar.bz2
32# Source1-md5: 2ed2b452daefe70ededd75dc0061fd07
f17e2be4 33Source2: %{name}.init
34Source3: %{name6}.init
c7a0fe01 35Patch0: %{name}-%{netfilter_snap}.patch
65ffbe22 36Patch1: %{name}-man.patch
75dcc0ed 37# based on http://www.linuximq.net/patchs/iptables-1.4.0-imq.diff
6dc7a739 38Patch2: %{name}-imq.patch
a27de1df 39# http://www.balabit.com/downloads/files/tproxy/tproxy-iptables-20080204-1915.patch
40Patch3: %{name}-tproxy.patch
6dc7a739 41Patch4: %{name}-stealth.patch
42# almost based on iptables-1.4-for-kernel-2.6.20forward-layer7-2.18.patch
43# http://switch.dl.sourceforge.net/sourceforge/l7-filter/netfilter-layer7-v2.18.tar.gz
49a79e53 44Patch5: %{name}-layer7.patch
2af8cb4e 45Patch6: %{name}-old-1.3.7.patch
6dc7a739 46# based on http://www.svn.barbara.eu.org/ipt_account/attachment/wiki/Software/ipt_account-0.1.21-20070804164729.tar.gz?format=raw
03db53c9 47Patch7: %{name}-account.patch
78d5658d 48# http://people.linux-vserver.org/~dhozac/p/m/iptables-1.3.5-owner-xid.patch
49Patch8: %{name}-1.3.5-owner-xid.patch
a27de1df 50Patch9: %{name}-batch.patch
0dbd2c21 51Patch10: %{name}-headers.patch
cd94f0ed 52Patch11: %{name}-owner-struct-size-vs.patch
6c13dbc4 53Patch999: %{name}-llh-dirty-hack.patch
c588d6c8 54URL: http://www.netfilter.org/
6dc7a739 55BuildRequires: autoconf
56BuildRequires: automake
78e5603d 57BuildRequires: libtool
0e79507b 58%if %{with doc}
c7a0fe01 59BuildRequires: sed >= 4.0
0e79507b
PS
60BuildRequires: sgml-tools
61BuildRequires: sgmls
c322322e 62BuildRequires: tetex-dvips
6d30ffc5 63BuildRequires: tetex-format-latex
c588d6c8 64BuildRequires: tetex-latex
0e79507b 65BuildRequires: tetex-tex-babel
199610f3 66%endif
c7a0fe01 67%if %{with dist_kernel} && %{netfilter_snap} != 0
d1ca3791 68BuildRequires: kernel%{_alt_kernel}-headers(netfilter) >= %{netfilter_snap}
23f0f477 69BuildRequires: kernel%{_alt_kernel}-source
0e79507b 70%endif
31388607 71#BuildRequires: linux-libc-headers >= %{llh_version}
0e79507b 72BuildConflicts: kernel-headers < 2.3.0
c322322e 73Provides: firewall-userspace-tool
0e79507b 74Obsoletes: ipchains
717801e2 75Obsoletes: iptables-ipp2p
e51026eb 76Obsoletes: iptables24-compat
c7a0fe01 77Obsoletes: netfilter
0e79507b
PS
78BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
79
80%description
81An extensible NAT system, and an extensible packet filtering system.
cc6a4371 82Replacement of ipchains in 2.4 and higher kernels.
0e79507b 83
30bd20eb
JR
84%description -l pl.UTF-8
85Wydajny system translacji adresów (NAT) oraz system filtrowania
86pakietów. Zamiennik ipchains w jądrach 2.4 i nowszych.
0e79507b 87
30bd20eb
JR
88%description -l pt_BR.UTF-8
89Esta é a ferramenta que controla o código de filtragem de pacotes do
90kernel 2.4, obsoletando ipchains. Com esta ferramenta você pode
0e79507b 91configurar filtros de pacotes, NAT, mascaramento (masquerading),
30bd20eb 92regras dinâmicas (stateful inspection), etc.
0e79507b 93
30bd20eb
JR
94%description -l ru.UTF-8
95iptables управляют кодом фильтрации сетевых пакетов в ядре Linux. Они
96позволяют вам устанавливать межсетевые экраны (firewalls) и IP
97маскарадинг, и т.п.
0e79507b 98
30bd20eb
JR
99%description -l uk.UTF-8
100iptables управляють кодом фільтрації пакетів мережі в ядрі Linux. Вони
101дозволяють вам встановлювати міжмережеві екрани (firewalls) та IP
102маскарадинг, тощо.
0e79507b 103
dfc0441a
AM
104%package libs
105Summary: iptables libraries
106Summary(pl.UTF-8): Biblioteki iptables
107Group: Development/Libraries
ae000808 108Conflicts: iptables < 1.4.3-1
dfc0441a
AM
109
110%description libs
111iptables libraries.
112
113%description libs -l pl.UTF-8
114Biblioteki iptables.
115
0e79507b
PS
116%package devel
117Summary: Libraries and headers for developing iptables extensions
e8c37038 118Summary(pl.UTF-8): Biblioteki i nagłówki do tworzenia rozszerzeń iptables
0e79507b 119Group: Development/Libraries
dfc0441a 120Requires: %{name}-libs = %{epoch}:%{version}-%{release}
e51026eb 121Obsoletes: iptables24-devel
0e79507b
PS
122
123%description devel
124Libraries and headers for developing iptables extensions.
125
30bd20eb
JR
126%description devel -l pl.UTF-8
127Biblioteki i pliki nagłówkowe niezbędne do tworzenia rozszerzeń dla
0e79507b
PS
128iptables.
129
dfc0441a
AM
130%package static
131Summary: Static iptables libraries
132Summary(pl.UTF-8): Biblioteki statyczne iptables
133Group: Development/Libraries
134Requires: %{name}-devel = %{epoch}:%{version}-%{release}
135
136%description static
137Static iptables libraries.
138
139%description devel -l pl.UTF-8
140Biblioteki statyczne iptables.
141
0e79507b
PS
142%package init
143Summary: Iptables init (RedHat style)
e8c37038 144Summary(pl.UTF-8): Iptables init (w stylu RedHata)
0e79507b 145Group: Networking/Admin
c322322e 146Requires(post,preun): /sbin/chkconfig
c8cf446f 147Requires: %{name}
c7a0fe01 148Requires: rc-scripts
0e79507b 149Obsoletes: firewall-init
52d89633 150Obsoletes: firewall-init-ipchains
e51026eb 151Obsoletes: iptables24-init
0e79507b
PS
152
153%description init
154Iptables-init is meant to provide an alternate way than firewall-init
155to start and stop packet filtering through iptables(8).
156
30bd20eb
JR
157%description init -l pl.UTF-8
158Iptables-init ma na celu udostępnienie alternatywnego w stosunku do
159firewall-init sposobu włączania i wyłączania filtrów IP jądra poprzez
0e79507b
PS
160iptables(8).
161
162%prep
78e5603d 163%setup -q -a1
65ffbe22
JR
164%patch0 -p1
165%patch1 -p1
75dcc0ed 166%patch2 -p1
67f76361 167#%patch3 -p0
65ffbe22
JR
168%patch4 -p1
169%patch5 -p1
2af8cb4e 170%patch6 -p1
03db53c9 171%patch7 -p1
b64f0e10 172%if %{with vserver}
83394586 173#patch8 -p1
cd94f0ed 174%patch11 -p1
b64f0e10 175%endif
dfc0441a 176%if %{with batch}
1fda6533 177%patch9 -p1
dfc0441a 178%endif
67f76361 179#%patch10 -p1
b125ed09 180
65ffbe22 181#patch999 -p1
6c13dbc4 182
0e79507b 183chmod 755 extensions/.*-test*
0e79507b
PS
184
185%build
78e5603d 186%{__libtoolize}
6dc7a739 187%{__aclocal}
03ece50a 188%{__autoconf}
6dc7a739 189%{__automake}
190%configure \
191 --with-kbuild=%{_kernelsrcdir} \
192 --with-ksource=%{_kernelsrcdir} \
193 --enable-devel \
194 --enable-libipq \
195 --enable-shared
196
197%{__make} -j1 all \
d10aa82c 198 CC="%{__cc}" \
6dc7a739 199 CFLAGS="%{rpmcflags} -D%{!?debug:N}DEBUG" \
d10aa82c 200 KERNEL_DIR="%{_kernelsrcdir}" \
cc6a4371 201 LIBDIR="%{_libdir}" \
c3529b1b 202 DO_SELINUX=1 \
cc6a4371 203 LDLIBS="-ldl"
0e79507b 204
199610f3 205%if %{with doc}
2958d7d0 206%{__make} -j1 -C iptables-howtos
199610f3
PG
207sed -i 's:$(HTML_HOWTOS)::g; s:$(PSUS_HOWTOS)::g' iptables-howtos/Makefile
208%endif
0e79507b 209
2b102cd4
JR
210# Make a library, needed for OpenVCP
211ar rcs libiptables.a iptables.o
212ar rcs libip6tables.a ip6tables.o
213
0e79507b
PS
214%install
215rm -rf $RPM_BUILD_ROOT
801695eb 216install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_includedir},%{_libdir},%{_mandir}/man3}
0e79507b 217
6dc7a739 218%{__make} install \
0e79507b
PS
219 DESTDIR=$RPM_BUILD_ROOT \
220 BINDIR=%{_sbindir} \
221 MANDIR=%{_mandir} \
222 LIBDIR=%{_libdir}
223
44e59a50 224# install library needed for collectd:
67f76361 225#install libiptc/libiptc.a $RPM_BUILD_ROOT%{_libdir}
44e59a50 226
801695eb
JB
227install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
228install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name6}
c322322e 229
0e79507b
PS
230%clean
231rm -rf $RPM_BUILD_ROOT
232
dfc0441a
AM
233%post libs -p /sbin/ldconfig
234%postun libs -p /sbin/ldconfig
235
0e79507b
PS
236%post init
237/sbin/chkconfig --add %{name}
740f0f65 238/sbin/chkconfig --add %{name6}
0e79507b
PS
239
240%preun init
241if [ "$1" = "0" ]; then
242 /sbin/chkconfig --del %{name}
740f0f65 243 /sbin/chkconfig --del %{name6}
0e79507b
PS
244fi
245
246%files
247%defattr(644,root,root,755)
0e79507b 248%{?with_doc:%doc iptables-howtos/{NAT,networking-concepts,packet-filtering}-HOWTO*}
6dc7a739 249%attr(755,root,root) %{_bindir}/iptables-xml
c7a0fe01 250%attr(755,root,root) %{_sbindir}/iptables
75dcc0ed 251%attr(755,root,root) %{_sbindir}/iptables-multi
c7a0fe01
ER
252%attr(755,root,root) %{_sbindir}/iptables-restore
253%attr(755,root,root) %{_sbindir}/iptables-save
c7a0fe01 254%attr(755,root,root) %{_sbindir}/ip6tables
75dcc0ed 255%attr(755,root,root) %{_sbindir}/ip6tables-multi
c7a0fe01
ER
256%attr(755,root,root) %{_sbindir}/ip6tables-restore
257%attr(755,root,root) %{_sbindir}/ip6tables-save
dfc0441a
AM
258%if %{with batch}
259%attr(755,root,root) %{_sbindir}/iptables-batch
260%attr(755,root,root) %{_sbindir}/ip6tables-batch
261%endif
6dc7a739 262%dir %{_libdir}/xtables
1d5bfdc5 263%if %{with dist_kernel}
6dc7a739 264%attr(755,root,root) %{_libdir}/xtables/libip6t_ah.so
265%attr(755,root,root) %{_libdir}/xtables/libip6t_dst.so
266%attr(755,root,root) %{_libdir}/xtables/libip6t_eui64.so
267%attr(755,root,root) %{_libdir}/xtables/libip6t_frag.so
268%attr(755,root,root) %{_libdir}/xtables/libip6t_hbh.so
269%attr(755,root,root) %{_libdir}/xtables/libip6t_hl.so
270%attr(755,root,root) %{_libdir}/xtables/libip6t_HL.so
271%attr(755,root,root) %{_libdir}/xtables/libip6t_icmp6.so
6dc7a739 272%attr(755,root,root) %{_libdir}/xtables/libip6t_ipv6header.so
273%attr(755,root,root) %{_libdir}/xtables/libip6t_LOG.so
274%attr(755,root,root) %{_libdir}/xtables/libip6t_mh.so
ab1d9cfc 275#%attr(755,root,root) %{_libdir}/xtables/libip6t_policy.so
6dc7a739 276%attr(755,root,root) %{_libdir}/xtables/libip6t_REJECT.so
277%attr(755,root,root) %{_libdir}/xtables/libip6t_ROUTE.so
278%attr(755,root,root) %{_libdir}/xtables/libip6t_rt.so
279%attr(755,root,root) %{_libdir}/xtables/libipt_account.so
280#attr(755,root,root) %{_libdir}/xtables/libipt_ACCOUNT.so
281%attr(755,root,root) %{_libdir}/xtables/libipt_addrtype.so
282%attr(755,root,root) %{_libdir}/xtables/libipt_ah.so
283%attr(755,root,root) %{_libdir}/xtables/libipt_CLUSTERIP.so
284%attr(755,root,root) %{_libdir}/xtables/libipt_DNAT.so
285%attr(755,root,root) %{_libdir}/xtables/libipt_ecn.so
286%attr(755,root,root) %{_libdir}/xtables/libipt_ECN.so
6dc7a739 287%attr(755,root,root) %{_libdir}/xtables/libipt_icmp.so
6dc7a739 288%attr(755,root,root) %{_libdir}/xtables/libipt_ipv4options.so
289%attr(755,root,root) %{_libdir}/xtables/libipt_IPV4OPTSSTRIP.so
290%attr(755,root,root) %{_libdir}/xtables/libipt_layer7.so
291%attr(755,root,root) %{_libdir}/xtables/libipt_LOG.so
292%attr(755,root,root) %{_libdir}/xtables/libipt_MASQUERADE.so
293%attr(755,root,root) %{_libdir}/xtables/libipt_MIRROR.so
294%attr(755,root,root) %{_libdir}/xtables/libipt_NETMAP.so
ab1d9cfc 295#%attr(755,root,root) %{_libdir}/xtables/libipt_policy.so
6dc7a739 296%attr(755,root,root) %{_libdir}/xtables/libipt_realm.so
6dc7a739 297%attr(755,root,root) %{_libdir}/xtables/libipt_REDIRECT.so
298%attr(755,root,root) %{_libdir}/xtables/libipt_REJECT.so
299%attr(755,root,root) %{_libdir}/xtables/libipt_ROUTE.so
300%attr(755,root,root) %{_libdir}/xtables/libipt_rpc.so
301%attr(755,root,root) %{_libdir}/xtables/libipt_SAME.so
302%attr(755,root,root) %{_libdir}/xtables/libipt_set.so
303%attr(755,root,root) %{_libdir}/xtables/libipt_SET.so
304%attr(755,root,root) %{_libdir}/xtables/libipt_SNAT.so
78e5603d 305%attr(755,root,root) %{_libdir}/xtables/libipt_stealth.so
6dc7a739 306%attr(755,root,root) %{_libdir}/xtables/libipt_ttl.so
307%attr(755,root,root) %{_libdir}/xtables/libipt_TTL.so
308%attr(755,root,root) %{_libdir}/xtables/libipt_ULOG.so
309%attr(755,root,root) %{_libdir}/xtables/libipt_unclean.so
310%attr(755,root,root) %{_libdir}/xtables/libxt_CLASSIFY.so
ab1d9cfc 311%attr(755,root,root) %{_libdir}/xtables/libxt_cluster.so
6dc7a739 312%attr(755,root,root) %{_libdir}/xtables/libxt_comment.so
313%attr(755,root,root) %{_libdir}/xtables/libxt_connbytes.so
314%attr(755,root,root) %{_libdir}/xtables/libxt_connlimit.so
315%attr(755,root,root) %{_libdir}/xtables/libxt_connmark.so
316%attr(755,root,root) %{_libdir}/xtables/libxt_CONNMARK.so
317%attr(755,root,root) %{_libdir}/xtables/libxt_CONNSECMARK.so
318%attr(755,root,root) %{_libdir}/xtables/libxt_conntrack.so
319%attr(755,root,root) %{_libdir}/xtables/libxt_dccp.so
320%attr(755,root,root) %{_libdir}/xtables/libxt_dscp.so
321%attr(755,root,root) %{_libdir}/xtables/libxt_DSCP.so
322%attr(755,root,root) %{_libdir}/xtables/libxt_esp.so
323%attr(755,root,root) %{_libdir}/xtables/libxt_hashlimit.so
324%attr(755,root,root) %{_libdir}/xtables/libxt_helper.so
6479e41b 325%attr(755,root,root) %{_libdir}/xtables/libxt_IMQ.so
6dc7a739 326%attr(755,root,root) %{_libdir}/xtables/libxt_iprange.so
327%attr(755,root,root) %{_libdir}/xtables/libxt_length.so
328%attr(755,root,root) %{_libdir}/xtables/libxt_limit.so
329%attr(755,root,root) %{_libdir}/xtables/libxt_mac.so
330%attr(755,root,root) %{_libdir}/xtables/libxt_mark.so
331%attr(755,root,root) %{_libdir}/xtables/libxt_MARK.so
332%attr(755,root,root) %{_libdir}/xtables/libxt_multiport.so
333%attr(755,root,root) %{_libdir}/xtables/libxt_NFLOG.so
334%attr(755,root,root) %{_libdir}/xtables/libxt_NFQUEUE.so
335%attr(755,root,root) %{_libdir}/xtables/libxt_NOTRACK.so
336%attr(755,root,root) %{_libdir}/xtables/libxt_owner.so
337%attr(755,root,root) %{_libdir}/xtables/libxt_physdev.so
338%attr(755,root,root) %{_libdir}/xtables/libxt_pkttype.so
ab1d9cfc 339%attr(755,root,root) %{_libdir}/xtables/libxt_policy.so
67f76361 340%attr(755,root,root) %{_libdir}/xtables/libxt_recent.so
6dc7a739 341%attr(755,root,root) %{_libdir}/xtables/libxt_quota.so
75dcc0ed 342%attr(755,root,root) %{_libdir}/xtables/libxt_RATEEST.so
343%attr(755,root,root) %{_libdir}/xtables/libxt_rateest.so
6dc7a739 344%attr(755,root,root) %{_libdir}/xtables/libxt_sctp.so
345%attr(755,root,root) %{_libdir}/xtables/libxt_SECMARK.so
346%attr(755,root,root) %{_libdir}/xtables/libxt_socket.so
347%attr(755,root,root) %{_libdir}/xtables/libxt_standard.so
348%attr(755,root,root) %{_libdir}/xtables/libxt_state.so
349%attr(755,root,root) %{_libdir}/xtables/libxt_statistic.so
350%attr(755,root,root) %{_libdir}/xtables/libxt_string.so
351%attr(755,root,root) %{_libdir}/xtables/libxt_tcpmss.so
352%attr(755,root,root) %{_libdir}/xtables/libxt_TCPMSS.so
75dcc0ed 353%attr(755,root,root) %{_libdir}/xtables/libxt_TCPOPTSTRIP.so
6dc7a739 354%attr(755,root,root) %{_libdir}/xtables/libxt_tcp.so
355%attr(755,root,root) %{_libdir}/xtables/libxt_time.so
356%attr(755,root,root) %{_libdir}/xtables/libxt_tos.so
357%attr(755,root,root) %{_libdir}/xtables/libxt_TOS.so
358%attr(755,root,root) %{_libdir}/xtables/libxt_TPROXY.so
359%attr(755,root,root) %{_libdir}/xtables/libxt_TRACE.so
360%attr(755,root,root) %{_libdir}/xtables/libxt_u32.so
361%attr(755,root,root) %{_libdir}/xtables/libxt_udp.so
1d5bfdc5 362%else
6dc7a739 363%attr(755,root,root) %{_libdir}/xtables/*.so
1d5bfdc5 364%endif
0e79507b
PS
365%{_mandir}/man8/*
366
dfc0441a
AM
367%files libs
368%defattr(644,root,root,755)
532bfe8d 369%attr(755,root,root) %ghost %{_libdir}/libiptc.so.0
dfc0441a 370%attr(755,root,root) %{_libdir}/libiptc.so.*.*
167b9b22 371%attr(755,root,root) %ghost %{_libdir}/libxtables.so.2
dfc0441a
AM
372%attr(755,root,root) %{_libdir}/libxtables.so.*.*
373
0e79507b
PS
374%files devel
375%defattr(644,root,root,755)
376%{?with_doc:%doc iptables-howtos/netfilter-hacking-HOWTO*}
dfc0441a
AM
377%attr(755,root,root) %{_libdir}/lib*.so
378%{_libdir}/lib*.la
85065c23 379%{_includedir}/*.h
dfc0441a
AM
380%{_includedir}/libiptc
381%{_pkgconfigdir}/*.pc
0e79507b
PS
382%{_mandir}/man3/*
383
dfc0441a
AM
384%files static
385%defattr(644,root,root,755)
386%{_libdir}/lib*.a
387
0e79507b
PS
388%files init
389%defattr(644,root,root,755)
c7a0fe01
ER
390%attr(754,root,root) /etc/rc.d/init.d/iptables
391%attr(754,root,root) /etc/rc.d/init.d/ip6tables
This page took 0.106999 seconds and 4 git commands to generate.