Skip to contentSkip to conversation

nftables: upgrade 0.9.2 -> 0.9.3

PATCH In review Alex Kiernan 1 participant 3 messages Dec 15, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 nftables: upgrade 0.9.2 -> 0.9.3

Also fill out PACKAGECONFIG options for json, mini-gmp, readline and xtables whilst matching existing behaviour. Drop PACKAGECONFIG to weak default. Fix upstream version matching so the very old 0.099 is rejected as the newest version.

Drop seemingly redundant ASNEEDED which was added in 5477d5bcb727 ("nftables: Upgrade to 0.7") without explanation.

---

 .../recipes-filter/nftables/nftables_0.9.2.bb | 28 ----------------
 .../recipes-filter/nftables/nftables_0.9.3.bb | 32 +++++++++++++++++++
 2 files changed, 32 insertions(+), 28 deletions(-)
 delete mode 100644 meta-networking/recipes-filter/nftables/nftables_0.9.2.bb
 create mode 100644 meta-networking/recipes-filter/nftables/nftables_0.9.3.bb
meta-networking/recipes-filter/nftables/nftables_0.9.2.bb deleted +0 -28
deleted file mode 100644
index 0c57e7255eaf..000000000000
@@ -1,28 +0,0 @@
-SUMMARY = "Netfilter Tables userspace utillites"
-SECTION = "net"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d1a78fdd879a263a5e0b42d1fc565e79"
-
-DEPENDS = "libmnl libnftnl readline gmp bison-native"
-
-UPSTREAM_CHECK_URI = "https://www.netfilter.org/projects/nftables/files/"
-
-SRC_URI = "http://www.netfilter.org/projects/nftables/files/${BP}.tar.bz2"
-SRC_URI[md5sum] = "dfe130724d7c998eb26b56447e932899"
-SRC_URI[sha256sum] = "5cb66180143e6bfc774f4eb316206d40ac1cb6df269a90882404cbf7165513f5"
-
-inherit autotools manpages pkgconfig
-
-PACKAGECONFIG ?= "python"
-PACKAGECONFIG[manpages] = ", --disable-man-doc, asciidoc-native"
-PACKAGECONFIG[python] = "--with-python-bin=${PYTHON}, --with-python-bin="", python3"
-
-inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)}
-
-ASNEEDED = ""
-
-RRECOMMENDS_${PN} += "kernel-module-nf-tables"
-
-PACKAGES =+ "${PN}-python"
-FILES_${PN}-python = "${libdir_native}/${PYTHON_DIR}"
-RDEPENDS_${PN}-python = "python3-core python3-json"
meta-networking/recipes-filter/nftables/nftables_0.9.3.bb new file +32 -0
new file mode 100644
index 000000000000..47cbf3a4b240
@@ -0,0 +1,32 @@
+SUMMARY = "Netfilter Tables userspace utillites"
+SECTION = "net"
+LICENSE = "GPLv2"
+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"
+SRC_URI[md5sum] = "9913b2b46864394d41916b74638e0875"
+SRC_URI[sha256sum] = "956b915ce2a7aeaff123e49006be7a0690a0964e96c062703181a36e2e5edb78"
+
+inherit autotools manpages pkgconfig
+
+PACKAGECONFIG ??= "python readline"
+PACKAGECONFIG[json] = "--with-json, --without-json, jansson"
+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[xtables] = "--with-xtables, --without-xtables, iptables"
+
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)}
+
+RRECOMMENDS_${PN} += "kernel-module-nf-tables"
+
+PACKAGES =+ "${PN}-python"
+FILES_${PN}-python = "${libdir}/${PYTHON_DIR}"
+RDEPENDS_${PN}-python = "python3-core python3-json"
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/2 ostree: Add support for gjs tests

Now gjs is packaged in meta-gnome, if that layer is available then enable the gjs tests. Also weaken test for python3-pyyaml so that building ptest without meta-python is possible (though more tests will have to be skipped).

---

 meta-oe/recipes-extended/ostree/ostree_2019.6.bb | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
meta-oe/recipes-extended/ostree/ostree_2019.6.bb +6 -7
index 86a7aac31c27..374ceb397ba0 100644
@@ -86,6 +86,10 @@ EXTRA_OECONF_class-native = " \
     --disable-otmpfile \
 "
 
+CACHED_CONFIGUREVARS += " \
+    ${@bb.utils.contains('BBFILE_COLLECTIONS', 'gnome-layer', 'ac_cv_path_GJS=${bindir}/gjs', '', d)} \
+"
+
 # Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the
 # do_configure stage so we do depend on it
 SYSROOT_DIR = "${STAGING_DIR_TARGET}"
@@ -166,9 +170,10 @@ RDEPENDS_${PN}-ptest += " \
     grep \
     python3-core \
     python3-multiprocessing \
-    python3-pyyaml \
     tar \
     ${PN}-trivial-httpd \
+    ${@bb.utils.contains('BBFILE_COLLECTIONS', 'gnome-layer', 'gjs', '', d)} \
+    ${@bb.utils.contains('BBFILE_COLLECTIONS', 'meta-python', 'python3-pyyaml', '', d)} \
 "
 RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils glibc-localedata-en-us"
 
@@ -179,9 +184,3 @@ SYSTEMD_SERVICE_${PN} = "ostree-remount.service ostree-finalize-staged.path"
 SYSTEMD_SERVICE_${PN}-switchroot = "ostree-prepare-root.service"
 
 BBCLASSEXTEND = "native"
-
-python __anonymous() {
-    if bb.utils.contains('PTEST_ENABLED', '1', 'True', '', d):
-        if not bb.utils.contains_any('BBFILE_COLLECTIONS', 'meta-python', 'True', '', d):
-            raise bb.parse.SkipRecipe('ptest requires meta-python to be present.')
-}
Signature · 1 line
2.17.1
#2 lore raw

Re: [meta-oe][PATCH 2/2] ostree: Add support for gjs tests

Quoted 7 lines · Alex Kiernan

Now gjs is packaged in meta-gnome, if that layer is available then enable the gjs tests. Also weaken test for python3-pyyaml so that building ptest without meta-python is possible (though more tests will have to be skipped).

gjs fails to build without gobject-introspection-data - will send a v2

Quoted 45 lines

---

 meta-oe/recipes-extended/ostree/ostree_2019.6.bb | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
meta-oe/recipes-extended/ostree/ostree_2019.6.bb +6 -8
index 86a7aac31c27..374ceb397ba0 100644
@@ -86,6 +86,10 @@ EXTRA_OECONF_class-native = " \
     --disable-otmpfile \
 "
 
+CACHED_CONFIGUREVARS += " \
+    ${@bb.utils.contains('BBFILE_COLLECTIONS', 'gnome-layer', 'ac_cv_path_GJS=${bindir}/gjs', '', d)} \
+"
+
 # Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the
 # do_configure stage so we do depend on it
 SYSROOT_DIR = "${STAGING_DIR_TARGET}"
@@ -166,9 +170,10 @@ RDEPENDS_${PN}-ptest += " \
     grep \
     python3-core \
     python3-multiprocessing \
-    python3-pyyaml \
     tar \
     ${PN}-trivial-httpd \
+    ${@bb.utils.contains('BBFILE_COLLECTIONS', 'gnome-layer', 'gjs', '', d)} \
+    ${@bb.utils.contains('BBFILE_COLLECTIONS', 'meta-python', 'python3-pyyaml', '', d)} \
 "
 RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils glibc-localedata-en-us"
 
@@ -179,9 +184,3 @@ SYSTEMD_SERVICE_${PN} = "ostree-remount.service ostree-finalize-staged.path"
 SYSTEMD_SERVICE_${PN}-switchroot = "ostree-prepare-root.service"
 
 BBCLASSEXTEND = "native"
-
-python __anonymous() {
-    if bb.utils.contains('PTEST_ENABLED', '1', 'True', '', d):
-        if not bb.utils.contains_any('BBFILE_COLLECTIONS', 'meta-python', 'True', '', d):
-            raise bb.parse.SkipRecipe('ptest requires meta-python to be present.')
-}
--

2.17.1

Signature · 1 line
Alex Kiernan