Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH/next v9 00/12] Introduce libudev (branch yem/libudev-6)
@ 2023-08-06 14:02 Bernd Kuhls
  2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 01/12] package/eudev: add option to enable the udev daemon Bernd Kuhls
                   ` (13 more replies)
  0 siblings, 14 replies; 17+ messages in thread
From: Bernd Kuhls @ 2023-08-06 14:02 UTC (permalink / raw)
  To: buildroot
  Cc: Eric Le Bihan, Sen Hastings, Fabrice Fontaine, Julien Corjon,
	Giulio Benetti, Yann E . MORIN, Norbert Lange

Hi,

quoting Yann from 2016:
https://lists.buildroot.org/pipermail/buildroot/2016-July/167371.html

"Hello All!

This series introduces the possibility to just build and install
libudev, without requiring that the /dev management be handled by
eudev or systemd.

A lot of packages that have a dependency on udev, in fact only require a
libudev, not a udev daemon. That's the case for e.g. libinput, libcec,
mesa3d...

During previous developers days, it was suggested that libudev was to be
made a virtual package that could be selected (like jpeg is). So I
eventually got some time to rework it (since the series was not adopted
by Peter as it was discussed during those DevDays:
https://lite5.framapad.org/p/buildrootfosdem15 ;-) ).

This series is a full rewrite from scratch, with very little caried over
from the previous attempts (far back in the past).

  - first come a few cleanup patches;

  - then eudev is split in two, virtually providing to different
    packages in one, with two different configure/build/install
    procedures, one for libudev only, one for the full package;

  - then the libudev virtual package is introduced, with eudev and
    systemd both declared as providers;

  - libudev is made selectable, so that packages can select it instead
    of depending (like is usual) on the virtual package;

  - eventually, two packages are converted over to using libudev:
    qt5base, as an optional implicit dependency, and libinput, as a
    mandatory dependency.

Not all packages that reference udev have been switched over to depend
on libudev, though, since it is unclear to me whether they require a
udev daemon, or would be happy with just libudev. This can be done in
follow up patches once libudev is eventually in the tree (for good this
time I hope! ;-) )"

This patch series was rebased on Yann's latest code from 2020:
https://git.buildroot.org/~ymorin/git/buildroot/log/?h=yem/libudev-6
as suggested in 2021:
https://lists.buildroot.org/pipermail/buildroot/2021-March/607988.html
"eudev now has had the ability to only build the library for a while
already"

and more packages were ported to make use of libudev.

Bernd Kuhls (4):
  package/kodi: only needs libudev, not udev daemon
  package/libv4l: optionally use libudev
  package/libcec: optionally use libudev
  package/usbutils: only needs libudev, not udev daemon

Yann E. MORIN (8):
  package/eudev: add option to enable the udev daemon
  package/eudev: allow building only the library
  package/libudev: new virtual package
  package/eudev: provides libudev
  package/systemd: provides libudev
  package/libudev: make it selectable
  package/qt5base: optionally use libudev
  package/libinput: only needs libudev, not udev daemon

 package/Config.in              |  1 +
 package/eudev/Config.in        | 45 +++++++++++++++++++++++++-------
 package/eudev/eudev.mk         | 47 ++++++++++++++++++++++++----------
 package/kodi/Config.in         |  4 +--
 package/kodi/kodi.mk           |  4 +--
 package/libcec/libcec.mk       |  4 +--
 package/libinput/Config.in     | 10 +++++---
 package/libinput/libinput.mk   |  2 +-
 package/libudev/Config.in      | 13 ++++++++++
 package/libudev/libudev.mk     |  7 +++++
 package/libv4l/libv4l.mk       |  4 +--
 package/qt5/qt5base/qt5base.mk |  4 +--
 package/systemd/Config.in      |  4 +++
 package/systemd/systemd.mk     |  2 +-
 package/usbutils/Config.in     | 12 ++++++---
 package/usbutils/usbutils.mk   |  2 +-
 system/Config.in               |  1 +
 17 files changed, 124 insertions(+), 42 deletions(-)
 create mode 100644 package/libudev/Config.in
 create mode 100644 package/libudev/libudev.mk

-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH/next v9 01/12] package/eudev: add option to enable the udev daemon
  2023-08-06 14:02 [Buildroot] [PATCH/next v9 00/12] Introduce libudev (branch yem/libudev-6) Bernd Kuhls
@ 2023-08-06 14:02 ` Bernd Kuhls
  2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 02/12] package/eudev: allow building only the library Bernd Kuhls
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 17+ messages in thread
From: Bernd Kuhls @ 2023-08-06 14:02 UTC (permalink / raw)
  To: buildroot
  Cc: Eric Le Bihan, Sen Hastings, Fabrice Fontaine, Julien Corjon,
	Giulio Benetti, Yann E . MORIN, Norbert Lange

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

This is currently forcefully enabled, and does not (yet) change the way
we handle eudev-based /dev management, but will help introduce libudev
in followup commits.

The rules generator does not make sense without the daemon, while the
hardware database (hwdb) is used by the library.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
 package/eudev/Config.in | 24 +++++++++++++++++-------
 system/Config.in        |  1 +
 2 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/package/eudev/Config.in b/package/eudev/Config.in
index 6e7bbe4648..a561a96edf 100644
--- a/package/eudev/Config.in
+++ b/package/eudev/Config.in
@@ -4,12 +4,6 @@ config BR2_PACKAGE_EUDEV
 	depends on BR2_USE_MMU # uses fork()
 	depends on BR2_USE_WCHAR # needs C99 compiler
 	depends on !BR2_STATIC_LIBS # kmod
-	select BR2_PACKAGE_HAS_UDEV
-	select BR2_PACKAGE_UDEV_GENTOO_SCRIPTS if BR2_INIT_OPENRC
-	select BR2_PACKAGE_UTIL_LINUX
-	select BR2_PACKAGE_UTIL_LINUX_LIBS
-	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
-	select BR2_PACKAGE_KMOD
 	help
 	  eudev is a fork of systemd-udev with the goal of obtaining
 	  better compatibility with existing software such as OpenRC and
@@ -20,6 +14,20 @@ config BR2_PACKAGE_EUDEV
 
 if BR2_PACKAGE_EUDEV
 
+config BR2_PACKAGE_EUDEV_DAEMON
+	bool "udev daemon"
+	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
+	select BR2_PACKAGE_HAS_UDEV
+	select BR2_PACKAGE_UDEV_GENTOO_SCRIPTS if BR2_INIT_OPENRC
+	select BR2_PACKAGE_UTIL_LINUX
+	select BR2_PACKAGE_UTIL_LINUX_LIBS
+	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
+	select BR2_PACKAGE_KMOD
+	help
+	  Install the udev daemon.
+
+if BR2_PACKAGE_EUDEV_DAEMON
+
 config BR2_PACKAGE_PROVIDES_UDEV
 	default "eudev"
 
@@ -28,6 +36,8 @@ config BR2_PACKAGE_EUDEV_RULES_GEN
 	help
 	  Enable persistent rules generator
 
+endif # BR2_PACKAGE_EUDEV_DAEMON
+
 config BR2_PACKAGE_EUDEV_ENABLE_HWDB
 	bool "enable hwdb installation"
 	default y
@@ -35,7 +45,7 @@ config BR2_PACKAGE_EUDEV_ENABLE_HWDB
 	help
 	  Enables hardware database installation to /etc/udev/hwdb.bin
 
-endif
+endif # BR2_PACKAGE_EUDEV
 
 comment "eudev needs eudev /dev management"
 	depends on BR2_USE_MMU
diff --git a/system/Config.in b/system/Config.in
index 24798dc068..a77631cb6c 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -228,6 +228,7 @@ config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_USE_MMU # eudev
 	select BR2_PACKAGE_EUDEV
+	select BR2_PACKAGE_EUDEV_DAEMON
 
 comment "eudev needs a toolchain w/ wchar, dynamic library"
 	depends on BR2_USE_MMU
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH/next v9 02/12] package/eudev: allow building only the library
  2023-08-06 14:02 [Buildroot] [PATCH/next v9 00/12] Introduce libudev (branch yem/libudev-6) Bernd Kuhls
  2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 01/12] package/eudev: add option to enable the udev daemon Bernd Kuhls
@ 2023-08-06 14:02 ` Bernd Kuhls
  2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 03/12] package/libudev: new virtual package Bernd Kuhls
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 17+ messages in thread
From: Bernd Kuhls @ 2023-08-06 14:02 UTC (permalink / raw)
  To: buildroot
  Cc: Eric Le Bihan, Sen Hastings, Fabrice Fontaine, Julien Corjon,
	Giulio Benetti, Yann E . MORIN, Norbert Lange

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
 package/eudev/Config.in | 12 +++++++----
 package/eudev/eudev.mk  | 46 ++++++++++++++++++++++++++++-------------
 2 files changed, 40 insertions(+), 18 deletions(-)

diff --git a/package/eudev/Config.in b/package/eudev/Config.in
index a561a96edf..e31f8ae8c8 100644
--- a/package/eudev/Config.in
+++ b/package/eudev/Config.in
@@ -1,9 +1,9 @@
 config BR2_PACKAGE_EUDEV
 	bool "eudev"
-	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
 	depends on BR2_USE_MMU # uses fork()
 	depends on BR2_USE_WCHAR # needs C99 compiler
 	depends on !BR2_STATIC_LIBS # kmod
+	depends on !BR2_INIT_SYSTEMD
 	help
 	  eudev is a fork of systemd-udev with the goal of obtaining
 	  better compatibility with existing software such as OpenRC and
@@ -45,12 +45,16 @@ config BR2_PACKAGE_EUDEV_ENABLE_HWDB
 	help
 	  Enables hardware database installation to /etc/udev/hwdb.bin
 
-endif # BR2_PACKAGE_EUDEV
-
-comment "eudev needs eudev /dev management"
+comment "udev daemon needs eudev /dev management"
 	depends on BR2_USE_MMU
 	depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
 
+endif # BR2_PACKAGE_EUDEV
+
 comment "eudev needs a toolchain w/ wchar, dynamic library"
 	depends on BR2_USE_MMU
 	depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS
+	depends on !BR2_INIT_SYSTEMD
+
+comment "eudev is incompatible with systemd init"
+	depends on BR2_INIT_SYSTEMD
diff --git a/package/eudev/eudev.mk b/package/eudev/eudev.mk
index 235a71967e..120307b6e6 100644
--- a/package/eudev/eudev.mk
+++ b/package/eudev/eudev.mk
@@ -10,34 +10,41 @@ EUDEV_LICENSE = GPL-2.0+ (programs), LGPL-2.1+ (libraries)
 EUDEV_LICENSE_FILES = COPYING
 EUDEV_INSTALL_STAGING = YES
 
+EUDEV_DEPENDENCIES = host-gperf host-pkgconf
+
 EUDEV_CONF_OPTS = \
 	--disable-manpages \
-	--sbindir=/sbin \
-	--libexecdir=/lib \
 	--disable-introspection \
-	--enable-kmod \
-	--enable-blkid
-
-# eudev requires only the util-linux libraries at build time
-EUDEV_DEPENDENCIES = host-gperf host-pkgconf util-linux-libs kmod
-EUDEV_PROVIDES = udev
+	--libexecdir=/lib
 
 ifeq ($(BR2_ROOTFS_MERGED_USR),)
 EUDEV_CONF_OPTS += --with-rootlibdir=/lib --enable-split-usr
 endif
 
-ifeq ($(BR2_PACKAGE_EUDEV_RULES_GEN),y)
-EUDEV_CONF_OPTS += --enable-rule-generator
-else
-EUDEV_CONF_OPTS += --disable-rule-generator
-endif
-
 ifeq ($(BR2_PACKAGE_EUDEV_ENABLE_HWDB),y)
 EUDEV_CONF_OPTS += --enable-hwdb
 else
 EUDEV_CONF_OPTS += --disable-hwdb
 endif
 
+ifeq ($(BR2_PACKAGE_EUDEV_DAEMON),y)
+
+# eudev requires only the util-linux libraries at build time
+EUDEV_DEPENDENCIES += util-linux-libs kmod
+EUDEV_PROVIDES = udev
+
+EUDEV_CONF_OPTS += \
+	--enable-programs \
+	--sbindir=/sbin \
+	--enable-kmod \
+	--enable-blkid
+
+ifeq ($(BR2_PACKAGE_EUDEV_RULES_GEN),y)
+EUDEV_CONF_OPTS += --enable-rule-generator
+else
+EUDEV_CONF_OPTS += --disable-rule-generator
+endif
+
 ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
 EUDEV_CONF_OPTS += --enable-selinux
 EUDEV_DEPENDENCIES += libselinux
@@ -55,6 +62,17 @@ define EUDEV_INSTALL_INIT_OPENRC
 	@:
 endef
 
+else # !BR2_PACKAGE_EUDEV_DAEMON
+
+EUDEV_CONF_OPTS += \
+	--disable-programs \
+	--disable-blkid \
+	--disable-selinux \
+	--disable-kmod \
+	--disable-rule-generator
+
+endif
+
 HOST_EUDEV_DEPENDENCIES = host-gperf host-pkgconf
 
 HOST_EUDEV_CONF_OPTS = \
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH/next v9 03/12] package/libudev: new virtual package
  2023-08-06 14:02 [Buildroot] [PATCH/next v9 00/12] Introduce libudev (branch yem/libudev-6) Bernd Kuhls
  2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 01/12] package/eudev: add option to enable the udev daemon Bernd Kuhls
  2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 02/12] package/eudev: allow building only the library Bernd Kuhls
@ 2023-08-06 14:02 ` Bernd Kuhls
  2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 04/12] package/eudev: provides libudev Bernd Kuhls
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 17+ messages in thread
From: Bernd Kuhls @ 2023-08-06 14:02 UTC (permalink / raw)
  To: buildroot
  Cc: Eric Le Bihan, Sen Hastings, Fabrice Fontaine, Julien Corjon,
	Giulio Benetti, Yann E . MORIN, Norbert Lange

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
 package/Config.in          | 1 +
 package/libudev/Config.in  | 6 ++++++
 package/libudev/libudev.mk | 7 +++++++
 3 files changed, 14 insertions(+)
 create mode 100644 package/libudev/Config.in
 create mode 100644 package/libudev/libudev.mk

diff --git a/package/Config.in b/package/Config.in
index dd57856444..dfcb666be6 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -531,6 +531,7 @@ endmenu
 	source "package/libiec61850/Config.in"
 	source "package/libmanette/Config.in"
 	source "package/libubootenv/Config.in"
+	source "package/libudev/Config.in"
 	source "package/libuio/Config.in"
 	source "package/linux-backports/Config.in"
 	source "package/linux-serial-test/Config.in"
diff --git a/package/libudev/Config.in b/package/libudev/Config.in
new file mode 100644
index 0000000000..2dbafe4991
--- /dev/null
+++ b/package/libudev/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_HAS_LIBUDEV
+	bool
+
+config BR2_PACKAGE_PROVIDES_LIBUDEV
+	string
+	depends on BR2_PACKAGE_HAS_LIBUDEV
diff --git a/package/libudev/libudev.mk b/package/libudev/libudev.mk
new file mode 100644
index 0000000000..af1b3ddb51
--- /dev/null
+++ b/package/libudev/libudev.mk
@@ -0,0 +1,7 @@
+################################################################################
+#
+# libudev
+#
+################################################################################
+
+$(eval $(virtual-package))
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH/next v9 04/12] package/eudev: provides libudev
  2023-08-06 14:02 [Buildroot] [PATCH/next v9 00/12] Introduce libudev (branch yem/libudev-6) Bernd Kuhls
                   ` (2 preceding siblings ...)
  2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 03/12] package/libudev: new virtual package Bernd Kuhls
@ 2023-08-06 14:02 ` Bernd Kuhls
  2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 05/12] package/systemd: " Bernd Kuhls
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 17+ messages in thread
From: Bernd Kuhls @ 2023-08-06 14:02 UTC (permalink / raw)
  To: buildroot
  Cc: Eric Le Bihan, Sen Hastings, Fabrice Fontaine, Julien Corjon,
	Giulio Benetti, Yann E . MORIN, Norbert Lange

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
 package/eudev/Config.in | 4 ++++
 package/eudev/eudev.mk  | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/package/eudev/Config.in b/package/eudev/Config.in
index e31f8ae8c8..b7fa6b8bc5 100644
--- a/package/eudev/Config.in
+++ b/package/eudev/Config.in
@@ -4,6 +4,7 @@ config BR2_PACKAGE_EUDEV
 	depends on BR2_USE_WCHAR # needs C99 compiler
 	depends on !BR2_STATIC_LIBS # kmod
 	depends on !BR2_INIT_SYSTEMD
+	select BR2_PACKAGE_HAS_LIBUDEV
 	help
 	  eudev is a fork of systemd-udev with the goal of obtaining
 	  better compatibility with existing software such as OpenRC and
@@ -14,6 +15,9 @@ config BR2_PACKAGE_EUDEV
 
 if BR2_PACKAGE_EUDEV
 
+config BR2_PACKAGE_PROVIDES_LIBUDEV
+	default "eudev"
+
 config BR2_PACKAGE_EUDEV_DAEMON
 	bool "udev daemon"
 	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
diff --git a/package/eudev/eudev.mk b/package/eudev/eudev.mk
index 120307b6e6..6de82acbdb 100644
--- a/package/eudev/eudev.mk
+++ b/package/eudev/eudev.mk
@@ -11,6 +11,7 @@ EUDEV_LICENSE_FILES = COPYING
 EUDEV_INSTALL_STAGING = YES
 
 EUDEV_DEPENDENCIES = host-gperf host-pkgconf
+EUDEV_PROVIDES = libudev
 
 EUDEV_CONF_OPTS = \
 	--disable-manpages \
@@ -31,7 +32,7 @@ ifeq ($(BR2_PACKAGE_EUDEV_DAEMON),y)
 
 # eudev requires only the util-linux libraries at build time
 EUDEV_DEPENDENCIES += util-linux-libs kmod
-EUDEV_PROVIDES = udev
+EUDEV_PROVIDES += udev
 
 EUDEV_CONF_OPTS += \
 	--enable-programs \
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH/next v9 05/12] package/systemd: provides libudev
  2023-08-06 14:02 [Buildroot] [PATCH/next v9 00/12] Introduce libudev (branch yem/libudev-6) Bernd Kuhls
                   ` (3 preceding siblings ...)
  2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 04/12] package/eudev: provides libudev Bernd Kuhls
@ 2023-08-06 14:02 ` Bernd Kuhls
  2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 06/12] package/libudev: make it selectable Bernd Kuhls
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 17+ messages in thread
From: Bernd Kuhls @ 2023-08-06 14:02 UTC (permalink / raw)
  To: buildroot
  Cc: Eric Le Bihan, Sen Hastings, Fabrice Fontaine, Julien Corjon,
	Giulio Benetti, Yann E . MORIN, Norbert Lange

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
 package/systemd/Config.in  | 4 ++++
 package/systemd/systemd.mk | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/package/systemd/Config.in b/package/systemd/Config.in
index 859332d9e4..40409bc612 100644
--- a/package/systemd/Config.in
+++ b/package/systemd/Config.in
@@ -25,6 +25,7 @@ menuconfig BR2_PACKAGE_SYSTEMD
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14 # LOOP_SET_BLOCK_SIZE
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5
 	depends on BR2_HOST_GCC_AT_LEAST_5 # host-systemd
+	select BR2_PACKAGE_HAS_LIBUDEV
 	select BR2_PACKAGE_HAS_UDEV
 	select BR2_PACKAGE_DBUS if !BR2_PACKAGE_DBUS_BROKER # runtime
 	select BR2_PACKAGE_LIBCAP
@@ -104,6 +105,9 @@ menuconfig BR2_PACKAGE_SYSTEMD
 
 if BR2_PACKAGE_SYSTEMD
 
+config BR2_PACKAGE_PROVIDES_LIBUDEV
+	default "systemd"
+
 config BR2_PACKAGE_PROVIDES_UDEV
 	default "systemd"
 
diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
index d220673572..e52b84e013 100644
--- a/package/systemd/systemd.mk
+++ b/package/systemd/systemd.mk
@@ -60,7 +60,7 @@ SYSTEMD_DEPENDENCIES = \
 
 SYSTEMD_SELINUX_MODULES = systemd udev xdg
 
-SYSTEMD_PROVIDES = udev
+SYSTEMD_PROVIDES = libudev udev
 
 SYSTEMD_CONF_OPTS += \
 	-Ddbus=false \
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH/next v9 06/12] package/libudev: make it selectable
  2023-08-06 14:02 [Buildroot] [PATCH/next v9 00/12] Introduce libudev (branch yem/libudev-6) Bernd Kuhls
                   ` (4 preceding siblings ...)
  2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 05/12] package/systemd: " Bernd Kuhls
@ 2023-08-06 14:02 ` Bernd Kuhls
  2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 07/12] package/qt5base: optionally use libudev Bernd Kuhls
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 17+ messages in thread
From: Bernd Kuhls @ 2023-08-06 14:02 UTC (permalink / raw)
  To: buildroot
  Cc: Eric Le Bihan, Sen Hastings, Fabrice Fontaine, Julien Corjon,
	Giulio Benetti, Yann E . MORIN, Norbert Lange

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Usually, it is not possible for a package to select a virtual package it
depends on, and expects a provider to suddenly be available.

However, for libudev, this is slightly simpler: there will be only two
providers ever: eudev and systemd. Both are incompatible one with the
other, systemd is only available if chosen as an init system.

So, if systemd is not enabled (as an init system), then we can
forcefully enable eudev as the provider for libudev.

However, this can cause circular dependencies in Kconfig, du to a rather
complex chain of select and depends. For example, when libinput is
converting in a later patch, we'd end up with:

    package/weston/Config.in:6:error: recursive dependency detected!
    package/weston/Config.in:6:     symbol BR2_PACKAGE_WESTON depends on BR2_PACKAGE_HAS_UDEV
    package/udev/Config.in:1:       symbol BR2_PACKAGE_HAS_UDEV is selected by BR2_PACKAGE_EUDEV_DAEMON
    package/eudev/Config.in:24:     symbol BR2_PACKAGE_EUDEV_DAEMON depends on BR2_PACKAGE_EUDEV
    package/eudev/Config.in:1:      symbol BR2_PACKAGE_EUDEV is selected by BR2_PACKAGE_LIBUDEV
    package/libudev/Config.in:1:    symbol BR2_PACKAGE_LIBUDEV is selected by BR2_PACKAGE_LIBINPUT
    package/libinput/Config.in:1:   symbol BR2_PACKAGE_LIBINPUT is selected by BR2_PACKAGE_WESTON

The root cause being a mis-match of select and depends on in the same
chain, where Kconfig can not determine that an external condition will
ensure that the chain is in fact broken at some point.

To fix that, we move the symbol for the eudev daemon out of the eudev
if-block. This breaks the chain.

Yet, we still want to tell the user that the daemon is enabled, so we
introduce a dummy symbol, just for the sake of having a forced-on
prompt.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
 package/eudev/Config.in   | 25 +++++++++++++++++--------
 package/libudev/Config.in |  7 +++++++
 2 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/package/eudev/Config.in b/package/eudev/Config.in
index b7fa6b8bc5..d35e442c2f 100644
--- a/package/eudev/Config.in
+++ b/package/eudev/Config.in
@@ -1,3 +1,17 @@
+# This symbol is outside the eudev if-block, so that we do not have
+# a circular dependency in kconfig. Thus, we need the dummy symbol,
+# below, to inform the user that the daemon has indeed been enabled.
+config BR2_PACKAGE_EUDEV_DAEMON
+	bool
+	select BR2_PACKAGE_HAS_UDEV
+	select BR2_PACKAGE_UDEV_GENTOO_SCRIPTS if BR2_INIT_OPENRC
+	select BR2_PACKAGE_UTIL_LINUX
+	select BR2_PACKAGE_UTIL_LINUX_LIBS
+	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
+	select BR2_PACKAGE_KMOD
+	# We can select this has we're sure eudev is selected when we are.
+	select BR2_PACKAGE_EUDEV_DAEMON_DUMMY
+
 config BR2_PACKAGE_EUDEV
 	bool "eudev"
 	depends on BR2_USE_MMU # uses fork()
@@ -18,19 +32,14 @@ if BR2_PACKAGE_EUDEV
 config BR2_PACKAGE_PROVIDES_LIBUDEV
 	default "eudev"
 
-config BR2_PACKAGE_EUDEV_DAEMON
+config BR2_PACKAGE_EUDEV_DAEMON_DUMMY
 	bool "udev daemon"
 	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
-	select BR2_PACKAGE_HAS_UDEV
-	select BR2_PACKAGE_UDEV_GENTOO_SCRIPTS if BR2_INIT_OPENRC
-	select BR2_PACKAGE_UTIL_LINUX
-	select BR2_PACKAGE_UTIL_LINUX_LIBS
-	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
-	select BR2_PACKAGE_KMOD
 	help
 	  Install the udev daemon.
 
-if BR2_PACKAGE_EUDEV_DAEMON
+# Use the dummy symbol for proper indetation
+if BR2_PACKAGE_EUDEV_DAEMON_DUMMY
 
 config BR2_PACKAGE_PROVIDES_UDEV
 	default "eudev"
diff --git a/package/libudev/Config.in b/package/libudev/Config.in
index 2dbafe4991..8784f4374a 100644
--- a/package/libudev/Config.in
+++ b/package/libudev/Config.in
@@ -1,3 +1,10 @@
+config BR2_PACKAGE_LIBUDEV
+	bool
+	depends on BR2_USE_MMU # eudev / systemd
+	depends on BR2_USE_WCHAR # eudev / systemd
+	depends on !BR2_STATIC_LIBS # eudev / systemd
+	select BR2_PACKAGE_EUDEV if !BR2_PACKAGE_SYSTEMD
+
 config BR2_PACKAGE_HAS_LIBUDEV
 	bool
 
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH/next v9 07/12] package/qt5base: optionally use libudev
  2023-08-06 14:02 [Buildroot] [PATCH/next v9 00/12] Introduce libudev (branch yem/libudev-6) Bernd Kuhls
                   ` (5 preceding siblings ...)
  2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 06/12] package/libudev: make it selectable Bernd Kuhls
@ 2023-08-06 14:02 ` Bernd Kuhls
  2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 08/12] package/libinput: only needs libudev, not udev daemon Bernd Kuhls
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 17+ messages in thread
From: Bernd Kuhls @ 2023-08-06 14:02 UTC (permalink / raw)
  To: buildroot
  Cc: Eric Le Bihan, Yann E. MORIN, Sen Hastings, Fabrice Fontaine,
	Julien Corjon, Giulio Benetti, Yann E . MORIN, Norbert Lange

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

qt5base only requires libudev, not a full udev daemon.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: "Yann E. MORIN" <yann.morin@orange.com>
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
 package/qt5/qt5base/qt5base.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
index 028236d2ed..f7d6559d9f 100644
--- a/package/qt5/qt5base/qt5base.mk
+++ b/package/qt5/qt5base/qt5base.mk
@@ -105,8 +105,8 @@ ifneq ($(QT5BASE_CONFIG_FILE),)
 QT5BASE_CONFIGURE_OPTS += -qconfig buildroot
 endif
 
-ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
-QT5BASE_DEPENDENCIES += udev
+ifeq ($(BR2_PACKAGE_HAS_LIBUDEV),y)
+QT5BASE_DEPENDENCIES += libudev
 endif
 
 ifeq ($(BR2_PACKAGE_CUPS), y)
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH/next v9 08/12] package/libinput: only needs libudev, not udev daemon
  2023-08-06 14:02 [Buildroot] [PATCH/next v9 00/12] Introduce libudev (branch yem/libudev-6) Bernd Kuhls
                   ` (6 preceding siblings ...)
  2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 07/12] package/qt5base: optionally use libudev Bernd Kuhls
@ 2023-08-06 14:02 ` Bernd Kuhls
  2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 09/12] package/kodi: " Bernd Kuhls
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 17+ messages in thread
From: Bernd Kuhls @ 2023-08-06 14:02 UTC (permalink / raw)
  To: buildroot
  Cc: Eric Le Bihan, Sen Hastings, Fabrice Fontaine, Julien Corjon,
	Giulio Benetti, Yann E . MORIN, Norbert Lange

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
 package/libinput/Config.in   | 10 +++++++---
 package/libinput/libinput.mk |  2 +-
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/package/libinput/Config.in b/package/libinput/Config.in
index 1a8fcc7ed4..df1cff260f 100644
--- a/package/libinput/Config.in
+++ b/package/libinput/Config.in
@@ -1,8 +1,11 @@
 config BR2_PACKAGE_LIBINPUT
 	bool "libinput"
-	depends on BR2_PACKAGE_HAS_UDEV
+	depends on BR2_USE_MMU # libudev <- eudev/systemd
+	depends on BR2_USE_WCHAR # libudev <- eudev/systemd
+	depends on !BR2_STATIC_LIBS # libudev <- eudev/systemd
 	select BR2_PACKAGE_LIBEVDEV
 	select BR2_PACKAGE_MTDEV
+	select BR2_PACKAGE_LIBUDEV
 	help
 	  libinput is a library to handle input devices in Wayland
 	  compositors and to provide a generic X.Org input driver.
@@ -35,5 +38,6 @@ config BR2_PACKAGE_LIBINPUT_PYTHON_TOOLS
 
 endif
 
-comment "libinput needs udev /dev management"
-	depends on !BR2_PACKAGE_HAS_UDEV
+comment "libinput needs a toolchain w/ wchar, dynamic library"
+	depends on BR2_USE_MMU
+	depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS
diff --git a/package/libinput/libinput.mk b/package/libinput/libinput.mk
index a4d30b5910..ff7b75077b 100644
--- a/package/libinput/libinput.mk
+++ b/package/libinput/libinput.mk
@@ -7,7 +7,7 @@
 LIBINPUT_VERSION = 1.23.0
 LIBINPUT_SOURCE = libinput-$(LIBINPUT_VERSION).tar.bz2
 LIBINPUT_SITE = https://gitlab.freedesktop.org/libinput/libinput/-/archive/$(LIBINPUT_VERSION)
-LIBINPUT_DEPENDENCIES = host-pkgconf libevdev mtdev udev
+LIBINPUT_DEPENDENCIES = host-pkgconf libevdev mtdev libudev
 LIBINPUT_INSTALL_STAGING = YES
 LIBINPUT_LICENSE = MIT
 LIBINPUT_LICENSE_FILES = COPYING
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH/next v9 09/12] package/kodi: only needs libudev, not udev daemon
  2023-08-06 14:02 [Buildroot] [PATCH/next v9 00/12] Introduce libudev (branch yem/libudev-6) Bernd Kuhls
                   ` (7 preceding siblings ...)
  2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 08/12] package/libinput: only needs libudev, not udev daemon Bernd Kuhls
@ 2023-08-06 14:02 ` Bernd Kuhls
  2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 10/12] package/libv4l: optionally use libudev Bernd Kuhls
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 17+ messages in thread
From: Bernd Kuhls @ 2023-08-06 14:02 UTC (permalink / raw)
  To: buildroot
  Cc: Eric Le Bihan, Bernd Kuhls, Sen Hastings, Fabrice Fontaine,
	Julien Corjon, Giulio Benetti, Yann E . MORIN, Norbert Lange

From: Bernd Kuhls <bernd.kuhls@t-online.de>

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
 package/kodi/Config.in | 4 ++--
 package/kodi/kodi.mk   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/kodi/Config.in b/package/kodi/Config.in
index bb71daa7e0..4f402c093f 100644
--- a/package/kodi/Config.in
+++ b/package/kodi/Config.in
@@ -24,8 +24,8 @@ config BR2_PACKAGE_KODI_PLATFORM_SUPPORTS_GBM
 	depends on BR2_PACKAGE_HAS_LIBGL || BR2_PACKAGE_HAS_LIBGLES
 	depends on BR2_PACKAGE_HAS_LIBGBM
 	depends on BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF
-	depends on BR2_PACKAGE_HAS_UDEV # libinput
 	select BR2_PACKAGE_KODI_PLATFORM_SUPPORTS
+	select BR2_PACKAGE_LIBUDEV
 
 comment "kodi needs udev support for gbm"
 	depends on !BR2_PACKAGE_KODI_PLATFORM_SUPPORTS
@@ -252,7 +252,7 @@ config BR2_PACKAGE_KODI_LIBUSB
 	bool "usb"
 	# https://github.com/xbmc/xbmc/blob/Jarvis/configure.ac#L1554
 	# "if libudev is available, we don't need libusb"
-	depends on !BR2_PACKAGE_HAS_UDEV
+	depends on !BR2_PACKAGE_HAS_LIBUDEV
 	select BR2_PACKAGE_LIBUSB
 	select BR2_PACKAGE_LIBUSB_COMPAT
 	help
diff --git a/package/kodi/kodi.mk b/package/kodi/kodi.mk
index e6101e7b57..5fb0a99d62 100644
--- a/package/kodi/kodi.mk
+++ b/package/kodi/kodi.mk
@@ -221,9 +221,9 @@ else
 KODI_CONF_OPTS += -DENABLE_MYSQLCLIENT=OFF
 endif
 
-ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
+ifeq ($(BR2_PACKAGE_HAS_LIBUDEV),y)
 KODI_CONF_OPTS += -DENABLE_UDEV=ON
-KODI_DEPENDENCIES += udev
+KODI_DEPENDENCIES += libudev
 else
 KODI_CONF_OPTS += -DENABLE_UDEV=OFF
 ifeq ($(BR2_PACKAGE_KODI_LIBUSB),y)
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH/next v9 10/12] package/libv4l: optionally use libudev
  2023-08-06 14:02 [Buildroot] [PATCH/next v9 00/12] Introduce libudev (branch yem/libudev-6) Bernd Kuhls
                   ` (8 preceding siblings ...)
  2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 09/12] package/kodi: " Bernd Kuhls
@ 2023-08-06 14:02 ` Bernd Kuhls
  2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 11/12] package/libcec: " Bernd Kuhls
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 17+ messages in thread
From: Bernd Kuhls @ 2023-08-06 14:02 UTC (permalink / raw)
  To: buildroot
  Cc: Eric Le Bihan, Bernd Kuhls, Sen Hastings, Fabrice Fontaine,
	Julien Corjon, Giulio Benetti, Yann E . MORIN, Norbert Lange

From: Bernd Kuhls <bernd.kuhls@t-online.de>

libv4l only requires libudev, not a full udev daemon.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
 package/libv4l/libv4l.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/libv4l/libv4l.mk b/package/libv4l/libv4l.mk
index 1142a7442f..094cf74f67 100644
--- a/package/libv4l/libv4l.mk
+++ b/package/libv4l/libv4l.mk
@@ -44,9 +44,9 @@ ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
 LIBV4L_DEPENDENCIES += libgl
 endif
 
-ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
+ifeq ($(BR2_PACKAGE_HAS_LIBUDEV),y)
 LIBV4L_CONF_OPTS += --with-libudev --with-udevdir=/usr/lib/udev
-LIBV4L_DEPENDENCIES += udev
+LIBV4L_DEPENDENCIES += libudev
 else
 LIBV4L_CONF_OPTS += --without-libudev
 endif
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH/next v9 11/12] package/libcec: optionally use libudev
  2023-08-06 14:02 [Buildroot] [PATCH/next v9 00/12] Introduce libudev (branch yem/libudev-6) Bernd Kuhls
                   ` (9 preceding siblings ...)
  2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 10/12] package/libv4l: optionally use libudev Bernd Kuhls
@ 2023-08-06 14:02 ` Bernd Kuhls
  2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 12/12] package/usbutils: only needs libudev, not udev daemon Bernd Kuhls
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 17+ messages in thread
From: Bernd Kuhls @ 2023-08-06 14:02 UTC (permalink / raw)
  To: buildroot
  Cc: Eric Le Bihan, Bernd Kuhls, Sen Hastings, Fabrice Fontaine,
	Julien Corjon, Giulio Benetti, Yann E . MORIN, Norbert Lange

From: Bernd Kuhls <bernd.kuhls@t-online.de>

libcec only requires libudev, not a full udev daemon.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
 package/libcec/libcec.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/libcec/libcec.mk b/package/libcec/libcec.mk
index 33e0463eb8..4661cca6fd 100644
--- a/package/libcec/libcec.mk
+++ b/package/libcec/libcec.mk
@@ -16,8 +16,8 @@ ifeq ($(BR2_PACKAGE_LOCKDEV),y)
 LIBCEC_DEPENDENCIES += lockdev
 endif
 
-ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
-LIBCEC_DEPENDENCIES += udev
+ifeq ($(BR2_PACKAGE_HAS_LIBUDEV),y)
+LIBCEC_DEPENDENCIES += libudev
 endif
 
 ifeq ($(BR2_PACKAGE_PYTHON3),y)
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH/next v9 12/12] package/usbutils: only needs libudev, not udev daemon
  2023-08-06 14:02 [Buildroot] [PATCH/next v9 00/12] Introduce libudev (branch yem/libudev-6) Bernd Kuhls
                   ` (10 preceding siblings ...)
  2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 11/12] package/libcec: " Bernd Kuhls
@ 2023-08-06 14:02 ` Bernd Kuhls
  2023-08-22 20:59 ` [Buildroot] [PATCH/next v9 00/12] Introduce libudev (branch yem/libudev-6) Thomas Petazzoni via buildroot
       [not found] ` <20230822225949.2b326664__48539.150941518$1692738023$gmane$org@windsurf>
  13 siblings, 0 replies; 17+ messages in thread
From: Bernd Kuhls @ 2023-08-06 14:02 UTC (permalink / raw)
  To: buildroot
  Cc: Eric Le Bihan, Bernd Kuhls, Sen Hastings, Fabrice Fontaine,
	Julien Corjon, Giulio Benetti, Yann E . MORIN, Norbert Lange

From: Bernd Kuhls <bernd.kuhls@t-online.de>

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
 package/usbutils/Config.in   | 12 +++++++++---
 package/usbutils/usbutils.mk |  2 +-
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/package/usbutils/Config.in b/package/usbutils/Config.in
index a38eb2f2e5..64e0905cb6 100644
--- a/package/usbutils/Config.in
+++ b/package/usbutils/Config.in
@@ -2,14 +2,20 @@ config BR2_PACKAGE_USBUTILS
 	bool "usbutils"
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb
-	depends on BR2_PACKAGE_HAS_UDEV # needs hwdb
+	depends on BR2_USE_MMU # libudev <- eudev/systemd
+	depends on BR2_USE_WCHAR # libudev <- eudev/systemd
+	depends on !BR2_STATIC_LIBS # libudev <- eudev/systemd
+	select BR2_PACKAGE_EUDEV_ENABLE_HWDB if BR2_PACKAGE_EUDEV
+	select BR2_PACKAGE_SYSTEMD_HWDB if BR2_PACKAGE_SYSTEMD
+	select BR2_PACKAGE_LIBUDEV
 	select BR2_PACKAGE_LIBUSB
 	help
 	  USB enumeration utilities
 
 	  http://linux-usb.sourceforge.net/
 
-comment "usbutils needs udev /dev management and toolchain w/ threads, gcc >= 4.9"
+comment "usbutils needs a toolchain w/ threads, wchar, dynamic library, gcc >= 4.9"
+	depends on BR2_USE_MMU
 	depends on !BR2_TOOLCHAIN_HAS_THREADS || \
-		!BR2_PACKAGE_HAS_UDEV || \
+		!BR2_USE_WCHAR || BR2_STATIC_LIBS || \
 		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
diff --git a/package/usbutils/usbutils.mk b/package/usbutils/usbutils.mk
index 84a6a625cf..d9e28a1b5d 100644
--- a/package/usbutils/usbutils.mk
+++ b/package/usbutils/usbutils.mk
@@ -7,7 +7,7 @@
 USBUTILS_VERSION = 015
 USBUTILS_SOURCE = usbutils-$(USBUTILS_VERSION).tar.xz
 USBUTILS_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/usb/usbutils
-USBUTILS_DEPENDENCIES = host-pkgconf libusb udev
+USBUTILS_DEPENDENCIES = host-pkgconf libudev libusb
 USBUTILS_LICENSE = GPL-2.0+ (utils) GPL-2.0 or GPL-3.0 (lsusb.py)
 USBUTILS_LICENSE_FILES = LICENSES/GPL-2.0-only.txt LICENSES/GPL-3.0-only.txt
 
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [Buildroot] [PATCH/next v9 00/12] Introduce libudev (branch yem/libudev-6)
  2023-08-06 14:02 [Buildroot] [PATCH/next v9 00/12] Introduce libudev (branch yem/libudev-6) Bernd Kuhls
                   ` (11 preceding siblings ...)
  2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 12/12] package/usbutils: only needs libudev, not udev daemon Bernd Kuhls
@ 2023-08-22 20:59 ` Thomas Petazzoni via buildroot
       [not found] ` <20230822225949.2b326664__48539.150941518$1692738023$gmane$org@windsurf>
  13 siblings, 0 replies; 17+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-08-22 20:59 UTC (permalink / raw)
  To: Bernd Kuhls
  Cc: Eric Le Bihan, Sen Hastings, Yann E . MORIN, Julien Corjon,
	buildroot, Giulio Benetti, Fabrice Fontaine, Norbert Lange

Hello,

On Sun,  6 Aug 2023 16:02:29 +0200
Bernd Kuhls <bernd@kuhls.net> wrote:

> Bernd Kuhls (4):
>   package/kodi: only needs libudev, not udev daemon
>   package/libv4l: optionally use libudev
>   package/libcec: optionally use libudev
>   package/usbutils: only needs libudev, not udev daemon
> 
> Yann E. MORIN (8):
>   package/eudev: add option to enable the udev daemon
>   package/eudev: allow building only the library
>   package/libudev: new virtual package
>   package/eudev: provides libudev
>   package/systemd: provides libudev
>   package/libudev: make it selectable
>   package/qt5base: optionally use libudev
>   package/libinput: only needs libudev, not udev daemon

Thanks Bernd for working on this. I didn't look carefully at the
patches in this iteration, but I remember looking at previous
iterations, and it was good.

I just wanted to question the relevance of this, so I did a quick
experiment. I applied just patches 1 and 2 of this patch series, which
allow to build eudev with and without the daemon. Then I built two
defconfigs:

BR2_arm=y
BR2_cortex_a9=y
BR2_ARM_ENABLE_VFP=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_INIT_NONE=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
# BR2_PACKAGE_EUDEV_ENABLE_HWDB is not set
# BR2_TARGET_ROOTFS_TAR is not set

which enables the full eudev (daemon included)

And:

BR2_arm=y
BR2_cortex_a9=y
BR2_ARM_ENABLE_VFP=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_EUDEV=y
# BR2_PACKAGE_EUDEV_ENABLE_HWDB is not set
# BR2_TARGET_ROOTFS_TAR is not set

which enables only libudev.

The first defconfig generates an output/target/ of 7.4 MB, the second
defconfig generates an output/target/ of 5.4 MB.

In the first defconfig, the eudev package takes 1.69 MB, and the
util-linux-libs package takes 330 KB.

In the second defconfig, the eudev package takes 133 KB, and
util-linux-libs is not needed.

So in this "extreme" example, it saves 2 MB. I say "extreme" because a
realistic rootfs will have something that uses libudev and is going to
be bigger. util-linux-libs is used by a *lot* of system-level packages,
so it's relatively likely that it's going to be pulled in by some other
packages in most typical configurations. The size of eudev could be
reduced locally via post-build script.

I want to see if we really want to add this additional complexity of a
virtual package "just" to save 2 MB. I don't have a very strong opinion
on this so I could be convinced either way, but I find the extra
complexity quite high compared to the usefulness for most typical
use-cases.

Arnout, Peter, could you give your opinion here so that we can take a
decision, and either merge this patch series or reject it?

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Buildroot] [PATCH/next v9 00/12] Introduce libudev (branch yem/libudev-6)
       [not found] ` <20230822225949.2b326664__48539.150941518$1692738023$gmane$org@windsurf>
@ 2023-08-25 16:24   ` Bernd Kuhls
  2023-08-25 17:05     ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 17+ messages in thread
From: Bernd Kuhls @ 2023-08-25 16:24 UTC (permalink / raw)
  To: buildroot

Am Tue, 22 Aug 2023 22:59:49 +0200 schrieb Thomas Petazzoni via buildroot:

> I just wanted to question the relevance of this

> The first defconfig generates an output/target/ of 7.4 MB, the second
> defconfig generates an output/target/ of 5.4 MB.

> I don't have a very strong opinion on this so I could be convinced
> either way, but I find the extra complexity quite high compared to
> the usefulness for most typical use-cases.

Hi Thomas,

the reason I am carrying this patch in my personal tree is maintenance of 
a buildroot-based system which uses

BR2_ROOTFS_DEVICE_CREATION_STATIC=y

Without the libudev series I can not use packages like Kodi, and no, I can 
not change the rootfs setting for this system, sorry.

Regards, Bernd

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Buildroot] [PATCH/next v9 00/12] Introduce libudev (branch yem/libudev-6)
  2023-08-25 16:24   ` Bernd Kuhls
@ 2023-08-25 17:05     ` Thomas Petazzoni via buildroot
  2023-08-25 17:22       ` Bernd Kuhls
  0 siblings, 1 reply; 17+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-08-25 17:05 UTC (permalink / raw)
  To: Bernd Kuhls; +Cc: buildroot

Hello Bernd,

On Fri, 25 Aug 2023 18:24:41 +0200
Bernd Kuhls <bernd@kuhls.net> wrote:

> the reason I am carrying this patch in my personal tree is maintenance of 
> a buildroot-based system which uses
> 
> BR2_ROOTFS_DEVICE_CREATION_STATIC=y
> 
> Without the libudev series I can not use packages like Kodi, and no, I can 
> not change the rootfs setting for this system, sorry.

So you can apply complicated patches/changes, but you cannot adjust the
configuration of your system to use eudev? This does not really sound
like a very good/solid argument in favor of this patch series :-/

Especially when you have Kodi, the size difference between "just
libudev" and "libudev + eudev" is insignificant compared to the size of
Kodi. 

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Buildroot] [PATCH/next v9 00/12] Introduce libudev (branch yem/libudev-6)
  2023-08-25 17:05     ` Thomas Petazzoni via buildroot
@ 2023-08-25 17:22       ` Bernd Kuhls
  0 siblings, 0 replies; 17+ messages in thread
From: Bernd Kuhls @ 2023-08-25 17:22 UTC (permalink / raw)
  To: buildroot; +Cc: buildroot

Am Fri, 25 Aug 2023 19:05:32 +0200 schrieb Thomas Petazzoni via buildroot:

> So you can apply complicated patches/changes, but you cannot adjust the
> configuration of your system to use eudev? 

Hi,

the init scripts of this system were created outside of buildroot and need 
a statically-populated /dev. As I said, changing the configuration is not 
possible, sorry.

Due to upstream now supporting a daemon-less build I thought I try again 
to get this series into buildroot. One of your arguments from 2016 was the 
lack of upstream support for this feature:
https://lists.buildroot.org/pipermail/buildroot/2016-July/470285.html

We do not need to trick-around with the build system anymore, we just add 
an option to build the package in a way which is supported by upstream 
now.

Regards, Bernd

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-08-25 17:23 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-06 14:02 [Buildroot] [PATCH/next v9 00/12] Introduce libudev (branch yem/libudev-6) Bernd Kuhls
2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 01/12] package/eudev: add option to enable the udev daemon Bernd Kuhls
2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 02/12] package/eudev: allow building only the library Bernd Kuhls
2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 03/12] package/libudev: new virtual package Bernd Kuhls
2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 04/12] package/eudev: provides libudev Bernd Kuhls
2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 05/12] package/systemd: " Bernd Kuhls
2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 06/12] package/libudev: make it selectable Bernd Kuhls
2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 07/12] package/qt5base: optionally use libudev Bernd Kuhls
2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 08/12] package/libinput: only needs libudev, not udev daemon Bernd Kuhls
2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 09/12] package/kodi: " Bernd Kuhls
2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 10/12] package/libv4l: optionally use libudev Bernd Kuhls
2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 11/12] package/libcec: " Bernd Kuhls
2023-08-06 14:02 ` [Buildroot] [PATCH/next v9 12/12] package/usbutils: only needs libudev, not udev daemon Bernd Kuhls
2023-08-22 20:59 ` [Buildroot] [PATCH/next v9 00/12] Introduce libudev (branch yem/libudev-6) Thomas Petazzoni via buildroot
     [not found] ` <20230822225949.2b326664__48539.150941518$1692738023$gmane$org@windsurf>
2023-08-25 16:24   ` Bernd Kuhls
2023-08-25 17:05     ` Thomas Petazzoni via buildroot
2023-08-25 17:22       ` Bernd Kuhls

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox