[OE-core] [PATCH v3] bluez5: manage udev dependency with PACKAGECONFIG
udev is an optional dependency of bluez5, so use PACKAGECONFIG to give users the ability to build bluez5 without udev support. Signed-off-by: David Frey --- meta/recipes-connectivity/bluez5/bluez5.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc b/meta/recipes-connectivity/bluez5/bluez5.inc index aaf2af975d..93d1b4d8b0 100644 --- a/meta/recipes-connectivity/bluez5/bluez5.inc +++ b/meta/recipes-connectivity/bluez5/bluez5.inc @@ -6,7 +6,7 @@ LICENSE = "GPLv2+ & LGPLv2.1+" LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \ file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e" -DEPENDS = "udev dbus-glib glib-2.0" +DEPENDS = "dbus-glib glib-2.0" PROVIDES += "bluez-hcidump" RPROVIDES_${PN} += "bluez-hcidump" @@ -22,6 +22,7 @@ PACKAGECONFIG ??= "obex-profiles \ hog-profiles \ tools \ deprecated \ +udev \ " PACKAGECONFIG[obex-profiles] = "--enable-obex,--disable-obex,libical" PACKAGECONFIG[readline] = "--enable-client,--disable-client,readline," @@ -43,6 +44,7 @@ PACKAGECONFIG[threads] = "--enable-threads,--disable-threads" PACKAGECONFIG[deprecated] = "--enable-deprecated,--disable-deprecated" PACKAGECONFIG[mesh] = "--enable-mesh,--disable-mesh, json-c ell" PACKAGECONFIG[btpclient] = "--enable-btpclient,--disable-btpclient, ell" +PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,udev" SRC_URI = "\ ${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \ -- 2.21.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH v2] bluez5: remove udev dependency
On 5/25/2019 8:51 AM, Burton, Ross wrote: > The commit message and the patch disagree: you're not removing the > udev dependency but allowing the user to remove it. > > A better message would be 'bluez5: allow udev dependency to be > disabled with PACKAGECONFIG' Thanks for your feedback. I will send v3 with a clearer commit message. David > > Ross > > On Thu, 23 May 2019 at 17:42, David Frey wrote: >> >> udev is an optional dependency of bluez5, so use PACKAGECONFIG to allow >> users to decide if they want udev support. >> >> Signed-off-by: David Frey >> --- >> meta/recipes-connectivity/bluez5/bluez5.inc | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc >> b/meta/recipes-connectivity/bluez5/bluez5.inc >> index aaf2af975d..93d1b4d8b0 100644 >> --- a/meta/recipes-connectivity/bluez5/bluez5.inc >> +++ b/meta/recipes-connectivity/bluez5/bluez5.inc >> @@ -6,7 +6,7 @@ LICENSE = "GPLv2+ & LGPLv2.1+" >> LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ >> file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 >> \ >> >> file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e" >> -DEPENDS = "udev dbus-glib glib-2.0" >> +DEPENDS = "dbus-glib glib-2.0" >> PROVIDES += "bluez-hcidump" >> RPROVIDES_${PN} += "bluez-hcidump" >> >> @@ -22,6 +22,7 @@ PACKAGECONFIG ??= "obex-profiles \ >> hog-profiles \ >> tools \ >> deprecated \ >> +udev \ >> " >> PACKAGECONFIG[obex-profiles] = "--enable-obex,--disable-obex,libical" >> PACKAGECONFIG[readline] = "--enable-client,--disable-client,readline," >> @@ -43,6 +44,7 @@ PACKAGECONFIG[threads] = >> "--enable-threads,--disable-threads" >> PACKAGECONFIG[deprecated] = "--enable-deprecated,--disable-deprecated" >> PACKAGECONFIG[mesh] = "--enable-mesh,--disable-mesh, json-c ell" >> PACKAGECONFIG[btpclient] = "--enable-btpclient,--disable-btpclient, ell" >> +PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,udev" >> >> SRC_URI = "\ >> ${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \ >> -- >> 2.21.0 >> >> -- >> ___ >> Openembedded-core mailing list >> Openembedded-core@lists.openembedded.org >> http://lists.openembedded.org/mailman/listinfo/openembedded-core -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] bluez5: remove udev dependency
On 5/23/2019 9:30 AM, Joshua Watt wrote: > > On 5/23/19 11:12 AM, David Frey wrote: >> On 5/22/2019 3:03 PM, Adrian Bunk wrote: >>> On Wed, May 22, 2019 at 02:55:41PM -0700, David Frey wrote: >>>> udev is an optional dependency of bluez5, so use PACKAGECONFIG to allow >>>> users to decide if they want udev support. >>>> >>>> Signed-off-by: David Frey >>>> --- >>>> meta/recipes-connectivity/bluez5/bluez5.inc | 3 ++- >>>> 1 file changed, 2 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc >>>> b/meta/recipes-connectivity/bluez5/bluez5.inc >>>> index aaf2af975d..568de86d6d 100644 >>>> --- a/meta/recipes-connectivity/bluez5/bluez5.inc >>>> +++ b/meta/recipes-connectivity/bluez5/bluez5.inc >>>> @@ -6,7 +6,7 @@ LICENSE = "GPLv2+ & LGPLv2.1+" >>>> LIC_FILES_CHKSUM = >>>> "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ >>>> >>>> file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \ >>>> >>>> file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e" >>>> >>>> -DEPENDS = "udev dbus-glib glib-2.0" >>>> +DEPENDS = "dbus-glib glib-2.0" >>>> PROVIDES += "bluez-hcidump" >>>> RPROVIDES_${PN} += "bluez-hcidump" >>>> @@ -43,6 +43,7 @@ PACKAGECONFIG[threads] = >>>> "--enable-threads,--disable-threads" >>>> PACKAGECONFIG[deprecated] = >>>> "--enable-deprecated,--disable-deprecated" >>>> PACKAGECONFIG[mesh] = "--enable-mesh,--disable-mesh, json-c ell" >>>> PACKAGECONFIG[btpclient] = >>>> "--enable-btpclient,--disable-btpclient, ell" >>>> +PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,udev" >>>> ... >>> Unless there is a good reason to do otherwise, this should be added to >>> the default PACKAGECONFIG so that the set of features enabled by default >>> stays the same. >> I think bluez5 should be built with udev support if udev is going to be >> part of the system, but I don't think udev should be brought in as a >> dependency of bluez5 by default. How can I express this? I *think* >> this is what is done for systemd in the PACKAGECONFIG with this fragment: >> ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} > > I think it already is a dependency by default (before your patch). We > would like this to remain the default for current consumers of bluez > after your patch. I think the easiest way to do this is to have your > patch add "udev" to the default PACKAGECONFIG for the recipe. Then, in > your local.conf/distro.conf/whatever you can override the PACKAGECONFIG > for the recipe to remove udev for your use case. > > This way, your patch allow you to have bluez without udev, but you won't > break everyone else by suddenly removing it. I have submitted v2 based on your feedback. Thanks, David -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH v2] bluez5: remove udev dependency
udev is an optional dependency of bluez5, so use PACKAGECONFIG to allow users to decide if they want udev support. Signed-off-by: David Frey --- meta/recipes-connectivity/bluez5/bluez5.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc b/meta/recipes-connectivity/bluez5/bluez5.inc index aaf2af975d..93d1b4d8b0 100644 --- a/meta/recipes-connectivity/bluez5/bluez5.inc +++ b/meta/recipes-connectivity/bluez5/bluez5.inc @@ -6,7 +6,7 @@ LICENSE = "GPLv2+ & LGPLv2.1+" LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \ file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e" -DEPENDS = "udev dbus-glib glib-2.0" +DEPENDS = "dbus-glib glib-2.0" PROVIDES += "bluez-hcidump" RPROVIDES_${PN} += "bluez-hcidump" @@ -22,6 +22,7 @@ PACKAGECONFIG ??= "obex-profiles \ hog-profiles \ tools \ deprecated \ +udev \ " PACKAGECONFIG[obex-profiles] = "--enable-obex,--disable-obex,libical" PACKAGECONFIG[readline] = "--enable-client,--disable-client,readline," @@ -43,6 +44,7 @@ PACKAGECONFIG[threads] = "--enable-threads,--disable-threads" PACKAGECONFIG[deprecated] = "--enable-deprecated,--disable-deprecated" PACKAGECONFIG[mesh] = "--enable-mesh,--disable-mesh, json-c ell" PACKAGECONFIG[btpclient] = "--enable-btpclient,--disable-btpclient, ell" +PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,udev" SRC_URI = "\ ${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \ -- 2.21.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] bluez5: remove udev dependency
On 5/22/2019 3:03 PM, Adrian Bunk wrote: > On Wed, May 22, 2019 at 02:55:41PM -0700, David Frey wrote: >> udev is an optional dependency of bluez5, so use PACKAGECONFIG to allow >> users to decide if they want udev support. >> >> Signed-off-by: David Frey >> --- >> meta/recipes-connectivity/bluez5/bluez5.inc | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc >> b/meta/recipes-connectivity/bluez5/bluez5.inc >> index aaf2af975d..568de86d6d 100644 >> --- a/meta/recipes-connectivity/bluez5/bluez5.inc >> +++ b/meta/recipes-connectivity/bluez5/bluez5.inc >> @@ -6,7 +6,7 @@ LICENSE = "GPLv2+ & LGPLv2.1+" >> LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ >> file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 >> \ >> >> file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e" >> -DEPENDS = "udev dbus-glib glib-2.0" >> +DEPENDS = "dbus-glib glib-2.0" >> PROVIDES += "bluez-hcidump" >> RPROVIDES_${PN} += "bluez-hcidump" >> >> @@ -43,6 +43,7 @@ PACKAGECONFIG[threads] = >> "--enable-threads,--disable-threads" >> PACKAGECONFIG[deprecated] = "--enable-deprecated,--disable-deprecated" >> PACKAGECONFIG[mesh] = "--enable-mesh,--disable-mesh, json-c ell" >> PACKAGECONFIG[btpclient] = "--enable-btpclient,--disable-btpclient, ell" >> +PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,udev" >> ... > > Unless there is a good reason to do otherwise, this should be added to > the default PACKAGECONFIG so that the set of features enabled by default > stays the same. I think bluez5 should be built with udev support if udev is going to be part of the system, but I don't think udev should be brought in as a dependency of bluez5 by default. How can I express this? I *think* this is what is done for systemd in the PACKAGECONFIG with this fragment: ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} This uses DISTRO_FEATURES and based on this (https://www.yoctoproject.org/docs/2.7/mega-manual/mega-manual.html#ref-features-distro), it seems that there is no "udev" distro feature, so I'm not sure how to proceed. Thanks, David -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] bluez5: remove udev dependency
udev is an optional dependency of bluez5, so use PACKAGECONFIG to allow users to decide if they want udev support. Signed-off-by: David Frey --- meta/recipes-connectivity/bluez5/bluez5.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc b/meta/recipes-connectivity/bluez5/bluez5.inc index aaf2af975d..568de86d6d 100644 --- a/meta/recipes-connectivity/bluez5/bluez5.inc +++ b/meta/recipes-connectivity/bluez5/bluez5.inc @@ -6,7 +6,7 @@ LICENSE = "GPLv2+ & LGPLv2.1+" LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \ file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e" -DEPENDS = "udev dbus-glib glib-2.0" +DEPENDS = "dbus-glib glib-2.0" PROVIDES += "bluez-hcidump" RPROVIDES_${PN} += "bluez-hcidump" @@ -43,6 +43,7 @@ PACKAGECONFIG[threads] = "--enable-threads,--disable-threads" PACKAGECONFIG[deprecated] = "--enable-deprecated,--disable-deprecated" PACKAGECONFIG[mesh] = "--enable-mesh,--disable-mesh, json-c ell" PACKAGECONFIG[btpclient] = "--enable-btpclient,--disable-btpclient, ell" +PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,udev" SRC_URI = "\ ${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \ -- 2.21.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] bluez5: Fix status subcommand of init script
Update the bluez5 init script to resolve an issue where the status subcommand would exit without printing any message if bluez was not running. The early exit was caused by the fact that the init script has "set -e". When "pidof ${DAEMON} >/dev/null" is executed, the script terminates immediately if bluez isn't running because pidof returns a non-zero result. The fixed version does not suffer from this issue and makes use of the "status" function from the functions library. Signed-off-by: David Frey --- meta/recipes-connectivity/bluez5/bluez5/init | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/meta/recipes-connectivity/bluez5/bluez5/init b/meta/recipes-connectivity/bluez5/bluez5/init index d7972f2d95..ca9fa18549 100644 --- a/meta/recipes-connectivity/bluez5/bluez5/init +++ b/meta/recipes-connectivity/bluez5/bluez5/init @@ -1,5 +1,8 @@ #!/bin/sh +# Source function library +. /etc/init.d/functions + PATH=/sbin:/bin:/usr/sbin:/usr/bin DESC=bluetooth @@ -44,14 +47,7 @@ case $1 in $0 start ;; status) -pidof ${DAEMON} >/dev/null -status=$? -if [ $status -eq 0 ]; then - echo "bluetooth is running." -else -echo "bluetooth is not running" -fi -exit $status + status ${DAEMON} || exit $? ;; *) N=/etc/init.d/bluetooth -- 2.11.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core