2007-01-04 01:56:28 +01:00
|
|
|
#
|
2011-05-31 13:02:21 +02:00
|
|
|
# spec file for package iptables
|
2007-01-04 01:56:28 +01:00
|
|
|
#
|
2014-01-09 12:22:59 +01:00
|
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-04 01:56:28 +01:00
|
|
|
#
|
2008-09-13 02:35:11 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-04 01:56:28 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2011-12-31 23:59:05 +01:00
|
|
|
|
2007-01-04 01:56:28 +01:00
|
|
|
Name: iptables
|
2011-12-31 23:59:05 +01:00
|
|
|
%define lname_ipq libipq0
|
|
|
|
%define lname_iptc libiptc0
|
2013-03-06 00:25:19 +01:00
|
|
|
%define lname_xt libxtables10
|
2013-11-23 05:39:53 +01:00
|
|
|
Version: 1.4.21
|
2012-03-27 15:48:47 +02:00
|
|
|
Release: 0
|
2011-12-31 23:59:05 +01:00
|
|
|
Summary: IP Packet Filter Administration utilities
|
2013-03-20 09:25:08 +01:00
|
|
|
License: GPL-2.0 and Artistic-2.0
|
2011-12-28 11:12:23 +01:00
|
|
|
Group: Productivity/Networking/Security
|
2013-03-06 00:25:19 +01:00
|
|
|
Url: http://netfilter.org/projects/iptables/
|
2012-12-21 02:47:55 +01:00
|
|
|
|
|
|
|
#Freecode-URL: http://freecode.com/projects/iptables/
|
2010-03-07 10:56:32 +01:00
|
|
|
#Git-Web: http://git.netfilter.org/
|
|
|
|
#Git-Clone: git://git.netfilter.org/iptables
|
2012-10-08 15:30:00 +02:00
|
|
|
#DL-URL: http://netfilter.org/projects/iptables/files/
|
|
|
|
Source: http://netfilter.org/projects/iptables/files/%name-%version.tar.bz2
|
|
|
|
Source2: http://netfilter.org/projects/iptables/files/%name-%version.tar.bz2.sig
|
2012-12-10 15:22:27 +01:00
|
|
|
Source3: %name.keyring
|
2013-03-06 00:25:19 +01:00
|
|
|
Patch3: iptables-batch.patch
|
|
|
|
Patch4: iptables-apply-mktemp-fix.patch
|
2012-12-10 15:22:27 +01:00
|
|
|
|
2011-07-26 08:58:08 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2011-08-01 21:30:40 +02:00
|
|
|
%if 0%{?fedora_version} || 0%{?centos_version}
|
2011-09-05 16:32:05 +02:00
|
|
|
BuildRequires: sgml-common
|
2011-08-01 20:28:45 +02:00
|
|
|
%endif
|
2012-05-26 21:42:02 +02:00
|
|
|
#git#BuildRequires: autoconf, automake >= 1.10
|
2012-03-27 15:48:47 +02:00
|
|
|
BuildRequires: libtool
|
|
|
|
BuildRequires: pkgconfig >= 0.21
|
2012-01-20 19:07:31 +01:00
|
|
|
%if 0%{?suse_version}
|
2012-03-27 15:48:47 +02:00
|
|
|
BuildRequires: fdupes
|
2012-06-30 15:40:28 +02:00
|
|
|
%endif
|
2014-01-09 13:46:18 +01:00
|
|
|
%if 0%{?suse_version} >= 1140 || 0%{?fedora_version}
|
2013-10-01 02:26:03 +02:00
|
|
|
BuildRequires: pkgconfig(libnetfilter_conntrack) >= 1.0.4
|
2012-03-27 15:48:47 +02:00
|
|
|
BuildRequires: pkgconfig(libnfnetlink) >= 1.0.0
|
2012-01-20 19:07:31 +01:00
|
|
|
%endif
|
2014-01-09 12:23:33 +01:00
|
|
|
%if (0%{?suse_version} && 0%{?suse_version} <= 1110) || 0%{?centos_version} || 0%{?redhat_version}
|
2014-01-09 12:22:59 +01:00
|
|
|
BuildRequires: libnetfilter_conntrack-devel >= 1.0.4
|
2012-01-20 19:07:31 +01:00
|
|
|
BuildRequires: libnfnetlink-devel >= 1.0.0
|
|
|
|
%endif
|
2013-03-06 00:25:19 +01:00
|
|
|
Requires: xtables-plugins = %version
|
2007-01-04 01:56:28 +01:00
|
|
|
|
|
|
|
%description
|
2011-12-31 23:59:05 +01:00
|
|
|
iptables is used to set up, maintain, and inspect the tables of IP
|
2007-01-04 01:56:28 +01:00
|
|
|
packet filter rules in the Linux kernel. This version requires kernel
|
2013-03-06 00:25:19 +01:00
|
|
|
3.0 or newer.
|
|
|
|
|
|
|
|
%package -n xtables-plugins
|
|
|
|
Summary: Match and Target Extension plugins for iptables
|
|
|
|
Group: Productivity/Networking/Security
|
|
|
|
Conflicts: iptables < 1.4.18
|
|
|
|
|
|
|
|
%description -n xtables-plugins
|
|
|
|
Match and Target Extension plugins for iptables.
|
2007-01-04 01:56:28 +01:00
|
|
|
|
2011-12-31 23:59:05 +01:00
|
|
|
%package -n %lname_ipq
|
|
|
|
Summary: Library to interface with the (old) ip_queue kernel mechanism
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n %lname_ipq
|
|
|
|
The Netfilter project provides a mechanism (ip_queue) for passing
|
|
|
|
packets out of the stack for queueing to userspace, then receiving
|
|
|
|
these packets back into the kernel with a verdict specifying what to
|
|
|
|
do with the packets (such as ACCEPT or DROP). These packets may also
|
|
|
|
be modified in userspace prior to reinjection back into the kernel.
|
|
|
|
|
|
|
|
ip_queue/libipq is obsoleted by nf_queue/libnetfilter_queue!
|
|
|
|
|
|
|
|
%package -n libipq-devel
|
|
|
|
Summary: Development files for the ip_queue kernel mechanism
|
2007-01-04 01:56:28 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2011-12-31 23:59:05 +01:00
|
|
|
Requires: %lname_ipq = %version
|
2007-01-04 01:56:28 +01:00
|
|
|
|
2011-12-31 23:59:05 +01:00
|
|
|
%description -n libipq-devel
|
|
|
|
The Netfilter project provides a mechanism (ip_queue) for passing
|
|
|
|
packets out of the stack for queueing to userspace, then receiving
|
|
|
|
these packets back into the kernel with a verdict specifying what to
|
|
|
|
do with the packets (such as ACCEPT or DROP). These packets may also
|
|
|
|
be modified in userspace prior to reinjection back into the kernel.
|
2007-01-04 01:56:28 +01:00
|
|
|
|
2011-12-31 23:59:05 +01:00
|
|
|
ip_queue/libipq is obsoleted by nf_queue/libnetfilter_queue!
|
|
|
|
|
|
|
|
%package -n %lname_iptc
|
|
|
|
Summary: Library for low-level ruleset generation and parsing
|
2011-09-05 16:32:05 +02:00
|
|
|
Group: System/Libraries
|
2011-09-02 12:34:59 +02:00
|
|
|
|
2011-12-31 23:59:05 +01:00
|
|
|
%description -n %lname_iptc
|
|
|
|
libiptc ("iptables cache") is used to retrieve from the kernel, parse,
|
|
|
|
construct, and load new rulesets into the kernel.
|
|
|
|
|
|
|
|
%package -n libiptc-devel
|
|
|
|
Summary: Development files for libiptc, a packet filter ruleset library
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %lname_iptc = %version
|
|
|
|
|
|
|
|
%description -n libiptc-devel
|
|
|
|
libiptc ("iptables cache") is used to retrieve from the kernel, parse,
|
|
|
|
construct, and load new rulesets into the kernel.
|
|
|
|
|
|
|
|
%package -n %lname_xt
|
|
|
|
Summary: iptables extension interface
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n %lname_xt
|
|
|
|
This library contains all the iptables code shared between iptables,
|
|
|
|
ip6tables, their extensions, and for external integration for e.g.
|
2011-09-02 12:34:59 +02:00
|
|
|
iproute2's m_xt.
|
|
|
|
|
2011-12-31 23:59:05 +01:00
|
|
|
%package -n libxtables-devel
|
|
|
|
Summary: Libraries, Headers and Development Man Pages for iptables
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %lname_xt = %version
|
|
|
|
|
|
|
|
%description -n libxtables-devel
|
|
|
|
This library contains all the iptables code shared between iptables,
|
|
|
|
ip6tables, their extensions, and for external integration for e.g.
|
|
|
|
|
|
|
|
Link your extension (iptables plugins) with $(pkg-config xtables
|
|
|
|
--libs) and place the plugin in the directory given by $(pkg-config
|
|
|
|
xtables --variable=xtlibdir).
|
|
|
|
|
2007-01-04 01:56:28 +01:00
|
|
|
%prep
|
2011-07-22 15:17:36 +02:00
|
|
|
%setup -q
|
2013-06-01 04:42:31 +02:00
|
|
|
%patch -P 3 -P 4 -p1
|
2007-01-04 01:56:28 +01:00
|
|
|
|
|
|
|
%build
|
2012-11-15 15:17:09 +01:00
|
|
|
# We have the iptables-batch patch, so always regenerate.
|
|
|
|
if true || [ ! -e configure ]; then
|
2010-02-23 01:18:57 +01:00
|
|
|
./autogen.sh;
|
|
|
|
fi
|
2010-01-03 12:32:20 +01:00
|
|
|
# bnc#561793 - do not include unclean module in iptables manpage
|
2010-10-29 19:58:43 +02:00
|
|
|
rm -f extensions/libipt_unclean.man
|
2011-09-01 19:13:49 +02:00
|
|
|
# includedir is overriden on purpose to detect projects that
|
|
|
|
# fail to include libxtables_CFLAGS
|
2013-06-01 04:42:31 +02:00
|
|
|
%configure --includedir="%_includedir/pkg/%name" --enable-libipq
|
2010-02-23 01:18:57 +01:00
|
|
|
make %{?_smp_mflags}
|
2007-01-04 01:56:28 +01:00
|
|
|
|
|
|
|
%install
|
2011-05-30 02:02:46 +02:00
|
|
|
make DESTDIR=%buildroot install
|
2009-06-18 01:36:03 +02:00
|
|
|
# iptables-apply is not installed by upstream Makefile
|
2011-06-08 13:07:59 +02:00
|
|
|
install -m0755 iptables/iptables-apply %buildroot%_sbindir/
|
|
|
|
install -m0644 iptables/iptables-apply.8 %buildroot%_mandir/man8/
|
2011-12-31 23:59:05 +01:00
|
|
|
rm -f "%buildroot/%_libdir"/*.la;
|
2011-08-09 22:49:38 +02:00
|
|
|
%if 0%{?suse_version}
|
2013-03-06 00:25:19 +01:00
|
|
|
%fdupes %buildroot/%_prefix
|
2011-08-09 22:49:38 +02:00
|
|
|
%endif
|
2007-01-04 01:56:28 +01:00
|
|
|
|
2012-12-03 23:17:05 +01:00
|
|
|
%post -n %lname_ipq -p /sbin/ldconfig
|
2011-12-31 23:59:05 +01:00
|
|
|
%postun -n %lname_ipq -p /sbin/ldconfig
|
2012-12-03 23:17:05 +01:00
|
|
|
%post -n %lname_iptc -p /sbin/ldconfig
|
2011-12-31 23:59:05 +01:00
|
|
|
%postun -n %lname_iptc -p /sbin/ldconfig
|
2012-12-03 23:17:05 +01:00
|
|
|
%post -n %lname_xt -p /sbin/ldconfig
|
2011-12-31 23:59:05 +01:00
|
|
|
%postun -n %lname_xt -p /sbin/ldconfig
|
2011-09-02 12:34:59 +02:00
|
|
|
|
2007-01-04 01:56:28 +01:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2011-12-31 23:59:05 +01:00
|
|
|
%doc COPYING
|
2013-03-06 00:25:19 +01:00
|
|
|
%doc %_mandir/man1/ip*
|
|
|
|
%doc %_mandir/man8/ip*
|
2012-11-16 00:26:56 +01:00
|
|
|
%_bindir/iptables-xml
|
|
|
|
%_sbindir/iptables
|
|
|
|
%_sbindir/iptables-apply
|
|
|
|
%_sbindir/iptables-batch
|
|
|
|
%_sbindir/iptables-restore
|
|
|
|
%_sbindir/iptables-save
|
|
|
|
%_sbindir/ip6tables
|
|
|
|
%_sbindir/ip6tables-batch
|
|
|
|
%_sbindir/ip6tables-restore
|
|
|
|
%_sbindir/ip6tables-save
|
|
|
|
%_sbindir/xtables-multi
|
2013-03-06 00:25:19 +01:00
|
|
|
|
|
|
|
%files -n xtables-plugins
|
|
|
|
%defattr(-,root,root)
|
2013-06-01 04:42:31 +02:00
|
|
|
%_libdir/xtables/
|
2013-03-06 00:25:19 +01:00
|
|
|
%_sbindir/nfnl_osf
|
2013-06-01 04:42:31 +02:00
|
|
|
%_datadir/xtables/
|
2007-01-04 01:56:28 +01:00
|
|
|
|
2011-12-31 23:59:05 +01:00
|
|
|
%files -n %lname_ipq
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%_libdir/libipq.so.0*
|
|
|
|
|
|
|
|
%files -n libipq-devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc %_mandir/man3/libipq*
|
|
|
|
%doc %_mandir/man3/ipq*
|
2013-06-01 04:42:31 +02:00
|
|
|
%dir %_includedir/pkg/%name/
|
|
|
|
%_includedir/pkg/%name/libipq*
|
2011-12-31 23:59:05 +01:00
|
|
|
%_libdir/libipq.so
|
|
|
|
%_libdir/pkgconfig/libipq.pc
|
|
|
|
|
|
|
|
%files -n %lname_iptc
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%_libdir/libiptc.so.0*
|
|
|
|
%_libdir/libip4tc.so.0*
|
|
|
|
%_libdir/libip6tc.so.0*
|
|
|
|
|
|
|
|
%files -n libiptc-devel
|
|
|
|
%defattr(-,root,root)
|
2013-06-01 04:42:31 +02:00
|
|
|
%dir %_includedir/pkg/
|
|
|
|
%dir %_includedir/pkg/%name/
|
|
|
|
%_includedir/pkg/%name/libiptc*
|
2011-12-31 23:59:05 +01:00
|
|
|
%_libdir/libip*tc.so
|
|
|
|
%_libdir/pkgconfig/libip*tc.pc
|
|
|
|
|
|
|
|
%files -n %lname_xt
|
2007-01-04 01:56:28 +01:00
|
|
|
%defattr(-,root,root)
|
2013-03-06 00:25:19 +01:00
|
|
|
%_libdir/libxtables.so.10*
|
2007-01-04 01:56:28 +01:00
|
|
|
|
2011-12-31 23:59:05 +01:00
|
|
|
%files -n libxtables-devel
|
2011-09-02 12:34:59 +02:00
|
|
|
%defattr(-,root,root)
|
2013-06-01 04:42:31 +02:00
|
|
|
%dir %_includedir/pkg/
|
|
|
|
%dir %_includedir/pkg/%name/
|
|
|
|
%_includedir/pkg/%name/xtables.h
|
|
|
|
%_includedir/pkg/%name/xtables-version.h
|
2011-12-31 23:59:05 +01:00
|
|
|
%_libdir/libxtables.so
|
|
|
|
%_libdir/pkgconfig/xtables.pc
|
2011-09-02 12:34:59 +02:00
|
|
|
|
2007-03-15 01:40:35 +01:00
|
|
|
%changelog
|