* [PATCH] connman: fix nftables dependency
@ 2017-06-19 10:32 André Draszik
2017-06-19 12:02 ` Andreas Oberritter
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: André Draszik @ 2017-06-19 10:32 UTC (permalink / raw)
To: openembedded-core
From: André Draszik <adraszik@tycoint.com>
When building with nftables support, connman doesn't ever
depend on the nftables command line tool.
connman will depend on libmnl and libnftnl at build and
run time. In addition, the nftables rules it creates
depend on various kernel modules being present.
Update the PACKAGECONFIG to reflect this.
Signed-off-by: André Draszik <adraszik@tycoint.com>
Acked-by: Sylvain Lemieux <slemieux@tycoint.com>
---
meta/recipes-connectivity/connman/connman.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
index ab18f2fe01..132a58ff40 100644
--- a/meta/recipes-connectivity/connman/connman.inc
+++ b/meta/recipes-connectivity/connman/connman.inc
@@ -51,7 +51,7 @@ PACKAGECONFIG[l2tp] = "--enable-l2tp --with-l2tp=${sbindir}/xl2tpd,--disable-l2t
PACKAGECONFIG[pptp] = "--enable-pptp --with-pptp=${sbindir}/pptp,--disable-pptp,,pptp-linux"
# WISPr support for logging into hotspots, requires TLS
PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls,"
-PACKAGECONFIG[nftables] = "--with-firewall=nftables ,,nftables,nftables"
+PACKAGECONFIG[nftables] = "--with-firewall=nftables ,,libmnl libnftnl,kernel-module-nf-tables-ipv4 kernel-module-nft-chain-nat-ipv4 kernel-module-nft-chain-route-ipv4 kernel-module-nft-meta kernel-module-nft-masq-ipv4 kernel-module-nft-nat"
PACKAGECONFIG[iptables] = "--with-firewall=iptables ,,iptables,iptables"
INITSCRIPT_NAME = "connman"
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] connman: fix nftables dependency
2017-06-19 10:32 [PATCH] connman: fix nftables dependency André Draszik
@ 2017-06-19 12:02 ` Andreas Oberritter
2017-06-19 12:06 ` André Draszik
2017-06-19 12:40 ` Maxin B. John
2017-06-26 10:08 ` [PATCH v2 1/2] [RFC] base.bbclass: extend PACKAGECONFIG to also allow RRECOMMENDS André Draszik
2 siblings, 1 reply; 7+ messages in thread
From: Andreas Oberritter @ 2017-06-19 12:02 UTC (permalink / raw)
To: openembedded-core
Hi André,
On Mon, 19 Jun 2017 11:32:38 +0100
André Draszik <git@andred.net> wrote:
> From: André Draszik <adraszik@tycoint.com>
>
> When building with nftables support, connman doesn't ever
> depend on the nftables command line tool.
>
> connman will depend on libmnl and libnftnl at build and
> run time. In addition, the nftables rules it creates
> depend on various kernel modules being present.
>
> Update the PACKAGECONFIG to reflect this.
>
packageconfig creates runtime dependencies for the modules you added. This
will cause problems if the modules are built into the kernel binary. You
should add runtime recommendations instead.
Regards,
Andreas
> Signed-off-by: André Draszik <adraszik@tycoint.com>
> Acked-by: Sylvain Lemieux <slemieux@tycoint.com>
> ---
> meta/recipes-connectivity/connman/connman.inc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
> index ab18f2fe01..132a58ff40 100644
> --- a/meta/recipes-connectivity/connman/connman.inc
> +++ b/meta/recipes-connectivity/connman/connman.inc
> @@ -51,7 +51,7 @@ PACKAGECONFIG[l2tp] = "--enable-l2tp --with-l2tp=${sbindir}/xl2tpd,--disable-l2t
> PACKAGECONFIG[pptp] = "--enable-pptp --with-pptp=${sbindir}/pptp,--disable-pptp,,pptp-linux"
> # WISPr support for logging into hotspots, requires TLS
> PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls,"
> -PACKAGECONFIG[nftables] = "--with-firewall=nftables ,,nftables,nftables"
> +PACKAGECONFIG[nftables] = "--with-firewall=nftables ,,libmnl libnftnl,kernel-module-nf-tables-ipv4 kernel-module-nft-chain-nat-ipv4 kernel-module-nft-chain-route-ipv4 kernel-module-nft-meta kernel-module-nft-masq-ipv4 kernel-module-nft-nat"
> PACKAGECONFIG[iptables] = "--with-firewall=iptables ,,iptables,iptables"
>
> INITSCRIPT_NAME = "connman"
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] connman: fix nftables dependency
2017-06-19 12:02 ` Andreas Oberritter
@ 2017-06-19 12:06 ` André Draszik
2017-06-19 12:30 ` Andreas Oberritter
0 siblings, 1 reply; 7+ messages in thread
From: André Draszik @ 2017-06-19 12:06 UTC (permalink / raw)
To: openembedded-core
On Mon, 2017-06-19 at 14:02 +0200, Andreas Oberritter wrote:
> Hi André,
>
> On Mon, 19 Jun 2017 11:32:38 +0100
> André Draszik <git@andred.net> wrote:
>
> > From: André Draszik <adraszik@tycoint.com>
> >
> > When building with nftables support, connman doesn't ever
> > depend on the nftables command line tool.
> >
> > connman will depend on libmnl and libnftnl at build and
> > run time. In addition, the nftables rules it creates
> > depend on various kernel modules being present.
> >
> > Update the PACKAGECONFIG to reflect this.
> >
>
> packageconfig creates runtime dependencies for the modules you added. This
> will cause problems if the modules are built into the kernel binary. You
> should add runtime recommendations instead.
But they should all be fulfilled because of PACKAGES_DYNAMIC in
kernel.bbclass, no?
Cheers,
Andre'
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] connman: fix nftables dependency
2017-06-19 12:06 ` André Draszik
@ 2017-06-19 12:30 ` Andreas Oberritter
0 siblings, 0 replies; 7+ messages in thread
From: Andreas Oberritter @ 2017-06-19 12:30 UTC (permalink / raw)
To: openembedded-core
On Mon, 19 Jun 2017 13:06:41 +0100
André Draszik <git@andred.net> wrote:
> On Mon, 2017-06-19 at 14:02 +0200, Andreas Oberritter wrote:
> > Hi André,
> >
> > On Mon, 19 Jun 2017 11:32:38 +0100
> > André Draszik <git@andred.net> wrote:
> >
> > > From: André Draszik <adraszik@tycoint.com>
> > >
> > > When building with nftables support, connman doesn't ever
> > > depend on the nftables command line tool.
> > >
> > > connman will depend on libmnl and libnftnl at build and
> > > run time. In addition, the nftables rules it creates
> > > depend on various kernel modules being present.
> > >
> > > Update the PACKAGECONFIG to reflect this.
> > >
> >
> > packageconfig creates runtime dependencies for the modules you added. This
> > will cause problems if the modules are built into the kernel binary. You
> > should add runtime recommendations instead.
>
> But they should all be fulfilled because of PACKAGES_DYNAMIC in
> kernel.bbclass, no?
This will let the build succeed, but the package manager still aborts
when trying to install connman if some runtime dependencies don't exist
on the package feed. Runtime recommendations get ignored if missing, but
get installed by default otherwise.
Regards,
Andreas
>
> Cheers,
> Andre'
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] connman: fix nftables dependency
2017-06-19 10:32 [PATCH] connman: fix nftables dependency André Draszik
2017-06-19 12:02 ` Andreas Oberritter
@ 2017-06-19 12:40 ` Maxin B. John
2017-06-26 10:08 ` [PATCH v2 1/2] [RFC] base.bbclass: extend PACKAGECONFIG to also allow RRECOMMENDS André Draszik
2 siblings, 0 replies; 7+ messages in thread
From: Maxin B. John @ 2017-06-19 12:40 UTC (permalink / raw)
To: André Draszik; +Cc: openembedded-core
Hi,
On Mon, Jun 19, 2017 at 11:32:38AM +0100, André Draszik wrote:
> From: André Draszik <adraszik@tycoint.com>
>
> When building with nftables support, connman doesn't ever
> depend on the nftables command line tool.
>
> connman will depend on libmnl and libnftnl at build and
> run time. In addition, the nftables rules it creates
> depend on various kernel modules being present.
>
> Update the PACKAGECONFIG to reflect this.
>
> Signed-off-by: André Draszik <adraszik@tycoint.com>
> Acked-by: Sylvain Lemieux <slemieux@tycoint.com>
> ---
> meta/recipes-connectivity/connman/connman.inc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
> index ab18f2fe01..132a58ff40 100644
> --- a/meta/recipes-connectivity/connman/connman.inc
> +++ b/meta/recipes-connectivity/connman/connman.inc
> @@ -51,7 +51,7 @@ PACKAGECONFIG[l2tp] = "--enable-l2tp --with-l2tp=${sbindir}/xl2tpd,--disable-l2t
> PACKAGECONFIG[pptp] = "--enable-pptp --with-pptp=${sbindir}/pptp,--disable-pptp,,pptp-linux"
> # WISPr support for logging into hotspots, requires TLS
> PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls,"
> -PACKAGECONFIG[nftables] = "--with-firewall=nftables ,,nftables,nftables"
> +PACKAGECONFIG[nftables] = "--with-firewall=nftables ,,libmnl libnftnl,kernel-module-nf-tables-ipv4 kernel-module-nft-chain-nat-ipv4 kernel-module-nft-chain-route-ipv4 kernel-module-nft-meta kernel-module-nft-masq-ipv4 kernel-module-nft-nat"
> PACKAGECONFIG[iptables] = "--with-firewall=iptables ,,iptables,iptables"
Thanks for fixing this. However, this patch introduces some warnings:
WARNING: connman-1.34-r0 do_package_qa: QA Issue: connman rdepends on kernel-module-nf-tables-ipv4, but it isn't a build dependency? [build-deps]
WARNING: connman-1.34-r0 do_package_qa: QA Issue: connman rdepends on kernel-module-nft-chain-nat-ipv4, but it isn't a build dependency? [build-deps]
WARNING: connman-1.34-r0 do_package_qa: QA Issue: connman rdepends on kernel-module-nft-chain-route-ipv4, but it isn't a build dependency? [build-deps]
WARNING: connman-1.34-r0 do_package_qa: QA Issue: connman rdepends on kernel-module-nft-masq-ipv4, but it isn't a build dependency? [build-deps]
WARNING: connman-1.34-r0 do_package_qa: QA Issue: connman rdepends on kernel-module-nft-meta, but it isn't a build dependency? [build-deps]
WARNING: connman-1.34-r0 do_package_qa: QA Issue: connman rdepends on kernel-module-nft-nat, but it isn't a build dependency? [build-deps]
NOTE: Tasks Summary: Attempted 2032 tasks of which 2000 didn't need to be rerun and all succeeded.
Please consider fixing this as well.
Best Regards,
Maxin
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/2] [RFC] base.bbclass: extend PACKAGECONFIG to also allow RRECOMMENDS
2017-06-19 10:32 [PATCH] connman: fix nftables dependency André Draszik
2017-06-19 12:02 ` Andreas Oberritter
2017-06-19 12:40 ` Maxin B. John
@ 2017-06-26 10:08 ` André Draszik
2017-06-26 10:08 ` [PATCH v2 2/2] connman: fix nftables dependency André Draszik
2 siblings, 1 reply; 7+ messages in thread
From: André Draszik @ 2017-06-26 10:08 UTC (permalink / raw)
To: openembedded-core
From: André Draszik <adraszik@tycoint.com>
It can be useful to add RRECOMMENDS to packages created, based
on certain PACKAGECONFIGs.
In particular where a package depends on certain linux kernel
infrastructure (kernel modules) which might or might not be
built as a module, being able to RRECOMMENDS instead of
RDEPENDS on the relevant packages avoids build failures in
case those modules are built statically into the kernel, i.e.
in case no package is being created for them.
Add another field to the PACKAGECONFIG syntax to achieve just
that.
Signed-off-by: André Draszik <adraszik@tycoint.com>
---
meta/classes/base.bbclass | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 78926656d7..3762c8addc 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -384,7 +384,7 @@ python () {
# These take the form:
#
# PACKAGECONFIG ??= "<default options>"
- # PACKAGECONFIG[foo] = "--enable-foo,--disable-foo,foo_depends,foo_runtime_depends"
+ # PACKAGECONFIG[foo] = "--enable-foo,--disable-foo,foo_depends,foo_runtime_depends,foo_runtime_recommends"
pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {}
if pkgconfigflags:
pkgconfig = (d.getVar('PACKAGECONFIG') or "").split()
@@ -426,12 +426,13 @@ python () {
extradeps = []
extrardeps = []
+ extrarrecs = []
extraconf = []
for flag, flagval in sorted(pkgconfigflags.items()):
items = flagval.split(",")
num = len(items)
- if num > 4:
- bb.error("%s: PACKAGECONFIG[%s] Only enable,disable,depend,rdepend can be specified!"
+ if num > 5:
+ bb.error("%s: PACKAGECONFIG[%s] Only enable,disable,depend,rdepend,rrecommend can be specified!"
% (d.getVar('PN'), flag))
if flag in pkgconfig:
@@ -439,12 +440,15 @@ python () {
extradeps.append(items[2])
if num >= 4 and items[3]:
extrardeps.append(items[3])
+ if num >= 5 and items[4]:
+ extrarrecs.append(items[4])
if num >= 1 and items[0]:
extraconf.append(items[0])
elif num >= 2 and items[1]:
extraconf.append(items[1])
appendVar('DEPENDS', extradeps)
appendVar('RDEPENDS_${PN}', extrardeps)
+ appendVar('RRECOMMENDS_${PN}', extrarrecs)
appendVar('PACKAGECONFIG_CONFARGS', extraconf)
pn = d.getVar('PN')
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/2] connman: fix nftables dependency
2017-06-26 10:08 ` [PATCH v2 1/2] [RFC] base.bbclass: extend PACKAGECONFIG to also allow RRECOMMENDS André Draszik
@ 2017-06-26 10:08 ` André Draszik
0 siblings, 0 replies; 7+ messages in thread
From: André Draszik @ 2017-06-26 10:08 UTC (permalink / raw)
To: openembedded-core
From: André Draszik <adraszik@tycoint.com>
When building with nftables support, connman doesn't ever
depend on the nftables command line tool.
connman will depend on libmnl and libnftnl at build and
run time. In addition, the nftables rules it creates
depend on various kernel modules being present.
Update the PACKAGECONFIG to reflect this. We use the
just introduced RRECOMMENDS field so as to make the
build still succeed if those kernel modules have been
linked statically into the kernel, i.e. when the
packages haven't actually been created.
Signed-off-by: André Draszik <adraszik@tycoint.com>
Acked-by: Sylvain Lemieux <slemieux@tycoint.com>
---
meta/recipes-connectivity/connman/connman.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
index ab18f2fe01..141a464121 100644
--- a/meta/recipes-connectivity/connman/connman.inc
+++ b/meta/recipes-connectivity/connman/connman.inc
@@ -51,7 +51,7 @@ PACKAGECONFIG[l2tp] = "--enable-l2tp --with-l2tp=${sbindir}/xl2tpd,--disable-l2t
PACKAGECONFIG[pptp] = "--enable-pptp --with-pptp=${sbindir}/pptp,--disable-pptp,,pptp-linux"
# WISPr support for logging into hotspots, requires TLS
PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls,"
-PACKAGECONFIG[nftables] = "--with-firewall=nftables ,,nftables,nftables"
+PACKAGECONFIG[nftables] = "--with-firewall=nftables ,,libmnl libnftnl,,kernel-module-nf-tables-ipv4 kernel-module-nft-chain-nat-ipv4 kernel-module-nft-chain-route-ipv4 kernel-module-nft-meta kernel-module-nft-masq-ipv4 kernel-module-nft-nat"
PACKAGECONFIG[iptables] = "--with-firewall=iptables ,,iptables,iptables"
INITSCRIPT_NAME = "connman"
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-06-26 10:08 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-19 10:32 [PATCH] connman: fix nftables dependency André Draszik
2017-06-19 12:02 ` Andreas Oberritter
2017-06-19 12:06 ` André Draszik
2017-06-19 12:30 ` Andreas Oberritter
2017-06-19 12:40 ` Maxin B. John
2017-06-26 10:08 ` [PATCH v2 1/2] [RFC] base.bbclass: extend PACKAGECONFIG to also allow RRECOMMENDS André Draszik
2017-06-26 10:08 ` [PATCH v2 2/2] connman: fix nftables dependency André Draszik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox