Skip to contentSkip to conversation

systemd/udev/eudev polishing

PATCH New Eric Le Bihan 4 participants 8 messages Feb 24, 2014 – Feb 25, 2014

lore
Share & tools
lore
#0 lore raw

v2 cover systemd/udev/eudev polishing

This patch series contains enhancements for systemd, udev and eudev, intended for next branch:

- use of proper virtual package infrastructure (suggested by Arnout).
- enable required kernel features for systemd (suggested by SamuelM).

Changes v1 -> v2:
- reworked systemd help text (suggested by ThomasP).
- removed shell commands in virtual package infra (suggested by ThomasP).

Best regards,
ELB

Eric Le Bihan (2):
udev: update udev to new virtual package infra.
systemd: enable required kernel features.

 linux/linux.mk            |    6 +++++-
 package/eudev/Config.in   |    3 +++
 package/systemd/Config.in |   19 +++++++++++++++++--
 package/udev/Config.in    |    8 ++++----
 package/udev/udev.mk      |   16 ++++------------
 5 files changed, 33 insertions(+), 19 deletions(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v2 1/2 udev: update udev to new virtual package infra.

The udev virtual package and its current providers (eudev and systemd) have been updated to use the latest version of virtual package infrastructure.

A provider should now select BR2_PACKAGE_HAS_UDEV and well as set a value for BR2_PACKAGE_PROVIDES_UDEV.

---
 package/eudev/Config.in   |    3 +++
 package/systemd/Config.in |    3 +++
 package/udev/Config.in    |    8 ++++----
 package/udev/udev.mk      |   16 ++++------------
 4 files changed, 14 insertions(+), 16 deletions(-)
package/eudev/Config.in +3 -0
index bfad99a..40ff721 100644
@@ -21,6 +21,9 @@ config BR2_PACKAGE_EUDEV
 
 if BR2_PACKAGE_EUDEV
 
+config BR2_PACKAGE_PROVIDES_UDEV
+	default "eudev"
+
 config BR2_PACKAGE_EUDEV_RULES_GEN
 	bool "enable rules generator"
 	help
package/systemd/Config.in +3 -0
index e3ea433..eacc23c 100644
@@ -40,6 +40,9 @@ config BR2_PACKAGE_SYSTEMD
 
 if BR2_PACKAGE_SYSTEMD
 
+config BR2_PACKAGE_PROVIDES_UDEV
+	default "systemd"
+
 config BR2_PACKAGE_SYSTEMD_ALL_EXTRAS
 	bool "enable all extras"
 	select BR2_PACKAGE_XZ
package/udev/Config.in +4 -4
index 5cd4051..941a515 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_HAS_UDEV
 	bool
-	help
-	  udev is now a virtual package.
-	  Packages requiring udevd at run time or libudev/gudev at build time
-	  should select it.
+
+config BR2_PACKAGE_PROVIDES_UDEV
+	depends on BR2_PACKAGE_HAS_UDEV
+	string
package/udev/udev.mk +4 -12
index a5d0f80..f5eeeb4 100644
@@ -5,20 +5,12 @@
 ################################################################################
 
 UDEV_SOURCE =
+UDEV_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_UDEV))
 
-ifeq ($(BR2_PACKAGE_EUDEV),y)
-UDEV_DEPENDENCIES += eudev
-endif
-
-ifeq ($(BR2_PACKAGE_SYSTEMD),y)
-UDEV_DEPENDENCIES += systemd
-endif
-
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 ifeq ($(UDEV_DEPENDENCIES),)
-define UDEV_CONFIGURE_CMDS
-	echo "No Udev implementation selected. Configuration error."
-	exit 1
-endef
+$(error No Udev implementation selected. Configuration error)
+endif
 endif
 
 $(eval $(generic-package))
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH v2 1/2 udev: update udev to new virtual package infra.

Quoted 8 lines · Eric Le Bihan

The udev virtual package and its current providers (eudev and systemd) have been updated to use the latest version of virtual package infrastructure.

A provider should now select BR2_PACKAGE_HAS_UDEV and well as set a value for BR2_PACKAGE_PROVIDES_UDEV.

Regards,
Arnout

Quoted 80 lines
---
 package/eudev/Config.in   |    3 +++
 package/systemd/Config.in |    3 +++
 package/udev/Config.in    |    8 ++++----
 package/udev/udev.mk      |   16 ++++------------
 4 files changed, 14 insertions(+), 16 deletions(-)
package/eudev/Config.in +3 -0
index bfad99a..40ff721 100644
@@ -21,6 +21,9 @@ config BR2_PACKAGE_EUDEV
 
 if BR2_PACKAGE_EUDEV
 
+config BR2_PACKAGE_PROVIDES_UDEV
+	default "eudev"
+
 config BR2_PACKAGE_EUDEV_RULES_GEN
 	bool "enable rules generator"
 	help
package/systemd/Config.in +3 -0
index e3ea433..eacc23c 100644
@@ -40,6 +40,9 @@ config BR2_PACKAGE_SYSTEMD
 
 if BR2_PACKAGE_SYSTEMD
 
+config BR2_PACKAGE_PROVIDES_UDEV
+	default "systemd"
+
 config BR2_PACKAGE_SYSTEMD_ALL_EXTRAS
 	bool "enable all extras"
 	select BR2_PACKAGE_XZ
package/udev/Config.in +4 -4
index 5cd4051..941a515 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_HAS_UDEV
 	bool
-	help
-	  udev is now a virtual package.
-	  Packages requiring udevd at run time or libudev/gudev at build time
-	  should select it.
+
+config BR2_PACKAGE_PROVIDES_UDEV
+	depends on BR2_PACKAGE_HAS_UDEV
+	string
package/udev/udev.mk +4 -12
index a5d0f80..f5eeeb4 100644
@@ -5,20 +5,12 @@
 ################################################################################
 
 UDEV_SOURCE =
+UDEV_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_UDEV))
 
-ifeq ($(BR2_PACKAGE_EUDEV),y)
-UDEV_DEPENDENCIES += eudev
-endif
-
-ifeq ($(BR2_PACKAGE_SYSTEMD),y)
-UDEV_DEPENDENCIES += systemd
-endif
-
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 ifeq ($(UDEV_DEPENDENCIES),)
-define UDEV_CONFIGURE_CMDS
-	echo "No Udev implementation selected. Configuration error."
-	exit 1
-endef
+$(error No Udev implementation selected. Configuration error)
+endif
 endif
 
 $(eval $(generic-package))
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#3 lore raw

PATCH v2 1/2 udev: update udev to new virtual package infra.

Quoted 11 lines · Arnout Vandecappelle
Quoted 8 lines · Eric Le Bihan

The udev virtual package and its current providers (eudev and systemd) have been updated to use the latest version of virtual package infrastructure.

A provider should now select BR2_PACKAGE_HAS_UDEV and well as set a value for BR2_PACKAGE_PROVIDES_UDEV.

Regards,

Signature · 1 line
Samuel
#4 lore raw

PATCH v2 2/2 systemd: enable required kernel features.

In reply to Eric Le Bihan

When systemd is chosen as init system, the required kernel features are enabled.

---
 linux/linux.mk            |    6 +++++-
 package/systemd/Config.in |   16 ++++++++++++++--
 2 files changed, 19 insertions(+), 3 deletions(-)
linux/linux.mk +5 -1
index d7f51b3..f948e6c 100644
@@ -195,7 +195,11 @@ define LINUX_CONFIGURE_CMDS
 		$(call KCONFIG_ENABLE_OPT,CONFIG_FUNCTION_TRACER,$(@D)/.config))
 	$(if $(BR2_PACKAGE_SYSTEMD),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config))
+		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_FHANDLE,$(@D)/.config)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_AUTOFS4_FS,$(@D)/.config)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_POSIX_ACL,$(@D)/.config)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_POSIX_XATTR,$(@D)/.config))
 	$(if $(BR2_LINUX_KERNEL_APPENDED_DTB),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_ARM_APPENDED_DTB,$(@D)/.config))
 	yes '' | $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) oldconfig
package/systemd/Config.in +14 -2
index eacc23c..4f180a1 100644
@@ -26,8 +26,20 @@ config BR2_PACKAGE_SYSTEMD
 	  elaborate transactional dependency-based service control logic.
 	  It can work as a drop-in replacement for sysvinit.
 
-	  Systemd requires a Linux kernel >= 3.0, with inotify, devtmpfs,
-	  tmpfs vfs and tmpfs POSIX ACL enabled.
+	  Systemd requires a Linux kernel >= 3.0 with the following options
+	  enabled:
+
+	  - CONFIG_CGROUPS
+	  - CONFIG_INOTIFY_USER
+	  - CONFIG_FHANDLE
+	  - CONFIG_AUTOFS4_FS
+	  - CONFIG_TMPFS_POSIX_ACL
+	  - CONFIG_TMPFS_XATTR
+
+	  These options will be automatically enabled by Buildroot if
+	  it is responsible for building the kernel. Otherwise, if you
+	  are building your kernel outside of Buildroot, make sure
+	  these options are enabled.
 
 	  Systemd also provides udev, the userspace device daemon.
 
Signature · 1 line
1.7.9.5
#5 lore raw

PATCH v2 2/2 systemd: enable required kernel features.

Quoted 4 lines · Eric Le Bihan

When systemd is chosen as init system, the required kernel features are enabled.

However, it would be good to add the same information to the end of
docs/manual/configure.txt

Regards,
Arnout

Quoted 50 lines
---
 linux/linux.mk            |    6 +++++-
 package/systemd/Config.in |   16 ++++++++++++++--
 2 files changed, 19 insertions(+), 3 deletions(-)
linux/linux.mk +5 -1
index d7f51b3..f948e6c 100644
@@ -195,7 +195,11 @@ define LINUX_CONFIGURE_CMDS
 		$(call KCONFIG_ENABLE_OPT,CONFIG_FUNCTION_TRACER,$(@D)/.config))
 	$(if $(BR2_PACKAGE_SYSTEMD),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config))
+		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_FHANDLE,$(@D)/.config)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_AUTOFS4_FS,$(@D)/.config)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_POSIX_ACL,$(@D)/.config)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_POSIX_XATTR,$(@D)/.config))
 	$(if $(BR2_LINUX_KERNEL_APPENDED_DTB),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_ARM_APPENDED_DTB,$(@D)/.config))
 	yes '' | $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) oldconfig
package/systemd/Config.in +14 -2
index eacc23c..4f180a1 100644
@@ -26,8 +26,20 @@ config BR2_PACKAGE_SYSTEMD
 	  elaborate transactional dependency-based service control logic.
 	  It can work as a drop-in replacement for sysvinit.
 
-	  Systemd requires a Linux kernel >= 3.0, with inotify, devtmpfs,
-	  tmpfs vfs and tmpfs POSIX ACL enabled.
+	  Systemd requires a Linux kernel >= 3.0 with the following options
+	  enabled:
+
+	  - CONFIG_CGROUPS
+	  - CONFIG_INOTIFY_USER
+	  - CONFIG_FHANDLE
+	  - CONFIG_AUTOFS4_FS
+	  - CONFIG_TMPFS_POSIX_ACL
+	  - CONFIG_TMPFS_XATTR
+
+	  These options will be automatically enabled by Buildroot if
+	  it is responsible for building the kernel. Otherwise, if you
+	  are building your kernel outside of Buildroot, make sure
+	  these options are enabled.
 
 	  Systemd also provides udev, the userspace device daemon.
 
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#6 lore raw

PATCH v2 2/2 systemd: enable required kernel features.

Quoted 7 lines · Arnout Vandecappelle
Quoted 4 lines · Eric Le Bihan

When systemd is chosen as init system, the required kernel features are enabled.

Quoted 3 lines

However, it would be good to add the same information to the end of
docs/manual/configure.txt

May be good indeed, but it can be done in another patch.

Regards,

Signature · 1 line
Samuel
#7 lore raw

v2 cover systemd/udev/eudev polishing

In reply to Eric Le Bihan
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Eric" == Eric Le Bihan <[email protected]> writes:

This patch series contains enhancements for systemd, udev and eudev, intended for next branch:

- use of proper virtual package infrastructure (suggested by Arnout).
- enable required kernel features for systemd (suggested by SamuelM).

Changes v1 -> v2:
- reworked systemd help text (suggested by ThomasP).
- removed shell commands in virtual package infra (suggested by ThomasP).

Committed both to next, thanks.

Signature · 1 line
Bye, Peter Korsgaard