aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-filter/nftables/nftables_1.0.5.bb
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2022-09-30 11:31:38 +0800
committerKhem Raj <raj.khem@gmail.com>2022-09-29 21:21:11 -0700
commitb07db09fe8e6fe35a8bf520a3deeed4aa4b536be (patch)
treef7c8dee973cbc805a997561920c03c9f5d421e26 /meta-networking/recipes-filter/nftables/nftables_1.0.5.bb
parent333cdd80c6943fb37e7f5e338fa5c0222127dbfa (diff)
downloadmeta-openembedded-b07db09fe8e6fe35a8bf520a3deeed4aa4b536be.tar.gz
nftables: upgrade 1.0.4 -> 1.0.5
Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-filter/nftables/nftables_1.0.5.bb')
-rw-r--r--meta-networking/recipes-filter/nftables/nftables_1.0.5.bb53
1 files changed, 53 insertions, 0 deletions
diff --git a/meta-networking/recipes-filter/nftables/nftables_1.0.5.bb b/meta-networking/recipes-filter/nftables/nftables_1.0.5.bb
new file mode 100644
index 0000000000..1708786f49
--- /dev/null
+++ b/meta-networking/recipes-filter/nftables/nftables_1.0.5.bb
@@ -0,0 +1,53 @@
+SUMMARY = "Netfilter Tables userspace utillites"
+SECTION = "net"
+LICENSE = "GPL-2.0-only"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d1a78fdd879a263a5e0b42d1fc565e79"
+
+DEPENDS = "libmnl libnftnl bison-native \
+ ${@bb.utils.contains('PACKAGECONFIG', 'mini-gmp', '', 'gmp', d)}"
+
+SRC_URI = "http://www.netfilter.org/projects/nftables/files/${BP}.tar.bz2 \
+ file://0001-nftables-python-Split-root-from-prefix.patch \
+ file://run-ptest \
+ "
+
+SRC_URI[sha256sum] = "8d1b4b18393af43698d10baa25d2b9b6397969beecac7816c35dd0714e4de50a"
+
+inherit autotools manpages pkgconfig ptest
+
+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}, --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"
+
+PACKAGES =+ "${PN}-python"
+FILES:${PN}-python = "${nonarch_libdir}/${PYTHON_DIR}"
+RDEPENDS:${PN}-python = "python3-core python3-json ${PN}"
+
+RDEPENDS:${PN}-ptest += " ${PN}-python make bash python3-core python3-ctypes python3-json python3-misc util-linux"
+
+TESTDIR = "tests"
+
+PRIVATE_LIBS:${PN}-ptest:append = "libnftables.so.1"
+
+do_install_ptest() {
+ cp -rf ${S}/build-aux ${D}${PTEST_PATH}
+ cp -rf ${S}/src ${D}${PTEST_PATH}
+ 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}/${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
+}