Skip to contentSkip to conversation

package: udev is now provided by systemd or eudev

PATCH Superseded Eric Le Bihan 3 participants 14 messages Sep 20, 2013 – Nov 4, 2013

v2 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

v2 cover package: udev is now provided by systemd or eudev

Hello!

This series converts udev to a virtual package, either provided by systemd or eudev.

Starting with version 183, udev has been merged into systemd. This forces the use of systemd as the init system if /dev is to be dynamically managed by udev. eudev is a fork of udev, maintained by Gentoo, but isolated from systemd, so it can be used with any init system.

Systemd has been bumped to v206 and a new eudev package has been added. Version 1.2 of eudev is in sync with systemd v206 (v1.3 will be in sync with v207).

The bump of systemd to v206 also introduces new options, like the activation of the journal gateway.

In the end:

- if systemd is selected as init system, the /dev management will handled by udev. No either choice possible.
- if busybox or SysV is chosen, the user can choose to manage /dev statically, or dynamically using mdev or eudev.

Changes v1 -> v2:
- split patch for better readability.
- promoted init system selection above /dev management in "System Configuration" menu.
- /dev management selection is not displayed if systemd is chosen as init system, as udev is the only possible choice (suggested by Arnout).
- added "Dynamic with eudev" choice in /dev management selection.
- less patches for systemd/uclibc compatibility, thanks to recent update of

    uclibc 0.9.33.2.

- autoreconf not needed anymore for systemd (thanks to removal of configure.ac patch).
- ACL/Gudev support in systemd activated only if acl/libglib2 are selected (suggested by Arnout).
- udev package provides BR2_PACKAGE_HAS_UDEV (suggested by Thomas).
- converted packages depending on BR2_PACKAGE_UDEV/BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV to BR2_PACKAGE_HAS_UDEV.
- eudev source code fetched as a tarball, not from Git tree (suggested by Arnout).
- removed "enable all extras" option from eudev configuration: Gudev support is activated if libglib2 is selected (suggested by Arnout).
- added option to build udev rule generator in eudev, as it was in previous version of udev.
- removed dependency on hwdata for systemd and eudev, as both embed their own hardware database.

Best regards,
ELB

Eric Le Bihan (6):
system: move init system option above /dev management.
sysvinit: depend on SysV selected as init system.
systemd: bump to v206.
systemd: set correct firmware search path
package: update dependency on udev.
eudev: new package.

 Config.in.legacy                                   |    7 ++
 package/Config.in                                  |    1 +
 package/eudev/Config.in                            |   26 ++++++
 package/eudev/S10udev                              |   48 +++++++++++
 package/eudev/eudev.mk                             |   50 ++++++++++++
 package/libatasmart/Config.in                      |    4 +-
 package/network-manager/Config.in                  |    6 +-
 package/pcsc-lite/Config.in                        |    2 +-
 package/systemd/Config.in                          |   36 +++++++--
 package/systemd/systemd-fix-getty-unit.patch       |   36 ++++-----
 package/systemd/systemd-fix-page-size.patch        |   43 ----------
 .../systemd/systemd-optional-secure-getenv.patch   |   20 +++++
 package/systemd/systemd-uclibc-fix.patch           |   59 --------------
 ...systemd-use-cap_mknod-conditioncapability.patch |   26 ++++++
 package/systemd/systemd.mk                         |   83 +++++++++++++++-----
 package/sysvinit/Config.in                         |    1 +
 package/udev/Config.in                             |   43 +---------
 package/udev/udev.mk                               |   49 +++---------
 package/udisks/Config.in                           |    8 +-
 package/usbmount/Config.in                         |    4 +-
 package/weston/Config.in                           |    4 +-
 package/x11r7/xdriver_xf86-input-evdev/Config.in   |    4 +-
 system/Config.in                                   |   68 ++++++++--------
 23 files changed, 352 insertions(+), 276 deletions(-)
 create mode 100644 package/eudev/Config.in
 create mode 100644 package/eudev/S10udev
 create mode 100644 package/eudev/eudev.mk
 delete mode 100644 package/systemd/systemd-fix-page-size.patch
 create mode 100644 package/systemd/systemd-optional-secure-getenv.patch
 delete mode 100644 package/systemd/systemd-uclibc-fix.patch
 create mode 100644 package/systemd/systemd-use-cap_mknod-conditioncapability.patch

--
1.7.9.5

#1 lore raw

PATCH v2 1/6 system: move init system option above /dev management.

The option to choose init system was below the one for /dev management. As Systemd forces the use of udev, it is logical to swap them.

---
 system/Config.in |   58 +++++++++++++++++++++++++++---------------------------
 1 file changed, 29 insertions(+), 29 deletions(-)
system/Config.in +29 -29
index 9d4e837..1fe4127 100644
@@ -67,35 +67,6 @@ config BR2_TARGET_GENERIC_PASSWD_METHOD
 	default "sha-512"   if BR2_TARGET_GENERIC_PASSWD_SHA512
 
 choice
-	prompt "/dev management"
-	default BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS
-
-config BR2_ROOTFS_DEVICE_CREATION_STATIC
-	bool "Static using device table"
-
-config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS
-	bool "Dynamic using devtmpfs only"
-
-config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV
-	bool "Dynamic using mdev"
-	select BR2_PACKAGE_BUSYBOX
-
-config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
-	bool "Dynamic using udev"
-	depends on BR2_LARGEFILE # udev
-	depends on BR2_USE_WCHAR # udev
-	depends on !BR2_PREFER_STATIC_LIB # udev -> kmod
-	select BR2_PACKAGE_UDEV
-
-comment "udev requires a toolchain with LARGEFILE + WCHAR support"
-	depends on !(BR2_LARGEFILE && BR2_USE_WCHAR)
-
-comment "udev doesn't work with 'prefer static libraries'"
-	depends on BR2_PREFER_STATIC_LIB
-
-endchoice
-
-choice
 	prompt "Init system"
 	default BR2_INIT_BUSYBOX
 
@@ -128,6 +99,35 @@ config BR2_INIT_NONE
 
 endchoice
 
+choice
+	prompt "/dev management"
+	default BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS
+
+config BR2_ROOTFS_DEVICE_CREATION_STATIC
+	bool "Static using device table"
+
+config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS
+	bool "Dynamic using devtmpfs only"
+
+config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV
+	bool "Dynamic using mdev"
+	select BR2_PACKAGE_BUSYBOX
+
+config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+	bool "Dynamic using udev"
+	depends on BR2_LARGEFILE # udev
+	depends on BR2_USE_WCHAR # udev
+	depends on !BR2_PREFER_STATIC_LIB # udev -> kmod
+	select BR2_PACKAGE_UDEV
+
+comment "udev requires a toolchain with LARGEFILE + WCHAR support"
+	depends on !(BR2_LARGEFILE && BR2_USE_WCHAR)
+
+comment "udev doesn't work with 'prefer static libraries'"
+	depends on BR2_PREFER_STATIC_LIB
+
+endchoice
+
 config BR2_ROOTFS_DEVICE_TABLE
 	string "Path to the permission tables"
 	default "system/device_table.txt"

--
1.7.9.5

#2 lore raw

PATCH v2 1/6 system: move init system option above /dev management.

Dear Eric Le Bihan,

Quoted 7 lines · Eric Le Bihan

The option to choose init system was below the one for /dev management. As Systemd forces the use of udev, it is logical to swap them.

---
 system/Config.in |   58 +++++++++++++++++++++++++++---------------------------
 1 file changed, 29 insertions(+), 29 deletions(-)
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH v2 2/6 sysvinit: depend on SysV selected as init system.

In reply to Eric Le Bihan

In order to prevent sysvinit and systemd to be selected at the same time, sysvinit can now only be selected if SysV is chosen as init system.

---
 package/sysvinit/Config.in |    1 +
 1 file changed, 1 insertion(+)
package/sysvinit/Config.in +1 -0
index 34ec391..d91c643 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_SYSVINIT
 	bool "sysvinit"
+	depends on BR2_INIT_SYSV
 	help
 	  /sbin/init - parent of all processes
 

--
1.7.9.5

#4 lore raw

PATCH v2 2/6 sysvinit: depend on SysV selected as init system.

Dear Eric Le Bihan,

Quoted 14 lines · Eric Le Bihan

In order to prevent sysvinit and systemd to be selected at the same time, sysvinit can now only be selected if SysV is chosen as init system.

---
 package/sysvinit/Config.in |    1 +
 1 file changed, 1 insertion(+)
package/sysvinit/Config.in +0 -0
index 34ec391..d91c643 100644

package/sysvinit/Config.in line 5

Quoted 5 lines
package/sysvinit/Config.in +1 -0
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_SYSVINIT
 	bool "sysvinit"
+	depends on BR2_INIT_SYSV
 	help
 	  /sbin/init - parent of all processes

Hum, isn't this causing a circular dependency?

BR2_INIT_SYSV selects BR2_PACKAGE_SYSVINIT
BR2_PACKAGE_SYSVINIT depends on BR2_INIT_SYSV

but apparently, Kconfig doesn't complain, so it looks fine to me:

Thomas

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

PATCH v2 3/6 systemd: bump to v206.

In reply to Eric Le Bihan

This patch bumps systemd to v206 but also converts udev to a virtual package. Starting with systemd 183, udev has been merged into systemd. The udev daemon is now installed as /lib/systemd/systemd-udevd. This means that /dev management using udev is only available if systemd is chosen as init system.

When configuring systemd, the following options are available:

- activation of systemd-journal-gatewayd, to access the journal via HTTP.
- activation of extra features like journal compression and sealing.

The selection of the following packages will also add features:

- libglib2 package will add support for gudev.
- acl package will add support for multi-seat.

---
 package/systemd/Config.in                          |   35 +++++++--
 package/systemd/systemd-fix-getty-unit.patch       |   36 ++++-----
 package/systemd/systemd-fix-page-size.patch        |   43 ----------
 .../systemd/systemd-optional-secure-getenv.patch   |   20 +++++
 package/systemd/systemd-uclibc-fix.patch           |   59 --------------
 ...systemd-use-cap_mknod-conditioncapability.patch |   26 +++++++
 package/systemd/systemd.mk                         |   82 +++++++++++++++-----
 package/udev/Config.in                             |   41 +---------
 package/udev/udev.mk                               |   46 +----------
 system/Config.in                                   |   34 ++++----
 10 files changed, 176 insertions(+), 246 deletions(-)
 delete mode 100644 package/systemd/systemd-fix-page-size.patch
 create mode 100644 package/systemd/systemd-optional-secure-getenv.patch
 delete mode 100644 package/systemd/systemd-uclibc-fix.patch
 create mode 100644 package/systemd/systemd-use-cap_mknod-conditioncapability.patch
package/systemd/Config.in +30 -5
index 86ab2cf..ad92b73 100644
@@ -1,11 +1,14 @@
 config BR2_PACKAGE_SYSTEMD
 	bool "systemd"
-	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
-	depends on BR2_INET_IPV6
+	depends on BR2_INIT_SYSTEMD
 	depends on BR2_TOOLCHAIN_HAS_THREADS # dbus
 	depends on BR2_USE_MMU # dbus
 	select BR2_PACKAGE_DBUS
 	select BR2_PACKAGE_LIBCAP
+	select BR2_PACKAGE_UTIL_LINUX
+	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
+	select BR2_PACKAGE_KMOD
+	select BR2_PACKAGE_KMOD_TOOLS
 	help
 	  systemd is a system and service manager for Linux, compatible with
 	  SysV and LSB init scripts. systemd provides aggressive parallelization
@@ -18,6 +21,28 @@ config BR2_PACKAGE_SYSTEMD
 
 	  http://freedesktop.org/wiki/Software/systemd
 
-comment "systemd not available (depends on /dev management with udev and ipv6 support, and thread support in toolchain)"
-	depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV || !BR2_INET_IPV6 || \\
-		!BR2_TOOLCHAIN_HAS_THREADS
+comment "systemd needs a toolchain w/ threads, MMU"
+	depends on (!BR2_INIT_SYSTEMD || !BR2_TOOLCHAIN_HAS_THREADS || \\
+		    !BR2_USE_MMU)
+
+if BR2_PACKAGE_SYSTEMD
+
+config BR2_PACKAGE_SYSTEMD_ALL_EXTRAS
+	bool "enable all extras"
+	select BR2_PACKAGE_XZ
+	select BR2_PACKAGE_LIBGCRYPT
+	help
+	  Enable extra features for Systemd: journal compression and
+	  signing.
+
+config BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY
+        bool "HTTP server for journal events"
+	select BR2_PACKAGE_LIBMICROHTTPD
+	help
+	  systemd-journal-gatewayd serves journal events over the
+	  network. Clients must connect using HTTP. The server
+	  listens on port 19531 by default.
+
+	  http://www.freedesktop.org/software/systemd/man/systemd-journal-gatewayd.service.html
+
+endif
package/systemd/systemd-fix-getty-unit.patch +17 -19
index 6df54b1..166a2e5 100644
@@ -1,34 +1,32 @@
 Prefer getty to agetty in console setup systemd units
 
 Signed-off-by: Maxime Ripard <[email protected]>
+Signed-off-by: Eric Le Bihan <[email protected]>
 ---
- units/getty at .service.m4        |    2 +-
- units/serial-getty at .service.m4 |    2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
 
-Index: systemd-37/units/getty at .service.m4
+Index: systemd-206/units/getty at .service.m4
 ===================================================================
---- systemd-37.orig/units/getty at .service.m4
-+++ systemd-37/units/getty at .service.m4
-@@ -32,7 +32,7 @@
-
+--- systemd-206.orig/units/getty at .service.m4	2013-07-22 00:43:28.000000000 +0200
++++ systemd-206/units/getty at .service.m4	2013-09-18 10:20:17.000000000 +0200
+@@ -27,7 +27,7 @@
+
  [Service]
- Environment=TERM=linux
--ExecStart=-/sbin/agetty %I 38400
+ # the VT is cleared by TTYVTDisallocate
+-ExecStart=-/sbin/agetty --noclear %I
 +ExecStart=-/sbin/getty -L %I 115200 vt100
+ Type=idle
  Restart=always
  RestartSec=0
- UtmpIdentifier=%I
-Index: systemd-37/units/serial-getty at .service.m4
+Index: systemd-206/units/serial-getty at .service.m4
 ===================================================================
---- systemd-37.orig/units/serial-getty at .service.m4
-+++ systemd-37/units/serial-getty at .service.m4
-@@ -32,7 +32,7 @@
-
+--- systemd-206.orig/units/serial-getty at .service.m4	2013-07-22 00:43:28.000000000 +0200
++++ systemd-206/units/serial-getty at .service.m4	2013-09-18 10:21:31.000000000 +0200
+@@ -22,7 +22,7 @@
+ IgnoreOnIsolate=yes
+
  [Service]
- Environment=TERM=vt100
--ExecStart=-/sbin/agetty -s %I 115200,38400,9600
+-ExecStart=-/sbin/agetty --keep-baud %I 115200,38400,9600
 +ExecStart=-/sbin/getty -L %I 115200 vt100
+ Type=idle
  Restart=always
  RestartSec=0
- UtmpIdentifier=%I
package/systemd/systemd-fix-page-size.patch deleted +0 -43

43 lines not on this page · raw message

package/systemd/systemd-optional-secure-getenv.patch new file +20 -0
new file mode 100644
index 0000000..c163031
@@ -0,0 +1,20 @@
+on uclibc secure_getenv is not available
+therefore default to using getenv instead
+
+Upstream-Status: Denied [no desire for uclibc support]
+Signed-off-by: Khem Raj <[email protected]>
+Signed-off-by: Eric Le Bihan <[email protected]>
+
+Index: git/src/shared/missing.h
+===================================================================
+--- git.orig/src/shared/missing.h	2012-09-22 18:46:44.141282145 -0700
++++ git/src/shared/missing.h	2012-09-22 18:48:44.081276570 -0700
+@@ -233,6 +233,8 @@
+ #ifndef HAVE_SECURE_GETENV
+ #  ifdef HAVE___SECURE_GETENV
+ #    define secure_getenv __secure_getenv
++#  elif defined __UCLIBC__
++#    define secure_getenv getenv
+ #  else
+ #    error neither secure_getenv nor __secure_getenv are available
+ #  endif
package/systemd/systemd-uclibc-fix.patch deleted +0 -59

59 lines not on this page · raw message

package/systemd/systemd-use-cap_mknod-conditioncapability.patch new file +26 -0
new file mode 100644
index 0000000..e91fea8
@@ -0,0 +1,26 @@
+Fixes errors seen when booting VMs on QEMU like
+
+systemd[1]: kmod-static-nodes.service: main process exited, code=exited, status=203/EXEC
+systemd[1]: Failed to start Create list of required static device nodes for the current kernel.
+systemd[1]: Unit kmod-static-nodes.service entered failed state.
+
+Make sure that mknod capability is available
+
+Signed-off-by: Khem Raj <[email protected]>
+Signed-off-by: Eric Le Bihan <[email protected]>
+---
+ units/kmod-static-nodes.service.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: systemd-206/units/kmod-static-nodes.service.in
+===================================================================
+--- systemd-206.orig/units/kmod-static-nodes.service.in	2013-08-21 19:13:02.000000000 -0700
++++ systemd-206/units/kmod-static-nodes.service.in	2013-08-21 20:39:13.310689871 -0700
+@@ -9,6 +9,7 @@
+ Description=Create list of required static device nodes for the current kernel
+ DefaultDependencies=no
+ Before=sysinit.target systemd-tmpfiles-setup-dev.service
++ConditionCapability=CAP_MKNOD
+
+ [Service]
+ Type=oneshot
package/systemd/systemd.mk +63 -19

128 lines not on this page · raw message

package/udev/Config.in +1 -40

42 lines not on this page · raw message

package/udev/udev.mk +2 -44

50 lines not on this page · raw message

system/Config.in +17 -17
index 1fe4127..c16e8e7 100644
@@ -83,16 +83,22 @@ config BR2_INIT_SYSTEMD
 	depends on BR2_LARGEFILE
 	depends on BR2_USE_WCHAR
 	depends on BR2_INET_IPV6
-	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
 	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_TOOLCHAIN_HAS_SSP
 	depends on BR2_USE_MMU
-	select BR2_PACKAGE_DBUS
+	depends on !BR2_PREFER_STATIC_LIB
+	select BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
 	select BR2_PACKAGE_SYSTEMD
 
-comment 'systemd requires largefile, wchar, IPv6, threads and udev support'
+comment 'systemd needs toolchain w/ largefile, wchar, IPv6, threads'
 	depends on !(BR2_LARGEFILE && BR2_USE_WCHAR && \
-		     BR2_INET_IPV6 && BR2_TOOLCHAIN_HAS_THREADS && \
-		     BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV)
+		     BR2_INET_IPV6 && BR2_TOOLCHAIN_HAS_THREADS)
+
+comment 'systemd needs toolchain w/ stack smashing protection'
+	depends on !BR2_TOOLCHAIN_HAS_SSP
+
+comment "systemd doesn't work with 'prefer static libraries'"
+	depends on BR2_PREFER_STATIC_LIB
 
 config BR2_INIT_NONE
 	bool "None"
@@ -100,7 +106,7 @@ config BR2_INIT_NONE
 endchoice
 
 choice
-	prompt "/dev management"
+	prompt "/dev management" if !BR2_INIT_SYSTEMD
 	default BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS
 
 config BR2_ROOTFS_DEVICE_CREATION_STATIC
@@ -113,20 +119,14 @@ config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV
 	bool "Dynamic using mdev"
 	select BR2_PACKAGE_BUSYBOX
 
+endchoice
+
 config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
-	bool "Dynamic using udev"
-	depends on BR2_LARGEFILE # udev
-	depends on BR2_USE_WCHAR # udev
-	depends on !BR2_PREFER_STATIC_LIB # udev -> kmod
+	bool
 	select BR2_PACKAGE_UDEV
 
-comment "udev requires a toolchain with LARGEFILE + WCHAR support"
-	depends on !(BR2_LARGEFILE && BR2_USE_WCHAR)
-
-comment "udev doesn't work with 'prefer static libraries'"
-	depends on BR2_PREFER_STATIC_LIB
-
-endchoice
+comment "/dev management using udev (from systemd)"
+	depends on BR2_INIT_SYSTEMD
 
 config BR2_ROOTFS_DEVICE_TABLE
 	string "Path to the permission tables"

--
1.7.9.5

#6 lore raw

PATCH v2 3/6 systemd: bump to v206.

Dear Eric Le Bihan,

Quoted 2 lines · Eric Le Bihan

This patch bumps systemd to v206 but also converts udev to a virtual package.

I am a little bit concerned about bisectability throughout your patch set. Have you thought about this? Is there a way of making sure things will remain bisectable or it's really too complicated?

Quoted 4 lines

The selection of the following packages will also add features:

- libglib2 package will add support for gudev.
- acl package will add support for multi-seat.

Maybe this text should be mentioned in the help text of the systemd option.

package/systemd/systemd-uclibc-fix.patch

Quoted 5 lines
package/systemd/systemd-uclibc-fix.patch deleted +0 -0
deleted file mode 100644
index 9a20845..0000000

Without this patch (or similar patches), systemd does not build with uClibc, so it should be marked to depend on (e)glibc.

Quoted 92 lines
package/udev/Config.in +1 -40
index d4d97c1..23c443e 100644
@@ -1,41 +1,2 @@
 config BR2_PACKAGE_UDEV
-	bool "udev"
-	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
-	depends on BR2_LARGEFILE # util-linux
-	depends on BR2_USE_WCHAR # util-linux
-	depends on !BR2_PREFER_STATIC_LIB # kmod
-	select BR2_PACKAGE_UTIL_LINUX
-	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
-	select BR2_PACKAGE_KMOD
-	help
-	  Userspace device daemon.
-
-	  udev requires a Linux kernel >= 2.6.34: it relies on devtmpfs.
-
-	  ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/
-
-if BR2_PACKAGE_UDEV
-
-config BR2_PACKAGE_UDEV_RULES_GEN
-	bool "enable rules generator"
-	help
-	  Enable persistant rules generator
-
-config BR2_PACKAGE_UDEV_ALL_EXTRAS
-	bool "enable all extras"
-	select BR2_PACKAGE_ACL
-	select BR2_PACKAGE_HWDATA
-	select BR2_PACKAGE_LIBGLIB2
-	depends on BR2_USE_WCHAR # libglib2
-	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
-	help
-	  Enable all extras with external dependencies like
-	  libacl, hwdata and libglib2
-
-comment "enabling all extras requires a toolchain with WCHAR and threading support"
-	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
-
-endif
-
-comment "udev requires /dev mgmnt set to udev under System configuration"
-	depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+	bool
package/udev/udev.mk +1 -35
index db86850..c6fcdfc 100644
@@ -4,48 +4,6 @@
 #
 ################################################################################
 
-UDEV_VERSION = 182
-UDEV_SOURCE = udev-$(UDEV_VERSION).tar.xz
-UDEV_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/kernel/hotplug/
-UDEV_LICENSE = GPLv2+
-UDEV_LICENSE_FILES = COPYING
-UDEV_INSTALL_STAGING = YES
+UDEV_SOURCE =
 
-# mq_getattr is in librt
-UDEV_CONF_ENV += LIBS=-lrt
-
-UDEV_CONF_OPT =			\
-	--sbindir=/sbin		\
-	--with-rootlibdir=/lib	\
-	--libexecdir=/lib	\
-	--with-usb-ids-path=/usr/share/hwdata/usb.ids	\
-	--with-pci-ids-path=/usr/share/hwdata/pci.ids	\
-	--with-firmware-path=/lib/firmware		\
-	--disable-introspection
-
-UDEV_DEPENDENCIES = host-gperf host-pkgconf util-linux kmod
-
-ifeq ($(BR2_PACKAGE_UDEV_RULES_GEN),y)
-UDEV_CONF_OPT += --enable-rule_generator
-endif
-
-ifeq ($(BR2_PACKAGE_UDEV_ALL_EXTRAS),y)
-UDEV_DEPENDENCIES += acl hwdata libglib2
-UDEV_CONF_OPT +=		\
-	--enable-udev_acl
-else
-UDEV_CONF_OPT +=		\
-	--disable-gudev
-endif
-
-ifeq ($(BR2_PACKAGE_SYSTEMD),y)
-	UDEV_CONF_OPT += --with-systemdsystemunitdir=/lib/systemd/system/

package/udev/udev.mk line 9

Quoted 10 lines
package/udev/udev.mk +1 -9
-endif
-
-define UDEV_INSTALL_INITSCRIPT
-	$(INSTALL) -m 0755 package/udev/S10udev $(TARGET_DIR)/etc/init.d/S10udev
-endef
-
-UDEV_POST_INSTALL_TARGET_HOOKS += UDEV_INSTALL_INITSCRIPT
-
-$(eval $(autotools-package))
+$(eval $(generic-package))

So for the moment the udev virtual package is completely empty. It only gets updated to depend on systemd in PATCH 5/6. Is this intentional?

Quoted 5 lines
system/Config.in +0 -0
index 1fe4127..c16e8e7 100644

system/Config.in config BR2_INIT_SYSTEMD · line 90

Quoted 10 lines
system/Config.in +3 -2
@@ -83,16 +83,22 @@ config BR2_INIT_SYSTEMD
 	depends on BR2_LARGEFILE
 	depends on BR2_USE_WCHAR
 	depends on BR2_INET_IPV6
-	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
 	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_TOOLCHAIN_HAS_SSP
 	depends on BR2_USE_MMU
-	select BR2_PACKAGE_DBUS
+	depends on !BR2_PREFER_STATIC_LIB
+	select BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV

Why do we have this select? I must say I don't really follow what's going on in system/Config.in in terms of init option vs. /dev management options.

system/Config.in config BR2_INIT_SYSTEMD · line 98

Quoted 11 lines
system/Config.in +5 -3
 	select BR2_PACKAGE_SYSTEMD
 
-comment 'systemd requires largefile, wchar, IPv6, threads and udev support'
+comment 'systemd needs toolchain w/ largefile, wchar, IPv6, threads'
 	depends on !(BR2_LARGEFILE && BR2_USE_WCHAR && \
-		     BR2_INET_IPV6 && BR2_TOOLCHAIN_HAS_THREADS && \
-		     BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV)
+		     BR2_INET_IPV6 && BR2_TOOLCHAIN_HAS_THREADS)
+
+comment 'systemd needs toolchain w/ stack smashing protection'
+	depends on !BR2_TOOLCHAIN_HAS_SSP

Wow, that's probably the first package that has this requirement. What happens when the toolchain doesn't have SSP support?

system/Config.in config BR2_INIT_NONE · line 109

Quoted 11 lines
system/Config.in +3 -1
+comment "systemd doesn't work with 'prefer static libraries'"
+	depends on BR2_PREFER_STATIC_LIB
 
 config BR2_INIT_NONE
 	bool "None"
@@ -100,7 +106,7 @@ config BR2_INIT_NONE
 endchoice
 
 choice
-	prompt "/dev management"
+	prompt "/dev management" if !BR2_INIT_SYSTEMD

Ok, so we show the /dev management only if another init system that systemd is selected. Makes sense.

Quoted 16 lines
system/Config.in +3 -4
 	default BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS
 
 config BR2_ROOTFS_DEVICE_CREATION_STATIC
@@ -113,20 +119,14 @@ config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV
 	bool "Dynamic using mdev"
 	select BR2_PACKAGE_BUSYBOX
 
+endchoice
+
 config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
-	bool "Dynamic using udev"
-	depends on BR2_LARGEFILE # udev
-	depends on BR2_USE_WCHAR # udev
-	depends on !BR2_PREFER_STATIC_LIB # udev -> kmod
+	bool
 	select BR2_PACKAGE_UDEV

system/Config.in config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV · line 129

Quoted 10 lines
system/Config.in +2 -7
 
-comment "udev requires a toolchain with LARGEFILE + WCHAR support"
-	depends on !(BR2_LARGEFILE && BR2_USE_WCHAR)
-
-comment "udev doesn't work with 'prefer static libraries'"
-	depends on BR2_PREFER_STATIC_LIB
-
-endchoice
+comment "/dev management using udev (from systemd)"
+	depends on BR2_INIT_SYSTEMD

I don't think this comment is really needed.

system/Config.in config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV · line 132

Quoted 3 lines
system/Config.in +0 -0
 config BR2_ROOTFS_DEVICE_TABLE
 	string "Path to the permission tables"

In order to make the patch series bisectable, I think I would suggest to have the following sequence:

* Introduce the eudev package

* Turn the udev package into a virtual package that uses the only available udev implementation: eudev

* Bump the systemd package, and register it as a possible udev implementation.

What do you think?

Thomas

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

PATCH v2 3/6 systemd: bump to v206.

On Sat, Nov 02, 2013 at 07:31:39PM +0100, Thomas Petazzoni wrote:

Dear Thomas Petazzoni,

Quoted 7 lines
Quoted 4 lines

The selection of the following packages will also add features:

- libglib2 package will add support for gudev.
- acl package will add support for multi-seat.

Maybe this text should be mentioned in the help text of the systemd option.

Good suggestion. I will add it.

Quoted 8 lines

package/systemd/systemd-uclibc-fix.patch

Quoted 5 lines
package/systemd/systemd-uclibc-fix.patch deleted +0 -0
deleted file mode 100644
index 9a20845..0000000

Without this patch (or similar patches), systemd does not build with uClibc, so it should be marked to depend on (e)glibc.

As there was no advantage in using systemd with a uClibc toolchain, Arnout Vandecappelle suggested that I add:

depends on !BR2_TOOLCHAIN_USES_UCLIBC

in system/Config.in, but I'd prefer to add:

depends on BR2_TOOLCHAIN_USES_GLIBC+

As I have not tested systemd with the musl libc yet. I will also remove the uClib patches.

Quoted 5 lines

package/systemd/systemd-uclibc-fix.patch

Quoted 1 line
package/systemd/systemd-uclibc-fix.patch deleted +1 -0
+	select BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV

Why do we have this select? I must say I don't really follow what's going on in system/Config.in in terms of init option vs. /dev management options.

The line

select BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV

is needed in order to have udisks and friends to show up. The 'depends' became a 'select' as I swapped the selection of the init system and the /dev management.

Quoted 5 lines

package/systemd/systemd-uclibc-fix.patch

Quoted 2 lines
package/systemd/systemd-uclibc-fix.patch deleted +2 -0
+comment 'systemd needs toolchain w/ stack smashing protection'
+	depends on !BR2_TOOLCHAIN_HAS_SSP

Wow, that's probably the first package that has this requirement. What happens when the toolchain doesn't have SSP support?

Without SSP, systemd does not build. It is compiled using lots of error checking flags (see OUR_CFLAGS in configure.ac), which sounds sensible when building a program meant to run as PID 1. This requirement made me report the issue "uClibc fails to build with stack smash protection" back in September, which was caused by the change in GCC build procedure (two steps instead of three).

Quoted 4 lines

package/systemd/systemd-uclibc-fix.patch

Quoted 2 lines
package/systemd/systemd-uclibc-fix.patch deleted +2 -0
+comment "/dev management using udev (from systemd)"
+	depends on BR2_INIT_SYSTEMD

I don't think this comment is really needed.

I'd prefer to keep it: even if the end user does not have the choice of /dev management, he is informed of the solution chosen for him.

Quoted 6 lines

In order to make the patch series bisectable, I think I would suggest to have the following sequence:

* Introduce the eudev package

Quoted 7 lines

* Turn the udev package into a virtual package that uses the only available udev implementation: eudev

* Bump the systemd package, and register it as a possible udev implementation.

What do you think?

You are right. My initial problem was "bumping systemd", so I kept at looking the udev stuff from this perspective. It seems more logical to see it as a "bumping udev" problem. So, I will send a new series, with eudev as a starting point.

Best Regards,
ELB

#8 lore raw

PATCH v2 3/6 systemd: bump to v206.

Hi,

Quoted 2 lines · Eric Le Bihan

On Sat, Nov 02, 2013 at 07:31:39PM +0100, Thomas Petazzoni wrote:

[..]

Quoted 7 lines
Quoted 6 lines

system/Config.in config BR2_INIT_SYSTEMD · line 98

Quoted 3 lines
system/Config.in +2 -0
+comment 'systemd needs toolchain w/ stack smashing protection'
+   depends on !BR2_TOOLCHAIN_HAS_SSP

Wow, that's probably the first package that has this requirement. What happens when the toolchain doesn't have SSP support?

Quoted 7 lines

Without SSP, systemd does not build. It is compiled using lots of error checking flags (see OUR_CFLAGS in configure.ac), which sounds sensible when building a program meant to run as PID 1. This requirement made me report the issue "uClibc fails to build with stack smash protection" back in September, which was caused by the change in GCC build procedure (two steps instead of three).

Note that the comments should be '...needs a toolchain...' (with 'a')

I wonder what to do here though. We have deliberately chosen the toolchain keywords to be short so that the entire line can fit within a 80-char terminal. 'Stack smashing protection' is pretty long in that respect.
Not sure if there will be other packages that depend on this option, but what about we name it just 'SSP' (which also is how it's named in the toolchain menu). We should probably also update the manual with this new 'toolchain option' that can have a comment.

Best regards,
Thomas

#9 lore raw

PATCH v2 4/6 systemd: set correct firmware search path

In reply to Eric Le Bihan
---
 package/systemd/systemd.mk |    1 +
 1 file changed, 1 insertion(+)
package/systemd/systemd.mk +1 -0
index d371711..1afceed 100644
@@ -34,6 +34,7 @@ SYSTEMD_CONF_OPT += \
 	--with-dbussessionservicedir=/usr/share/dbus-1/services \
 	--with-dbussystemservicedir=/usr/share/dbus-1/system-services \
 	--with-dbusinterfacedir=/usr/share/dbus-1/interfaces \
+	--with-firmware-path=/lib/firmware \
 	--enable-split-usr \
 	--enable-introspection=no \
 	--disable-efi \

--
1.7.9.5

#10 lore raw

PATCH v2 4/6 systemd: set correct firmware search path

Dear Eric Le Bihan,

Quoted 10 lines · Eric Le Bihan
---
 package/systemd/systemd.mk |    1 +
 1 file changed, 1 insertion(+)
package/systemd/systemd.mk +0 -0
index d371711..1afceed 100644

package/systemd/systemd.mk SYSTEMD_CONF_OPT += \ · line 40

Quoted 7 lines
package/systemd/systemd.mk +1 -0
@@ -34,6 +34,7 @@ SYSTEMD_CONF_OPT += \
 	--with-dbussessionservicedir=/usr/share/dbus-1/services \
 	--with-dbussystemservicedir=/usr/share/dbus-1/system-services \
 	--with-dbusinterfacedir=/usr/share/dbus-1/interfaces \
+	--with-firmware-path=/lib/firmware \
 	--enable-split-usr \
 	--enable-introspection=no \
 	--disable-efi \

This should be squashed into the patch updating systemd, I don't really a reason to have this separately.

Thomas

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

PATCH v2 5/6 package: update dependency on udev.

In reply to Eric Le Bihan

Some packages were depending on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV and selected BR2_PACKAGE_UDEV.
As udev is now a virtual package (which is provided by systemd and sooner by eudev) and as these packages were in fact depending on udev itself and not the type of /dev management, the symbol BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV is now deprecated and replaced by BR2_PACKAGE_HAS_UDEV.

For the moment, only systemd selects this symbol.

---
 Config.in.legacy                                 |    7 +++++++
 package/libatasmart/Config.in                    |    4 ++--
 package/network-manager/Config.in                |    6 ++----
 package/pcsc-lite/Config.in                      |    2 +-
 package/systemd/Config.in                        |    1 +
 package/udev/Config.in                           |    2 +-
 package/udev/udev.mk                             |   11 +++++++++++
 package/udisks/Config.in                         |    8 +++-----
 package/usbmount/Config.in                       |    4 ++--
 package/weston/Config.in                         |    4 ++--
 package/x11r7/xdriver_xf86-input-evdev/Config.in |    4 ++--
 11 files changed, 34 insertions(+), 19 deletions(-)
Config.in.legacy +7 -0
index 4f30b2b..f797304 100644
@@ -55,6 +55,13 @@ config BR2_PACKAGE_MODULE_INIT_TOOLS
 	  The 'module-init-tools' package has been removed, since it
 	  has been depracated upstream and replaced by 'kmod'.
 
+config BR2_PACKAGE_UDEV
+	bool "udev is now provided by systemd or eudev"
+	select BR2_PACKAGE_HAS_UDEV
+	help
+	  The 'udev' package is now a virtual package. It can be
+	  provided by 'systemd' or 'eudev'.
+
 ###############################################################################
 comment "Legacy options removed in 2013.08"
 
package/libatasmart/Config.in +2 -2
index a3e44f8..534e7c1 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LIBATASMART
 	bool "libatasmart"
-	depends on BR2_PACKAGE_UDEV # libudev is configure dependency
+	depends on BR2_PACKAGE_HAS_UDEV # libudev is configure dependency
 	help
 	  The libatasmart package is a disk reporting library.
 	  It only supports a subset of the ATA S.M.A.R.T. functionality.
@@ -8,4 +8,4 @@ config BR2_PACKAGE_LIBATASMART
 	  http://www.linuxfromscratch.org/blfs/view/svn/general/libatasmart.html
 
 comment "libatasmart requires udev to be enabled"
-	depends on !BR2_PACKAGE_UDEV
+	depends on !BR2_PACKAGE_HAS_UDEV
package/network-manager/Config.in +2 -4
index 50a3e74..b58de58 100644
@@ -1,15 +1,13 @@
 config BR2_PACKAGE_NETWORK_MANAGER
 	bool "NetworkManager"
-	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
-	select BR2_PACKAGE_DBUS
 	depends on BR2_INET_IPV6
 	depends on BR2_LARGEFILE # acl
 	depends on BR2_USE_WCHAR # libglib2 and gnutls
 	depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, libglib2
 	depends on BR2_USE_MMU # dbus
+	depends on BR2_PACKAGE_HAS_UDEV
+	select BR2_PACKAGE_DBUS
 	select BR2_PACKAGE_DBUS_GLIB
-	select BR2_PACKAGE_UDEV
-	select BR2_PACKAGE_UDEV_ALL_EXTRAS
 	select BR2_PACKAGE_GNUTLS
 	select BR2_PACKAGE_LIBGCRYPT
 	select BR2_PACKAGE_LIBNL
package/pcsc-lite/Config.in +1 -1
index d6629d0..7c4bca9 100644
@@ -11,7 +11,7 @@ if BR2_PACKAGE_PCSC_LITE
 
 config BR2_PACKAGE_PCSC_LITE_FORCE_LIBUSB
 	bool "use libusb"
-	depends on !BR2_PACKAGE_UDEV
+	depends on !BR2_PACKAGE_HAS_UDEV
 	select BR2_PACKAGE_LIBUSB
 	help
 	  Select Y if you want to support usb smart card readers.
package/systemd/Config.in +1 -0
index ad92b73..63639b2 100644
@@ -3,6 +3,7 @@ config BR2_PACKAGE_SYSTEMD
 	depends on BR2_INIT_SYSTEMD
 	depends on BR2_TOOLCHAIN_HAS_THREADS # dbus
 	depends on BR2_USE_MMU # dbus
+	select BR2_PACKAGE_HAS_UDEV
 	select BR2_PACKAGE_DBUS
 	select BR2_PACKAGE_LIBCAP
 	select BR2_PACKAGE_UTIL_LINUX
package/udev/Config.in +1 -1
index 23c443e..1c9251b 100644
@@ -1,2 +1,2 @@
-config BR2_PACKAGE_UDEV
+config BR2_PACKAGE_HAS_UDEV
 	bool
package/udev/udev.mk +11 -0
index c6fcdfc..bbb4049 100644
@@ -6,4 +6,15 @@
 
 UDEV_SOURCE =
 
+ifeq ($(BR2_PACKAGE_SYSTEMD),y)
+	UDEV_DEPENDENCIES += systemd
+endif
+
+ifeq ($(UDEV_DEPENDENCIES),)
+define UDEV_CONFIGURE_CMDS
+	echo "No Udev implementation selected. Configuration error."
+	exit 1
+endef
+endif
+
 $(eval $(generic-package))
package/udisks/Config.in +3 -5
index dca23ea..7899155 100644
@@ -1,10 +1,8 @@
 config BR2_PACKAGE_UDISKS
 	bool "udisks"
-	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+	depends on BR2_PACKAGE_HAS_UDEV
 	depends on BR2_TOOLCHAIN_HAS_THREADS # dbus-glib -> glib2
 	depends on BR2_USE_MMU # lvm2
-	select BR2_PACKAGE_UDEV
-	select BR2_PACKAGE_UDEV_ALL_EXTRAS
 	select BR2_PACKAGE_DBUS
 	select BR2_PACKAGE_DBUS_GLIB
 	depends on BR2_USE_WCHAR # dbus-glib -> glib2
@@ -35,6 +33,6 @@ config BR2_PACKAGE_UDISKS_LVM2
 
 endif
 
-comment "udisks requires /dev mgmnt set to udev under System configuration and a toolchain with WCHAR and threading support"
-	depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV || \
+comment "udisks requires /dev mgmnt set to udev, toolchain w/ wchar, threads"
+	depends on !BR2_PACKAGE_HAS_UDEV || \
 		!BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
package/usbmount/Config.in +2 -2
index 2583e7c..0bb8883 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_USBMOUNT
 	bool "usbmount"
-	depends on BR2_PACKAGE_UDEV
+	depends on BR2_PACKAGE_HAS_UDEV
 	select BR2_PACKAGE_LOCKFILE_PROGS
 	help
 	  The usbmount package automatically mounts USB mass storage devices
@@ -9,4 +9,4 @@ config BR2_PACKAGE_USBMOUNT
 	  http://usbmount.alioth.debian.org/
 
 comment "usbmount requires udev to be enabled"
-	depends on !BR2_PACKAGE_UDEV
+	depends on !BR2_PACKAGE_HAS_UDEV
package/weston/Config.in +2 -2
index 56eb135..8818ab9 100644
@@ -1,5 +1,5 @@
 comment "weston requires udev"
-	depends on !BR2_PACKAGE_UDEV
+	depends on !BR2_PACKAGE_HAS_UDEV
 
 config BR2_PACKAGE_WESTON
 	bool "weston"
@@ -10,7 +10,7 @@ config BR2_PACKAGE_WESTON
 	select BR2_PACKAGE_LIBPNG
 	select BR2_PACKAGE_JPEG
 	select BR2_PACKAGE_MTDEV
-	depends on BR2_PACKAGE_UDEV
+	depends on BR2_PACKAGE_HAS_UDEV
 	depends on BR2_TOOLCHAIN_HAS_THREADS # wayland
 	# Runtime dependency
 	select BR2_PACKAGE_XKEYBOARD_CONFIG
package/x11r7/xdriver_xf86-input-evdev/Config.in +2 -2
index cc159c9..05ee314 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_XDRIVER_XF86_INPUT_EVDEV
 	bool "xf86-input-evdev"
-	depends on BR2_PACKAGE_UDEV # libudev is configure dependency
+	depends on BR2_PACKAGE_HAS_UDEV # libudev is configure dependency
 	select BR2_PACKAGE_XPROTO_INPUTPROTO
 	select BR2_PACKAGE_XPROTO_RANDRPROTO
 	select BR2_PACKAGE_XPROTO_XPROTO
@@ -8,4 +8,4 @@ config BR2_PACKAGE_XDRIVER_XF86_INPUT_EVDEV
 	  Generic Linux input driver
 
 comment "xf86-input-evdev requires udev to be enabled"
-        depends on !BR2_PACKAGE_UDEV
+        depends on !BR2_PACKAGE_HAS_UDEV

--
1.7.9.5

#12 lore raw

PATCH v2 6/6 eudev: new package.

In reply to Eric Le Bihan

eudev is a userspace device management daemon. It is a standalone version, independent from systemd. It is a fork maintained by Gentoo.

Features:

- This package selects the BR2_PACKAGE_HAS_UDEV symbol.
- No extra configuration options are available: Gudev is build if libglib2 is selected.
- No dependency on hwdata as the package uses its own hardware database (as does systemd).

---
 package/Config.in       |    1 +
 package/eudev/Config.in |   26 ++++++++++++++++++++++++
 package/eudev/S10udev   |   48 +++++++++++++++++++++++++++++++++++++++++++++
 package/eudev/eudev.mk  |   50 +++++++++++++++++++++++++++++++++++++++++++++++
 package/udev/udev.mk    |    4 ++++
 system/Config.in        |    8 ++++----
 6 files changed, 133 insertions(+), 4 deletions(-)
 create mode 100644 package/eudev/Config.in
 create mode 100644 package/eudev/S10udev
 create mode 100644 package/eudev/eudev.mk
package/Config.in +1 -0
index e187aa3..72eb8bd 100644
@@ -272,6 +272,7 @@ source "package/dmraid/Config.in"
 source "package/dvb-apps/Config.in"
 source "package/dvbsnoop/Config.in"
 source "package/eeprog/Config.in"
+source "package/eudev/Config.in"
 source "package/evtest/Config.in"
 source "package/fan-ctrl/Config.in"
 source "package/flashrom/Config.in"
package/eudev/Config.in new file +26 -0
new file mode 100644
index 0000000..5a89325
@@ -0,0 +1,26 @@
+config BR2_PACKAGE_EUDEV
+	bool "eudev"
+	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
+	depends on BR2_LARGEFILE # util-linux
+	depends on BR2_USE_WCHAR # util-linux
+	depends on !BR2_PACKAGE_SYSTEMD
+	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.
+
+	  eudev requires a Linux kernel >= 2.6.34: it relies on devtmpfs.
+
+	  http://github.com/gentoo/eudev/
+
+if BR2_PACKAGE_EUDEV
+
+config BR2_PACKAGE_EUDEV_RULES_GEN
+	bool "enable rules generator"
+	help
+	  Enable persistant rules generator
+
+endif
package/eudev/S10udev new file +48 -0

48 lines not on this page · raw message

package/eudev/eudev.mk new file +50 -0

50 lines not on this page · raw message

package/udev/udev.mk +4 -0
index bbb4049..a176262 100644
@@ -10,6 +10,10 @@ ifeq ($(BR2_PACKAGE_SYSTEMD),y)
 	UDEV_DEPENDENCIES += systemd
 endif
 
+ifeq ($(BR2_PACKAGE_EUDEV),y)
+	UDEV_DEPENDENCIES += eudev
+endif
+
 ifeq ($(UDEV_DEPENDENCIES),)
 define UDEV_CONFIGURE_CMDS
 	echo "No Udev implementation selected. Configuration error."
system/Config.in +4 -4
index c16e8e7..3698be3 100644
@@ -119,11 +119,11 @@ config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV
 	bool "Dynamic using mdev"
 	select BR2_PACKAGE_BUSYBOX
 
-endchoice
+config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
+	bool "Dynamic using eudev"
+	select BR2_PACKAGE_EUDEV
 
-config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
-	bool
-	select BR2_PACKAGE_UDEV
+endchoice
 
 comment "/dev management using udev (from systemd)"
 	depends on BR2_INIT_SYSTEMD

--
1.7.9.5

#13 lore raw

v2 cover package: udev is now provided by systemd or eudev

In reply to Eric Le Bihan

Dear Eric Le Bihan,

Quoted 15 lines · Eric Le Bihan

This series converts udev to a virtual package, either provided by systemd or eudev.

Starting with version 183, udev has been merged into systemd. This forces the use of systemd as the init system if /dev is to be dynamically managed by udev. eudev is a fork of udev, maintained by Gentoo, but isolated from systemd, so it can be used with any init system.

Systemd has been bumped to v206 and a new eudev package has been added. Version 1.2 of eudev is in sync with systemd v206 (v1.3 will be in sync with v207).

The bump of systemd to v206 also introduces new options, like the activation of the journal gateway.

Quoted 6 lines

In the end:

- if systemd is selected as init system, the /dev management will handled by udev. No either choice possible.
- if busybox or SysV is chosen, the user can choose to manage /dev statically, or dynamically using mdev or eudev.

Thanks! I've made a few comments on PATCH 3/6, mainly around bisectability and other questions.

However, I wanted to test this patch set, especially to understand better the impact on the System configuration, but the patches no longer apply. Would you mind fixing the few comments, and resending an updated series on top of the latest master?

Thanks a lot!

Thomas

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