Skip to contentSkip to conversation

nftables: upgrade v1.0.0 -> v1.0.2

PATCH In review Trevor Gamblin 2 participants 3 messages Mar 22, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nftables: upgrade v1.0.0 -> v1.0.2

Add libmnl and libnftnl to the RDEPENDS for the recipe. Also add a patch to remove the "example" directory from the list of build subdirs in Makefile.am, since this was added in v1.0.2 but it is breaking the build for content that we don't need in the image.

---
 ...e.am-do-not-build-examples-directory.patch | 34 +++++++++++++++++++
 .../{nftables_1.0.1.bb => nftables_1.0.2.bb}  |  8 +++--
 2 files changed, 40 insertions(+), 2 deletions(-)
 create mode 100644 meta-networking/recipes-filter/nftables/nftables/0001-Makefile.am-do-not-build-examples-directory.patch
 rename meta-networking/recipes-filter/nftables/{nftables_1.0.1.bb => nftables_1.0.2.bb} (85%)
meta-networking/recipes-filter/nftables/nftables/0001-Makefile.am-do-not-build-examples-directory.patch new file +34 -0
new file mode 100644
index 000000000..da568900c
@@ -0,0 +1,34 @@
+From 4a0a013647054994e089a024b07d76b25af6ab76 Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <[email protected]>
+Date: Tue, 22 Mar 2022 10:11:10 -0400
+Subject: [PATCH] Makefile.am: do not build examples directory
+
+v1.0.2 added the "examples" subdir in Makefile.am, but the contents of
+this directory do "#include <nftables/libnftables.h>", which is breaking
+the build. Since we don't need the content in that directory, patch it
+locally to prevent it from being built.
+
+Upstream-Status: Inappropriate (embedded-specific)
+
+Signed-off-by: Trevor Gamblin <[email protected]>
+---
+ Makefile.am | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 72fb4e88..4a17424d 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -3,8 +3,7 @@ ACLOCAL_AMFLAGS	= -I m4
+ SUBDIRS = 	src	\
+ 		include	\
+ 		files	\
+-		doc	\
+-		examples
++		doc
+ if HAVE_PYTHON
+ SUBDIRS += py
+ endif
+-- 
+2.35.1
+
meta-networking/recipes-filter/nftables/nftables_1.0.2.bb renamed from meta-networking/recipes-filter/nftables/nftables_1.0.1.bb +6 -2
similarity index 85%
rename from meta-networking/recipes-filter/nftables/nftables_1.0.1.bb
rename to meta-networking/recipes-filter/nftables/nftables_1.0.2.bb
index 2c378e8fd..1556b217f 100644
@@ -6,11 +6,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d1a78fdd879a263a5e0b42d1fc565e79"
 DEPENDS = "libmnl libnftnl bison-native \
            ${@bb.utils.contains('PACKAGECONFIG', 'mini-gmp', '', 'gmp', d)}"
 
+RDEPENDS:${PN} = "libmnl libnftnl"
+
 # 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[sha256sum] = "3ceeba625818e81a0be293e9dd486c3ef799ebd92165270f1e57e9a201efa423"
+SRC_URI = "http://www.netfilter.org/projects/nftables/files/${BP}.tar.bz2 \
+           file://0001-Makefile.am-do-not-build-examples-directory.patch \
+          "
+SRC_URI[sha256sum] = "0b28a36ffcf4567b841de7bd3f37918b1fed27859eb48bdec51e1f7a83954c02"
 
 inherit autotools manpages pkgconfig
 
Signature · 1 line
2.33.0
#1 lore raw

There is a prior patch doing this upgrade slightly differently

https://patchwork.yoctoproject.org/project/oe/patch/[email protected]/

and since it fixes the extramples/ build with a backport, I think thats better tha disabling the build.

This patch adds explicit rdeps on libmnl and libnftnl, is there a reason to do so ? is shlibs code failing to detect
the dependencies?

Quoted 91 lines · Trevor Gamblin

Add libmnl and libnftnl to the RDEPENDS for the recipe. Also add a patch to remove the "example" directory from the list of build subdirs in Makefile.am, since this was added in v1.0.2 but it is breaking the build for content that we don't need in the image.

---
 ...e.am-do-not-build-examples-directory.patch | 34 +++++++++++++++++++
 .../{nftables_1.0.1.bb => nftables_1.0.2.bb}  |  8 +++--
 2 files changed, 40 insertions(+), 2 deletions(-)
 create mode 100644 meta-networking/recipes-filter/nftables/nftables/0001-Makefile.am-do-not-build-examples-directory.patch
 rename meta-networking/recipes-filter/nftables/{nftables_1.0.1.bb => nftables_1.0.2.bb} (85%)
meta-networking/recipes-filter/nftables/nftables/0001-Makefile.am-do-not-build-examples-directory.patch new file +34 -0
new file mode 100644
index 000000000..da568900c
@@ -0,0 +1,34 @@
+From 4a0a013647054994e089a024b07d76b25af6ab76 Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <[email protected]>
+Date: Tue, 22 Mar 2022 10:11:10 -0400
+Subject: [PATCH] Makefile.am: do not build examples directory
+
+v1.0.2 added the "examples" subdir in Makefile.am, but the contents of
+this directory do "#include <nftables/libnftables.h>", which is breaking
+the build. Since we don't need the content in that directory, patch it
+locally to prevent it from being built.
+
+Upstream-Status: Inappropriate (embedded-specific)
+
+Signed-off-by: Trevor Gamblin <[email protected]>
+---
+ Makefile.am | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 72fb4e88..4a17424d 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -3,8 +3,7 @@ ACLOCAL_AMFLAGS        = -I m4
+ SUBDIRS =     src     \
+               include \
+               files   \
+-              doc     \
+-              examples
++              doc
+ if HAVE_PYTHON
+ SUBDIRS += py
+ endif
+--
+2.35.1
+
meta-networking/recipes-filter/nftables/nftables_1.0.2.bb renamed from meta-networking/recipes-filter/nftables/nftables_1.0.1.bb +6 -3
similarity index 85%
rename from meta-networking/recipes-filter/nftables/nftables_1.0.1.bb
rename to meta-networking/recipes-filter/nftables/nftables_1.0.2.bb
index 2c378e8fd..1556b217f 100644
@@ -6,11 +6,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d1a78fdd879a263a5e0b42d1fc565e79"
 DEPENDS = "libmnl libnftnl bison-native \
            ${@bb.utils.contains('PACKAGECONFIG', 'mini-gmp', '', 'gmp', d)}"
 
+RDEPENDS:${PN} = "libmnl libnftnl"
+
 # 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[sha256sum] = "3ceeba625818e81a0be293e9dd486c3ef799ebd92165270f1e57e9a201efa423"
+SRC_URI = "http://www.netfilter.org/projects/nftables/files/${BP}.tar.bz2 \
+           file://0001-Makefile.am-do-not-build-examples-directory.patch \
+          "
+SRC_URI[sha256sum] = "0b28a36ffcf4567b841de7bd3f37918b1fed27859eb48bdec51e1f7a83954c02"
 
 inherit autotools manpages pkgconfig
 
--

2.33.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#96141): https://lists.openembedded.org/g/openembedded-devel/message/96141
Mute This Topic: https://lists.openembedded.org/mt/89953861/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw
Quoted 8 lines · Khem Raj

[Please note: This e-mail is from an EXTERNAL e-mail address]

There is a prior patch doing this upgrade slightly differently

https://patchwork.yoctoproject.org/project/oe/patch/[email protected]/

and since it fixes the extramples/ build with a backport, I think thats better tha disabling the build.

Works for me, hadn't noticed that patch.

Quoted 4 lines

This patch adds explicit rdeps on libmnl and libnftnl, is there a reason to do so ? is shlibs code failing to detect
the dependencies?

I put it in as an attempt to make sure the above error wouldn't happen, but it looks like it's not the right approach. Let's keep ther existing patch.

Quoted 93 lines
Quoted 90 lines · Trevor Gamblin

Add libmnl and libnftnl to the RDEPENDS for the recipe. Also add a patch to remove the "example" directory from the list of build subdirs in Makefile.am, since this was added in v1.0.2 but it is breaking the build for content that we don't need in the image.

---
  ...e.am-do-not-build-examples-directory.patch | 34 +++++++++++++++++++
  .../{nftables_1.0.1.bb => nftables_1.0.2.bb}  |  8 +++--
  2 files changed, 40 insertions(+), 2 deletions(-)

create mode 100644 meta-networking/recipes-filter/nftables/nftables/0001-Makefile.am-do-not-build-examples-directory.patch rename meta-networking/recipes-filter/nftables/{nftables_1.0.1.bb => nftables_1.0.2.bb} (85%)

meta-networking/recipes-filter/nftables/nftables/0001-Makefile.am-do-not-build-examples-directory.patch new file +34 -0
new file mode 100644
index 000000000..da568900c
@@ -0,0 +1,34 @@
+From 4a0a013647054994e089a024b07d76b25af6ab76 Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <[email protected]>
+Date: Tue, 22 Mar 2022 10:11:10 -0400
+Subject: [PATCH] Makefile.am: do not build examples directory
+
+v1.0.2 added the "examples" subdir in Makefile.am, but the contents of
+this directory do "#include <nftables/libnftables.h>", which is breaking
+the build. Since we don't need the content in that directory, patch it
+locally to prevent it from being built.
+
+Upstream-Status: Inappropriate (embedded-specific)
+
+Signed-off-by: Trevor Gamblin <[email protected]>
+---
+ Makefile.am | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 72fb4e88..4a17424d 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -3,8 +3,7 @@ ACLOCAL_AMFLAGS        = -I m4
+ SUBDIRS =     src     \
+               include \
+               files   \
+-              doc     \
+-              examples
++              doc
+ if HAVE_PYTHON
+ SUBDIRS += py
+ endif
+--
+2.35.1
+
meta-networking/recipes-filter/nftables/nftables_1.0.2.bb renamed from meta-networking/recipes-filter/nftables/nftables_1.0.1.bb +6 -3
similarity index 85%
rename from meta-networking/recipes-filter/nftables/nftables_1.0.1.bb
rename to meta-networking/recipes-filter/nftables/nftables_1.0.2.bb
index 2c378e8fd..1556b217f 100644
@@ -6,11 +6,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d1a78fdd879a263a5e0b42d1fc565e79"
  DEPENDS = "libmnl libnftnl bison-native \
             ${@bb.utils.contains('PACKAGECONFIG', 'mini-gmp', '', 'gmp', d)}"
 
+RDEPENDS:${PN} = "libmnl libnftnl"
+
  # 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[sha256sum] = "3ceeba625818e81a0be293e9dd486c3ef799ebd92165270f1e57e9a201efa423"
+SRC_URI = "http://www.netfilter.org/projects/nftables/files/${BP}.tar.bz2 \
+           file://0001-Makefile.am-do-not-build-examples-directory.patch \
+          "
+SRC_URI[sha256sum] = "0b28a36ffcf4567b841de7bd3f37918b1fed27859eb48bdec51e1f7a83954c02"
 
  inherit autotools manpages pkgconfig
 
--

2.33.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#96141): https://lists.openembedded.org/g/openembedded-devel/message/96141
Mute This Topic: https://lists.openembedded.org/mt/89953861/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-