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
|
|
|
#
|
2018-02-03 15:28:48 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX 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
|
2018-02-03 15:28:48 +01:00
|
|
|
Version: 1.6.2
|
2012-03-27 15:48:47 +02:00
|
|
|
Release: 0
|
2018-02-03 15:28:48 +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/
|
2018-02-03 15:28:48 +01:00
|
|
|
#Git-Clone: git://git.netfilter.org/iptables
|
2015-12-18 21:58:55 +01:00
|
|
|
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
|
2017-06-29 13:37:40 +02:00
|
|
|
Patch5: iptables-batch-lock.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-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
|
2015-11-23 13:07:42 +01:00
|
|
|
#git#BuildRequires: autoconf, automake >= 1.10
|
|
|
|
BuildRequires: bison
|
|
|
|
BuildRequires: flex >= 2.5.33
|
|
|
|
BuildRequires: libtool
|
|
|
|
BuildRequires: pkg-config >= 0.21
|
|
|
|
BuildRequires: xz
|
|
|
|
BuildRequires: pkgconfig(libmnl) >= 1.0
|
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
|
2015-11-23 13:07:42 +01:00
|
|
|
BuildRequires: pkgconfig(libnftnl) >= 1.0.5
|
|
|
|
Requires: xtables-plugins = %version-%release
|
2007-01-04 01:56:28 +01:00
|
|
|
|
|
|
|
%description
|
2015-11-23 13:07:42 +01:00
|
|
|
iptables is used to set up, maintain, and inspect the rule tables of
|
|
|
|
the classic "ip6_tables" and "ip_tables" packet filters in the Linux
|
|
|
|
kernel.
|
|
|
|
|
|
|
|
%package nft
|
2018-02-03 15:28:48 +01:00
|
|
|
Summary: nft packet filter administration utilties in the style of Xtables
|
2015-11-23 13:07:42 +01:00
|
|
|
Group: Productivity/Networking/Security
|
|
|
|
Requires: xtables-plugins = %version-%release
|
|
|
|
Conflicts: ebtables
|
|
|
|
|
|
|
|
%description nft
|
|
|
|
The programs shipped in this subpackage behave like iptables on the
|
2018-02-03 15:28:48 +01:00
|
|
|
command line, but instead edits the rules of the nft packet filter in
|
2015-11-23 13:07:42 +01:00
|
|
|
the Linux kernel. Linux kernel 4.2 or newer is recommended to exploit
|
2018-02-03 15:28:48 +01:00
|
|
|
the features.
|
2013-03-06 00:25:19 +01:00
|
|
|
|
|
|
|
%package -n xtables-plugins
|
2018-02-03 15:28:48 +01:00
|
|
|
Summary: Match and target extension plugins for iptables
|
2013-03-06 00:25:19 +01:00
|
|
|
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
|
|
|
|
2015-11-23 13:07:42 +01:00
|
|
|
%package -n libipq0
|
2011-12-31 23:59:05 +01:00
|
|
|
Summary: Library to interface with the (old) ip_queue kernel mechanism
|
|
|
|
Group: System/Libraries
|
|
|
|
|
2015-11-23 13:07:42 +01:00
|
|
|
%description -n libipq0
|
2011-12-31 23:59:05 +01:00
|
|
|
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++
|
2015-11-23 13:07:42 +01:00
|
|
|
Requires: libipq0 = %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!
|
|
|
|
|
2015-11-23 13:07:42 +01:00
|
|
|
%package -n libiptc0
|
2011-12-31 23:59:05 +01:00
|
|
|
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
|
|
|
|
2015-11-23 13:07:42 +01:00
|
|
|
%description -n libiptc0
|
2011-12-31 23:59:05 +01:00
|
|
|
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++
|
2015-11-23 13:07:42 +01:00
|
|
|
Requires: libiptc0 = %version
|
2011-12-31 23:59:05 +01:00
|
|
|
|
|
|
|
%description -n libiptc-devel
|
|
|
|
libiptc ("iptables cache") is used to retrieve from the kernel, parse,
|
|
|
|
construct, and load new rulesets into the kernel.
|
|
|
|
|
2017-01-28 10:17:04 +01:00
|
|
|
%package -n libxtables12
|
2011-12-31 23:59:05 +01:00
|
|
|
Summary: iptables extension interface
|
|
|
|
Group: System/Libraries
|
|
|
|
|
2017-01-28 10:17:04 +01:00
|
|
|
%description -n libxtables12
|
2011-12-31 23:59:05 +01:00
|
|
|
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
|
2018-02-03 15:28:48 +01:00
|
|
|
Summary: Headers and manpages for iptables
|
2011-12-31 23:59:05 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2017-01-28 10:17:04 +01:00
|
|
|
Requires: libxtables12 = %version
|
2011-12-31 23:59:05 +01:00
|
|
|
|
|
|
|
%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
|
2015-12-18 21:58:55 +01:00
|
|
|
%setup -q
|
2017-06-29 13:37:40 +02:00
|
|
|
%patch -P 3 -P 4 -P 5 -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
|
2018-02-03 15:28:48 +01:00
|
|
|
./autogen.sh
|
2010-02-23 01:18:57 +01:00
|
|
|
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
|
2015-11-23 13:07:42 +01:00
|
|
|
%configure --includedir="%_includedir/%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/
|
2018-02-03 15:28:48 +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
|
|
|
|
2015-11-23 13:07:42 +01:00
|
|
|
%post -n libipq0 -p /sbin/ldconfig
|
|
|
|
%postun -n libipq0 -p /sbin/ldconfig
|
|
|
|
%post -n libiptc0 -p /sbin/ldconfig
|
|
|
|
%postun -n libiptc0 -p /sbin/ldconfig
|
2017-01-28 10:17:04 +01:00
|
|
|
%post -n libxtables12 -p /sbin/ldconfig
|
|
|
|
%postun -n libxtables12 -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
|
|
|
|
2015-11-23 13:07:42 +01:00
|
|
|
%files nft
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%_sysconfdir/ethertypes
|
|
|
|
%_sbindir/*-compat*
|
2017-01-28 10:17:04 +01:00
|
|
|
%_sbindir/*-translate*
|
2015-11-23 13:07:42 +01:00
|
|
|
|
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
|
2018-02-03 15:28:48 +01:00
|
|
|
%_mandir/man8/nfnl_osf.8*
|
2013-06-01 04:42:31 +02:00
|
|
|
%_datadir/xtables/
|
2007-01-04 01:56:28 +01:00
|
|
|
|
2015-11-23 13:07:42 +01:00
|
|
|
%files -n libipq0
|
2011-12-31 23:59:05 +01:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%_libdir/libipq.so.0*
|
|
|
|
|
|
|
|
%files -n libipq-devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc %_mandir/man3/libipq*
|
|
|
|
%doc %_mandir/man3/ipq*
|
2015-11-23 13:07:42 +01:00
|
|
|
%dir %_includedir/%name/
|
|
|
|
%_includedir/%name/libipq*
|
2011-12-31 23:59:05 +01:00
|
|
|
%_libdir/libipq.so
|
|
|
|
%_libdir/pkgconfig/libipq.pc
|
|
|
|
|
2015-11-23 13:07:42 +01:00
|
|
|
%files -n libiptc0
|
2011-12-31 23:59:05 +01:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%_libdir/libiptc.so.0*
|
|
|
|
%_libdir/libip4tc.so.0*
|
|
|
|
%_libdir/libip6tc.so.0*
|
|
|
|
|
|
|
|
%files -n libiptc-devel
|
|
|
|
%defattr(-,root,root)
|
2015-11-23 13:07:42 +01:00
|
|
|
%dir %_includedir/%name/
|
|
|
|
%_includedir/%name/libiptc*
|
2011-12-31 23:59:05 +01:00
|
|
|
%_libdir/libip*tc.so
|
|
|
|
%_libdir/pkgconfig/libip*tc.pc
|
|
|
|
|
2017-01-28 10:17:04 +01:00
|
|
|
%files -n libxtables12
|
2007-01-04 01:56:28 +01:00
|
|
|
%defattr(-,root,root)
|
2017-01-28 10:17:04 +01:00
|
|
|
%_libdir/libxtables.so.12*
|
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)
|
2015-11-23 13:07:42 +01:00
|
|
|
%dir %_includedir/%name/
|
|
|
|
%_includedir/%name/xtables.h
|
|
|
|
%_includedir/%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
|