diff options
| author | Petr Gotthard <petr.gotthard@advantech.cz> | 2023-04-14 21:19:45 +0000 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2023-04-14 15:38:30 -0700 |
| commit | d7001f534e3d994368d465830cfbb8480f347320 (patch) | |
| tree | 147ce31f0cc95de2fed04014e49ff8dbbab3b444 | |
| parent | c6243e1b6a15d1507a3d25918be99afaaca062d2 (diff) | |
| download | meta-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 @@ | |||
| 1 | SUMMARY = "Netfilter Tables userspace utillites" | 1 | SUMMARY = "Netfilter Tables userspace utillites" |
| 2 | SECTION = "net" | 2 | SECTION = "net" |
| 3 | LICENSE = "GPL-2.0-only" | 3 | LICENSE = "GPL-2.0-only" |
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=d1a78fdd879a263a5e0b42d1fc565e79" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=81ec33bb3e47b460fc993ac768c74b62" |
| 5 | 5 | ||
| 6 | DEPENDS = "libmnl libnftnl bison-native \ | 6 | DEPENDS = "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 \ | |||
| 9 | SRC_URI = "http://www.netfilter.org/projects/nftables/files/${BP}.tar.xz \ | 9 | SRC_URI = "http://www.netfilter.org/projects/nftables/files/${BP}.tar.xz \ |
| 10 | file://run-ptest \ | 10 | file://run-ptest \ |
| 11 | " | 11 | " |
| 12 | SRC_URI[sha256sum] = "2407430ddd82987670e48dc2fda9e280baa8307abec04ab18d609df3db005e4c" | 12 | SRC_URI[sha256sum] = "c12ac941fff9adaedf17367d5ce213789b98a0d314277bc22b3d71e10891f412" |
| 13 | 13 | ||
| 14 | inherit autotools manpages pkgconfig ptest | 14 | inherit autotools manpages pkgconfig ptest |
| 15 | 15 | ||
| @@ -19,31 +19,53 @@ PACKAGECONFIG[json] = "--with-json, --without-json, jansson" | |||
| 19 | PACKAGECONFIG[linenoise] = "--with-cli=linenoise, , linenoise, , , editline readline" | 19 | PACKAGECONFIG[linenoise] = "--with-cli=linenoise, , linenoise, , , editline readline" |
| 20 | PACKAGECONFIG[manpages] = "--enable-man-doc, --disable-man-doc, asciidoc-native" | 20 | PACKAGECONFIG[manpages] = "--enable-man-doc, --disable-man-doc, asciidoc-native" |
| 21 | PACKAGECONFIG[mini-gmp] = "--with-mini-gmp, --without-mini-gmp" | 21 | PACKAGECONFIG[mini-gmp] = "--with-mini-gmp, --without-mini-gmp" |
| 22 | PACKAGECONFIG[python] = "--enable-python --with-python-bin=${PYTHON}, --disable-python, python3-setuptools-native" | 22 | PACKAGECONFIG[python] = ",, python3-setuptools-native" |
| 23 | PACKAGECONFIG[readline] = "--with-cli=readline, , readline, , , editline linenoise" | 23 | PACKAGECONFIG[readline] = "--with-cli=readline, , readline, , , editline linenoise" |
| 24 | PACKAGECONFIG[xtables] = "--with-xtables, --without-xtables, iptables" | 24 | PACKAGECONFIG[xtables] = "--with-xtables, --without-xtables, iptables" |
| 25 | 25 | ||
| 26 | EXTRA_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 |
| 27 | EXTRA_OECONF = "--disable-python \ | ||
| 28 | ${@bb.utils.contains_any('PACKAGECONFIG', 'editline linenoise readline', '', '--without-cli', d)}" | ||
| 27 | 29 | ||
| 28 | inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)} | 30 | SETUPTOOLS_SETUP_PATH = "${S}/py" |
| 31 | |||
| 32 | inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'setuptools3', '', d)} | ||
| 29 | 33 | ||
| 30 | RRECOMMENDS:${PN} += "kernel-module-nf-tables" | 34 | RRECOMMENDS:${PN} += "kernel-module-nf-tables" |
| 31 | 35 | ||
| 32 | PACKAGES =+ "${PN}-python" | 36 | PACKAGES =+ "${PN}-python" |
| 33 | FILES:${PN}-python = "${nonarch_libdir}/${PYTHON_DIR}" | 37 | FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}" |
| 34 | RDEPENDS:${PN}-python = "python3-core python3-json ${PN}" | 38 | RDEPENDS:${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 | ||
| 42 | do_configure() { | ||
| 43 | autotools_do_configure | ||
| 44 | if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then | ||
| 45 | setuptools3_do_configure | ||
| 46 | fi | ||
| 47 | } | ||
| 48 | |||
| 49 | do_compile() { | ||
| 50 | autotools_do_compile | ||
| 51 | if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then | ||
| 52 | setuptools3_do_compile | ||
| 53 | fi | ||
| 54 | } | ||
| 55 | |||
| 56 | do_install() { | ||
| 57 | autotools_do_install | ||
| 58 | if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then | ||
| 59 | setuptools3_do_install | ||
| 60 | fi | ||
| 61 | } | ||
| 62 | |||
| 36 | RDEPENDS:${PN}-ptest += " ${PN}-python bash make iproute2 iputils-ping procps python3-core python3-ctypes python3-json python3-misc sed util-linux" | 63 | RDEPENDS:${PN}-ptest += " ${PN}-python bash make iproute2 iputils-ping procps python3-core python3-ctypes python3-json python3-misc sed util-linux" |
| 37 | 64 | ||
| 38 | TESTDIR = "tests" | 65 | TESTDIR = "tests" |
| 39 | 66 | ||
| 40 | PRIVATE_LIBS:${PN}-ptest:append = " libnftables.so.1" | 67 | PRIVATE_LIBS:${PN}-ptest:append = " libnftables.so.1" |
| 41 | 68 | ||
| 42 | do_install:append() { | ||
| 43 | # Avoid "contains reference to TMPDIR" warning | ||
| 44 | find ${D} -name *.pyc -delete | ||
| 45 | } | ||
| 46 | |||
| 47 | do_install_ptest() { | 69 | do_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} |
