Blame SPECS/nftables.spec

195495
Name:           nftables
195495
Version:        0.9.8
195495
Release:        12%{?dist}
195495
# Upstream released a 0.100 version, then 0.4. Need Epoch to get back on track.
195495
Epoch:          1
195495
Summary:        Netfilter Tables userspace utillites
195495
195495
License:        GPLv2
195495
URL:            https://netfilter.org/projects/nftables/
195495
Source0:        %{url}/files/%{name}-%{version}.tar.bz2
195495
Source1:        nftables.service
195495
Source2:        nftables.conf
195495
Source3:        main.nft
195495
Source4:        router.nft
195495
Source5:        nat.nft
195495
195495
Patch01: 0001-payload-check-icmp-dependency-before-removing-previo.patch
195495
Patch02: 0002-tests-add-icmp-6-test-where-dependency-should-be-lef.patch
195495
Patch03: 0003-main-fix-nft-help-output-fallout-from-719e4427.patch
195495
Patch04: 0004-parser_bison-Fix-for-implicit-declaration-of-isalnum.patch
195495
Patch05: 0005-parser_json-Fix-for-memleak-in-tcp-option-error-path.patch
195495
Patch06: 0006-evaluate-Mark-fall-through-case-in-str2hooknum.patch
195495
Patch07: 0007-json-Drop-pointless-assignment-in-exthdr_expr_json.patch
195495
Patch08: 0008-netlink-Avoid-memleak-in-error-path-of-netlink_delin.patch
195495
Patch09: 0009-netlink-Avoid-memleak-in-error-path-of-netlink_delin.patch
195495
Patch10: 0010-netlink-Avoid-memleak-in-error-path-of-netlink_delin.patch
195495
Patch11: 0011-netlink-Avoid-memleak-in-error-path-of-netlink_delin.patch
195495
Patch12: 0012-netlink_delinearize-Fix-suspicious-calloc-call.patch
195495
Patch13: 0013-rule-Fix-for-potential-off-by-one-in-cmd_add_loc.patch
195495
Patch14: 0014-src-add-xzalloc_array-and-use-it-to-allocate-the-exp.patch
195495
Patch15: 0015-json-init-parser-state-for-every-new-buffer-file.patch
195495
Patch16: 0016-segtree-Fix-segfault-when-restoring-a-huge-interval-.patch
195495
Patch17: 0017-tests-cover-baecd1cf2685-segtree-Fix-segfault-when-r.patch
195495
Patch18: 0018-doc-nft.8-Extend-monitor-description-by-trace.patch
195495
Patch19: 0019-tests-shell-NFT-needs-to-be-invoked-unquoted.patch
195495
Patch20: 0020-tests-shell-better-parameters-for-the-interval-stack.patch
195495
Patch21: 0021-json-Simplify-non-tcpopt-exthdr-printing-a-bit.patch
195495
Patch22: 0022-scanner-introduce-start-condition-stack.patch
195495
Patch23: 0023-scanner-sctp-Move-to-own-scope.patch
195495
Patch24: 0024-exthdr-Implement-SCTP-Chunk-matching.patch
195495
Patch25: 0025-include-missing-sctp_chunk.h-in-Makefile.am.patch
195495
Patch26: 0026-evaluate-fix-inet-nat-with-no-layer-3-info.patch
195495
Patch27: 0027-tests-py-add-dnat-to-port-without-defining-destinati.patch
195495
Patch28: 0028-evaluate-pick-data-element-byte-order-not-dtype-one.patch
195495
195495
BuildRequires: autoconf
195495
BuildRequires: automake
195495
BuildRequires: libtool
195495
BuildRequires: make
195495
BuildRequires:  gcc
195495
BuildRequires: flex
195495
BuildRequires: bison
195495
BuildRequires: libmnl-devel
195495
BuildRequires: gmp-devel
195495
BuildRequires: readline-devel
195495
BuildRequires: libnftnl-devel
195495
BuildRequires: systemd
195495
BuildRequires: asciidoc
195495
BuildRequires: iptables-devel
195495
BuildRequires: jansson-devel
195495
BuildRequires: python3-devel
195495
195495
%description
195495
Netfilter Tables userspace utilities.
195495
195495
%package        devel
195495
Summary:        Development library for nftables / libnftables
195495
Requires:       %{name} = %{epoch}:%{version}-%{release}
195495
Requires:       pkgconfig
195495
195495
%description devel
195495
Development tools and static libraries and header files for the libnftables library.
195495
195495
%package -n     python3-nftables
195495
Summary:        Python module providing an interface to libnftables
195495
Requires:       %{name} = %{epoch}:%{version}-%{release}
195495
%{?python_provide:%python_provide python3-nftables}
195495
195495
%description -n python3-nftables
195495
The nftables python module provides an interface to libnftables via ctypes.
195495
195495
%prep
195495
%autosetup -p1
195495
195495
%build
195495
autoreconf -fi
195495
rm -Rf autom4te*.cache config.h.in~
195495
%configure --disable-silent-rules --with-xtables --with-json \
195495
	--enable-python --with-python-bin=%{__python3}
195495
%make_build
195495
195495
%install
195495
%make_install
195495
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
195495
195495
# Don't ship static lib (for now at least)
195495
rm -f $RPM_BUILD_ROOT/%{_libdir}/libnftables.a
195495
195495
chmod 644 $RPM_BUILD_ROOT/%{_mandir}/man8/nft*
195495
195495
mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
195495
cp -a %{SOURCE1} $RPM_BUILD_ROOT/%{_unitdir}/
195495
195495
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig
195495
cp -a %{SOURCE2} $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/
195495
195495
rm $RPM_BUILD_ROOT/%{_sysconfdir}/nftables/*.nft
195495
cp %{SOURCE3} %{SOURCE4} %{SOURCE5} \
195495
	$RPM_BUILD_ROOT/%{_sysconfdir}/nftables/
195495
195495
find $RPM_BUILD_ROOT/%{_sysconfdir} \
195495
	\( -type d -exec chmod 0700 {} \; \) , \
195495
	\( -type f -exec chmod 0600 {} \; \)
195495
195495
# make nftables.py use the real library file name
195495
# to avoid nftables-devel package dependency
195495
sofile=$(readlink $RPM_BUILD_ROOT/%{_libdir}/libnftables.so)
195495
sed -i -e 's/\(sofile=\)".*"/\1"'$sofile'"/' \
195495
	$RPM_BUILD_ROOT/%{python3_sitelib}/nftables/nftables.py
195495
195495
%post
195495
%systemd_post nftables.service
195495
%ldconfig_post
195495
195495
%preun
195495
%systemd_preun nftables.service
195495
195495
%postun
195495
%systemd_postun_with_restart nftables.service
195495
%ldconfig_postun
195495
195495
%files
195495
%license COPYING
195495
%config(noreplace) %{_sysconfdir}/nftables/
195495
%config(noreplace) %{_sysconfdir}/sysconfig/nftables.conf
195495
%{_sbindir}/nft
195495
%{_libdir}/libnftables.so.*
195495
%{_mandir}/man5/libnftables-json.5*
195495
%{_mandir}/man8/nft*
195495
%{_unitdir}/nftables.service
195495
%{_docdir}/nftables/examples/*.nft
195495
195495
%files devel
195495
%{_libdir}/libnftables.so
195495
%{_libdir}/pkgconfig/libnftables.pc
195495
%{_includedir}/nftables/libnftables.h
195495
%{_mandir}/man3/libnftables.3*
195495
195495
%files -n python3-nftables
195495
%{python3_sitelib}/nftables-*.egg-info
195495
%{python3_sitelib}/nftables/
195495
195495
%changelog
195495
* Fri Jan 14 2022 Phil Sutter <psutter@redhat.com> - 1:0.9.8-12
195495
- evaluate: pick data element byte order, not dtype one
195495
195495
* Wed Dec 08 2021 Phil Sutter <psutter@redhat.com> - 1:0.9.8-11
195495
- tests: py: add dnat to port without defining destination address
195495
- evaluate: fix inet nat with no layer 3 info
195495
- include: missing sctp_chunk.h in Makefile.am
195495
- exthdr: Implement SCTP Chunk matching
195495
- scanner: sctp: Move to own scope
195495
- scanner: introduce start condition stack
195495
- json: Simplify non-tcpopt exthdr printing a bit
195495
195495
* Wed Dec 08 2021 Phil Sutter <psutter@redhat.com> - 1:0.9.8-10
195495
- tests: shell: better parameters for the interval stack overflow test
195495
- tests: shell: $NFT needs to be invoked unquoted
195495
195495
* Thu Nov 11 2021 Phil Sutter <psutter@redhat.com> - 1:0.9.8-9
195495
- doc: nft.8: Extend monitor description by trace
195495
195495
* Fri Nov 05 2021 Phil Sutter <psutter@redhat.com> - 1:0.9.8-8
195495
- tests: cover baecd1cf2685 ("segtree: Fix segfault when restoring a huge interval set")
195495
- segtree: Fix segfault when restoring a huge interval set
195495
195495
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1:0.9.8-7
195495
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
195495
  Related: rhbz#1991688
195495
195495
* Fri Jun 18 2021 Phil Sutter <psutter@redhat.com> - 1:0.9.8-6
195495
- json: init parser state for every new buffer/file
195495
195495
* Tue Jun 15 2021 Phil Sutter <psutter@redhat.com> - 1:0.9.8-5
195495
- src: add xzalloc_array() and use it to allocate the expression hashtable
195495
195495
* Mon Jun 14 2021 Phil Sutter <psutter@redhat.com> - 1:0.9.8-4
195495
- Install an improved sample config
195495
- Fix permissions of osf-related configs
195495
- rule: Fix for potential off-by-one in cmd_add_loc()
195495
- netlink_delinearize: Fix suspicious calloc() call
195495
- netlink: Avoid memleak in error path of netlink_delinearize_obj()
195495
- netlink: Avoid memleak in error path of netlink_delinearize_table()
195495
- netlink: Avoid memleak in error path of netlink_delinearize_chain()
195495
- netlink: Avoid memleak in error path of netlink_delinearize_set()
195495
- json: Drop pointless assignment in exthdr_expr_json()
195495
- evaluate: Mark fall through case in str2hooknum()
195495
- parser_json: Fix for memleak in tcp option error path
195495
- parser_bison: Fix for implicit declaration of isalnum
195495
- main: fix nft --help output fallout from 719e4427
195495
- tests: add icmp/6 test where dependency should be left alone
195495
- payload: check icmp dependency before removing previous icmp expression
195495
195495
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1:0.9.8-3
195495
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
195495
195495
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.9.8-2
195495
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
195495
195495
* Sat Jan 16 2021 Kevin Fenzi <kevin@scrye.com> - 0.9.8-1
195495
- Update to 0.9.8. Fixes rhbz#1916940
195495
195495
* Sat Oct 31 2020 Kevin Fenzi <kevin@scrye.com> - 0.9.7-1
195495
- Update to 0.9.7. Fixes bug #1891769
195495
195495
* Thu Oct 29 2020 Stephen Gallagher <sgallagh@redhat.com> - 1:0.9.6-2
195495
- Drop upstreamed patch
195495
195495
* Sat Sep 05 2020 Neal Gompa <ngompa13@gmail.com> - 1:0.9.6-1
195495
- Update to 0.9.6 (RH#1846663)
195495
195495
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.9.3-6
195495
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
195495
195495
* Tue Jul 14 2020 Tom Stellard <tstellar@redhat.com> - 1:0.9.3-5
195495
- Use make macros
195495
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
195495
195495
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1:0.9.3-4
195495
- Rebuilt for Python 3.9
195495
195495
* Fri May 15 2020 Richard Shaw <hobbes1069@gmail.com> - 1:0.9.3-3
195495
- Add patch for json performance with ipsets, fixes RHBZ#1834853.
195495
195495
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.9.3-2
195495
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
195495
195495
* Wed Dec 04 2019 Phil Sutter <psutter@redhat.com> - 1:0.9.3-1
195495
- Update to 0.9.3. Fixes bug #1778959
195495
195495
* Tue Oct 01 2019 Phil Sutter <psutter@redhat.com> - 1:0.9.2-3
195495
- Drop unneeded docbook2X build dependency
195495
- Add python3-nftables sub-package
195495
195495
* Fri Aug 23 2019 Kevin Fenzi <kevin@scrye.com> - 0.9.2-2
195495
- Move libnftables section 3 man page to devel package.
195495
195495
* Fri Aug 23 2019 Kevin Fenzi <kevin@scrye.com> - 0.9.2-1
195495
- Update to 0.9.2. Fixes bug #1743223
195495
195495
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.9.1-3
195495
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
195495
195495
* Fri Jun 28 2019 Kevin Fenzi <kevin@scrye.com> - 0.9.1-2
195495
- Add some filters to nftables.conf
195495
195495
* Tue Jun 25 2019 Kevin Fenzi <kevin@scrye.com> - 0.9.1-1
195495
- Update to 0.9.1. Fixes bug #1723515
195495
195495
* Mon Jun 17 2019 Kevin Fenzi <kevin@scrye.com> - 0.9.0-7
195495
- Rebuild for new libnftnl.
195495
195495
* Sat Mar 16 2019 Kevin Fenzi <kevin@scrye.com> - 1:0.9.0-6
195495
- Fix permissions. Bug #1685242
195495
195495
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1:0.9.0-5
195495
- Rebuild for readline 8.0
195495
195495
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.9.0-4
195495
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
195495
195495
* Sun Nov 04 2018 Kevin Fenzi <kevin@scrye.com> - 0.9.0-3
195495
- Fix config file to have correct include names. Fixes bug #1642103
195495
195495
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.9.0-2
195495
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
195495
195495
* Sat Jun 09 2018 Kevin Fenzi <kevin@scrye.com> - 0.9.0-1
195495
- Update to 0.9.0. Fixes bug #1589404
195495
195495
* Fri May 11 2018 Kevin Fenzi <kevin@scrye.com> - 0.8.5-1
195495
- Update to 0.8.5. Fixes bug #1576802
195495
195495
* Sun May 06 2018 Kevin Fenzi <kevin@scrye.com> - 0.8.4-2
195495
- Fix devel package to require the Epoch too.
195495
- Fix libraries split
195495
195495
* Fri May 04 2018 Kevin Fenzi <kevin@scrye.com> - 0.8.4-1
195495
- Update to 0.8.4. Fixes bug #1574096
195495
195495
* Sat Mar 03 2018 Kevin Fenzi <kevin@scrye.com> - 0.8.3-1
195495
- Update to 0.8.3. Fixes bug #1551207
195495
195495
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.8.2-2
195495
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
195495
195495
* Mon Feb 05 2018 Kevin Fenzi <kevin@scrye.com> - 0.8.2-1
195495
- Update to 0.8.2. Fixes bug #1541582
195495
195495
* Tue Jan 16 2018 Kevin Fenzi <kevin@scrye.com> - 0.8.1-1
195495
- Update to 0.8.1. Fixes bug #1534982
195495
195495
* Sun Oct 22 2017 Kevin Fenzi <kevin@scrye.com> - 0.8-1
195495
- Update to 0.8. 
195495
195495
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.7-5
195495
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
195495
195495
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.7-4
195495
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
195495
195495
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.7-3
195495
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
195495
195495
* Thu Jan 12 2017 Igor Gnatenko <ignatenko@redhat.com> - 1:0.7-2
195495
- Rebuild for readline 7.x
195495
195495
* Thu Dec 22 2016 Kevin Fenzi <kevin@scrye.com> - 0.7-1
195495
- Update to 0.7
195495
195495
* Fri Jul 15 2016 Kevin Fenzi <kevin@scrye.com> - 0.6-2
195495
- Rebuild for new glibc symbols
195495
195495
* Thu Jun 02 2016 Kevin Fenzi <kevin@scrye.com> - 0.6-1
195495
- Update to 0.6.
195495
195495
* Sun Apr 10 2016 Kevin Fenzi <kevin@scrye.com> - 0.5-4
195495
- Add example config files and move config to /etc/sysconfig. Fixes bug #1313936
195495
195495
* Fri Mar 25 2016 Kevin Fenzi <kevin@scrye.com> - 0.5-3
195495
- Add systemd unit file. Fixes bug #1313936
195495
195495
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.5-2
195495
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
195495
195495
* Thu Sep 17 2015 Kevin Fenzi <kevin@scrye.com> 0.5-1
195495
- Update to 0.5
195495
195495
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.4-3
195495
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
195495
195495
* Sat Jan 10 2015 Kevin Fenzi <kevin@scrye.com> 0.4-2
195495
- Add patch to fix nft -f dep gen.
195495
195495
* Fri Dec 26 2014 Kevin Fenzi <kevin@scrye.com> 0.4-1
195495
- Update to 0.4
195495
- Add Epoch to fix versioning. 
195495
195495
* Wed Sep 03 2014 Kevin Fenzi <kevin@scrye.com> 0.100-4.20140903git
195495
- Update to 20140903 snapshot
195495
195495
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.100-4.20140704git
195495
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
195495
195495
* Fri Jul 04 2014 Kevin Fenzi <kevin@scrye.com> 0.100-3.20140704git
195495
- Update to new snapshot
195495
195495
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.100-2.20140426git
195495
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
195495
195495
* Sat Apr 26 2014 Kevin Fenzi <kevin@scrye.com> 0.100-1.20140426git
195495
- Update t0 20140426
195495
195495
* Sun Mar 30 2014 Kevin Fenzi <kevin@scrye.com> 0.100-1.20140330git
195495
- Update to 20140330 snapshot
195495
- Sync versions to be post 0.100 release.
195495
195495
* Wed Mar 26 2014 Kevin Fenzi <kevin@scrye.com> 0-0.7.20140326git
195495
- Update to 20140326 snapshot
195495
- Fix permissions on man pages. 
195495
195495
* Mon Mar 24 2014 Kevin Fenzi <kevin@scrye.com> 0-0.6.20140324git
195495
- Update to 20140324 snapshot
195495
195495
* Fri Mar 07 2014 Kevin Fenzi <kevin@scrye.com> 0-0.5.20140307git
195495
- Update to 20140307
195495
195495
* Sat Jan 25 2014 Kevin Fenzi <kevin@scrye.com> 0-0.4.20140125git
195495
- Update to 20140125 snapshot
195495
195495
* Sat Jan 18 2014 Kevin Fenzi <kevin@scrye.com> 0-0.3.20140118git
195495
- Update to 20140118 snapshot
195495
- Fixed License tag to be correct
195495
- Fixed changelog
195495
- nft scripts now use full path for nft
195495
- Fixed man page building
195495
- Dropped unneeded rm in install
195495
- Patched build to not be silent. 
195495
195495
* Tue Dec 03 2013 Kevin Fenzi <kevin@scrye.com> 0-0.2.20131202git
195495
- Use upstream snapshots for source.
195495
- Use 0 for version. 
195495
195495
* Sat Nov 30 2013 Kevin Fenzi <kevin@scrye.com> 0-0.1
195495
- initial version for Fedora review