Blame SPECS/nftables.spec

9ff721
Name:           nftables
9ff721
Version:        0.9.0
bacbc8
Release:        14%{?dist}
9ff721
# Upstream released a 0.100 version, then 0.4. Need Epoch to get back on track.
9ff721
Epoch:          1
9ff721
Summary:        Netfilter Tables userspace utillites
9ff721
9ff721
License:        GPLv2
9ff721
URL:            http://netfilter.org/projects/nftables/
9ff721
Source0:        http://ftp.netfilter.org/pub/nftables/nftables-%{version}.tar.bz2
9ff721
Source1:        nftables.service
9ff721
Source2:        nftables.conf
9ff721
9ff721
Patch1:  0001-evaluate-reject-Allow-icmpx-in-inet-bridge-families.patch
9ff721
Patch2:  0002-monitor-Drop-fake-XML-support.patch
9ff721
Patch3:  0003-monitor-Drop-update-table-and-update-chain-cases.patch
9ff721
Patch4:  0004-monitor-Fix-printing-of-ct-objects.patch
9ff721
Patch5:  0005-monitor-Use-libnftables-JSON-output.patch
9ff721
Patch6:  0006-tests-monitor-Test-JSON-output-as-well.patch
9ff721
Patch7:  0007-segtree-bogus-range-via-get-set-element-on-existing-.patch
9ff721
Patch8:  0008-segtree-disantangle-get_set_interval_end.patch
9ff721
Patch9:  0009-segtree-memleak-in-get_set_decompose.patch
9ff721
Patch10: 0010-segtree-stop-iteration-on-existing-elements-in-case-.patch
9ff721
Patch11: 0011-segtree-incorrect-handling-of-last-element-in-get_se.patch
9ff721
Patch12: 0012-segtree-set-proper-error-cause-on-existing-elements.patch
9ff721
Patch13: 0013-rule-fix-memleak-in-do_get_setelems.patch
9ff721
Patch14: 0014-Fix-memleak-in-netlink_parse_fwd-error-path.patch
9ff721
Patch15: 0015-libnftables-Fix-memleak-in-nft_parse_bison_filename.patch
9ff721
Patch16: 0016-src-pass-struct-nft_ctx-through-struct-eval_ctx.patch
9ff721
Patch17: 0017-src-trace-fix-policy-printing.patch
9ff721
Patch18: 0018-rule-list-only-the-table-containing-object.patch
9ff721
Patch19: 0019-src-pass-struct-nft_ctx-through-struct-netlink_ctx.patch
9ff721
Patch20: 0020-netlink-reset-mnl_socket-field-in-struct-nft_ctx-on-.patch
9ff721
Patch21: 0021-src-remove-opts-field-from-struct-xt_stmt.patch
9ff721
Patch22: 0022-JSON-Support-latest-enhancements-of-fwd-statement.patch
9ff721
Patch23: 0023-parser_json-Fix-for-ineffective-family-value-checks.patch
9ff721
Patch24: 0024-json-Fix-memleak-in-dup_stmt_json.patch
9ff721
Patch25: 0025-json-Fix-for-recent-changes-to-context-structs.patch
9ff721
Patch26: 0026-parser_bison-Fix-for-ECN-keyword-in-LHS-of-relationa.patch
9ff721
Patch27: 0027-nft.8-Update-meta-pkt_type-value-description.patch
9ff721
Patch28: 0028-json-Work-around-segfault-when-encountering-xt-stmt.patch
9ff721
Patch29: 0029-nft.8-Document-log-level-audit.patch
9ff721
Patch30: 0030-nft.8-Clarify-index-option-of-add-rule-command.patch
9ff721
Patch31: 0031-src-Reject-export-vm-json-command.patch
bacbc8
Patch32: 0032-datatype-add-stolen-verdict.patch
bacbc8
Patch33: 0033-libnftables-Fix-exit_cookie.patch
bacbc8
Patch34: 0034-scanner-Do-not-convert-tabs-into-spaces.patch
bacbc8
Patch35: 0035-netlink_delinearize-Refactor-meta_may_dependency_kil.patch
bacbc8
Patch36: 0036-evaluate-skip-evaluation-of-datatype-concatenations.patch
bacbc8
Patch37: 0037-tests-shell-add-tests-for-listing-objects.patch
bacbc8
Patch38: 0038-rule-fix-object-listing-when-no-table-is-given.patch
bacbc8
Patch39: 0039-proto-fix-icmp-icmpv6-code-datatype.patch
bacbc8
Patch40: 0040-evaluate-throw-distinct-error-if-map-exists-but-cont.patch
bacbc8
Patch41: 0041-parser-bail-out-on-incorrect-burst-unit.patch
bacbc8
Patch42: 0042-src-fix-netdev-family-device-name-parsing.patch
bacbc8
Patch43: 0043-libnftables-Print-errors-before-freeing-commands.patch
bacbc8
Patch44: 0044-segtree-fix-crash-when-debug-mode-is-active.patch
bacbc8
Patch45: 0045-parser_bison-no-need-for-statement-separator-for-ct-.patch
bacbc8
Patch46: 0046-ct-use-nft_print-instead-of-printf.patch
bacbc8
Patch47: 0047-parser_bison-type_identifier-string-memleak.patch
bacbc8
Patch48: 0048-src-missing-destroy-function-in-statement-definition.patch
bacbc8
Patch49: 0049-tests-shell-validate-too-deep-jumpstack-from-basecha.patch
bacbc8
Patch50: 0050-netlink-remove-markup-json-parsing-code.patch
bacbc8
Patch51: 0051-rule-limit-don-t-print-default-burst-value.patch
bacbc8
Patch52: 0052-JSON-Review-verdict-statement-and-expression.patch
bacbc8
Patch53: 0053-parser_json-Duplicate-chain-name-when-parsing-jump-v.patch
bacbc8
Patch54: 0054-src-Introduce-chain_expr-in-jump-and-goto-statements.patch
bacbc8
Patch55: 0055-src-Allow-goto-and-jump-to-a-variable.patch
bacbc8
Patch56: 0056-parser_json-Fix-and-simplify-verdict-expression-pars.patch
bacbc8
Patch57: 0057-src-invalid-read-when-importing-chain-name.patch
bacbc8
Patch58: 0058-expression-use-expr_clone-from-verdict_expr_clone.patch
bacbc8
Patch59: 0059-parser_bison-free-chain-name-after-creating-constant.patch
bacbc8
Patch60: 0060-doc-update-nft-list-plural-form-parameters.patch
bacbc8
Patch61: 0061-doc-Add-minimal-description-of-v-map-statements.patch
bacbc8
Patch62: 0062-xt-pass-octx-to-translate-function.patch
bacbc8
Patch63: 0063-xt-always-build-with-a-minimal-support-for-xt-match-.patch
bacbc8
Patch64: 0064-src-fix-double-free-on-xt-stmt-destruction.patch
bacbc8
Patch65: 0065-tests-shell-Add-testcase-for-cache-update-problems.patch
bacbc8
Patch66: 0066-src-update-cache-if-cmd-is-more-specific.patch
bacbc8
Patch67: 0067-src-fix-jumps-on-bigendian-arches.patch
bacbc8
Patch68: 0068-src-json-fix-constant-parsing-on-bigendian.patch
bacbc8
bacbc8
BuildRequires: autogen
bacbc8
BuildRequires: autoconf
bacbc8
BuildRequires: automake
bacbc8
BuildRequires: libtool
bacbc8
BuildRequires: gcc
9ff721
BuildRequires: flex
9ff721
BuildRequires: bison
9ff721
BuildRequires: libmnl-devel
9ff721
BuildRequires: gmp-devel
9ff721
BuildRequires: readline-devel
9ff721
BuildRequires: libnftnl-devel
9ff721
BuildRequires: docbook2X
9ff721
BuildRequires: systemd
9ff721
BuildRequires: jansson-devel
9ff721
BuildRequires: iptables-devel
9ff721
9ff721
%description
9ff721
Netfilter Tables userspace utilities.
9ff721
9ff721
%package        devel
9ff721
Summary:        Development library for nftables / libnftables
9ff721
Group:          Development/Libraries
9ff721
Requires:       %{name} = %{epoch}:%{version}-%{release}
9ff721
Requires:       pkgconfig
9ff721
9ff721
%description devel
9ff721
Development tools and static libraries and header files for the libnftables library.
9ff721
9ff721
%prep
9ff721
%autosetup -p1
9ff721
9ff721
%build
bacbc8
autoreconf -fi
bacbc8
rm -Rf autom4te*.cache config.h.in~
9ff721
%configure --disable-silent-rules --with-json --with-xtables
9ff721
make %{?_smp_mflags}
9ff721
9ff721
%install
9ff721
%make_install
9ff721
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
9ff721
9ff721
# Don't ship static lib (for now at least)
9ff721
rm -f $RPM_BUILD_ROOT/%{_libdir}/libnftables.a
9ff721
9ff721
chmod 644 $RPM_BUILD_ROOT/%{_mandir}/man8/nft*
9ff721
9ff721
mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
9ff721
cp -a %{SOURCE1} $RPM_BUILD_ROOT/%{_unitdir}/
9ff721
9ff721
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig
9ff721
cp -a %{SOURCE2} $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/
bacbc8
chmod 600 $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/nftables.conf
9ff721
bacbc8
cp files/examples/netdev-ingress.nft $RPM_BUILD_ROOT/%{_sysconfdir}/nftables
bacbc8
chmod 750 $RPM_BUILD_ROOT/%{_sysconfdir}/nftables
bacbc8
chmod 600 $RPM_BUILD_ROOT/%{_sysconfdir}/nftables/*.nft
9ff721
9ff721
%post
9ff721
%systemd_post nftables.service
9ff721
9ff721
%preun
9ff721
%systemd_preun nftables.service
9ff721
9ff721
%postun
9ff721
%systemd_postun_with_restart nftables.service
9ff721
9ff721
%post devel
9ff721
%ldconfig_post
9ff721
9ff721
%postun devel
9ff721
%ldconfig_postun
9ff721
9ff721
%files
9ff721
%license COPYING
9ff721
%config(noreplace) %{_sysconfdir}/nftables/
9ff721
%config(noreplace) %{_sysconfdir}/sysconfig/nftables.conf
9ff721
%{_sbindir}/nft
9ff721
%{_libdir}/libnftables.so.*
9ff721
%{_mandir}/man8/nft*
9ff721
%{_unitdir}/nftables.service
9ff721
9ff721
%files devel
9ff721
%{_libdir}/libnftables.so
9ff721
%{_libdir}/pkgconfig/libnftables.pc
9ff721
%{_includedir}/nftables/libnftables.h
9ff721
9ff721
%changelog
bacbc8
* Mon Aug 12 2019 Phil Sutter <psutter@redhat.com> - 1:0.9.0-14
bacbc8
- src: fix jumps on bigendian arches
bacbc8
- src: json: fix constant parsing on bigendian
bacbc8
bacbc8
* Thu Aug 08 2019 Phil Sutter <psutter@redhat.com> - 1:0.9.0-13
bacbc8
- Fix for adding a rule with index and set reference
bacbc8
bacbc8
* Wed Jul 31 2019 Phil Sutter <psutter@redhat.com> - 1:0.9.0-12
bacbc8
- Fix permissions of /etc/nftables directory
bacbc8
bacbc8
* Wed Jun 26 2019 Phil Sutter <psutter@redhat.com> - 1:0.9.0-11
bacbc8
- Fix segfault with xtables support
bacbc8
bacbc8
* Wed Jun 26 2019 Phil Sutter <psutter@redhat.com> - 1:0.9.0-10
bacbc8
- Fix typo in spec file
bacbc8
bacbc8
* Wed Jun 26 2019 Phil Sutter <psutter@redhat.com> - 1:0.9.0-9
bacbc8
- Allow variables in jump statement
bacbc8
- Make example configs readable only by root
bacbc8
- Document nft list parameters
bacbc8
- Document vmap statement
bacbc8
- Install netdev-ingress.nft sample config in the right spot
bacbc8
- Backport upstream fixes since last release
bacbc8
9ff721
* Fri Mar 01 2019 Phil Sutter - 1:0.9.0-8
9ff721
- Add missing patch to spec file
9ff721
9ff721
* Fri Dec 21 2018 Phil Sutter - 1:0.9.0-7
9ff721
- src: Reject 'export vm json' command
9ff721
9ff721
* Tue Dec 18 2018 Phil Sutter - 1:0.9.0-6
9ff721
- Rebuild for updated libnftnl
9ff721
9ff721
* Thu Dec 13 2018 Phil Sutter - 1:0.9.0-5
9ff721
- nft.8: Document log level audit
9ff721
- nft.8: Clarify 'index' option of add rule command
9ff721
9ff721
* Thu Oct 25 2018 Phil Sutter - 1:0.9.0-4
9ff721
- Add fixes for covscan report
9ff721
- Fix for ECN keyword in LHS of relational
9ff721
- Update meta pkt_type value description
9ff721
- Fix for segfault with JSON output if xt expression is present
9ff721
- Add missing nft suffix to files included from /etc/sysconfig/nftables.conf
9ff721
- Use native JSON API in nft monitor
9ff721
9ff721
* Thu Oct 11 2018 Phil Sutter - 1:0.9.0-3
9ff721
- Enable xtables support
9ff721
- Enable JSON support
9ff721
9ff721
* Mon Sep 10 2018 Phil Sutter - 1:0.9.0-2
9ff721
- Allow icmpx in inet/bridge families
9ff721
9ff721
* Tue Aug 14 2018 Phil Sutter - 1:0.9.0-1
9ff721
- New version 0.9.0
9ff721
- Install libnftables
9ff721
- Add devel sub-package
9ff721
- Add gcc BuildRequires
9ff721
9ff721
* Sat Mar 03 2018 Kevin Fenzi <kevin@scrye.com> - 0.8.3-1
9ff721
- Update to 0.8.3. Fixes bug #1551207
9ff721
9ff721
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.8.2-2
9ff721
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
9ff721
9ff721
* Mon Feb 05 2018 Kevin Fenzi <kevin@scrye.com> - 0.8.2-1
9ff721
- Update to 0.8.2. Fixes bug #1541582
9ff721
9ff721
* Tue Jan 16 2018 Kevin Fenzi <kevin@scrye.com> - 0.8.1-1
9ff721
- Update to 0.8.1. Fixes bug #1534982
9ff721
9ff721
* Sun Oct 22 2017 Kevin Fenzi <kevin@scrye.com> - 0.8-1
9ff721
- Update to 0.8. 
9ff721
9ff721
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.7-5
9ff721
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
9ff721
9ff721
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.7-4
9ff721
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
9ff721
9ff721
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.7-3
9ff721
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
9ff721
9ff721
* Thu Jan 12 2017 Igor Gnatenko <ignatenko@redhat.com> - 1:0.7-2
9ff721
- Rebuild for readline 7.x
9ff721
9ff721
* Thu Dec 22 2016 Kevin Fenzi <kevin@scrye.com> - 0.7-1
9ff721
- Update to 0.7
9ff721
9ff721
* Fri Jul 15 2016 Kevin Fenzi <kevin@scrye.com> - 0.6-2
9ff721
- Rebuild for new glibc symbols
9ff721
9ff721
* Thu Jun 02 2016 Kevin Fenzi <kevin@scrye.com> - 0.6-1
9ff721
- Update to 0.6.
9ff721
9ff721
* Sun Apr 10 2016 Kevin Fenzi <kevin@scrye.com> - 0.5-4
9ff721
- Add example config files and move config to /etc/sysconfig. Fixes bug #1313936
9ff721
9ff721
* Fri Mar 25 2016 Kevin Fenzi <kevin@scrye.com> - 0.5-3
9ff721
- Add systemd unit file. Fixes bug #1313936
9ff721
9ff721
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.5-2
9ff721
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
9ff721
9ff721
* Thu Sep 17 2015 Kevin Fenzi <kevin@scrye.com> 0.5-1
9ff721
- Update to 0.5
9ff721
9ff721
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.4-3
9ff721
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
9ff721
9ff721
* Sat Jan 10 2015 Kevin Fenzi <kevin@scrye.com> 0.4-2
9ff721
- Add patch to fix nft -f dep gen.
9ff721
9ff721
* Fri Dec 26 2014 Kevin Fenzi <kevin@scrye.com> 0.4-1
9ff721
- Update to 0.4
9ff721
- Add Epoch to fix versioning. 
9ff721
9ff721
* Wed Sep 03 2014 Kevin Fenzi <kevin@scrye.com> 0.100-4.20140903git
9ff721
- Update to 20140903 snapshot
9ff721
9ff721
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.100-4.20140704git
9ff721
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
9ff721
9ff721
* Fri Jul 04 2014 Kevin Fenzi <kevin@scrye.com> 0.100-3.20140704git
9ff721
- Update to new snapshot
9ff721
9ff721
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.100-2.20140426git
9ff721
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
9ff721
9ff721
* Sat Apr 26 2014 Kevin Fenzi <kevin@scrye.com> 0.100-1.20140426git
9ff721
- Update t0 20140426
9ff721
9ff721
* Sun Mar 30 2014 Kevin Fenzi <kevin@scrye.com> 0.100-1.20140330git
9ff721
- Update to 20140330 snapshot
9ff721
- Sync versions to be post 0.100 release.
9ff721
9ff721
* Wed Mar 26 2014 Kevin Fenzi <kevin@scrye.com> 0-0.7.20140326git
9ff721
- Update to 20140326 snapshot
9ff721
- Fix permissions on man pages. 
9ff721
9ff721
* Mon Mar 24 2014 Kevin Fenzi <kevin@scrye.com> 0-0.6.20140324git
9ff721
- Update to 20140324 snapshot
9ff721
9ff721
* Fri Mar 07 2014 Kevin Fenzi <kevin@scrye.com> 0-0.5.20140307git
9ff721
- Update to 20140307
9ff721
9ff721
* Sat Jan 25 2014 Kevin Fenzi <kevin@scrye.com> 0-0.4.20140125git
9ff721
- Update to 20140125 snapshot
9ff721
9ff721
* Sat Jan 18 2014 Kevin Fenzi <kevin@scrye.com> 0-0.3.20140118git
9ff721
- Update to 20140118 snapshot
9ff721
- Fixed License tag to be correct
9ff721
- Fixed changelog
9ff721
- nft scripts now use full path for nft
9ff721
- Fixed man page building
9ff721
- Dropped unneeded rm in install
9ff721
- Patched build to not be silent. 
9ff721
9ff721
* Tue Dec 03 2013 Kevin Fenzi <kevin@scrye.com> 0-0.2.20131202git
9ff721
- Use upstream snapshots for source.
9ff721
- Use 0 for version. 
9ff721
9ff721
* Sat Nov 30 2013 Kevin Fenzi <kevin@scrye.com> 0-0.1
9ff721
- initial version for Fedora review