summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Gotthard <petr.gotthard@advantech.cz>2023-04-14 21:19:45 +0000
committerKhem Raj <raj.khem@gmail.com>2023-04-14 15:38:30 -0700
commitd7001f534e3d994368d465830cfbb8480f347320 (patch)
tree147ce31f0cc95de2fed04014e49ff8dbbab3b444
parentc6243e1b6a15d1507a3d25918be99afaaca062d2 (diff)
downloadmeta-openembedded-d7001f534e3d994368d465830cfbb8480f347320.tar.gz
nftables: upgrade 1.0.6 -> 1.0.7
Changelog: https://netfilter.org/projects/nftables/files/changes-nftables-1.0.7.txt The COPYING text changed to highlight that "New code though is moving to GPL version 2 or any later which is the preferred license for this project these days." Although the project itself stays GPLv2 only. https://netfilter.org/licensing.html#terms The upstream replaced distutils with setuptools, so the nftables-python is now built using the standard approach. The coexistence of setuptools and automake is solved in the same way as in meta-oe/recipes-support/libiio. The removal of *.pyc is no longer necessary. Signed-off-by: Petr Gotthard <petr.gotthard@advantech.cz> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-networking/recipes-filter/nftables/nftables_1.0.7.bb (renamed from meta-networking/recipes-filter/nftables/nftables_1.0.6.bb)44
1 files changed, 33 insertions, 11 deletions
diff --git a/meta-networking/recipes-filter/nftables/nftables_1.0.6.bb b/meta-networking/recipes-filter/nftables/nftables_1.0.7.bb
index f43a223ac9..8380bbd73d 100644
--- a/meta-networking/recipes-filter/nftables/nftables_1.0.6.bb
+++ b/meta-networking/recipes-filter/nftables/nftables_1.0.7.bb
@@ -1,7 +1,7 @@
1SUMMARY = "Netfilter Tables userspace utillites" 1SUMMARY = "Netfilter Tables userspace utillites"
2SECTION = "net" 2SECTION = "net"
3LICENSE = "GPL-2.0-only" 3LICENSE = "GPL-2.0-only"
4LIC_FILES_CHKSUM = "file://COPYING;md5=d1a78fdd879a263a5e0b42d1fc565e79" 4LIC_FILES_CHKSUM = "file://COPYING;md5=81ec33bb3e47b460fc993ac768c74b62"
5 5
6DEPENDS = "libmnl libnftnl bison-native \ 6DEPENDS = "libmnl libnftnl bison-native \
7 ${@bb.utils.contains('PACKAGECONFIG', 'mini-gmp', '', 'gmp', d)}" 7 ${@bb.utils.contains('PACKAGECONFIG', 'mini-gmp', '', 'gmp', d)}"
@@ -9,7 +9,7 @@ DEPENDS = "libmnl libnftnl bison-native \
9SRC_URI = "http://www.netfilter.org/projects/nftables/files/${BP}.tar.xz \ 9SRC_URI = "http://www.netfilter.org/projects/nftables/files/${BP}.tar.xz \
10 file://run-ptest \ 10 file://run-ptest \
11 " 11 "
12SRC_URI[sha256sum] = "2407430ddd82987670e48dc2fda9e280baa8307abec04ab18d609df3db005e4c" 12SRC_URI[sha256sum] = "c12ac941fff9adaedf17367d5ce213789b98a0d314277bc22b3d71e10891f412"
13 13
14inherit autotools manpages pkgconfig ptest 14inherit autotools manpages pkgconfig ptest
15 15
@@ -19,31 +19,53 @@ PACKAGECONFIG[json] = "--with-json, --without-json, jansson"
19PACKAGECONFIG[linenoise] = "--with-cli=linenoise, , linenoise, , , editline readline" 19PACKAGECONFIG[linenoise] = "--with-cli=linenoise, , linenoise, , , editline readline"
20PACKAGECONFIG[manpages] = "--enable-man-doc, --disable-man-doc, asciidoc-native" 20PACKAGECONFIG[manpages] = "--enable-man-doc, --disable-man-doc, asciidoc-native"
21PACKAGECONFIG[mini-gmp] = "--with-mini-gmp, --without-mini-gmp" 21PACKAGECONFIG[mini-gmp] = "--with-mini-gmp, --without-mini-gmp"
22PACKAGECONFIG[python] = "--enable-python --with-python-bin=${PYTHON}, --disable-python, python3-setuptools-native" 22PACKAGECONFIG[python] = ",, python3-setuptools-native"
23PACKAGECONFIG[readline] = "--with-cli=readline, , readline, , , editline linenoise" 23PACKAGECONFIG[readline] = "--with-cli=readline, , readline, , , editline linenoise"
24PACKAGECONFIG[xtables] = "--with-xtables, --without-xtables, iptables" 24PACKAGECONFIG[xtables] = "--with-xtables, --without-xtables, iptables"
25 25
26EXTRA_OECONF = "${@bb.utils.contains_any('PACKAGECONFIG', 'editline linenoise readline', '', '--without-cli', d)}" 26# Disable the python via autoconf so we can build it separately via setuptools3
27EXTRA_OECONF = "--disable-python \
28 ${@bb.utils.contains_any('PACKAGECONFIG', 'editline linenoise readline', '', '--without-cli', d)}"
27 29
28inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)} 30SETUPTOOLS_SETUP_PATH = "${S}/py"
31
32inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'setuptools3', '', d)}
29 33
30RRECOMMENDS:${PN} += "kernel-module-nf-tables" 34RRECOMMENDS:${PN} += "kernel-module-nf-tables"
31 35
32PACKAGES =+ "${PN}-python" 36PACKAGES =+ "${PN}-python"
33FILES:${PN}-python = "${nonarch_libdir}/${PYTHON_DIR}" 37FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
34RDEPENDS:${PN}-python = "python3-core python3-json ${PN}" 38RDEPENDS:${PN}-python = "python3-core python3-json ${PN}"
35 39
40# Explicitly define do_configure, do_compile and do_install because both autotools and setuptools3
41# have EXPORT_FUNCTIONS do_configure do_compile do_install
42do_configure() {
43 autotools_do_configure
44 if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then
45 setuptools3_do_configure
46 fi
47}
48
49do_compile() {
50 autotools_do_compile
51 if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then
52 setuptools3_do_compile
53 fi
54}
55
56do_install() {
57 autotools_do_install
58 if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then
59 setuptools3_do_install
60 fi
61}
62
36RDEPENDS:${PN}-ptest += " ${PN}-python bash make iproute2 iputils-ping procps python3-core python3-ctypes python3-json python3-misc sed util-linux" 63RDEPENDS:${PN}-ptest += " ${PN}-python bash make iproute2 iputils-ping procps python3-core python3-ctypes python3-json python3-misc sed util-linux"
37 64
38TESTDIR = "tests" 65TESTDIR = "tests"
39 66
40PRIVATE_LIBS:${PN}-ptest:append = " libnftables.so.1" 67PRIVATE_LIBS:${PN}-ptest:append = " libnftables.so.1"
41 68
42do_install:append() {
43 # Avoid "contains reference to TMPDIR" warning
44 find ${D} -name *.pyc -delete
45}
46
47do_install_ptest() { 69do_install_ptest() {
48 cp -rf ${S}/build-aux ${D}${PTEST_PATH} 70 cp -rf ${S}/build-aux ${D}${PTEST_PATH}
49 cp -rf ${S}/src ${D}${PTEST_PATH} 71 cp -rf ${S}/src ${D}${PTEST_PATH}