Skip to contentSkip to conversation

WIP: package/eudev: Split libudev and daemon

PATCH New Bernd Kuhls 4 participants 12 messages Jun 11, 2014

lore
Share & tools
lore
#0 lore raw

v2 cover WIP: package/eudev: Split libudev and daemon

Hi,

in order to support a growing number of packages[1] depending on libudev, even when /dev is not managed by systemd/eudev, it is necessary to provide libudev as a stand-alone solution for systems which have BR2_ROOTFS_DEVICE_CREATION_STATIC=y.

This patch series
- bumps eudev to 1.7
- integrates my older libudev package into eudev
- fixes mesa3d build error

Still to be discussed:
- should we keep BR2_PACKAGE_HAS_UDEV which now means libudev, and
- introduce BR2_PACKAGE_HAS_UDEV_DAEMON for packages needing the daemon, or

- introduce BR2_PACKAGE_HAS_LIBUDEV and switch many packages over to this option

Regards, Bernd

[1] Inspired by mesa3d: https://bugs.freedesktop.org/show_bug.cgi?id=75212#c6

Bernd Kuhls (3):
package/eudev: Bump version to 1.7
package/eudev: Split libudev and daemon
package/mesa3d: depend on udev

Signature · 1 line
1.7.10.4
#1 lore raw

PATCH v2 1/3 package/eudev: Bump version to 1.7

---
 package/eudev/eudev.mk |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/eudev/eudev.mk +1 -1
index fc9c7d9..5f1525c 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-EUDEV_VERSION = v1.6
+EUDEV_VERSION = v1.7
 EUDEV_SITE = $(call github,gentoo,eudev,$(EUDEV_VERSION))
 EUDEV_LICENSE = GPLv2+ (programs), LGPLv2.1+ (libraries)
 EUDEV_LICENSE_FILES = COPYING
Signature · 1 line
1.7.10.4
#3 lore raw

PATCH v2 2/3 package/eudev: Split libudev and daemon

In reply to Bernd Kuhls

Provide new option BR2_PACKAGE_EUDEV_DAEMON, default y for backward- compatability.

If BR2_PACKAGE_EUDEV_DAEMON is disabled only libudev is build which does not depend on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV.

---
 package/eudev/Config.in |   43 ++++++++++++++++++++++++++-----------------
 package/eudev/eudev.mk  |   39 +++++++++++++++++++++++++++++++++++----
 2 files changed, 61 insertions(+), 21 deletions(-)
package/eudev/Config.in +26 -17
index 40ff721..582909e 100644
@@ -1,15 +1,9 @@
 config BR2_PACKAGE_EUDEV
 	bool "eudev"
-	depends on !BR2_avr32 # no epoll_create1
-	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
-	depends on BR2_USE_MMU # uses fork()
-	depends on BR2_LARGEFILE # util-linux
-	depends on BR2_USE_WCHAR # util-linux
-	depends on !BR2_PREFER_STATIC_LIB # kmod
+	depends on !BR2_avr32 # no __NR_name_to_handle_at
+	depends on BR2_USE_WCHAR
+	depends on !BR2_PREFER_STATIC_LIB
 	select BR2_PACKAGE_HAS_UDEV
-	select BR2_PACKAGE_UTIL_LINUX
-	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
-	select BR2_PACKAGE_KMOD
 	help
 	  Userspace device daemon. This is a standalone version,
 	  independent of systemd. It is a fork maintained by Gentoo.
@@ -24,19 +18,34 @@ if BR2_PACKAGE_EUDEV
 config BR2_PACKAGE_PROVIDES_UDEV
 	default "eudev"
 
+config BR2_PACKAGE_EUDEV_DAEMON
+	bool "enable daemon"
+	default y
+	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
+	depends on BR2_USE_MMU # uses fork()
+	depends on BR2_LARGEFILE # util-linux
+	select BR2_PACKAGE_UTIL_LINUX
+	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
+	select BR2_PACKAGE_KMOD
+	help
+	  Enable eudev daemon
+
+comment "eudev daemon needs eudev /dev management"
+	depends on BR2_USE_MMU
+	depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
+
+comment "eudev daemon needs a toolchain w/ largefile"
+	depends on BR2_USE_MMU
+	depends on !BR2_LARGEFILE
+
 config BR2_PACKAGE_EUDEV_RULES_GEN
 	bool "enable rules generator"
+	depends on BR2_PACKAGE_EUDEV_DAEMON
 	help
 	  Enable persistent rules generator
 
 endif
 
-comment "eudev needs eudev /dev management"
-	depends on !BR2_avr32
-	depends on BR2_USE_MMU
-	depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
-
-comment "eudev needs a toolchain w/ largefile, wchar, dynamic library"
+comment "eudev needs a toolchain w/ wchar, dynamic library"
 	depends on !BR2_avr32
-	depends on BR2_USE_MMU
-	depends on !BR2_LARGEFILE || !BR2_USE_WCHAR || BR2_PREFER_STATIC_LIB
+	depends on !BR2_USE_WCHAR || BR2_PREFER_STATIC_LIB
package/eudev/eudev.mk +35 -4
index 5f1525c..974e2bc 100644
@@ -16,17 +16,23 @@ EUDEV_CONF_ENV += LIBS=-lrt
 
 EUDEV_CONF_OPT =		\
 	--disable-manpages	\
-	--sbindir=/sbin		\
 	--with-rootlibdir=/lib	\
 	--libexecdir=/lib	\
 	--with-firmware-path=/lib/firmware	\
 	--disable-introspection			\
-	--enable-split-usr			\
-	--enable-libkmod
+	--enable-split-usr
 
-EUDEV_DEPENDENCIES = host-gperf host-pkgconf util-linux kmod
+EUDEV_DEPENDENCIES = host-pkgconf
 EUDEV_PROVIDES = udev
 
+ifeq ($(BR2_PACKAGE_EUDEV_DAEMON),y)
+
+EUDEV_DEPENDENCIES += host-gperf util-linux kmod
+
+EUDEV_CONF_OPT += \
+	--sbindir=/sbin \
+	--enable-libkmod
+
 ifeq ($(BR2_PACKAGE_EUDEV_RULES_GEN),y)
 EUDEV_CONF_OPT += --enable-rule_generator
 endif
@@ -42,4 +48,29 @@ define EUDEV_INSTALL_INIT_SYSV
 	$(INSTALL) -m 0755 package/eudev/S10udev $(TARGET_DIR)/etc/init.d/S10udev
 endef
 
+else
+
+EUDEV_CONF_OPT += \
+	--disable-keymap \
+	--disable-libkmod \
+	--disable-modules \
+	--disable-selinux \
+	--disable-rule-generator \
+	--disable-gtk-doc \
+	--disable-gudev
+
+define EUDEV_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/libudev
+endef
+
+define EUDEV_INSTALL_STAGING_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/libudev DESTDIR=$(STAGING_DIR) install
+endef
+
+define EUDEV_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/libudev DESTDIR=$(TARGET_DIR) install
+endef
+
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
1.7.10.4
#4 lore raw

PATCH v2 3/3 package/mesa3d: depend on udev

In reply to Bernd Kuhls

checking for LIBUDEV... no
configure: error: libudev-dev required for building DRI

Fixes
http://autobuild.buildroot.net/results/16d/16d12b986051db884eae86e9658e6c4fc0f28885/

---
 package/mesa3d/Config.in |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
package/mesa3d/Config.in +3 -2
index fc96cc5..d3ded82 100644
@@ -10,6 +10,7 @@ menuconfig BR2_PACKAGE_MESA3D
 	select BR2_PACKAGE_XLIB_LIBXDAMAGE if BR2_PACKAGE_XORG7
 	select BR2_PACKAGE_XLIB_LIBXFIXES if BR2_PACKAGE_XORG7
 	select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_XORG7
+	depends on BR2_PACKAGE_HAS_UDEV
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_LARGEFILE
 	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
@@ -125,6 +126,6 @@ config BR2_PACKAGE_PROVIDES_LIBGLES
 
 endif # BR2_PACKAGE_MESA3D
 
-comment "mesa3d needs a toolchain w/ C++, largefile, NPTL"
+comment "mesa3d needs udev /dev management and a toolchain w/ C++, largefile, NPTL"
 	depends on !BR2_LARGEFILE || !BR2_INSTALL_LIBSTDCPP || \
-		!BR2_TOOLCHAIN_HAS_THREADS_NPTL
+		!BR2_TOOLCHAIN_HAS_THREADS_NPTL || !BR2_PACKAGE_HAS_UDEV
Signature · 1 line
1.7.10.4
#5 lore raw

PATCH v2 3/3 package/mesa3d: depend on udev

Dear Bernd Kuhls,

Quoted 10 lines · Bernd Kuhls

checking for LIBUDEV... no
configure: error: libudev-dev required for building DRI

Fixes
http://autobuild.buildroot.net/results/16d/16d12b986051db884eae86e9658e6c4fc0f28885/

---
 package/mesa3d/Config.in |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Is this patch independent from PATCH 2/3 ? I'd like the mesa3d problem to be fixed now, regardless of the split between libudev and the daemon in eudev. The split between libudev and the daemon in eudev is an improvement, while the mesa3d build failure affecting the autobuilders since the past 3 days is a significant regression that we should handle in priority.

I know that Yann is also working on this issue, I'm not sure how much in sync both of you are.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#6 lore raw

PATCH v2 3/3 package/mesa3d: depend on udev

Thomas Petazzoni <[email protected]> wrote in news:20140611194914.2529d991 at free-electrons.com:

Quoted 3 lines

Dear Bernd Kuhls,

Is this patch independent from PATCH 2/3 ?

Dear Thomas,

yes.

Regards, Bernd

#7 lore raw

PATCH v2 3/3 package/mesa3d: depend on udev

In reply to Bernd Kuhls

Bernd, All,

On 2014-06-11 19:41 +0200, Bernd Kuhls spake thusly:

Quoted 7 lines

checking for LIBUDEV... no
configure: error: libudev-dev required for building DRI

Fixes
http://autobuild.buildroot.net/results/16d/16d12b986051db884eae86e9658e6c4fc0f28885/

This is a stop-gap fix until we have a proper libudev package. This shoudl be independent from the previous patches, so can go in as-is:

Regards,
Yann E. MORIN.

Quoted 32 lines
---
 package/mesa3d/Config.in |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
package/mesa3d/Config.in +3 -2
index fc96cc5..d3ded82 100644
@@ -10,6 +10,7 @@ menuconfig BR2_PACKAGE_MESA3D
 	select BR2_PACKAGE_XLIB_LIBXDAMAGE if BR2_PACKAGE_XORG7
 	select BR2_PACKAGE_XLIB_LIBXFIXES if BR2_PACKAGE_XORG7
 	select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_XORG7
+	depends on BR2_PACKAGE_HAS_UDEV
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_LARGEFILE
 	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
@@ -125,6 +126,6 @@ config BR2_PACKAGE_PROVIDES_LIBGLES
 
 endif # BR2_PACKAGE_MESA3D
 
-comment "mesa3d needs a toolchain w/ C++, largefile, NPTL"
+comment "mesa3d needs udev /dev management and a toolchain w/ C++, largefile, NPTL"
 	depends on !BR2_LARGEFILE || !BR2_INSTALL_LIBSTDCPP || \
-		!BR2_TOOLCHAIN_HAS_THREADS_NPTL
+		!BR2_TOOLCHAIN_HAS_THREADS_NPTL || !BR2_PACKAGE_HAS_UDEV
Signature · 6 lines
1.7.10.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#8 lore raw

PATCH v2 3/3 package/mesa3d: depend on udev

Dear Yann E. MORIN,

Quoted 3 lines · Yann E. MORIN

This is a stop-gap fix until we have a proper libudev package. This shoudl be independent from the previous patches, so can go in as-is:

Then why was it sent as the last patch of the series?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#9 lore raw

PATCH v2 3/3 package/mesa3d: depend on udev

Thomas, All,

On 2014-06-11 20:00 +0200, Thomas Petazzoni spake thusly:

Quoted 9 lines

Dear Yann E. MORIN,

Quoted 3 lines · Yann E. MORIN

This is a stop-gap fix until we have a proper libudev package. This shoudl be independent from the previous patches, so can go in as-is:

Then why was it sent as the last patch of the series?

Because Bernd changed the meaning of _HAS_UDEV to mean "has a libudev".

But since that's not what we want, but we need a quick fix, we can still apply that patch as-is to quickly stop the build-failure bleeding in the autobuilders.

Then (later!), when we have settled on this libudev thinggy, we can switch mesa to use the new libudev.

But in the mean time, this patch still applies and still makes sense without the rest of the series.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#10 lore raw

PATCH v2 3/3 package/mesa3d: depend on udev

In reply to Bernd Kuhls
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Bernd" == Bernd Kuhls <[email protected]> writes:

checking for LIBUDEV... no
configure: error: libudev-dev required for building DRI

Fixes
http://autobuild.buildroot.net/results/16d/16d12b986051db884eae86e9658e6c4fc0f28885/

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#11 lore raw

v2 cover WIP: package/eudev: Split libudev and daemon

In reply to Bernd Kuhls

Bernd, All,

On 2014-06-11 19:41 +0200, Bernd Kuhls spake thusly:

Quoted 10 lines

in order to support a growing number of packages[1] depending on libudev, even when /dev is not managed by systemd/eudev, it is necessary to provide libudev as a stand-alone solution for systems which have BR2_ROOTFS_DEVICE_CREATION_STATIC=y.

This patch series
- bumps eudev to 1.7
- integrates my older libudev package into eudev
- fixes mesa3d build error

Quoted 5 lines

Still to be discussed:
- should we keep BR2_PACKAGE_HAS_UDEV which now means libudev, and
- introduce BR2_PACKAGE_HAS_UDEV_DAEMON for packages needing the daemon, or

- introduce BR2_PACKAGE_HAS_LIBUDEV and switch many packages over to this option

Nope, the other way around.

We want to keep _HAS_UDEV to still mean "has a udev daemon", to support legacy .config files.

We can introduce a new _HAS_LIBUDEV however.

And... I am working on this. I know you are present on IRC, but since you do not seem to look at your IRC client (or it is not notifying you when we ping you), it's difficult to synchronise with you.

As I said in my reply to your previous libudev patch:
"I'll have a look at it tonight (UTC+2)." (which is basically "now"). "I'll see what I can come up with."

Of course, we appreciate your new submission, hopefully it will make my life easier. ;-)

Thanks!

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'