Skip to contentSkip to conversation

udev is now provided by systemd or eudev

PATCH Superseded Eric Le Bihan 6 participants 22 messages Jan 13, 2014 – Feb 5, 2014

v6 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

v6 cover udev is now provided by systemd or eudev

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 v207 and a new eudev package has been added. Version 1.3 of eudev is in sync with systemd v207.

The bump of systemd to v207 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 other choice possible.
- if busybox or SysV is chosen, the user can choose to manage /dev statically, or dynamically using mdev or eudev.

Changes v5 -> v6:
- fixed packages not properly converted to BR2_PACKAGE_HAS_UDEV (reported by Samuel M.).
- forced inotify support in Linux if eudev is used for /dev management.
- forced inotify support in Linux if systemd is used as init system.
- updated information about systemd requirements.

Changes v4 -> v5:
- disabled systemd and eudev on avr32.
- reverted Busybox binaries overwrite fix.

Changes v3 -> v4:
- updated /dev management section in user manual.
- fixed indentation of conditionals in Makefiles (suggested by Thomas P).
- added missing comments on dependencies (suggested by Thomas P, Thomas DS).
- fixed some packages not being converted to BR2_PACKAGE_HAS_UDEV.

Changes v2 -> v3:
- reordered patches for better bisectability (suggested by Thomas).
- removed uClibc support for Systemd (suggested by Arnout).
- bumped systemd to v207 (no more backport patches).
- bumped eudev to 1.3.

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 (5):
sysvinit: depend on SysV selected as init system.
eudev: new package.
udev: convert to virtual package.
systemd: bump to v207.
manual: update /dev management section.

 Config.in.legacy                                   |    8 ++
 docs/manual/adding-packages-directory.txt          |    3 +-
 docs/manual/configure.txt                          |   16 ++--
 linux/linux.mk                                     |    3 +-
 package/Config.in                                  |    1 +
 package/ccid/ccid.mk                               |    2 +-
 package/eudev/Config.in                            |   38 ++++++++
 package/{udev => eudev}/S10udev                    |    2 +-
 package/eudev/eudev.mk                             |   48 ++++++++++
 package/gpsd/gpsd.mk                               |    2 +-
 package/libatasmart/Config.in                      |    4 +-
 package/libcec/libcec.mk                           |    2 +-
 package/libdrm/libdrm.mk                           |    2 +-
 package/libmbim/Config.in                          |    5 +-
 package/modem-manager/Config.in                    |    6 +-
 package/network-manager/Config.in                  |    8 +-
 package/ofono/ofono.mk                             |    2 +-
 package/pcsc-lite/Config.in                        |    2 +-
 package/pcsc-lite/pcsc-lite.mk                     |    2 +-
 package/pulseaudio/pulseaudio.mk                   |    2 +-
 package/systemd/Config.in                          |   56 ++++++++++-
 package/systemd/systemd-fix-getty-unit.patch       |   36 ++++---
 package/systemd/systemd-fix-page-size.patch        |   43 ---------
 package/systemd/systemd-uclibc-fix.patch           |   59 ------------
 package/systemd/systemd.mk                         |   98 ++++++++++++++------
 package/sysvinit/Config.in                         |    1 +
 package/udev/Config.in                             |   49 +---------
 package/udev/udev.mk                               |   47 ++--------
 package/udisks/Config.in                           |    8 +-
 package/usbmount/Config.in                         |    4 +-
 package/weston/Config.in                           |    4 +-
 package/x11r7/xdriver_xf86-input-evdev/Config.in   |    4 +-
 .../xserver_xorg-server/xserver_xorg-server.mk     |    2 +-
 package/xenomai/xenomai.mk                         |    2 +-
 system/Config.in                                   |   47 ++++++----
 35 files changed, 318 insertions(+), 300 deletions(-)
 create mode 100644 package/eudev/Config.in
 copy package/{udev => eudev}/S10udev (98%)
 create mode 100644 package/eudev/eudev.mk
 delete mode 100644 package/systemd/systemd-fix-page-size.patch
 delete mode 100644 package/systemd/systemd-uclibc-fix.patch

--
1.7.9.5

#1 lore raw

PATCH v6 1/5 sysvinit: depend on SysV selected as init system.

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
 
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH v6 1/5 sysvinit: depend on SysV selected as init system.

Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

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

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.

Committed, thanks.

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

PATCH v6 2/5 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:

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

eudev 1.3 is in sync with systemd v207.

---
 linux/linux.mk                  |    2 +-
 package/Config.in               |    1 +
 package/eudev/Config.in         |   37 ++++++++++++++++++++++++++++++
 package/{udev => eudev}/S10udev |    2 +-
 package/eudev/eudev.mk          |   48 +++++++++++++++++++++++++++++++++++++++
 system/Config.in                |   15 ++++++++++++
 6 files changed, 103 insertions(+), 2 deletions(-)
 create mode 100644 package/eudev/Config.in
 copy package/{udev => eudev}/S10udev (98%)
 create mode 100644 package/eudev/eudev.mk
linux/linux.mk +1 -1
index ab25fe9..17365a0 100644
@@ -185,7 +185,7 @@ define LINUX_CONFIGURE_CMDS
 		$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(@D)/.config))
 	$(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),
 		$(call KCONFIG_SET_OPT,CONFIG_UEVENT_HELPER_PATH,\"/sbin/mdev\",$(@D)/.config))
-	$(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV),
+	$(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config))
 	$(if $(BR2_PACKAGE_KTAP),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_DEBUG_FS,$(@D)/.config)
package/Config.in +1 -0
index aac6f02..e37b33c 100644
@@ -279,6 +279,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/evemu/Config.in"
 source "package/evtest/Config.in"
 source "package/fan-ctrl/Config.in"
package/eudev/Config.in new file +37 -0
new file mode 100644
index 0000000..b3462d5
@@ -0,0 +1,37 @@
+config BR2_PACKAGE_EUDEV
+	bool "eudev"
+	depends on !BR2_avr32 # no epoll_create1
+	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
+	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. 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
+	  and inotify.
+
+	  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
+
+comment "eudev needs /dev management set to eudev"
+	depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
+
+comment "eudev needs a toolchain w/ largefile, wchar"
+	depends on !(BR2_LARGEFILE && BR2_USE_WCHAR)
+
+comment "eudev needs a toolchain w/ dynamic library"
+	depends on BR2_avr32
+	depends on BR2_PREFER_STATIC_LIB
package/eudev/S10udev renamed from package/udev/S10udev +1 -1
similarity index 98%
copy from package/udev/S10udev
copy to package/eudev/S10udev
index 2c7b7e9..e4d28a2 100755
@@ -17,7 +17,7 @@
 #
 
 # Check for missing binaries
-UDEV_BIN=/lib/udev/udevd
+UDEV_BIN=/sbin/udevd
 test -x $UDEV_BIN || exit 5
 
 # Check for config file and read it
package/eudev/eudev.mk new file +48 -0

48 lines not on this page · raw message

system/Config.in +15 -0
index 8288335..7f4d851 100644
@@ -136,6 +136,21 @@ comment "udev doesn't work with 'prefer static libraries'"
 	depends on !BR2_avr32 # udev
 	depends on BR2_PREFER_STATIC_LIB
 
+config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
+	bool "Dynamic using eudev"
+	depends on !BR2_avr32 # eudev
+	depends on BR2_LARGEFILE
+	depends on BR2_USE_WCHAR
+	depends on !BR2_PREFER_STATIC_LIB
+	select BR2_PACKAGE_EUDEV
+
+comment "eudev needs a toolchain w/ largefile, wchar"
+	depends on !(BR2_LARGEFILE && BR2_USE_WCHAR)
+
+comment "eudev needs a toolchain w/ dynamic library"
+	depends on BR2_avr32 # eudev
+	depends on BR2_PREFER_STATIC_LIB
+
 endchoice
 
 config BR2_ROOTFS_DEVICE_TABLE
Signature · 1 line
1.7.9.5
#4 lore raw

PATCH v6 2/5 eudev: new package.

Hi Eric,

Quoted 13 lines · 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:

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

eudev 1.3 is in sync with systemd v207.

Quoted 11 lines
---
 linux/linux.mk                  |    2 +-
 package/Config.in               |    1 +
 package/eudev/Config.in         |   37 ++++++++++++++++++++++++++++++
 package/{udev => eudev}/S10udev |    2 +-
 package/eudev/eudev.mk          |   48 +++++++++++++++++++++++++++++++++++++++
 system/Config.in                |   15 ++++++++++++
 6 files changed, 103 insertions(+), 2 deletions(-)
 create mode 100644 package/eudev/Config.in
 copy package/{udev => eudev}/S10udev (98%)
 create mode 100644 package/eudev/eudev.mk

We are targeting to integrate your patches Very Soon Now... (jay!) Below are a number of minor comments that should be fixed before that, though.

linux/linux.mk define LINUX_CONFIGURE_CMDS · line 188

Quoted 11 lines
linux/linux.mk +1 -1
index ab25fe9..17365a0 100644
@@ -185,7 +185,7 @@ define LINUX_CONFIGURE_CMDS
                $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(@D)/.config))
        $(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),
                $(call KCONFIG_SET_OPT,CONFIG_UEVENT_HELPER_PATH,\"/sbin/mdev\",$(@D)/.config))
-       $(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV),
+       $(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV),

To be correct, this change should not be in this patch like that: udev still exists, so the above should actually duplicate the enable-inotify line for both udev ?nd eudev, right?

Quoted 36 lines
linux/linux.mk +0 -0
                $(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config))
        $(if $(BR2_PACKAGE_KTAP),
                $(call KCONFIG_ENABLE_OPT,CONFIG_DEBUG_FS,$(@D)/.config)
package/Config.in +1 -0
index aac6f02..e37b33c 100644
@@ -279,6 +279,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/evemu/Config.in"
 source "package/evtest/Config.in"
 source "package/fan-ctrl/Config.in"
package/eudev/Config.in new file +15 -0
new file mode 100644
index 0000000..b3462d5
@@ -0,0 +1,37 @@
+config BR2_PACKAGE_EUDEV
+       bool "eudev"
+       depends on !BR2_avr32 # no epoll_create1
+       depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
+       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. 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

package/eudev/Config.in line 25

Quoted 10 lines
package/eudev/Config.in new file +10 -0
+         and inotify.
+
+         http://github.com/gentoo/eudev/
+
+if BR2_PACKAGE_EUDEV
+
+config BR2_PACKAGE_EUDEV_RULES_GEN
+       bool "enable rules generator"
+       help
+         Enable persistant rules generator

persistent

(in fact: this same problem is present in the current package/udev/Config.in)

package/eudev/Config.in line 30

Quoted 5 lines
package/eudev/Config.in new file +5 -0
+
+endif
+
+comment "eudev needs /dev management set to eudev"
+       depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV

This string should be:
"eudev needs eudev /dev management"
in analogy with the udev comment, as specified in:
http://nightly.buildroot.org/manual.html#_literal_config_in_literal_file

package/eudev/Config.in line 37

Quoted 7 lines
package/eudev/Config.in new file +7 -0
+
+comment "eudev needs a toolchain w/ largefile, wchar"
+       depends on !(BR2_LARGEFILE && BR2_USE_WCHAR)
+
+comment "eudev needs a toolchain w/ dynamic library"
+       depends on BR2_avr32
+       depends on BR2_PREFER_STATIC_LIB

These three comments should be merged into one comment. This unified comment should depend on !BR2_avr32 (common base dependency, see manual). Have a look at the current package/udev/Config.in file.

Quoted 22 lines
package/eudev/S10udev renamed from package/udev/S10udev +1 -1
similarity index 98%
copy from package/udev/S10udev
copy to package/eudev/S10udev
index 2c7b7e9..e4d28a2 100755
@@ -17,7 +17,7 @@
 #
 
 # Check for missing binaries
-UDEV_BIN=/lib/udev/udevd
+UDEV_BIN=/sbin/udevd
 test -x $UDEV_BIN || exit 5
 
 # Check for config file and read it
package/eudev/eudev.mk new file +0 -0
new file mode 100644
index 0000000..aac37e7

package/eudev/eudev.mk line 9

Quoted 9 lines
package/eudev/eudev.mk new file +9 -0
@@ -0,0 +1,48 @@
+################################################################################
+#
+# eudev
+#
+################################################################################
+
+EUDEV_VERSION         = 1.3
+EUDEV_SITE            = https://github.com/gentoo/eudev/archive/
+EUDEV_SOURCE          = v$(EUDEV_VERSION).tar.gz

This should be replaced by the new github helper.

package/eudev/eudev.mk line 10

Quoted 1 line
package/eudev/eudev.mk new file +1 -0
+EUDEV_LICENSE         = GPLv2+

The eudev package also contains libudev, gudev, that seem to be LGPLv2.1+, so the above license statement should be expanded with some more detail (if possible indicating which parts are GPL and which are LGPL).

package/eudev/eudev.mk line 11

Quoted 1 line
package/eudev/eudev.mk new file +1 -0
+EUDEV_LICENSE_FILES   = COPYING

Even though eudev has LGPL components, there is no COPYING.LIB (or equivalent) file. Ideally, this should be discussed with the eudev maintainers...

package/eudev/eudev.mk line 13

Quoted 2 lines
package/eudev/eudev.mk new file +2 -0
+EUDEV_INSTALL_STAGING = YES
+EUDEV_AUTORECONF      = YES

Please don't align the = signs in .mk files (it used to be in the manual but I removed that :) )

Quoted 12 lines
package/eudev/eudev.mk new file +12 -0
+
+# mq_getattr is in librt
+EUDEV_CONF_ENV += LIBS=-lrt
+
+EUDEV_CONF_OPT =               \
+       --sbindir=/sbin         \
+       --with-rootlibdir=/lib  \
+       --libexecdir=/lib       \
+       --with-firmware-path=/lib/firmware      \
+       --disable-introspection                 \
+       --enable-split-usr                      \
+       --enable-libkmod

package/eudev/eudev.mk line 35

Quoted 10 lines
package/eudev/eudev.mk new file +10 -0
+
+EUDEV_DEPENDENCIES = host-gperf host-pkgconf util-linux kmod
+
+ifeq ($(BR2_PACKAGE_EUDEV_RULES_GEN),y)
+EUDEV_CONF_OPT += --enable-rule_generator
+endif
+
+ifeq ($(BR2_LARGEFILE),)
+EUDEV_CONF_OPT += --disable-largefile
+endif

I don't think this check is needed: it is done by default in the autotools infrastructure (see package/Makefile.in)

Quoted 25 lines
package/eudev/eudev.mk new file +13 -0
+
+ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
+EUDEV_CONF_OPT += --enable-gudev
+EUDEV_DEPENDENCIES += libglib2
+else
+EUDEV_CONF_OPT += --disable-gudev
+endif
+
+define EUDEV_INSTALL_INIT_SYSV
+       $(INSTALL) -m 0755 package/eudev/S10udev $(TARGET_DIR)/etc/init.d/S10udev
+endef
+
+$(eval $(autotools-package))
system/Config.in +4 -0
index 8288335..7f4d851 100644
@@ -136,6 +136,21 @@ comment "udev doesn't work with 'prefer static libraries'"
        depends on !BR2_avr32 # udev
        depends on BR2_PREFER_STATIC_LIB
 
+config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
+       bool "Dynamic using eudev"
+       depends on !BR2_avr32 # eudev
+       depends on BR2_LARGEFILE

system/Config.in comment "udev doesn't work with 'prefer static libraries'" · line 152

Quoted 10 lines
system/Config.in +10 -0
+       depends on BR2_USE_WCHAR
+       depends on !BR2_PREFER_STATIC_LIB
+       select BR2_PACKAGE_EUDEV
+
+comment "eudev needs a toolchain w/ largefile, wchar"
+       depends on !(BR2_LARGEFILE && BR2_USE_WCHAR)
+
+comment "eudev needs a toolchain w/ dynamic library"
+       depends on BR2_avr32 # eudev
+       depends on BR2_PREFER_STATIC_LIB

Same comments about the 'comment's here: merge into one, and the avr32 should be negated.

system/Config.in comment "udev doesn't work with 'prefer static libraries'"

Quoted 5 lines
system/Config.in +1 -1
+
 endchoice
 
 config BR2_ROOTFS_DEVICE_TABLE
--

Best regards,
Thomas

#5 lore raw

PATCH v6 3/5 udev: convert to virtual package.

In reply to Eric Le Bihan

This patch converts udev to a virtual package. For the moment, there is only one provider for the udev features: eudev.

Packages meant to provide udev-like features must select the symbol BR2_PACKAGE_HAS_UDEV.

Packages depending on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV or BR2_PACKAGE_UDEV have been converted to use the new symbol.

---
 Config.in.legacy                                   |    8 ++++
 docs/manual/adding-packages-directory.txt          |    3 +-
 package/ccid/ccid.mk                               |    2 +-
 package/eudev/Config.in                            |    1 +
 package/gpsd/gpsd.mk                               |    2 +-
 package/libatasmart/Config.in                      |    4 +-
 package/libcec/libcec.mk                           |    2 +-
 package/libdrm/libdrm.mk                           |    2 +-
 package/libmbim/Config.in                          |    5 +-
 package/modem-manager/Config.in                    |    6 +--
 package/network-manager/Config.in                  |    8 ++--
 package/ofono/ofono.mk                             |    2 +-
 package/pcsc-lite/Config.in                        |    2 +-
 package/pcsc-lite/pcsc-lite.mk                     |    2 +-
 package/pulseaudio/pulseaudio.mk                   |    2 +-
 package/systemd/Config.in                          |    6 +--
 package/udev/Config.in                             |   49 +-------------------
 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 +-
 .../xserver_xorg-server/xserver_xorg-server.mk     |    2 +-
 package/xenomai/xenomai.mk                         |    2 +-
 system/Config.in                                   |   22 ++-------
 25 files changed, 55 insertions(+), 146 deletions(-)
Config.in.legacy +8 -0
index 01bf16b..5d80842 100644
@@ -235,6 +235,14 @@ config BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION_WRAP
 # Note: BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION is still referenced from
 # linux/Config.in
 
+config BR2_PACKAGE_UDEV
+	bool "udev is now a virtual package"
+	select BR2_PACKAGE_HAS_UDEV
+	help
+	  The 'udev' package is now a virtual package. It is
+	  currently only provided by 'eudev'.
+
+
 ###############################################################################
 comment "Legacy options removed in 2013.08"
 
docs/manual/adding-packages-directory.txt +1 -2
index 754a145..40af809 100644
@@ -273,8 +273,7 @@ foo needs a toolchain w/ featA, featB, featC and a Linux kernel to be built
 Dependencies on udev /dev management
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 If a package needs udev /dev management, it should depend on symbol
-+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV+, and the following comment
-should be added:
++BR2_PACKAGE_HAS_UDEV+, and the following comment should be added:
 
 --------------------------
 foo needs udev /dev management
package/ccid/ccid.mk +1 -1
index f39edce..b635aa1 100644
@@ -12,7 +12,7 @@ CCID_LICENSE_FILES = COPYING
 CCID_INSTALL_STAGING = YES
 CCID_DEPENDENCIES = pcsc-lite host-pkgconf libusb
 
-ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV),y)
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 define CCID_INSTALL_UDEV_RULES
 	if test -d $(TARGET_DIR)/etc/udev/rules.d ; then \
 		cp $(@D)/src/92_pcscd_ccid.rules $(TARGET_DIR)/etc/udev/rules.d/ ; \
package/eudev/Config.in +1 -0
index b3462d5..cbd1c77 100644
@@ -5,6 +5,7 @@ config BR2_PACKAGE_EUDEV
 	depends on BR2_LARGEFILE # util-linux
 	depends on BR2_USE_WCHAR # util-linux
 	depends on !BR2_PREFER_STATIC_LIB # kmod
+	select BR2_PACKAGE_HAS_UDEV
 	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
 	select BR2_PACKAGE_KMOD
package/gpsd/gpsd.mk +1 -1
index efc8d37..0f655ba 100644
@@ -222,7 +222,7 @@ define GPSD_INSTALL_STAGING_CMDS
 		install)
 endef
 
-ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV),y)
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 define GPSD_INSTALL_UDEV_RULES
 	(cd $(@D); \
 		$(GPSD_SCONS_ENV) \
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/libcec/libcec.mk +1 -1
index 910f319..99cc767 100644
@@ -18,7 +18,7 @@ ifeq ($(BR2_PACKAGE_LOCKDEV),y)
 LIBCEC_DEPENDENCIES += lockdev
 endif
 
-ifeq ($(BR2_PACKAGE_UDEV),y)
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 LIBCEC_DEPENDENCIES += udev
 endif
 
package/libdrm/libdrm.mk +1 -1
index f5efaf1..a1b0580 100644
@@ -65,7 +65,7 @@ else
 LIBDRM_CONF_OPT += --disable-freedreno-experimental-api
 endif
 
-ifeq ($(BR2_PACKAGE_UDEV),y)
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 LIBDRM_CONF_OPT += --enable-udev
 LIBDRM_DEPENDENCIES += udev
 else
package/libmbim/Config.in +2 -3
index d034e84..bd34dd4 100644
@@ -2,9 +2,8 @@ config BR2_PACKAGE_LIBMBIM
 	bool "libmbim"
 	depends on BR2_USE_WCHAR # libglib2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
-	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+	depends on BR2_PACKAGE_HAS_UDEV
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_UDEV_ALL_EXTRAS
 	help
 	  libmbim is a glib-based library for talking to WWAN modems and
 	  devices which speak the Mobile Interface Broadband Model (MBIM)
@@ -14,4 +13,4 @@ config BR2_PACKAGE_LIBMBIM
 
 comment "libmbim needs udev /dev management and a toolchain w/ wchar, threads"
 	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
-		!BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+		!BR2_PACKAGE_HAS_UDEV
package/modem-manager/Config.in +2 -4
index e157ca8..fe60850 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_MODEM_MANAGER
 	bool "modemmanager"
-	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+	depends on BR2_PACKAGE_HAS_UDEV
 	select BR2_PACKAGE_DBUS
 	depends on BR2_INET_IPV6
 	depends on BR2_LARGEFILE # acl
@@ -8,8 +8,6 @@ config BR2_PACKAGE_MODEM_MANAGER
 	depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, libglib2
 	depends on BR2_USE_MMU # dbus
 	select BR2_PACKAGE_DBUS_GLIB
-	select BR2_PACKAGE_UDEV
-	select BR2_PACKAGE_UDEV_ALL_EXTRAS
 	help
 	  ModemManager is a DBus-activated daemon which controls mobile
 	  broadband (2G/3G/4G) devices and connections.
@@ -33,4 +31,4 @@ endif
 
 comment "modemmanager needs udev /dev management and a toolchain w/ largefile, wchar, threads, IPv6"
 	depends on !BR2_INET_IPV6 || !BR2_LARGEFILE || !BR2_USE_WCHAR || \
-		!BR2_TOOLCHAIN_HAS_THREADS || !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+		!BR2_TOOLCHAIN_HAS_THREADS || !BR2_PACKAGE_HAS_UDEV
package/network-manager/Config.in +3 -5
index a194433..a4eeeaf 100644
@@ -1,16 +1,14 @@
 config BR2_PACKAGE_NETWORK_MANAGER
 	bool "NetworkManager"
 	depends on !BR2_avr32 # udev
-	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
@@ -33,4 +31,4 @@ comment "NetworkManager needs udev /dev management and a toolchain w/ IPv6, larg
 	depends on BR2_USE_MMU
 	depends on !BR2_INET_IPV6 || !BR2_LARGEFILE || !BR2_USE_WCHAR || \
 		!BR2_TOOLCHAIN_HAS_THREADS || \
-		!BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+		!BR2_PACKAGE_HAS_UDEV
package/ofono/ofono.mk +1 -1
index aaaa8fa..9e30c63 100644
@@ -22,7 +22,7 @@ OFONO_CONF_OPT = --disable-test
 # make sure that it is defined.
 OFONO_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
 
-ifeq ($(BR2_PACKAGE_UDEV),y)
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 	OFONO_CONF_OPT += --enable-udev
 	OFONO_DEPENDENCIES += udev
 else
package/pcsc-lite/Config.in +1 -1
index 4cd89e9..aab42e8 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/pcsc-lite/pcsc-lite.mk +1 -1
index afbe822..18859cd 100644
@@ -16,7 +16,7 @@ PCSC_LITE_LICENSE_FILES = COPYING
 # - libudev and libusb can't be used together
 # - libudev has a priority over libusb
 
-ifeq ($(BR2_PACKAGE_UDEV),y)
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 PCSC_LITE_CONF_OPT += --enable-libudev --disable-libusb
 PCSC_LITE_DEPENDENCIES += udev
 else
package/pulseaudio/pulseaudio.mk +1 -1
index cdeabc5..3fd3cd9 100644
@@ -26,7 +26,7 @@ PULSEAUDIO_DEPENDENCIES = \
 	$(if $(BR2_PACKAGE_AVAHI_DAEMON),avahi) \
 	$(if $(BR2_PACKAGE_DBUS),dbus) \
 	$(if $(BR2_PACKAGE_BLUEZ_UTILS),bluez_utils) \
-	$(if $(BR2_PACKAGE_UDEV),udev) \
+	$(if $(BR2_PACKAGE_HAS_UDEV),udev) \
 	$(if $(BR2_PACKAGE_OPENSSL),openssl) \
 	$(if $(BR2_PACKAGE_FFTW),fftw) \
 	$(if $(BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING),webrtc-audio-processing) \
package/systemd/Config.in +3 -3
index fe81900..500e623 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_SYSTEMD
 	bool "systemd"
-	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
 	depends on BR2_INET_IPV6
 	depends on BR2_TOOLCHAIN_HAS_THREADS # dbus
 	depends on BR2_USE_MMU # dbus
@@ -18,7 +18,7 @@ config BR2_PACKAGE_SYSTEMD
 
 	  http://freedesktop.org/wiki/Software/systemd
 
-comment "systemd needs udev /dev management and a toolchain w/ IPv6, threads"
+comment "systemd needs eudev /dev management and a toolchain w/ IPv6, threads"
 	depends on BR2_USE_MMU
-	depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV || !BR2_INET_IPV6 || \
+	depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV || !BR2_INET_IPV6 || \\
 		!BR2_TOOLCHAIN_HAS_THREADS
package/udev/Config.in +2 -47

49 lines not on this page · raw message

package/udev/udev.mk +9 -40

57 lines not on this page · raw message

package/udisks/Config.in +3 -5
index e9539a3..62d5598 100644
@@ -1,11 +1,9 @@
 config BR2_PACKAGE_UDISKS
 	bool "udisks"
 	depends on !BR2_avr32 # udev
-	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
@@ -36,8 +34,8 @@ config BR2_PACKAGE_UDISKS_LVM2
 
 endif
 
-comment "udisks needs udev /dev management and a toolchain w/ wchar, threads"
+comment "udisks needs udev /dev mgmnt, toolchain w/ wchar, threads"
 	depends on !BR2_avr32
 	depends on BR2_USE_MMU
-	depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV || \
+	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 247efc8..36bbb01 100644
@@ -1,6 +1,6 @@
 comment "weston needs udev and a toolchain w/ threads"
 	depends on !BR2_avr32
-	depends on !BR2_PACKAGE_UDEV || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_PACKAGE_HAS_UDEV || !BR2_TOOLCHAIN_HAS_THREADS
 
 config BR2_PACKAGE_WESTON
 	bool "weston"
@@ -11,7 +11,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_avr32 # wayland
 	depends on BR2_TOOLCHAIN_HAS_THREADS # wayland
 	# Runtime dependency
package/x11r7/xdriver_xf86-input-evdev/Config.in +2 -2
index 88d3e6e..6ec14bf 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
package/x11r7/xserver_xorg-server/xserver_xorg-server.mk +1 -1
index 4089aab..a7ac9a0 100644
@@ -123,7 +123,7 @@ XSERVER_XORG_SERVER_DEPENDENCIES += tslib
 XSERVER_XORG_SERVER_CONF_OPT += --enable-tslib LDFLAGS="-lts"
 endif
 
-ifeq ($(BR2_PACKAGE_UDEV),y)
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 XSERVER_XORG_SERVER_DEPENDENCIES += udev
 XSERVER_XORG_SERVER_CONF_OPT += --enable-config-udev
 else
package/xenomai/xenomai.mk +1 -1
index 2dd1bf6..4e9025d 100644
@@ -93,7 +93,7 @@ define XENOMAI_DEVICES
 /dev/rtp     c  666  0  0  150 0    0  1  32
 endef
 
-ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV),y)
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 XENOMAI_DEPENDENCIES += udev
 
 define XENOMAI_INSTALL_UDEV_RULES
system/Config.in +3 -19
index 7f4d851..18f27bf 100644
@@ -89,17 +89,17 @@ 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_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_USE_MMU
 	select BR2_PACKAGE_DBUS
 	select BR2_PACKAGE_SYSTEMD
 
-comment 'systemd needs udev /dev management and a toolchain w/ largefile, wchar, IPv6, threads'
+comment 'systemd needs eudev /dev management and a toolchain w/ largefile, wchar, IPv6, threads'
 	depends on BR2_USE_MMU
 	depends on !(BR2_LARGEFILE && BR2_USE_WCHAR && \
 		     BR2_INET_IPV6 && BR2_TOOLCHAIN_HAS_THREADS && \
-		     BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV)
+		     BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV)
 
 config BR2_INIT_NONE
 	bool "None"
@@ -120,22 +120,6 @@ 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_avr32 # 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 needs a toolchain w/ largefile, wchar"
-	depends on !BR2_avr32 # udev
-	depends on !(BR2_LARGEFILE && BR2_USE_WCHAR)
-
-comment "udev doesn't work with 'prefer static libraries'"
-	depends on !BR2_avr32 # udev
-	depends on BR2_PREFER_STATIC_LIB
-
 config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
 	bool "Dynamic using eudev"
 	depends on !BR2_avr32 # eudev
Signature · 1 line
1.7.9.5
#6 lore raw

PATCH v6 3/5 udev: convert to virtual package.

Hi Eric,

Quoted 44 lines · Eric Le Bihan

This patch converts udev to a virtual package. For the moment, there is only one provider for the udev features: eudev.

Packages meant to provide udev-like features must select the symbol BR2_PACKAGE_HAS_UDEV.

Packages depending on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV or BR2_PACKAGE_UDEV have been converted to use the new symbol.

---
 Config.in.legacy                                   |    8 ++++
 docs/manual/adding-packages-directory.txt          |    3 +-
 package/ccid/ccid.mk                               |    2 +-
 package/eudev/Config.in                            |    1 +
 package/gpsd/gpsd.mk                               |    2 +-
 package/libatasmart/Config.in                      |    4 +-
 package/libcec/libcec.mk                           |    2 +-
 package/libdrm/libdrm.mk                           |    2 +-
 package/libmbim/Config.in                          |    5 +-
 package/modem-manager/Config.in                    |    6 +--
 package/network-manager/Config.in                  |    8 ++--
 package/ofono/ofono.mk                             |    2 +-
 package/pcsc-lite/Config.in                        |    2 +-
 package/pcsc-lite/pcsc-lite.mk                     |    2 +-
 package/pulseaudio/pulseaudio.mk                   |    2 +-
 package/systemd/Config.in                          |    6 +--
 package/udev/Config.in                             |   49 +-------------------
 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 +-
 .../xserver_xorg-server/xserver_xorg-server.mk     |    2 +-
 package/xenomai/xenomai.mk                         |    2 +-
 system/Config.in                                   |   22 ++-------
 25 files changed, 55 insertions(+), 146 deletions(-)
Config.in.legacy +0 -0
index 01bf16b..5d80842 100644
@@ -235,6 +235,14 @@ config BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION_WRAP
 # Note: BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION is still referenced from

Config.in.legacy config BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION_WRAP · line 245

Quoted 10 lines
Config.in.legacy +8 -0
 # linux/Config.in
 
+config BR2_PACKAGE_UDEV
+       bool "udev is now a virtual package"
+       select BR2_PACKAGE_HAS_UDEV
+       help
+         The 'udev' package is now a virtual package. It is
+         currently only provided by 'eudev'.
+
+

This is more of a nitpick, but the convention is to add new legacy options at the front (just below the release indicator) instead of at the bottom of that section.

Quoted 3 lines
Config.in.legacy +0 -0
 ###############################################################################
 comment "Legacy options removed in 2013.08"
 

[..]

Quoted 11 lines
package/systemd/Config.in +1 -1
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_SYSTEMD
        bool "systemd"
-       depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+       depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
        depends on BR2_INET_IPV6
        depends on BR2_TOOLCHAIN_HAS_THREADS # dbus
        depends on BR2_USE_MMU # dbus

package/systemd/Config.in config BR2_PACKAGE_SYSTEMD · line 24

Quoted 9 lines
package/systemd/Config.in +2 -2
@@ -18,7 +18,7 @@ config BR2_PACKAGE_SYSTEMD
 
          http://freedesktop.org/wiki/Software/systemd
 
-comment "systemd needs udev /dev management and a toolchain w/ IPv6, threads"
+comment "systemd needs eudev /dev management and a toolchain w/ IPv6, threads"
        depends on BR2_USE_MMU
-       depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV || !BR2_INET_IPV6 || \
+       depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV || !BR2_INET_IPV6 || \\
                !BR2_TOOLCHAIN_HAS_THREADS

These changes are odd: you indicate here that systemd is depending on eudev, while eudev is precisely an alternative provider of udev than systemd. So:

       udev
       /   \

systemd eudev

and there is no direct relation between systemd and eudev. In the next patch, you replace this again with BR2_INIT_SYSTEMD, which makes sense again, but the transition is odd.

Directly related to this, we question the need to rename BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV to BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV. First of all, the symbol BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV is already existing in users' defconfig. Removing it requires the addition of a new legacy symbol (not only for BR2_PACKAGE_UDEV, which you already added, but also for the DEVICE_CREATION_DYNAMIC one).
Users that previously selected udev, should be moved to eudev, rather than systemd. Our suggestion is to keep the existing BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV symbol to indicate the eudev choice, rendering the massive rename in the previous patch unneeded, removing the above odd systemd transition, and avoiding the need for legacy handling. What do you think of that?

Quoted 44 lines
package/udev/Config.in +0 -39
index 7aa79c4..1c9251b 100644
@@ -1,47 +1,2 @@
-config BR2_PACKAGE_UDEV
-       bool "udev"
-       depends on !BR2_avr32 # no epoll_create1
-       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
-         and inotify.
-
-         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
-       depends on BR2_USE_MMU # libglib2
-       help
-         Enable all extras with external dependencies like
-         libacl, hwdata and libglib2
-
-comment "enabling all extras needs a toolchain w/ wchar, threads"
-       depends on BR2_USE_MMU

package/udev/Config.in line 2

Quoted 10 lines
package/udev/Config.in +2 -8
-       depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
-
-endif
-
-comment "udev needs udev /dev management and a toolchain w/ largefile, wchar, dynamic library"
-       depends on !BR2_avr32
-       depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV || \
-               !BR2_LARGEFILE || !BR2_USE_WCHAR || BR2_PREFER_STATIC_LIB
+config BR2_PACKAGE_HAS_UDEV
+       bool

Maybe you could add a comment in udev/Config.in and udev/udev.mk clarifying that this is now a virtual package.

Quoted 80 lines
package/udev/udev.mk +9 -40
index db86850..d274246 100644
@@ -4,48 +4,17 @@
 #
 ################################################################################
 
-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
+ifeq ($(BR2_PACKAGE_EUDEV),y)
+UDEV_DEPENDENCIES += eudev
 endif
 
-ifeq ($(BR2_PACKAGE_SYSTEMD),y)
-       UDEV_CONF_OPT += --with-systemdsystemunitdir=/lib/systemd/system/
-endif
-
-define UDEV_INSTALL_INITSCRIPT
-       $(INSTALL) -m 0755 package/udev/S10udev $(TARGET_DIR)/etc/init.d/S10udev
+ifeq ($(UDEV_DEPENDENCIES),)
+define UDEV_CONFIGURE_CMDS
+       echo "No Udev implementation selected. Configuration error."
+       exit 1
 endef
+endif
 
-UDEV_POST_INSTALL_TARGET_HOOKS += UDEV_INSTALL_INITSCRIPT
-
-$(eval $(autotools-package))
+$(eval $(generic-package))
package/udisks/Config.in +1 -3
index e9539a3..62d5598 100644
@@ -1,11 +1,9 @@
 config BR2_PACKAGE_UDISKS
        bool "udisks"
        depends on !BR2_avr32 # udev
-       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

package/udisks/Config.in config BR2_PACKAGE_UDISKS_LVM2 · line 37

Quoted 5 lines
package/udisks/Config.in +1 -1
@@ -36,8 +34,8 @@ config BR2_PACKAGE_UDISKS_LVM2
 
 endif
 
-comment "udisks needs udev /dev management and a toolchain w/ wchar, threads"
+comment "udisks needs udev /dev mgmnt, toolchain w/ wchar, threads"

This string is not as it is described in the manual. Why did you change it?

[..]

Best regards,
Thomas

#7 lore raw

PATCH v6 3/5 udev: convert to virtual package.

Thomas, All,

Quoted 25 lines · Thomas De Schampheleire
Quoted 11 lines
package/systemd/Config.in +1 -1
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_SYSTEMD
        bool "systemd"
-       depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+       depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
        depends on BR2_INET_IPV6
        depends on BR2_TOOLCHAIN_HAS_THREADS # dbus
        depends on BR2_USE_MMU # dbus

package/systemd/Config.in config BR2_PACKAGE_SYSTEMD · line 24

Quoted 9 lines
package/systemd/Config.in +2 -2
@@ -18,7 +18,7 @@ config BR2_PACKAGE_SYSTEMD
 
          http://freedesktop.org/wiki/Software/systemd
 
-comment "systemd needs udev /dev management and a toolchain w/ IPv6, threads"
+comment "systemd needs eudev /dev management and a toolchain w/ IPv6, threads"
        depends on BR2_USE_MMU
-       depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV || !BR2_INET_IPV6 || \
+       depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV || !BR2_INET_IPV6 || \\
                !BR2_TOOLCHAIN_HAS_THREADS

These changes are odd: you indicate here that systemd is depending on eudev, while eudev is precisely an alternative provider of udev than systemd. So:

Quoted 7 lines
       udev
       /   \

systemd eudev

and there is no direct relation between systemd and eudev. In the next patch, you replace this again with BR2_INIT_SYSTEMD, which makes sense again, but the transition is odd.

At this stage, the version of systemd in Buildroot is still v44, which does not provide udev, but needs it. As the previous patch introduced eudev and this one removes BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV, the dependency on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV ensures systemd will be installed with a udev implementation.

Quoted 5 lines

Directly related to this, we question the need to rename BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV to BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV. First of all, the symbol BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV is already existing in users' defconfig. Removing it requires the addition of a new legacy symbol

Quoted 8 lines

(not only for BR2_PACKAGE_UDEV, which you already added, but also for the DEVICE_CREATION_DYNAMIC one).
Users that previously selected udev, should be moved to eudev, rather than systemd. Our suggestion is to keep the existing BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV symbol to indicate the eudev choice, rendering the massive rename in the previous patch unneeded, removing the above odd systemd transition, and avoiding the need for legacy handling. What do you think of that?

I find it odd that some packages depend on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV whereas others depend on BR2_PACKAGE_UDEV. To me, both symbols are interpreted as "the package needs a udev daemon to talk to at runtime" (whether via D-Bus or libudev). So I replaced both with BR2_PACKAGE_HAS_UDEV to be homogeneous. It is true that if a package depends on BR2_PACKAGE_HAS_UDEV, it is not explicitly said if it is a runtime or a build dependency. But, AFAIK, programs that want to communicate with the udev daemon do it via libudev/libgudev, so we end up with a build dependency.

In system/Config.in, I removed BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV because I want the user to understand the change: he/she should not think of 'udev' as a package, but as a feature which, at this stage, is only available via eudev. I could have kept BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV and have it select BR2_PACKAGE_EUDEV, but I've found it confusing.

But I should have added BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV in Config.in.legacy to migrate to BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV.

In the end, the user selects BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV, which selects BR2_PACKAGE_EUDEV, which in turn selects BR2_PACKAGE_HAS_UDEV. All the packages depending on it are now available.

Quoted 2 lines

Maybe you could add a comment in udev/Config.in and udev/udev.mk clarifying that this is now a virtual package.

Yes, indeed!

Quoted 4 lines

package/systemd/Config.in

Quoted 2 lines
package/systemd/Config.in +1 -1
-comment "udisks needs udev /dev management and a toolchain w/ wchar, threads"
+comment "udisks needs udev /dev mgmnt, toolchain w/ wchar, threads"

This string is not as it is described in the manual. Why did you change it?

It was truncated on a 80x24 terminal.

#8 lore raw

PATCH v6 3/5 udev: convert to virtual package.

Hi Eric,

Quoted 37 lines · Eric Le Bihan

Thomas, All,

Quoted 25 lines · Thomas De Schampheleire
Quoted 11 lines
package/systemd/Config.in +1 -1
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_SYSTEMD
        bool "systemd"
-       depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+       depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
        depends on BR2_INET_IPV6
        depends on BR2_TOOLCHAIN_HAS_THREADS # dbus
        depends on BR2_USE_MMU # dbus

package/systemd/Config.in config BR2_PACKAGE_SYSTEMD · line 24

Quoted 9 lines
package/systemd/Config.in +2 -2
@@ -18,7 +18,7 @@ config BR2_PACKAGE_SYSTEMD
 
          http://freedesktop.org/wiki/Software/systemd
 
-comment "systemd needs udev /dev management and a toolchain w/ IPv6, threads"
+comment "systemd needs eudev /dev management and a toolchain w/ IPv6, threads"
        depends on BR2_USE_MMU
-       depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV || !BR2_INET_IPV6 || \
+       depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV || !BR2_INET_IPV6 || \\
                !BR2_TOOLCHAIN_HAS_THREADS

These changes are odd: you indicate here that systemd is depending on eudev, while eudev is precisely an alternative provider of udev than systemd. So:

Quoted 7 lines
       udev
       /   \

systemd eudev

and there is no direct relation between systemd and eudev. In the next patch, you replace this again with BR2_INIT_SYSTEMD, which makes sense again, but the transition is odd.

Quoted 5 lines

At this stage, the version of systemd in Buildroot is still v44, which does not provide udev, but needs it. As the previous patch introduced eudev and this one removes BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV, the dependency on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV ensures systemd will be installed with a udev implementation.

Ok, understood.

Quoted 31 lines
Quoted 14 lines

Directly related to this, we question the need to rename BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV to BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV. First of all, the symbol BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV is already existing in users' defconfig. Removing it requires the addition of a new legacy symbol (not only for BR2_PACKAGE_UDEV, which you already added, but also for the DEVICE_CREATION_DYNAMIC one).
Users that previously selected udev, should be moved to eudev, rather than systemd. Our suggestion is to keep the existing BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV symbol to indicate the eudev choice, rendering the massive rename in the previous patch unneeded, removing the above odd systemd transition, and avoiding the need for legacy handling. What do you think of that?

I find it odd that some packages depend on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV whereas others depend on BR2_PACKAGE_UDEV. To me, both symbols are interpreted as "the package needs a udev daemon to talk to at runtime" (whether via D-Bus or libudev). So I replaced both with BR2_PACKAGE_HAS_UDEV to be homogeneous. It is true that if a package depends on BR2_PACKAGE_HAS_UDEV, it is not explicitly said if it is a runtime or a build dependency. But, AFAIK, programs that want to communicate with the udev daemon do it via libudev/libgudev, so we end up with a build dependency.

In system/Config.in, I removed BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV because I want the user to understand the change: he/she should not think of 'udev' as a package, but as a feature which, at this stage, is only available via eudev. I could have kept BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV and have it select BR2_PACKAGE_EUDEV, but I've found it confusing.

Quoted 6 lines

But I should have added BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV in Config.in.legacy to migrate to BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV.

In the end, the user selects BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV, which selects BR2_PACKAGE_EUDEV, which in turn selects BR2_PACKAGE_HAS_UDEV. All the packages depending on it are now available.

Based on your additional input, and rechecking the changes, I understand your reasoning and accept it.
You still should add the legacy symbol, though.

Peter, what about you?

Quoted 10 lines
Quoted 3 lines

Maybe you could add a comment in udev/Config.in and udev/udev.mk clarifying that this is now a virtual package.

Yes, indeed!

Quoted 4 lines

package/systemd/Config.in

Quoted 2 lines
package/systemd/Config.in +1 -1
-comment "udisks needs udev /dev management and a toolchain w/ wchar, threads"
+comment "udisks needs udev /dev mgmnt, toolchain w/ wchar, threads"

This string is not as it is described in the manual. Why did you change it?

It was truncated on a 80x24 terminal.

In the past I have done extensive efforts in unifying all comments in our Config files, and described the unified syntax in the manual. We tried using 'short' strings so they would fit on a 80 char terminal. For packages that have many dependencies, it is true that some words may not necessarily fit.
In this case, we could decide to split the comment in two: one for the /dev management and one for the toolchain options. Both comments should depend on the common options (!avr32 and mmu).

So:
comment "udisks needs udev /dev management
depends on !BR2_avr32
depends on BR2_USE_MMU
depends on !BR2_PACKAGE_HAS_UDEV

comment "udisks needs a toolchain w/ wchar, threads"
depends on !BR2_avr32
depends on BR2_USE_MMU
depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS

Best regards,
Thomas

#9 lore raw

PATCH v6 3/5 udev: convert to virtual package.

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas De Schampheleire <[email protected]> writes:

Hi,

Quoted 23 lines
Quoted 16 lines

I find it odd that some packages depend on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV whereas others depend on BR2_PACKAGE_UDEV. To me, both symbols are interpreted as "the package needs a udev daemon to talk to at runtime" (whether via D-Bus or libudev). So I replaced both with BR2_PACKAGE_HAS_UDEV to be homogeneous. It is true that if a package depends on BR2_PACKAGE_HAS_UDEV, it is not explicitly said if it is a runtime or a build dependency. But, AFAIK, programs that want to communicate with the udev daemon do it via libudev/libgudev, so we end up with a build dependency.

In system/Config.in, I removed BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV because I want the user to understand the change: he/she should not think of 'udev' as a package, but as a feature which, at this stage, is only available via eudev. I could have kept BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV and have it select BR2_PACKAGE_EUDEV, but I've found it confusing.

Quoted 6 lines

But I should have added BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV in Config.in.legacy to migrate to BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV.

In the end, the user selects BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV, which selects BR2_PACKAGE_EUDEV, which in turn selects BR2_PACKAGE_HAS_UDEV. All the packages depending on it are now available.

Quoted 5 lines

Based on your additional input, and rechecking the changes, I understand your reasoning and accept it.
You still should add the legacy symbol, though.

Peter, what about you?

With the legacy handling added I'm fine with the rename.

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

PATCH v6 3/5 udev: convert to virtual package.

In reply to Eric Le Bihan

Hi Eric,

Quoted 32 lines · Eric Le Bihan

This patch converts udev to a virtual package. For the moment, there is only
one provider for the udev features: eudev.

Packages meant to provide udev-like features must select the symbol BR2_PACKAGE_HAS_UDEV.

Packages depending on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV or BR2_PACKAGE_UDEV have been converted to use the new symbol.

---
 Config.in.legacy                                   |    8 ++++
 docs/manual/adding-packages-directory.txt          |    3 +-
 package/ccid/ccid.mk                               |    2 +-
 package/eudev/Config.in                            |    1 +
 package/gpsd/gpsd.mk                               |    2 +-
 package/libatasmart/Config.in                      |    4 +-
 package/libcec/libcec.mk                           |    2 +-
 package/libdrm/libdrm.mk                           |    2 +-
 package/libmbim/Config.in                          |    5 +-
 package/modem-manager/Config.in                    |    6 +--
 package/network-manager/Config.in                  |    8 ++--
 package/ofono/ofono.mk                             |    2 +-
 package/pcsc-lite/Config.in                        |    2 +-
 package/pcsc-lite/pcsc-lite.mk                     |    2 +-
 package/pulseaudio/pulseaudio.mk                   |    2 +-
 package/systemd/Config.in                          |    6 +--
 package/udev/Config.in                             |   49
+-------------------
 package/udev/udev.mk                               |   49

++++----------------

Quoted 9 lines
 package/udisks/Config.in                           |    8 ++--
 package/usbmount/Config.in                         |    4 +-
 package/weston/Config.in                           |    4 +-
 package/x11r7/xdriver_xf86-input-evdev/Config.in   |    4 +-
 .../xserver_xorg-server/xserver_xorg-server.mk     |    2 +-
 package/xenomai/xenomai.mk                         |    2 +-
 system/Config.in                                   |   22 ++-------
 25 files changed, 55 insertions(+), 146 deletions(-)

Due to recent patches merged in Buildroot, a couple of fixes (just symbols updates,
no big deal) are needed after rebasing on top of Buildroot master, especially in libusb and vlc.
Care to rebase and integrate these fixes in your next submission ;)

BTW, the review and tests Thomas and I did were done on the v7 branch from your repository.

Regards,

Signature · 4 lines
Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140204/13676dac/attachment.html>
#11 lore raw

PATCH v6 4/5 systemd: bump to v207.

In reply to Eric Le Bihan

This patch bumps systemd to v207 but also declares it as a provider for the udev 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.

Support for uClibc has also been removed because:

- upstream has no interest in supporting uClibc.
- using a shrinked libc brings no advantage, given the size of all the programs included in Systemd. So using glibc does not matter.

---
 Config.in.legacy                             |    2 +-
 linux/linux.mk                               |    1 +
 package/systemd/Config.in                    |   56 +++++++++++++--
 package/systemd/systemd-fix-getty-unit.patch |   36 +++++-----
 package/systemd/systemd-fix-page-size.patch  |   43 -----------
 package/systemd/systemd-uclibc-fix.patch     |   59 ----------------
 package/systemd/systemd.mk                   |   98 ++++++++++++++++++--------
 package/udev/udev.mk                         |    4 ++
 system/Config.in                             |   26 +++++--
 9 files changed, 165 insertions(+), 160 deletions(-)
 delete mode 100644 package/systemd/systemd-fix-page-size.patch
 delete mode 100644 package/systemd/systemd-uclibc-fix.patch
Config.in.legacy +1 -1
index 5d80842..f56308f 100644
@@ -240,7 +240,7 @@ config BR2_PACKAGE_UDEV
 	select BR2_PACKAGE_HAS_UDEV
 	help
 	  The 'udev' package is now a virtual package. It is
-	  currently only provided by 'eudev'.
+	  currently provided by 'eudev' or 'systemd'.
 
 
 ###############################################################################
linux/linux.mk +1 -0
index 17365a0..e12dd39 100644
@@ -194,6 +194,7 @@ 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))
 	$(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 +52 -4

72 lines not on this page · raw message

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-uclibc-fix.patch deleted +0 -59

59 lines not on this page · raw message

package/systemd/systemd.mk +70 -28

145 lines not on this page · raw message

package/udev/udev.mk +4 -0
index d274246..a5d0f80 100644
@@ -10,6 +10,10 @@ ifeq ($(BR2_PACKAGE_EUDEV),y)
 UDEV_DEPENDENCIES += eudev
 endif
 
+ifeq ($(BR2_PACKAGE_SYSTEMD),y)
+UDEV_DEPENDENCIES += systemd
+endif
+
 ifeq ($(UDEV_DEPENDENCIES),)
 define UDEV_CONFIGURE_CMDS
 	echo "No Udev implementation selected. Configuration error."
system/Config.in +20 -6
index 18f27bf..b1b54ff 100644
@@ -86,20 +86,31 @@ config BR2_INIT_SYSV
 
 config BR2_INIT_SYSTEMD
 	bool "systemd"
+	depends on !BR2_avr32 # no epoll_create1
+	depends on BR2_TOOLCHAIN_USES_GLIBC
 	depends on BR2_LARGEFILE
 	depends on BR2_USE_WCHAR
 	depends on BR2_INET_IPV6
-	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
 	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_PACKAGE_SYSTEMD
 
-comment 'systemd needs eudev /dev management and a toolchain w/ largefile, wchar, IPv6, threads'
+comment 'systemd needs a (e)glibc toolchain'
+	depends on !BR2_TOOLCHAIN_USES_GLIBC
+
+comment 'systemd needs a toolchain w/ largefile, wchar, IPv6, threads'
+	depends on BR2_avr32
 	depends on BR2_USE_MMU
 	depends on !(BR2_LARGEFILE && BR2_USE_WCHAR && \
-		     BR2_INET_IPV6 && BR2_TOOLCHAIN_HAS_THREADS && \
-		     BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV)
+		     BR2_INET_IPV6 && BR2_TOOLCHAIN_HAS_THREADS)
+
+comment 'systemd needs a toolchain w/ SSP'
+	depends on !BR2_TOOLCHAIN_HAS_SSP
+
+comment "systemd needs a toolchain w/ dynamic library"
+	depends on BR2_PREFER_STATIC_LIB
 
 config BR2_INIT_NONE
 	bool "None"
@@ -107,7 +118,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
@@ -137,6 +148,9 @@ comment "eudev needs a toolchain w/ dynamic library"
 
 endchoice
 
+comment "/dev management using udev (from systemd)"
+	depends on BR2_INIT_SYSTEMD
+
 config BR2_ROOTFS_DEVICE_TABLE
 	string "Path to the permission tables"
 	default "system/device_table.txt"
Signature · 1 line
1.7.9.5
#12 lore raw

PATCH v6 4/5 systemd: bump to v207.

Eric,

2014/1/13 Eric Le Bihan <[email protected]>

Quoted 55 lines

This patch bumps systemd to v207 but also declares it as a provider for the udev 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.

Support for uClibc has also been removed because:

- upstream has no interest in supporting uClibc.
- using a shrinked libc brings no advantage, given the size of all the programs included in Systemd. So using glibc does not matter.

---
 Config.in.legacy                             |    2 +-
 linux/linux.mk                               |    1 +
 package/systemd/Config.in                    |   56 +++++++++++++--
 package/systemd/systemd-fix-getty-unit.patch |   36 +++++-----
 package/systemd/systemd-fix-page-size.patch  |   43 -----------
 package/systemd/systemd-uclibc-fix.patch     |   59 ----------------
 package/systemd/systemd.mk                   |   98
++++++++++++++++++--------
 package/udev/udev.mk                         |    4 ++
 system/Config.in                             |   26 +++++--
 9 files changed, 165 insertions(+), 160 deletions(-)
 delete mode 100644 package/systemd/systemd-fix-page-size.patch
 delete mode 100644 package/systemd/systemd-uclibc-fix.patch
Config.in.legacy +1 -1
index 5d80842..f56308f 100644
@@ -240,7 +240,7 @@ config BR2_PACKAGE_UDEV
        select BR2_PACKAGE_HAS_UDEV
        help
          The 'udev' package is now a virtual package. It is
-         currently only provided by 'eudev'.
+         currently provided by 'eudev' or 'systemd'.
 
 
 

###############################################################################

linux/linux.mk +0 -0
index 17365a0..e12dd39 100644

linux/linux.mk define LINUX_CONFIGURE_CMDS · line 198

Quoted 5 lines
linux/linux.mk +0 -0
@@ -194,6 +194,7 @@ 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

linux/linux.mk define LINUX_CONFIGURE_CMDS · line 199

Quoted 2 lines
linux/linux.mk +0 -0
 KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config))

Since you are adding a command in the if-block, there is an extra ")" at the end of the CONFIG_CGROUPS command line.

Quoted 6 lines
        $(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

Regards,

Signature · 4 lines
Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140116/5ca86510/attachment.html>
#13 lore raw

PATCH v6 4/5 systemd: bump to v207.

Hi!

Quoted 2 lines · Samuel Martin

Since you are adding a command in the if-block, there is an extra ")" at the end of the CONFIG_CGROUPS command line.

D'oh! Sloppy copy-paste... Thanks for noticing.

Best regards,
ELB

#14 lore raw

PATCH v6 4/5 systemd: bump to v207.

In reply to Eric Le Bihan

Hi Eric,

Quoted 106 lines · Eric Le Bihan

This patch bumps systemd to v207 but also declares it as a provider for the udev 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.

Support for uClibc has also been removed because:

- upstream has no interest in supporting uClibc.
- using a shrinked libc brings no advantage, given the size of all the programs included in Systemd. So using glibc does not matter.

---
 Config.in.legacy                             |    2 +-
 linux/linux.mk                               |    1 +
 package/systemd/Config.in                    |   56 +++++++++++++--
 package/systemd/systemd-fix-getty-unit.patch |   36 +++++-----
 package/systemd/systemd-fix-page-size.patch  |   43 -----------
 package/systemd/systemd-uclibc-fix.patch     |   59 ----------------
 package/systemd/systemd.mk                   |   98 ++++++++++++++++++--------
 package/udev/udev.mk                         |    4 ++
 system/Config.in                             |   26 +++++--
 9 files changed, 165 insertions(+), 160 deletions(-)
 delete mode 100644 package/systemd/systemd-fix-page-size.patch
 delete mode 100644 package/systemd/systemd-uclibc-fix.patch
Config.in.legacy +1 -1
index 5d80842..f56308f 100644
@@ -240,7 +240,7 @@ config BR2_PACKAGE_UDEV
        select BR2_PACKAGE_HAS_UDEV
        help
          The 'udev' package is now a virtual package. It is
-         currently only provided by 'eudev'.
+         currently provided by 'eudev' or 'systemd'.
 
 
 ###############################################################################
linux/linux.mk +1 -0
index 17365a0..e12dd39 100644
@@ -194,6 +194,7 @@ 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))
        $(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 +23 -2
index 500e623..2662492 100644
@@ -1,11 +1,21 @@
 config BR2_PACKAGE_SYSTEMD
        bool "systemd"
-       depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
+       depends on BR2_INIT_SYSTEMD
+       depends on !BR2_avr32 # no epoll_create1
+       depends on BR2_LARGEFILE # util-linux
+       depends on BR2_USE_WCHAR # util-linux
        depends on BR2_INET_IPV6
+       depends on !BR2_PREFER_STATIC_LIB # kmod
        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
+       select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
+       select BR2_PACKAGE_KMOD
+       select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # kmod-tools
+       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
@@ -16,9 +26,47 @@ 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 also provides udev, the userspace device daemon.
+
+         The selection of other packages will enable some features:
+
+         - libglib2 package will add support for gudev.
+         - acl package will add support for multi-seat.
+
          http://freedesktop.org/wiki/Software/systemd
 
-comment "systemd needs eudev /dev management and a toolchain w/ IPv6, threads"
+if BR2_PACKAGE_SYSTEMD
+

package/systemd/Config.in config BR2_PACKAGE_SYSTEMD · line 52

Quoted 10 lines
package/systemd/Config.in +10 -0
+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"

This is indented with spaces instead of a tab.

Quoted 12 lines
package/systemd/Config.in +12 -0
+       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
+
+if BR2_INIT_SYSTEMD
+comment "systemd needs a toolchain w/ largefile, wchar, IPv6, threads"

package/systemd/Config.in config BR2_PACKAGE_SYSTEMD · line 72

Quoted 10 lines
package/systemd/Config.in +7 -2
+       depends on BR2_avr32
        depends on BR2_USE_MMU
-       depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV || !BR2_INET_IPV6 || \\
-               !BR2_TOOLCHAIN_HAS_THREADS
+       depends on !(BR2_LARGEFILE && BR2_USE_WCHAR && \
+                    BR2_INET_IPV6 && BR2_TOOLCHAIN_HAS_THREADS)
+
+comment "systemd needs a toolchain w/ dynamic library"
+       depends on BR2_PREFER_STATIC_LIB
+endif

This comment isn't really needed: if you have systemd enabled, it means you already have all dependencies mentioned in system/Config.in.

Also, the dependencies of the comment are anyway not correct:
currently the comment is only showed for avr32, while in fact we want the inverse (for avr32 systemd is never available, so neither should the comment).

[..]

Quoted 126 lines
package/systemd/systemd.mk +52 -28
index a5dc8e5..bca3058 100644
@@ -4,75 +4,117 @@
 #
 ################################################################################
 
-SYSTEMD_VERSION = 44
+SYSTEMD_VERSION = 207
 SYSTEMD_SITE = http://www.freedesktop.org/software/systemd/
 SYSTEMD_SOURCE = systemd-$(SYSTEMD_VERSION).tar.xz
 SYSTEMD_LICENSE = GPLv2+
-SYSTEMD_LICENSE_FILES = LICENSE
+SYSTEMD_LICENSE_FILES = LICENSE.GPLV2 LICENSE.LGPL2.1 LICENSE.MIT
 SYSTEMD_INSTALL_STAGING = YES
 SYSTEMD_DEPENDENCIES = \
        host-intltool \
        libcap \
-       udev \
-       dbus
+       dbus \
+       util-linux \
+       kmod
 
 # Make sure that systemd will always be built after busybox so that we have
 # a consistent init setup between two builds
 ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-       SYSTEMD_DEPENDENCIES += busybox
+SYSTEMD_DEPENDENCIES += busybox
 endif
 
 SYSTEMD_CONF_OPT += \
-       --with-distro=other \
+       --with-rootprefix= \
+       --with-rootlibdir=/lib \
+       --localstatedir=/var \
+       --enable-static=no \
+       --disable-manpages \
        --disable-selinux \
        --disable-pam \
        --disable-libcryptsetup \
-       --disable-gtk \
-       --disable-plymouth \
-       --with-rootdir=/ \
        --with-dbuspolicydir=/etc/dbus-1/system.d \
        --with-dbussessionservicedir=/usr/share/dbus-1/services \
        --with-dbussystemservicedir=/usr/share/dbus-1/system-services \
        --with-dbusinterfacedir=/usr/share/dbus-1/interfaces \
-       --with-udevrulesdir=/etc/udev/rules.d \
-       --with-sysvinit-path=/etc/init.d/ \
-       --without-sysvrcd-path \
-       --enable-split-usr
+       --with-firmware-path=/lib/firmware \
+       --enable-split-usr \
+       --enable-introspection=no \
+       --disable-efi \
+       --disable-myhostname \
+       --disable-tcpwrap \
+       --disable-tests \
+       --without-python
 
 ifeq ($(BR2_PACKAGE_ACL),y)
-       SYSTEMD_CONF_OPT += --enable-acl
-       SYSTEMD_DEPENDENCIES += acl
+SYSTEMD_CONF_OPT += --enable-acl
+SYSTEMD_DEPENDENCIES += acl
 else
-       SYSTEMD_CONF_OPT += --disable-acl
+SYSTEMD_CONF_OPT += --disable-acl
 endif
 
-ifneq ($(BR2_LARGEFILE),y)
-       SYSTEMD_CONF_OPT += --disable-largefile
+ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
+SYSTEMD_CONF_OPT += --enable-gudev
+SYSTEMD_DEPENDENCIES += libglib2
+else
+SYSTEMD_CONF_OPT += --disable-gudev
+endif
+
+ifeq ($(BR2_PACKAGE_SYSTEMD_ALL_EXTRAS),y)
+SYSTEMD_DEPENDENCIES += \
+       xz              \
+       libgcrypt
+SYSTEMD_CONF_OPT +=    \
+       --enable-xz     \
+       --enable-gcrypt \
+       --with-libgcrypt-prefix=$(STAGING_DIR)/usr
+else
+SYSTEMD_CONF_OPT +=    \
+       --disable-xz    \
+       --disable-gcrypt
+endif
+
+ifeq ($(BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY),y)
+SYSTEMD_DEPENDENCIES += libmicrohttpd
+else
+SYSTEMD_CONF_OPT += --disable-microhttpd
 endif
 
 # mq_getattr needs -lrt
 SYSTEMD_MAKE_OPT += LIBS=-lrt
 SYSTEMD_MAKE_OPT += LDFLAGS+=-ldl
 
-ifeq ($(BR2_INIT_SYSTEMD),y)
 define SYSTEMD_INSTALL_INIT_HOOK
-       ln -fs ../usr/lib/systemd/systemd $(TARGET_DIR)/sbin/init
-       ln -fs ../usr/bin/systemctl $(TARGET_DIR)/sbin/halt
-       ln -fs ../usr/bin/systemctl $(TARGET_DIR)/sbin/poweroff
-       ln -fs ../usr/bin/systemctl $(TARGET_DIR)/sbin/reboot
+       ln -fs ../lib/systemd/systemd $(TARGET_DIR)/sbin/init
+       ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/halt
+       ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/poweroff
+       ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/reboot
 
-       ln -fs ../../../usr/lib/systemd/system/multi-user.target $(TARGET_DIR)/etc/systemd/system/default.target
+       ln -fs ../../../lib/systemd/system/multi-user.target $(TARGET_DIR)/etc/systemd/system/default.target
 endef
-SYSTEMD_POST_INSTALL_TARGET_HOOKS += \
-       SYSTEMD_INSTALL_INIT_HOOK
-endif
 
 define SYSTEMD_INSTALL_TTY_HOOK
        rm -f $(TARGET_DIR)/etc/systemd/system/getty.target.wants/getty at tty1.service
-       ln -fs ../../../../usr/lib/systemd/system/serial-getty at .service $(TARGET_DIR)/etc/systemd/system/getty.target.wants/serial-getty@$(BR2_TARGET_GENERIC_GETTY_PORT).service

package/systemd/systemd.mk line 106

Quoted 10 lines
package/systemd/systemd.mk +10 -0
+       ln -fs ../../../../lib/systemd/system/serial-getty at .service $(TARGET_DIR)/etc/systemd/system/getty.target.wants/serial-getty@$(BR2_TARGET_GENERIC_GETTY_PORT).service
+endef
+
+define SYSTEMD_INSTALL_MACHINEID_HOOK
+       touch $(TARGET_DIR)/etc/machine-id
+endef
+
+define SYSTEMD_SANITIZE_PATH_IN_UNITS
+       find $(TARGET_DIR)/lib/systemd/system -name '*.service' \
+               -exec sed -i -e 's,$(HOST_DIR),,g' {} \;

On this line, 'sed -i' should be replaced with $(SED) (defined in package/Makefile.in)

Quoted 57 lines
package/systemd/systemd.mk +8 -0
 endef
 
 SYSTEMD_POST_INSTALL_TARGET_HOOKS += \
+       SYSTEMD_INSTALL_INIT_HOOK \
        SYSTEMD_INSTALL_TTY_HOOK \
+       SYSTEMD_INSTALL_MACHINEID_HOOK \
+       SYSTEMD_SANITIZE_PATH_IN_UNITS
+
+define SYSTEMD_USERS
+       systemd-journal -1 systemd-journal -1 * /var/log/journal - - Journal
+       systemd-journal-gateway -1 systemd-journal-gateway -1 * /var/log/journal - - Journal Gateway
+endef
 
 $(eval $(autotools-package))
package/udev/udev.mk +4 -0
index d274246..a5d0f80 100644
@@ -10,6 +10,10 @@ ifeq ($(BR2_PACKAGE_EUDEV),y)
 UDEV_DEPENDENCIES += eudev
 endif
 
+ifeq ($(BR2_PACKAGE_SYSTEMD),y)
+UDEV_DEPENDENCIES += systemd
+endif
+
 ifeq ($(UDEV_DEPENDENCIES),)
 define UDEV_CONFIGURE_CMDS
        echo "No Udev implementation selected. Configuration error."
system/Config.in +9 -3
index 18f27bf..b1b54ff 100644
@@ -86,20 +86,31 @@ config BR2_INIT_SYSV
 
 config BR2_INIT_SYSTEMD
        bool "systemd"
+       depends on !BR2_avr32 # no epoll_create1
+       depends on BR2_TOOLCHAIN_USES_GLIBC
        depends on BR2_LARGEFILE
        depends on BR2_USE_WCHAR
        depends on BR2_INET_IPV6
-       depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
        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_PACKAGE_SYSTEMD
 
-comment 'systemd needs eudev /dev management and a toolchain w/ largefile, wchar, IPv6, threads'
+comment 'systemd needs a (e)glibc toolchain'
+       depends on !BR2_TOOLCHAIN_USES_GLIBC
+
+comment 'systemd needs a toolchain w/ largefile, wchar, IPv6, threads'
+       depends on BR2_avr32
        depends on BR2_USE_MMU

system/Config.in config BR2_INIT_SYSV · line 113

Quoted 10 lines
system/Config.in +7 -2
        depends on !(BR2_LARGEFILE && BR2_USE_WCHAR && \
-                    BR2_INET_IPV6 && BR2_TOOLCHAIN_HAS_THREADS && \
-                    BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV)
+                    BR2_INET_IPV6 && BR2_TOOLCHAIN_HAS_THREADS)
+
+comment 'systemd needs a toolchain w/ SSP'
+       depends on !BR2_TOOLCHAIN_HAS_SSP
+
+comment "systemd needs a toolchain w/ dynamic library"
+       depends on BR2_PREFER_STATIC_LIB

These comments should actually be one. However, we just realized that glibc toolchains are always with largefile, wchar, ipv6, threads, SSP and dynamic library support. So the comment can be reduced to:

systemd needs an (e)glibc toolchain
(note the 'an')

(this is a simplification we should actually make tree-wide and document in the manual, but this is for another patch).

Quoted 13 lines
system/Config.in +1 -1
 config BR2_INIT_NONE
        bool "None"
@@ -107,7 +118,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

system/Config.in comment "eudev needs a toolchain w/ dynamic library"

Quoted 10 lines
system/Config.in +3 -1
@@ -137,6 +148,9 @@ comment "eudev needs a toolchain w/ dynamic library"
 
 endchoice
 
+comment "/dev management using udev (from systemd)"
+       depends on BR2_INIT_SYSTEMD
+
 config BR2_ROOTFS_DEVICE_TABLE
        string "Path to the permission tables"
        default "system/device_table.txt"
--

Best regards,
Thomas

#15 lore raw

PATCH v6 4/5 systemd: bump to v207.

Hi Eric,

Quoted 5 lines · Thomas De Schampheleire

Hi Eric,

On Mon, Jan 13, 2014 at 4:45 PM, Eric Le Bihan
<[email protected]> wrote:

[..]

Quoted 9 lines

package/systemd/systemd.mk line 5

Quoted 7 lines
package/systemd/systemd.mk +0 -0
index a5dc8e5..bca3058 100644
@@ -4,75 +4,117 @@
 #
 

################################################################################

Quoted 1 line
Quoted 17 lines
Quoted 6 lines
package/systemd/systemd.mk +1 -2
-SYSTEMD_VERSION = 44
+SYSTEMD_VERSION = 207
 SYSTEMD_SITE = http://www.freedesktop.org/software/systemd/
 SYSTEMD_SOURCE = systemd-$(SYSTEMD_VERSION).tar.xz
 SYSTEMD_LICENSE = GPLv2+
-SYSTEMD_LICENSE_FILES = LICENSE

package/systemd/systemd.mk line 18

Quoted 10 lines
package/systemd/systemd.mk +4 -2
+SYSTEMD_LICENSE_FILES = LICENSE.GPLV2 LICENSE.LGPL2.1 LICENSE.MIT
 SYSTEMD_INSTALL_STAGING = YES
 SYSTEMD_DEPENDENCIES = \
        host-intltool \
        libcap \
-       udev \
-       dbus
+       dbus \
+       util-linux \
+       kmod

It seems systemd also depends on host-gperf

Regards,

Signature · 4 lines
Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140204/6104e370/attachment.html>
#16 lore raw

PATCH v6 5/5 manual: update /dev management section.

In reply to Eric Le Bihan

This patch updates the /dev management section in the manual with information about eudev, which replaces udev.

---
 docs/manual/configure.txt |   16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
docs/manual/configure.txt +9 -7
index 89df3d9..32a12ce 100644
@@ -310,22 +310,24 @@ different solutions to handle the +/dev+ directory :
    about +mdev+ and the syntax of its configuration file, see
    http://git.busybox.net/busybox/tree/docs/mdev.txt.
 
- * The fourth solution is *Dynamic using udev*. This method also
+ * The fourth solution is *Dynamic using eudev*. This method also
    relies on the _devtmpfs_ virtual filesystem detailed above, but
-   adds the +udev+ userspace daemon on top of it. +udev+ is a daemon
+   adds the +eudev+ userspace daemon on top of it. +eudev+ is a daemon
    that runs in the background, and gets called by the kernel when a
    device gets added or removed from the system. It is a more
-   heavyweight solution than +mdev+, but provides higher flexibility
-   and is sometimes mandatory for some system components (systemd for
-   example). +udev+ is the mechanism used in most desktop Linux
-   distributions. For more details about +udev+, see
-   http://en.wikipedia.org/wiki/Udev.
+   heavyweight solution than +mdev+, but provides higher flexibility.
+   +eudev+ is a standalone version of +udev+, the original userspace
+   daemon used in most desktop Linux distributions, which is now part
+   of Systemd. For more details, see http://en.wikipedia.org/wiki/Udev.
 
 The Buildroot developers recommandation is to start with the *Dynamic
 using devtmpfs only* solution, until you have the need for userspace
 to be notified when devices are added/removed, or if firmwares are
 needed, in which case *Dynamic using mdev* is usually a good solution.
 
+Note that if +systemd+ is chosen as init system, /dev management will
+be performed by the +udev+ program provided by +systemd+.
+
 init system
 ~~~~~~~~~~~
 
Signature · 1 line
1.7.9.5
#17 lore raw

PATCH v6 5/5 manual: update /dev management section.

Hi Eric,

Quoted 24 lines · Eric Le Bihan

This patch updates the /dev management section in the manual with information about eudev, which replaces udev.

---
 docs/manual/configure.txt |   16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
docs/manual/configure.txt +2 -3
index 89df3d9..32a12ce 100644
@@ -310,22 +310,24 @@ different solutions to handle the +/dev+ directory :
    about +mdev+ and the syntax of its configuration file, see
    http://git.busybox.net/busybox/tree/docs/mdev.txt.
 
- * The fourth solution is *Dynamic using udev*. This method also
+ * The fourth solution is *Dynamic using eudev*. This method also
    relies on the _devtmpfs_ virtual filesystem detailed above, but
-   adds the +udev+ userspace daemon on top of it. +udev+ is a daemon
+   adds the +eudev+ userspace daemon on top of it. +eudev+ is a daemon
    that runs in the background, and gets called by the kernel when a
    device gets added or removed from the system. It is a more
-   heavyweight solution than +mdev+, but provides higher flexibility

docs/manual/configure.txt different solutions to handle the +/dev+ directory : · line 323

Quoted 10 lines
docs/manual/configure.txt +4 -4
-   and is sometimes mandatory for some system components (systemd for
-   example). +udev+ is the mechanism used in most desktop Linux
-   distributions. For more details about +udev+, see
-   http://en.wikipedia.org/wiki/Udev.
+   heavyweight solution than +mdev+, but provides higher flexibility.
+   +eudev+ is a standalone version of +udev+, the original userspace
+   daemon used in most desktop Linux distributions, which is now part
+   of Systemd. For more details, see http://en.wikipedia.org/wiki/Udev.
 
 The Buildroot developers recommandation is to start with the *Dynamic

recommendation
(not changed by your patch, but would be nice to fix at the same time).

docs/manual/configure.txt different solutions to handle the +/dev+ directory : · line 333

Quoted 10 lines
docs/manual/configure.txt +3 -0
 using devtmpfs only* solution, until you have the need for userspace
 to be notified when devices are added/removed, or if firmwares are
 needed, in which case *Dynamic using mdev* is usually a good solution.
 
+Note that if +systemd+ is chosen as init system, /dev management will
+be performed by the +udev+ program provided by +systemd+.
+
 init system
 ~~~~~~~~~~~
 

Best regards,
Thomas

#18 lore raw

v6 cover udev is now provided by systemd or eudev

In reply to Eric Le Bihan

Hi Eric,

Quoted 21 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 v207 and a new eudev package has been added. Version 1.3 of eudev is in sync with systemd v207.

The bump of systemd to v207 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 other choice possible.
- if busybox or SysV is chosen, the user can choose to manage /dev statically, or dynamically using mdev or eudev.

Quoted 6 lines

Changes v5 -> v6:
- fixed packages not properly converted to BR2_PACKAGE_HAS_UDEV (reported by Samuel M.).
- forced inotify support in Linux if eudev is used for /dev management.
- forced inotify support in Linux if systemd is used as init system.
- updated information about systemd requirements.

Looks good. I'm successfully using this.

thanks

Lucas De Marchi

#19 lore raw

v6 cover udev is now provided by systemd or eudev

Hi Peter,

Any plans to apply the rest of this series?

thanks
Lucas De Marchi

Quoted 37 lines · Lucas De Marchi

Hi Eric,

Quoted 21 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 v207 and a new eudev package has been added. Version 1.3 of eudev is in sync with systemd v207.

The bump of systemd to v207 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 other choice possible.
- if busybox or SysV is chosen, the user can choose to manage /dev statically, or dynamically using mdev or eudev.

Quoted 6 lines

Changes v5 -> v6:
- fixed packages not properly converted to BR2_PACKAGE_HAS_UDEV (reported by Samuel M.).
- forced inotify support in Linux if eudev is used for /dev management.
- forced inotify support in Linux if systemd is used as init system.
- updated information about systemd requirements.

Looks good. I'm successfully using this.

thanks

Lucas De Marchi

Signature · 1 line
Lucas De Marchi
#20 lore raw

v6 cover udev is now provided by systemd or eudev

Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Lucas" == Lucas De Marchi <[email protected]> writes:

Hi Peter,
Any plans to apply the rest of this series?

Yes, certainly. Just need a bit more time to review.

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

v6 cover udev is now provided by systemd or eudev

In reply to Eric Le Bihan

Hi Eric,

Quoted 113 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 v207 and a new eudev package has been added. Version 1.3 of eudev is in sync with systemd v207.

The bump of systemd to v207 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 other choice possible.
- if busybox or SysV is chosen, the user can choose to manage /dev statically, or dynamically using mdev or eudev.

Changes v5 -> v6:
- fixed packages not properly converted to BR2_PACKAGE_HAS_UDEV (reported by Samuel M.).
- forced inotify support in Linux if eudev is used for /dev management.
- forced inotify support in Linux if systemd is used as init system.
- updated information about systemd requirements.

Changes v4 -> v5:
- disabled systemd and eudev on avr32.
- reverted Busybox binaries overwrite fix.

Changes v3 -> v4:
- updated /dev management section in user manual.
- fixed indentation of conditionals in Makefiles (suggested by Thomas P).
- added missing comments on dependencies (suggested by Thomas P, Thomas DS).
- fixed some packages not being converted to BR2_PACKAGE_HAS_UDEV.

Changes v2 -> v3:
- reordered patches for better bisectability (suggested by Thomas).
- removed uClibc support for Systemd (suggested by Arnout).
- bumped systemd to v207 (no more backport patches).
- bumped eudev to 1.3.

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 (5):
sysvinit: depend on SysV selected as init system.
eudev: new package.
udev: convert to virtual package.
systemd: bump to v207.
manual: update /dev management section.

 Config.in.legacy                                   |    8 ++
 docs/manual/adding-packages-directory.txt          |    3 +-
 docs/manual/configure.txt                          |   16 ++--
 linux/linux.mk                                     |    3 +-
 package/Config.in                                  |    1 +
 package/ccid/ccid.mk                               |    2 +-
 package/eudev/Config.in                            |   38 ++++++++
 package/{udev => eudev}/S10udev                    |    2 +-
 package/eudev/eudev.mk                             |   48 ++++++++++
 package/gpsd/gpsd.mk                               |    2 +-
 package/libatasmart/Config.in                      |    4 +-
 package/libcec/libcec.mk                           |    2 +-
 package/libdrm/libdrm.mk                           |    2 +-
 package/libmbim/Config.in                          |    5 +-
 package/modem-manager/Config.in                    |    6 +-
 package/network-manager/Config.in                  |    8 +-
 package/ofono/ofono.mk                             |    2 +-
 package/pcsc-lite/Config.in                        |    2 +-
 package/pcsc-lite/pcsc-lite.mk                     |    2 +-
 package/pulseaudio/pulseaudio.mk                   |    2 +-
 package/systemd/Config.in                          |   56 ++++++++++-
 package/systemd/systemd-fix-getty-unit.patch       |   36 ++++---
 package/systemd/systemd-fix-page-size.patch        |   43 ---------
 package/systemd/systemd-uclibc-fix.patch           |   59 ------------
 package/systemd/systemd.mk                         |   98 ++++++++++++++------
 package/sysvinit/Config.in                         |    1 +
 package/udev/Config.in                             |   49 +---------
 package/udev/udev.mk                               |   47 ++--------
 package/udisks/Config.in                           |    8 +-
 package/usbmount/Config.in                         |    4 +-
 package/weston/Config.in                           |    4 +-
 package/x11r7/xdriver_xf86-input-evdev/Config.in   |    4 +-
 .../xserver_xorg-server/xserver_xorg-server.mk     |    2 +-
Quoted 9 lines
 package/xenomai/xenomai.mk                         |    2 +-
 system/Config.in                                   |   47 ++++++----
 35 files changed, 318 insertions(+), 300 deletions(-)
 create mode 100644 package/eudev/Config.in
 copy package/{udev => eudev}/S10udev (98%)
 create mode 100644 package/eudev/eudev.mk
 delete mode 100644 package/systemd/systemd-fix-page-size.patch
 delete mode 100644 package/systemd/systemd-uclibc-fix.patch

I just finished reviewing this series and provided some comments on it, discussing some of the points with Peter and Samuel.

If you would have some time to review these comments and send a new patch series early this week, that would be great, as Peter could then integrate the entire series in 2014.02-rc1, still. The -rc1 is going to be send this week.

Thanks in advance,
Thomas