diff mbox

[v6,3/5] udev: convert to virtual package.

Message ID 1389627907-7821-4-git-send-email-eric.le.bihan.dev@free.fr
State Superseded
Headers show

Commit Message

Eric Le Bihan Jan. 13, 2014, 3:45 p.m. UTC
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.

Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
---
 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(-)

Comments

Thomas De Schampheleire Feb. 3, 2014, 9:41 p.m. UTC | #1
Hi Eric,

On Mon, Jan 13, 2014 at 4:45 PM, Eric Le Bihan
<eric.le.bihan.dev@free.fr> wrote:
> 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.
>
> Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
> ---
>  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(-)
>
> diff --git a/Config.in.legacy b/Config.in.legacy
> index 01bf16b..5d80842 100644
> --- a/Config.in.legacy
> +++ b/Config.in.legacy
> @@ -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'.
> +
> +

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.

>  ###############################################################################
>  comment "Legacy options removed in 2013.08"
>
[..]
> --- a/package/systemd/Config.in
> +++ b/package/systemd/Config.in
> @@ -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

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?

> diff --git a/package/udev/Config.in b/package/udev/Config.in
> index 7aa79c4..1c9251b 100644
> --- a/package/udev/Config.in
> +++ b/package/udev/Config.in
> @@ -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
> -       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.

> diff --git a/package/udev/udev.mk b/package/udev/udev.mk
> index db86850..d274246 100644
> --- a/package/udev/udev.mk
> +++ b/package/udev/udev.mk
> @@ -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))
> diff --git a/package/udisks/Config.in b/package/udisks/Config.in
> index e9539a3..62d5598 100644
> --- a/package/udisks/Config.in
> +++ b/package/udisks/Config.in
> @@ -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"

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

[..]

Best regards,
Thomas
Samuel Martin Feb. 4, 2014, 8:47 a.m. UTC | #2
Hi Eric,


On Mon, Jan 13, 2014 at 4:45 PM, Eric Le Bihan <eric.le.bihan.dev@free.fr>wrote:

> 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.
>
> Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
> ---
>  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(-)
>

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,
Eric Le Bihan Feb. 4, 2014, 12:10 p.m. UTC | #3
Thomas, All,

On Mon, Feb 03, 2014 at 10:41:03PM +0100, Thomas De Schampheleire wrote:

> > --- a/package/systemd/Config.in
> > +++ b/package/systemd/Config.in
> > @@ -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
>
> 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.

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.

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

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.

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

> > -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.
Thomas De Schampheleire Feb. 5, 2014, 12:31 p.m. UTC | #4
Hi Eric,

On Tue, Feb 4, 2014 at 1:10 PM, Eric Le Bihan <eric.le.bihan.dev@free.fr> wrote:
> Thomas, All,
>
> On Mon, Feb 03, 2014 at 10:41:03PM +0100, Thomas De Schampheleire wrote:
>
>> > --- a/package/systemd/Config.in
>> > +++ b/package/systemd/Config.in
>> > @@ -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
>>
>> 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.
>
> 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.

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

>
>> Maybe you could add a comment in udev/Config.in and udev/udev.mk
>> clarifying that this is now a virtual package.
> Yes, indeed!
>
>> > -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
Peter Korsgaard Feb. 5, 2014, 12:52 p.m. UTC | #5
>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin@gmail.com> writes:

Hi,

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

 > 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.
diff mbox

Patch

diff --git a/Config.in.legacy b/Config.in.legacy
index 01bf16b..5d80842 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -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"
 
diff --git a/docs/manual/adding-packages-directory.txt b/docs/manual/adding-packages-directory.txt
index 754a145..40af809 100644
--- a/docs/manual/adding-packages-directory.txt
+++ b/docs/manual/adding-packages-directory.txt
@@ -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
diff --git a/package/ccid/ccid.mk b/package/ccid/ccid.mk
index f39edce..b635aa1 100644
--- a/package/ccid/ccid.mk
+++ b/package/ccid/ccid.mk
@@ -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/ ; \
diff --git a/package/eudev/Config.in b/package/eudev/Config.in
index b3462d5..cbd1c77 100644
--- a/package/eudev/Config.in
+++ b/package/eudev/Config.in
@@ -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
diff --git a/package/gpsd/gpsd.mk b/package/gpsd/gpsd.mk
index efc8d37..0f655ba 100644
--- a/package/gpsd/gpsd.mk
+++ b/package/gpsd/gpsd.mk
@@ -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) \
diff --git a/package/libatasmart/Config.in b/package/libatasmart/Config.in
index a3e44f8..534e7c1 100644
--- a/package/libatasmart/Config.in
+++ b/package/libatasmart/Config.in
@@ -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
diff --git a/package/libcec/libcec.mk b/package/libcec/libcec.mk
index 910f319..99cc767 100644
--- a/package/libcec/libcec.mk
+++ b/package/libcec/libcec.mk
@@ -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
 
diff --git a/package/libdrm/libdrm.mk b/package/libdrm/libdrm.mk
index f5efaf1..a1b0580 100644
--- a/package/libdrm/libdrm.mk
+++ b/package/libdrm/libdrm.mk
@@ -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
diff --git a/package/libmbim/Config.in b/package/libmbim/Config.in
index d034e84..bd34dd4 100644
--- a/package/libmbim/Config.in
+++ b/package/libmbim/Config.in
@@ -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
diff --git a/package/modem-manager/Config.in b/package/modem-manager/Config.in
index e157ca8..fe60850 100644
--- a/package/modem-manager/Config.in
+++ b/package/modem-manager/Config.in
@@ -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
diff --git a/package/network-manager/Config.in b/package/network-manager/Config.in
index a194433..a4eeeaf 100644
--- a/package/network-manager/Config.in
+++ b/package/network-manager/Config.in
@@ -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
diff --git a/package/ofono/ofono.mk b/package/ofono/ofono.mk
index aaaa8fa..9e30c63 100644
--- a/package/ofono/ofono.mk
+++ b/package/ofono/ofono.mk
@@ -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
diff --git a/package/pcsc-lite/Config.in b/package/pcsc-lite/Config.in
index 4cd89e9..aab42e8 100644
--- a/package/pcsc-lite/Config.in
+++ b/package/pcsc-lite/Config.in
@@ -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.
diff --git a/package/pcsc-lite/pcsc-lite.mk b/package/pcsc-lite/pcsc-lite.mk
index afbe822..18859cd 100644
--- a/package/pcsc-lite/pcsc-lite.mk
+++ b/package/pcsc-lite/pcsc-lite.mk
@@ -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
diff --git a/package/pulseaudio/pulseaudio.mk b/package/pulseaudio/pulseaudio.mk
index cdeabc5..3fd3cd9 100644
--- a/package/pulseaudio/pulseaudio.mk
+++ b/package/pulseaudio/pulseaudio.mk
@@ -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) \
diff --git a/package/systemd/Config.in b/package/systemd/Config.in
index fe81900..500e623 100644
--- a/package/systemd/Config.in
+++ b/package/systemd/Config.in
@@ -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
diff --git a/package/udev/Config.in b/package/udev/Config.in
index 7aa79c4..1c9251b 100644
--- a/package/udev/Config.in
+++ b/package/udev/Config.in
@@ -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
-	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
diff --git a/package/udev/udev.mk b/package/udev/udev.mk
index db86850..d274246 100644
--- a/package/udev/udev.mk
+++ b/package/udev/udev.mk
@@ -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))
diff --git a/package/udisks/Config.in b/package/udisks/Config.in
index e9539a3..62d5598 100644
--- a/package/udisks/Config.in
+++ b/package/udisks/Config.in
@@ -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
diff --git a/package/usbmount/Config.in b/package/usbmount/Config.in
index 2583e7c..0bb8883 100644
--- a/package/usbmount/Config.in
+++ b/package/usbmount/Config.in
@@ -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
diff --git a/package/weston/Config.in b/package/weston/Config.in
index 247efc8..36bbb01 100644
--- a/package/weston/Config.in
+++ b/package/weston/Config.in
@@ -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
diff --git a/package/x11r7/xdriver_xf86-input-evdev/Config.in b/package/x11r7/xdriver_xf86-input-evdev/Config.in
index 88d3e6e..6ec14bf 100644
--- a/package/x11r7/xdriver_xf86-input-evdev/Config.in
+++ b/package/x11r7/xdriver_xf86-input-evdev/Config.in
@@ -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
diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
index 4089aab..a7ac9a0 100644
--- a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
+++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
@@ -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
diff --git a/package/xenomai/xenomai.mk b/package/xenomai/xenomai.mk
index 2dd1bf6..4e9025d 100644
--- a/package/xenomai/xenomai.mk
+++ b/package/xenomai/xenomai.mk
@@ -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
diff --git a/system/Config.in b/system/Config.in
index 7f4d851..18f27bf 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -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