nftables: Upgrade 1.0.2 -> 1.0.4
PATCH v3 1/1 nftables: Upgrade 1.0.2 -> 1.0.4
Drop backported patch, switch PACKAGECONFIG assignment to ?= (matches current practice), add in editline, linenoise CLI options and xtables option. Switch to --disable-python when building without python to avoid a configure time warning.
We can drop UPSTREAM_CHECK_REGEX as the version no longer gets confused by the 0.099 version which exists.
Fix buildpaths warning by switching to setuptools and add dependency on ${PN}-python to ${PN}-ptest so that the embedded paths in the compiled python files are correct.
Signed-off-by Alex Kiernan <[email protected]>
---
...-with-make-check-and-add-AM_CPPFLAGS.patch | 39 ----------------
...tables-python-Split-root-from-prefix.patch | 44 +++++++++++++++++++
.../{nftables_1.0.2.bb => nftables_1.0.4.bb} | 20 ++++-----
3 files changed, 54 insertions(+), 49 deletions(-)
delete mode 100644 meta-networking/recipes-filter/nftables/nftables/0001-examples-compile-with-make-check-and-add-AM_CPPFLAGS.patch
create mode 100644 meta-networking/recipes-filter/nftables/nftables/0001-nftables-python-Split-root-from-prefix.patch
rename meta-networking/recipes-filter/nftables/{nftables_1.0.2.bb => nftables_1.0.4.bb} (69%)meta-networking/recipes-filter/nftables/nftables/0001-examples-compile-with-make-check-and-add-AM_CPPFLAGS.patch deleted +0 -39
@@ -1,39 +0,0 @@ -From 18a08fb7f0443f8bde83393bd6f69e23a04246b3 Mon Sep 17 00:00:00 2001 -From: Pablo Neira Ayuso <[email protected]> -Date: Tue, 22 Feb 2022 00:56:36 +0100 -Subject: [PATCH] examples: compile with `make check' and add AM_CPPFLAGS - -Compile examples via `make check' like libnftnl does. Use AM_CPPFLAGS to -specify local headers via -I. - -Unfortunately, `make distcheck' did not catch this compile time error in -my system, since it was using the nftables/libnftables.h file of the -previous nftables release. - -Fixes: 5b364657a35f ("build: missing SUBIRS update") -Fixes: caf2a6ad2d22 ("examples: add libnftables example program") -Signed-off-by: Pablo Neira Ayuso <[email protected]> - -Upstream-Status: Backport -[http://git.netfilter.org/nftables/commit/?id=18a08fb7f0443f8bde83393bd6f69e23a04246b3] - -Signed-off-by: Yi Zhao <[email protected]> ---- - examples/Makefile.am | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/examples/Makefile.am b/examples/Makefile.am -index c972170d..3b8b0b67 100644 ---- a/examples/Makefile.am -+++ b/examples/Makefile.am -@@ -1,4 +1,6 @@ --noinst_PROGRAMS = nft-buffer \ -+check_PROGRAMS = nft-buffer \ - nft-json-file - -+AM_CPPFLAGS = -I$(top_srcdir)/include -+ - LDADD = $(top_builddir)/src/libnftables.la --- -2.25.1 -
meta-networking/recipes-filter/nftables/nftables/0001-nftables-python-Split-root-from-prefix.patch new file +44 -0
44 lines not on this page · raw message
meta-networking/recipes-filter/nftables/nftables_1.0.4.bb renamed from meta-networking/recipes-filter/nftables/nftables_1.0.2.bb +10 -10
@@ -6,26 +6,27 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d1a78fdd879a263a5e0b42d1fc565e79" DEPENDS = "libmnl libnftnl bison-native \ ${@bb.utils.contains('PACKAGECONFIG', 'mini-gmp', '', 'gmp', d)}" -# Ensure we reject the 0.099 version by matching at least two dots -UPSTREAM_CHECK_REGEX = "nftables-(?P<pver>\d+(\.\d+){2,}).tar.bz2" - SRC_URI = "http://www.netfilter.org/projects/nftables/files/${BP}.tar.bz2 \ - file://0001-examples-compile-with-make-check-and-add-AM_CPPFLAGS.patch \ + file://0001-nftables-python-Split-root-from-prefix.patch \ file://run-ptest \ " -SRC_URI[sha256sum] = "0b28a36ffcf4567b841de7bd3f37918b1fed27859eb48bdec51e1f7a83954c02" +SRC_URI[sha256sum] = "927fb1fea1f685a328c10cf791eb655d7e1ed49d310eea5cb3101dfd8d6cba35" inherit autotools manpages pkgconfig ptest -PACKAGECONFIG ??= "python readline json" +PACKAGECONFIG ?= "python readline json" +PACKAGECONFIG[editline] = "--with-cli=editline, , libedit, , , linenoise readline" PACKAGECONFIG[json] = "--with-json, --without-json, jansson" +PACKAGECONFIG[linenoise] = "--with-cli=linenoise, , linenoise, , , editline readline" PACKAGECONFIG[manpages] = "--enable-man-doc, --disable-man-doc, asciidoc-native" PACKAGECONFIG[mini-gmp] = "--with-mini-gmp, --without-mini-gmp" -PACKAGECONFIG[python] = "--enable-python --with-python-bin=${PYTHON}, --with-python-bin="", python3" -PACKAGECONFIG[readline] = "--with-cli=readline, --without-cli, readline" +PACKAGECONFIG[python] = "--enable-python --with-python-bin=${PYTHON}, --disable-python, python3-setuptools-native" +PACKAGECONFIG[readline] = "--with-cli=readline, , readline, , , editline linenoise" PACKAGECONFIG[xtables] = "--with-xtables, --without-xtables, iptables" +EXTRA_OECONF = "${@bb.utils.contains_any('PACKAGECONFIG', 'editline linenoise readline', '', '--without-cli', d)}" + inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)} RRECOMMENDS:${PN} += "kernel-module-nf-tables"
@@ -34,7 +35,7 @@ PACKAGES =+ "${PN}-python" FILES:${PN}-python = "${nonarch_libdir}/${PYTHON_DIR}" RDEPENDS:${PN}-python = "python3-core python3-json ${PN}" -RDEPENDS:${PN}-ptest += " make bash python3-core python3-ctypes python3-json python3-misc util-linux" +RDEPENDS:${PN}-ptest += " ${PN}-python make bash python3-core python3-ctypes python3-json python3-misc util-linux" TESTDIR = "tests"
@@ -46,7 +47,6 @@ do_install_ptest() { mkdir -p ${D}${PTEST_PATH}/src/.libs cp -rf ${B}/src/.libs/* ${D}${PTEST_PATH}/src/.libs cp -rf ${B}/src/.libs/nft ${D}${PTEST_PATH}/src/ - cp -rf ${S}/py ${D}${PTEST_PATH} cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH}/${TESTDIR} sed -i 's#/usr/bin/python#/usr/bin/python3#' ${D}${PTEST_PATH}/${TESTDIR}/json_echo/run-test.py sed -i 's#/usr/bin/env python#/usr/bin/env python3#' ${D}${PTEST_PATH}/${TESTDIR}/py/nft-test.py
Signature · 1 line
2.35.1