Skip to contentSkip to conversation

bluez5: remove udev dependency

PATCH Superseded David Frey 3 participants 6 messages May 22, 2019 – May 23, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

David Frey

author
#0 lore raw

PATCH 1/1 bluez5: remove udev dependency

udev is an optional dependency of bluez5, so use PACKAGECONFIG to allow users to decide if they want udev support.

---
 meta/recipes-connectivity/bluez5/bluez5.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-connectivity/bluez5/bluez5.inc +2 -1
index aaf2af975d..568de86d6d 100644
@@ -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 \
Signature · 1 line
2.21.0
#1 lore raw
Quoted 13 lines · David Frey

udev is an optional dependency of bluez5, so use PACKAGECONFIG to allow users to decide if they want udev support.

---
  meta/recipes-connectivity/bluez5/bluez5.inc | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-connectivity/bluez5/bluez5.inc +0 -0
index aaf2af975d..568de86d6d 100644

meta/recipes-connectivity/bluez5/bluez5.inc LICENSE = "GPLv2+ & LGPLv2.1+" · line 11

Quoted 7 lines
meta/recipes-connectivity/bluez5/bluez5.inc +1 -1
@@ -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"

Should it be enabled by default?

Quoted 9 lines
meta/recipes-connectivity/bluez5/bluez5.inc +1 -0
@@ -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 lore raw
In reply to David Frey
Quoted 22 lines · David Frey

udev is an optional dependency of bluez5, so use PACKAGECONFIG to allow users to decide if they want udev support.

---
 meta/recipes-connectivity/bluez5/bluez5.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-connectivity/bluez5/bluez5.inc +1 -1
index aaf2af975d..568de86d6d 100644
@@ -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"
 

meta/recipes-connectivity/bluez5/bluez5.inc PACKAGECONFIG[threads] = "--enable-threads,--disable-threads" · line 46

Quoted 5 lines
meta/recipes-connectivity/bluez5/bluez5.inc +1 -0
@@ -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.

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
author
#3 lore raw
Quoted 22 lines · Adrian Bunk
Quoted 21 lines · David Frey

udev is an optional dependency of bluez5, so use PACKAGECONFIG to allow users to decide if they want udev support.

---
 meta/recipes-connectivity/bluez5/bluez5.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-connectivity/bluez5/bluez5.inc +1 -1
index aaf2af975d..568de86d6d 100644
@@ -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"
 
Quoted 10 lines

meta/recipes-connectivity/bluez5/bluez5.inc PACKAGECONFIG[threads] = "--enable-threads,--disable-threads" · line 46

Quoted 6 lines
meta/recipes-connectivity/bluez5/bluez5.inc +1 -0
@@ -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

#4 lore raw
Quoted 32 lines · David Frey
Quoted 22 lines · Adrian Bunk
Quoted 21 lines · David Frey

udev is an optional dependency of bluez5, so use PACKAGECONFIG to allow users to decide if they want udev support.

---
  meta/recipes-connectivity/bluez5/bluez5.inc | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-connectivity/bluez5/bluez5.inc +1 -1
index aaf2af975d..568de86d6d 100644
@@ -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"
 
Quoted 9 lines

meta/recipes-connectivity/bluez5/bluez5.inc PACKAGECONFIG[threads] = "--enable-threads,--disable-threads" · line 46

Quoted 6 lines
meta/recipes-connectivity/bluez5/bluez5.inc +1 -0
@@ -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.

Quoted 5 lines

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.

Quoted 8 lines

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

author
#5 lore raw
Quoted 54 lines · Joshua Watt
Quoted 39 lines · David Frey
Quoted 22 lines · Adrian Bunk
Quoted 21 lines · David Frey

udev is an optional dependency of bluez5, so use PACKAGECONFIG to allow users to decide if they want udev support.

---
  meta/recipes-connectivity/bluez5/bluez5.inc | 3 ++-

  1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-connectivity/bluez5/bluez5.inc +0 -0
index aaf2af975d..568de86d6d 100644
@@ -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"

Quoted 16 lines
Quoted 5 lines
meta/recipes-connectivity/bluez5/bluez5.inc +1 -1
-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] =

Quoted 8 lines

"--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.

Quoted 5 lines

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.

Quoted 2 lines

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