2013-10-21 05:25:52 +02:00
|
|
|
#
|
|
|
|
# spec file for package nftables
|
|
|
|
#
|
2024-01-04 11:22:47 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2013-10-21 05:25:52 +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.
|
|
|
|
|
2019-08-19 14:41:58 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2013-10-21 05:25:52 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2024-01-06 15:46:14 +01:00
|
|
|
# configure subpackage rewriter for the python3XX-nftables bindings
|
|
|
|
%define python_subpackage_only 1
|
|
|
|
# check py/src/nftable.py:NFTABLES_VERSION
|
|
|
|
%define pyversion 0.1
|
|
|
|
|
2013-10-21 05:25:52 +02:00
|
|
|
Name: nftables
|
2024-10-03 09:03:32 +02:00
|
|
|
Version: 1.1.1
|
2013-10-21 05:25:52 +02:00
|
|
|
Release: 0
|
2014-08-06 07:19:55 +02:00
|
|
|
Summary: Userspace utility to access the nf_tables packet filter
|
2018-03-04 00:21:21 +01:00
|
|
|
License: GPL-2.0-only
|
2013-10-21 05:25:52 +02:00
|
|
|
Group: Productivity/Networking/Security
|
2019-08-19 14:41:58 +02:00
|
|
|
URL: https://netfilter.org/projects/nftables/
|
2017-10-13 10:47:37 +02:00
|
|
|
#Git-Clone: git://git.netfilter.org/nftables
|
2022-12-22 00:55:34 +01:00
|
|
|
Source: http://ftp.netfilter.org/pub/%name/%name-%version.tar.xz
|
|
|
|
Source2: http://ftp.netfilter.org/pub/%name/%name-%version.tar.xz.sig
|
2019-12-09 10:49:19 +01:00
|
|
|
Source3: %name.keyring
|
2024-01-06 15:46:14 +01:00
|
|
|
Source4: nftables.rpmlintrc
|
2023-10-20 03:20:25 +02:00
|
|
|
BuildRequires: %{python_module pip}
|
2024-01-04 11:22:47 +01:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2023-10-20 03:20:25 +02:00
|
|
|
BuildRequires: %{python_module wheel}
|
2019-08-19 14:41:58 +02:00
|
|
|
BuildRequires: asciidoc
|
2014-01-13 10:05:59 +01:00
|
|
|
BuildRequires: bison
|
2023-10-20 03:20:25 +02:00
|
|
|
BuildRequires: fdupes
|
2014-01-13 10:05:59 +01:00
|
|
|
BuildRequires: flex
|
|
|
|
BuildRequires: gmp-devel
|
2022-02-22 05:49:29 +01:00
|
|
|
BuildRequires: libtool
|
2018-01-23 10:31:36 +01:00
|
|
|
BuildRequires: pkg-config >= 0.21
|
2023-10-20 03:20:25 +02:00
|
|
|
BuildRequires: python-rpm-macros
|
2019-12-09 10:40:03 +01:00
|
|
|
BuildRequires: pkgconfig(jansson)
|
2022-02-22 05:49:29 +01:00
|
|
|
BuildRequires: pkgconfig(libedit)
|
2021-01-15 23:33:53 +01:00
|
|
|
BuildRequires: pkgconfig(libmnl) >= 1.0.4
|
2024-10-03 09:03:32 +02:00
|
|
|
BuildRequires: pkgconfig(libnftnl) >= 1.2.8
|
2018-06-09 09:29:57 +02:00
|
|
|
BuildRequires: pkgconfig(xtables) >= 1.6.1
|
2023-10-20 03:20:25 +02:00
|
|
|
%python_subpackages
|
2013-10-21 05:25:52 +02:00
|
|
|
|
|
|
|
%description
|
2018-05-02 08:15:36 +02:00
|
|
|
nf_tables is a firewalling mechanism in the Linux kernel, running
|
2019-08-19 14:41:58 +02:00
|
|
|
independently of and parallel to ip_tables, ip6_tables,
|
2018-03-04 00:21:21 +01:00
|
|
|
arp_tables and ebtables. nftables is the corresponsing userspace
|
|
|
|
frontend.
|
2015-05-24 01:09:40 +02:00
|
|
|
|
2019-08-19 14:41:58 +02:00
|
|
|
The nftables frontend features support for sets and dictionaries of arbitrary
|
|
|
|
types, meta data types, atomic incremental and full ruleset updates, and,
|
|
|
|
similar to iptables, support for different protocols, access to connection
|
|
|
|
tracking and NAT and logging.
|
2018-05-11 09:31:21 +02:00
|
|
|
|
2019-08-19 14:41:58 +02:00
|
|
|
%package -n libnftables1
|
2018-05-11 09:31:21 +02:00
|
|
|
Summary: nftables firewalling command interface
|
|
|
|
Group: System/Libraries
|
|
|
|
|
2019-08-19 14:41:58 +02:00
|
|
|
%description -n libnftables1
|
2018-05-11 09:31:21 +02:00
|
|
|
libnftables is the nftables command line interface placed into a
|
|
|
|
library.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for the nftables command line interface
|
|
|
|
Group: Development/Libraries/C and C++
|
2019-08-19 14:41:58 +02:00
|
|
|
Requires: libnftables1 = %version
|
2018-05-11 09:31:21 +02:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
libnftables is the nftables command line interface placed into a
|
|
|
|
library.
|
|
|
|
|
|
|
|
This package contains the header files for the library.
|
2013-10-21 05:25:52 +02:00
|
|
|
|
2023-10-20 04:06:23 +02:00
|
|
|
%package -n python-nftables
|
|
|
|
Summary: Python bindings for nftables
|
|
|
|
Group: Development/Languages/Python
|
|
|
|
# uses dlopen
|
|
|
|
Requires: libnftables1
|
2024-01-06 15:46:14 +01:00
|
|
|
BuildArch: noarch
|
2023-10-20 04:06:23 +02:00
|
|
|
|
|
|
|
%description -n python-nftables
|
|
|
|
Python bindings for nftables
|
|
|
|
|
2013-10-21 05:25:52 +02:00
|
|
|
%prep
|
2020-05-07 13:41:38 +02:00
|
|
|
%autosetup -p1
|
2024-01-06 15:46:14 +01:00
|
|
|
# remove unused shebang
|
|
|
|
sed -i '1{/bin/d}' py/src/nftables.py
|
2013-10-21 05:25:52 +02:00
|
|
|
|
|
|
|
%build
|
2022-02-22 05:49:29 +01:00
|
|
|
autoreconf -fi
|
2014-08-06 08:44:12 +02:00
|
|
|
mkdir bin
|
|
|
|
ln -s "%_bindir/docbook-to-man" bin/docbook2x-man
|
|
|
|
export PATH="$PATH:$PWD/bin"
|
2014-12-16 02:29:20 +01:00
|
|
|
mkdir obj
|
|
|
|
pushd obj/
|
|
|
|
%define _configure ../configure
|
2018-05-11 09:31:21 +02:00
|
|
|
%configure --disable-silent-rules --disable-static --docdir="%_docdir/%name" \
|
2019-12-09 10:40:03 +01:00
|
|
|
--includedir="%_includedir/%name" --with-json \
|
|
|
|
--enable-python --with-python-bin="$(which python3)"
|
2020-10-27 13:10:30 +01:00
|
|
|
%make_build
|
2014-12-16 02:29:20 +01:00
|
|
|
popd
|
2023-10-20 03:20:25 +02:00
|
|
|
pushd py
|
|
|
|
%pyproject_wheel
|
|
|
|
popd
|
2013-10-21 05:25:52 +02:00
|
|
|
|
|
|
|
%install
|
2014-06-27 19:08:44 +02:00
|
|
|
b="%buildroot"
|
2014-12-16 02:29:20 +01:00
|
|
|
%make_install -C obj
|
2023-10-20 03:20:25 +02:00
|
|
|
pushd py
|
|
|
|
%pyproject_install
|
|
|
|
%python_expand %fdupes %buildroot/%{$python_sitelib}
|
|
|
|
popd
|
2018-05-02 08:15:36 +02:00
|
|
|
rm -f "%buildroot/%_libdir"/*.la
|
2018-05-11 09:31:21 +02:00
|
|
|
mkdir -p "$b/%_docdir/%name/examples"
|
2021-05-26 01:36:22 +02:00
|
|
|
mv -v "$b/%_datadir/nftables"/*.nft "$b/%_docdir/%name/examples/"
|
2018-05-02 08:15:36 +02:00
|
|
|
|
2024-10-03 09:03:32 +02:00
|
|
|
%ldconfig_scriptlets -n libnftables1
|
2013-10-21 05:25:52 +02:00
|
|
|
|
2024-01-06 15:46:14 +01:00
|
|
|
%files
|
2018-05-11 09:31:21 +02:00
|
|
|
%license COPYING
|
2021-05-26 01:36:22 +02:00
|
|
|
%_sysconfdir/nftables/
|
2014-01-13 10:07:15 +01:00
|
|
|
%_sbindir/nft
|
2019-08-19 14:41:58 +02:00
|
|
|
%_mandir/man5/*.5*
|
2014-08-06 08:44:12 +02:00
|
|
|
%_mandir/man8/nft*
|
2018-05-11 09:31:21 +02:00
|
|
|
%_docdir/%name/
|
|
|
|
|
2019-08-19 14:41:58 +02:00
|
|
|
%files -n libnftables1
|
|
|
|
%_libdir/libnftables.so.1*
|
2018-05-11 09:31:21 +02:00
|
|
|
|
2024-01-06 15:46:14 +01:00
|
|
|
%files devel
|
2018-05-11 09:31:21 +02:00
|
|
|
%_includedir/%name/
|
|
|
|
%_libdir/libnftables.so
|
|
|
|
%_libdir/pkgconfig/*.pc
|
2019-08-19 14:41:58 +02:00
|
|
|
%_mandir/man3/*.3*
|
2013-10-21 05:25:52 +02:00
|
|
|
|
2024-01-06 15:46:14 +01:00
|
|
|
%files %{python_files nftables}
|
2024-10-03 09:03:32 +02:00
|
|
|
%python_sitelib/nftables
|
|
|
|
%python_sitelib/nftables-%pyversion.dist-info
|
2019-12-09 10:40:03 +01:00
|
|
|
|
2013-10-21 05:25:52 +02:00
|
|
|
%changelog
|