Skip to contentSkip to conversation

Introduce libudev (branch yem/libudev)

PATCH Superseded Yann E. MORIN 3 participants 29 messages Jul 19, 2014 – Jul 27, 2014

v3 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

v3 cover Introduce libudev (branch yem/libudev)

Hello All!

This series introduces the possibility to just build and install libudev, without requiring that the /dev management be handled by eudev or systemd.

A lot of packages that have a dependency on udev, in fact only require a libudev, not anudev daemon. That's the case for e.g. libinput, libcec, mesa3d...

The series contains:

- a patch to remove a spurious dependency on udev for XBMC

- three patches to fix generating the list of virtual packages for the manual

- two patches to remove the prompts of eudev and systemd, since they are never user-selectable; a bit of cleanup is done in the dependencies as well

- a patch to intrduce the libudev virtual package

- two patches to add libudev providers: eudev and systemd

- a patch to make eudev only build libudev if /dev management is handled by neither eudev nor systemd

- ten patches to convert packages to depend on libusb instead of a udev daemon

Not all packages that reference udev have been switched over to depend on libudev, though, since it is unclear to me whether they require a udev daemon, or would be happy with just libudev.

Also, the converted packages have not been tested, not even build-tested; this is just an RFC to validate the overal solution for now.

On your keyboards, get set, ready... Comment! :-)

Changes RFCv2 -> v3:
- some typoes (Samul)
- misc fixes in gen-manual-lists.py (Samuel)

Changes RFCv1 -> RFCv2:
- have eudev and systemd be providers for libudev, instead of having udev be the provider (Thomas, on IRC)
- fix the manual lists after bugs were uncovered with the removal of the eudev and systemd prompts
- convert some packages

Regards,
Yann E. MORIN.

The following changes since commit 1aa42ad4aed013c03d1e17f4cfe2ace2194f423d:

make: bump to version 4.0 (2014-07-19 14:47:27 +0200)

are available in the git repository at:

git://ymorin.is-a-geek.org/buildroot

for you to fetch changes up to 7964be0c75358121baa69301d23eb93d72a64db9:

package/xserver_xorg-server: needs libudev, not a udev daemon (2014-07-19 15:46:02 +0200)

----------------------------------------------------------------
Yann E. MORIN (20):
package/xbmc: remove spurious build-dependency on udev support/gen-manual-lists.py: remove unneeded arg in private function support/gen-manual-lists.py: bail out early for legacy symbols support/gen-manual-lists.py: rework generating the virtual package list package/eudev: remove the prompt
package/systemd: remove prompt
package/libudev: new virtual package
package/eudev: is a provider for libudev
package/systemd: is a provider for libudev
package/eudev: split udev/libudev
package/libatasmart: needs libudev, not a udev daemon package/libcec: needs libudev, not a udev daemon package/libdrm: can also use only libudev
package/libinput: needs libudev, not a udev daemon package/libusb: needs libudev, not a udev daemon package/mesa3d: depends on libudev, not udev
package/vlc: needs libudev, not a udev daemon package/weston: needs libudev, not a udev daemon package/xdriver_xf86-input-evdev: needs libudev, not a udev daemon package/xserver_xorg-server: needs libudev, not a udev daemon

 package/Config.in                                  |  3 +-
 package/eudev/Config.in                            | 68 +++++++++++-----
 package/eudev/eudev.mk                             | 51 ++++++++++--
 package/libatasmart/Config.in                      |  5 +-
 package/libcec/libcec.mk                           |  4 +-
 package/libdrm/libdrm.mk                           |  4 +-
 package/libinput/Config.in                         |  5 +-
 package/libinput/libinput.mk                       |  2 +-
 package/libudev/Config.in                          |  6 ++
 package/libudev/libudev.mk                         |  7 ++
 package/libusb/libusb.mk                           |  5 +-
 package/mesa3d/Config.in                           |  6 +-
 package/mesa3d/mesa3d.mk                           |  4 +-
 package/systemd/Config.in                          | 55 +++++--------
 package/systemd/systemd.mk                         |  2 +-
 package/vlc/vlc.mk                                 |  4 +-
 package/weston/Config.in                           |  6 +-
 package/weston/weston.mk                           |  2 +-
 package/x11r7/xdriver_xf86-input-evdev/Config.in   |  5 +-
 .../xdriver_xf86-input-evdev.mk                    |  3 +-
 .../xserver_xorg-server/xserver_xorg-server.mk     |  4 +-
 package/xbmc/Config.in                             |  6 +-
 package/xbmc/xbmc.mk                               |  2 +-
 support/scripts/gen-manual-lists.py                | 95 ++++++++++++++++++----
 system/Config.in                                   | 76 +++++++++++++----
 25 files changed, 301 insertions(+), 129 deletions(-)
 create mode 100644 package/libudev/Config.in
 create mode 100644 package/libudev/libudev.mk
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH v3 1/20 package/xbmc: remove spurious build-dependency on udev

CEC support with libcec needs udev, but it is the responsibility of libcec to have proper build-dependencies, not XBMC.

So, just remove the spurious dependency on udev in XBMC.

---
 package/xbmc/xbmc.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/xbmc/xbmc.mk +1 -1
index 1d458d4..45be990 100644
@@ -130,7 +130,7 @@ XBMC_CONF_OPT += --disable-avahi
 endif
 
 ifeq ($(BR2_PACKAGE_XBMC_LIBCEC),y)
-XBMC_DEPENDENCIES += libcec udev
+XBMC_DEPENDENCIES += libcec
 XBMC_CONF_OPT += --enable-libcec
 else
 XBMC_CONF_OPT += --disable-libcec
Signature · 1 line
1.9.1
#2 lore raw

PATCH v3 2/20 support/gen-manual-lists.py: remove unneeded arg in private function

In reply to Yann E. MORIN

No need to pass as argument to a function, members of the class it's in.

---
 support/scripts/gen-manual-lists.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
support/scripts/gen-manual-lists.py +3 -3
index 69f4c7e..483b384 100644
@@ -384,7 +384,7 @@ class Buildroot:
                     return s
             return None
 
-        def _get_providers(config, symbol):
+        def _get_providers(symbol):
             providers = list()
             for sym in self.config:
                 if not sym.is_symbol():
@@ -404,7 +404,7 @@ class Buildroot:
                                   + " (w/ " + l + ")"
                             providers.append(l)
                         else:
-                            providers.extend(_get_providers(config,sym))
+                            providers.extend(_get_providers(sym))
             return providers
 
         if what == "layout":
@@ -415,7 +415,7 @@ class Buildroot:
 
         if what == "symbol":
             pkg = re.sub(r"^BR2_PACKAGE_HAS_(.+)$", r"\1", symbol.get_name())
-            providers = _get_providers(self.config, symbol)
+            providers = _get_providers(symbol)
 
             return "| {0:<20} <| {1:<32} <| {2}\n".format(pkg.lower(),
                                                           '+' + symbol.get_name() + '+',
Signature · 1 line
1.9.1
#3 lore raw

PATCH v3 3/20 support/gen-manual-lists.py: bail out early for legacy symbols

In reply to Yann E. MORIN

When searching for virtual package providers, there's no need to handle legacy symbols at all, so just bail out early.

---
 support/scripts/gen-manual-lists.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
support/scripts/gen-manual-lists.py +2 -2
index 483b384..95c10dc 100644
@@ -389,13 +389,13 @@ class Buildroot:
             for sym in self.config:
                 if not sym.is_symbol():
                     continue
+                if _symbol_is_legacy(sym):
+                    continue
                 selects = sym.get_selected_symbols()
                 if not selects:
                     continue
                 for s in selects:
                     if s == symbol:
-                        if _symbol_is_legacy(sym):
-                            continue
                         if sym.prompts:
                             l = self._get_symbol_label(sym,False)
                             parent_pkg = _get_parent_package(sym)
Signature · 1 line
1.9.1
#4 lore raw

PATCH v3 4/20 support/gen-manual-lists.py: rework generating the virtual package list

In reply to Yann E. MORIN

To get the list of providers of a virtual pacakge, we currently scan all the symbols to see if they select the virtual package _HAS symbol.

Then, for all such selecting symbols, we iterate through the select chain, up to the uppermost symbol that has a prompt, to get the actual user-selectable symbol that ultimately will select the virtual package. This handles blind symbols that are options to a package.

So far, this is working relatively OK, except we do not account for a special type of providers: virtual packages. There is nothing that prevents a virtual package to declare itself as a provider for another virtual package.

Additionally, another case that is not handled is actual packages that are actually promptless. So far, we expected symbols with no prompt to be an option to a package, and we would ultimately (via the backward select recursion, above) end up finding a package symbol with a prompt.

But we're soon removing the prompts of eudev and systemd [*], so the previously valid heuristic is no longer valid.

So, we need a brand-new heuristic to build up the list of providers.

Fortunately, instead of _blindly_ looking for selecting symbols, we can actually extract the providing packages from the list of 'default' values of the _PROVIDES_XXX symbol. This gives us the list of packages, but not sub-options.

Then, we can go on hunting for any selecting symbol. Each such symbol that is not a known package gets treated like an option, as was done up until now.

What this additional complexity brings, is that prompt-less packages are automatically found, from the list of 'default' values, and this includes real prompt-less packages, as well as virtual packages. These are what we were missing previously.

[*] because they are not directly user-selectable, see the corresponding following changesets for the rationale.

---
 support/scripts/gen-manual-lists.py | 93 +++++++++++++++++++++++++++++++------
 1 file changed, 78 insertions(+), 15 deletions(-)
support/scripts/gen-manual-lists.py +78 -15
index 95c10dc..0f1906d 100644
@@ -384,28 +384,91 @@ class Buildroot:
                     return s
             return None
 
-        def _get_providers(symbol):
-            providers = list()
+        # This functions return a list of all symbols that have a prompt,
+        # and that 'select' the given symbol
+        def _get_selecting_symbols_with_prompt(symbol):
+            syms = list()
             for sym in self.config:
                 if not sym.is_symbol():
                     continue
-                if _symbol_is_legacy(sym):
-                    continue
                 selects = sym.get_selected_symbols()
                 if not selects:
                     continue
+                # Does this symbol selects us?
                 for s in selects:
-                    if s == symbol:
-                        if sym.prompts:
-                            l = self._get_symbol_label(sym,False)
-                            parent_pkg = _get_parent_package(sym)
-                            if parent_pkg is not None:
-                                l = self._get_symbol_label(parent_pkg, False) \
-                                  + " (w/ " + l + ")"
-                            providers.append(l)
-                        else:
-                            providers.extend(_get_providers(sym))
-            return providers
+                    if not s == symbol:
+                        continue
+                    if sym.prompts:
+                        syms.append(sym)
+                    else:
+                        syms.extend(_get_selecting_symbols_with_prompt(sym))
+            return syms
+
+        # This function returns a list of providers for the specified symbol.
+        # 'symbol' must be a _HAS_XXX symbol.
+        # Each element is a string.
+        # Each element is the name of the providing package, with any
+        # sub-option of that package.
+        # E.g.:  "rpi-userland"   "mesa3d (w/ OpenGL ES)"
+        #
+        # We consider the provider packages by looking at all the default "foo"
+        # for the corresponding _PROVIDES_XXX symbol, which gives us all the
+        # packages.
+        # Then we look at all the symbols that 'select' the _HAS_XXX symbol.
+        # If a selecting symbol is also a package symbol, this is a cut.
+        # Otherwise, we iterate the 'selected by' chain until we find a symbol
+        # with a prompt, which we consider the enabling sub-option, or we end
+        # up with the providing-package's symbol.
+        def _get_providers(symbol):
+            providers_syms = list()
+            providers_syms_names = list()
+            providers_syms_w_opts = list()
+
+            # Get all providing packages
+            _provides_pkg = re.sub(r"^(BR2_PACKAGE)_HAS_(.+)$",
+                                   r"\1_PROVIDES_\2",
+                                   symbol.get_name())
+            _provides_sym = self.config.get_symbol(_provides_pkg)
+            for (pn, _) in _provides_sym.def_exprs:
+                ps = self.config._expr_val_str(pn, get_val_instead_of_eval=True)
+                ps = re.sub(r"-", r"_", ps.strip('"'))
+                ps = self.config.get_symbol("BR2_PACKAGE_" + ps.upper())
+                providers_syms.append(ps)
+                providers_syms_names.append( (ps, pn) )
+
+            # Now, try to get sub-options
+            # Iterate across all symbols, to see if any selects us
+            for sym in _get_selecting_symbols_with_prompt(symbol):
+                if _symbol_is_legacy(sym):
+                    continue
+                if sym in providers_syms:
+                    # The symbol is a package that provides us, and we already
+                    # know of it
+                    continue
+                # The symbol is unknown, we suppose it is an option, so find
+                # the package it comes from
+                parent_pkg = _get_parent_package(sym)
+                if parent_pkg is not None:
+                    providers_syms_w_opts.append( (parent_pkg, sym) )
+
+            # Now, build a list of providers with option
+            seen = list()
+            providers_str = list()
+            for (p, o) in providers_syms_w_opts:
+                if not p in seen:
+                    seen.append(p)
+                l = self._get_symbol_label(p, False) + " (w/ " \
+                  + self._get_symbol_label(o, False) + ")"
+                providers_str.append(l)
+
+            # Finally, complete with the list of providers without option
+            for (ps, pn) in providers_syms_names:
+                if ps in seen:
+                    continue
+                if not pn in providers_str:
+                    providers_str.append(pn)
+
+            return providers_str
 
         if what == "layout":
             return ( "100%", "^1,4,4" )
Signature · 1 line
1.9.1
#5 lore raw

PATCH v3 5/20 package/eudev: remove the prompt

In reply to Yann E. MORIN

The package eudev depends on DEVICE_CREATION_DYNAMIC_EUDEV, and is also selected by DEVICE_CREATION_DYNAMIC_EUDEV.

This means that:
- eudev is not visible when DEVICE_CREATION_DYNAMIC_EUDEV is not set
- eudev is visible but forced when DEVICE_CREATION_DYNAMIC_EUDEV is set

As a consequence, eudev is never user-selectable.

Since the user already made the decision to use eudev in the /dev management choice, there is no point in showing the eudev package at all in the menuconfig.

Just remove the prompt.

Also remove the comments, since anyway the user can't do anything about it.

Although not strictly required, we anyway keep the dependencies expressed in eudev, to explain where they come from (fork, util-linux...), so it is explicit their duplication in the .dev management choice entry comes from eudev itself. So, update the comments there.

Also, move the help text to the /dev macnagement choice, so the user has a chance to look at it! ;-)

Cc Thomas Petazzoni <[email protected]>
Cc Bernd Kuhls <[email protected]>
---
 package/eudev/Config.in | 30 +++++++++---------------------
 system/Config.in        | 21 ++++++++++++++++-----
 2 files changed, 25 insertions(+), 26 deletions(-)
package/eudev/Config.in +9 -21
index 40ff721..b204a90 100644
@@ -1,7 +1,13 @@
+# Note: being prompt-less, and selected in the /dev management choice,
+# it is not needed to have dependencies on this symbol, since the
+# choice entry already have those dependencies.
+# However, it seems more logical to have the dependencies listed here,
+# so it is easier to uderstand why we have those, and duplicate them in
+# the choice entry.
+
 config BR2_PACKAGE_EUDEV
-	bool "eudev"
+	bool
 	depends on !BR2_avr32 # no epoll_create1
-	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
 	depends on BR2_USE_MMU # uses fork()
 	depends on BR2_LARGEFILE # util-linux
 	depends on BR2_USE_WCHAR # util-linux
@@ -10,14 +16,6 @@ config BR2_PACKAGE_EUDEV
 	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
 
@@ -25,18 +23,8 @@ config BR2_PACKAGE_PROVIDES_UDEV
 	default "eudev"
 
 config BR2_PACKAGE_EUDEV_RULES_GEN
-	bool "enable rules generator"
+	bool "eudev rules generator"
 	help
 	  Enable persistent rules generator
 
 endif
-
-comment "eudev needs eudev /dev management"
-	depends on !BR2_avr32
-	depends on BR2_USE_MMU
-	depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
-
-comment "eudev needs a toolchain w/ largefile, wchar, dynamic library"
-	depends on !BR2_avr32
-	depends on BR2_USE_MMU
-	depends on !BR2_LARGEFILE || !BR2_USE_WCHAR || BR2_PREFER_STATIC_LIB
system/Config.in +16 -5
index 1be7e5d..89ae46e 100644
@@ -124,12 +124,23 @@ config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV
 
 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
-	depends on BR2_USE_MMU # eudev
+	depends on !BR2_avr32 # eudev (no epoll_create1)
+	depends on BR2_USE_MMU # eudev (fork)
+	depends on BR2_LARGEFILE # eudev (util-linux)
+	depends on BR2_USE_WCHAR # eudev (util-linux)
+	depends on !BR2_PREFER_STATIC_LIB # eudev
 	select BR2_PACKAGE_EUDEV
+	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.
+
+	  You can further configure systemd in:
+	    Target packages --> Hardware handling
+
+	  http://github.com/gentoo/eudev/
 
 comment "eudev needs a toolchain w/ largefile, wchar, dynamic library"
 	depends on !BR2_avr32 # eudev
Signature · 1 line
1.9.1
#6 lore raw

PATCH v3 6/20 package/systemd: remove prompt

In reply to Yann E. MORIN

The package systemd depends on BR2_INIT_SYSTEMD, and is also selected by BR2_INIT_SYSTEMD.

This means that:
- systemd is not visible when BR2_INIT_SYSTEMD is not set
- systemd is visible but forced when BR2_INIT_SYSTEMD is set

As a consequence, systemd is never user-selectable.

Since the user already made the decision to use systemd in the init system choice, there is no point in showing the systemd package at all in the menuconfig.

Just remove the prompt, and move systemd's sub-option to a sub-menu.

Although not strictly required, we anyway keep the dependencies expressed in systemd, to explain where they come from (kmod, util-linux...), so it is explicit their duplication in the init system choice entry comes from systemd itself. So, update the comments there.

Re-order dependencies, so they are the same in the systemd package and the init system choice. Add dependencies missing in the package.

Also, move the help text to the init system choice, so the user has a chance to look at it! ;-)

Cc Thomas Petazzoni <[email protected]>
Cc Bernd Kuhls <[email protected]>
---
 package/systemd/Config.in | 53 ++++++++++++++------------------------------
 system/Config.in          | 56 ++++++++++++++++++++++++++++++++++++++---------
 2 files changed, 63 insertions(+), 46 deletions(-)
package/systemd/Config.in +17 -36
index 58f76a5..7ff36cc 100644
@@ -7,12 +7,22 @@ config BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS
 		BR2_sh4a || BR2_sh4aeb || BR2_sparc || BR2_x86_64 || \
 		BR2_aarch64 || BR2_m68k
 
+# Note: being prompt-less, and selected in the /dev management choice,
+# it is not needed to have dependencies on this symbol, since the
+# choice entry already have those dependencies.
+# However, it seems more logical to have the dependencies listed here,
+# so it is easier to uderstand why we have those, and duplicate them in
+# the choice entry.
+
 config BR2_PACKAGE_SYSTEMD
-	bool "systemd"
-	depends on BR2_INIT_SYSTEMD
+	bool
+	depends on BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+	depends on BR2_INET_IPV6
+	depends on BR2_TOOLCHAIN_HAS_SSP
+	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
 	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
@@ -24,42 +34,11 @@ config BR2_PACKAGE_SYSTEMD
 	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
-	  capabilities, uses socket and D-Bus activation for starting services,
-	  offers on-demand starting of daemons, keeps track of processes using
-	  Linux cgroups, supports snapshotting and restoring of the system
-	  state, maintains mount and automount points and implements an
-	  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 the following options
-	  enabled:
-
-	  - CONFIG_CGROUPS
-	  - CONFIG_INOTIFY_USER
-	  - CONFIG_FHANDLE
-	  - CONFIG_AUTOFS4_FS
-	  - CONFIG_TMPFS_POSIX_ACL
-	  - CONFIG_TMPFS_XATTR
-
-	  These options will be automatically enabled by Buildroot if
-	  it is responsible for building the kernel. Otherwise, if you
-	  are building your kernel outside of Buildroot, make sure
-	  these options are enabled.
-
-	  Systemd also provides udev, the userspace device daemon.
-
-	  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
 
 if BR2_PACKAGE_SYSTEMD
 
+menu "systemd"
+
 config BR2_PACKAGE_PROVIDES_UDEV
 	default "systemd"
 
@@ -132,4 +111,6 @@ config BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT
 	  When this feature is enabled, Systemd mounts smackfs and manages
 	  security labels for sockets.
 
+endmenu # "systemd"
+
 endif
system/Config.in +46 -10

63 lines not on this page · raw message

Signature · 1 line
1.9.1
#7 lore raw

PATCH v3 7/20 package/libudev: new virtual package

In reply to Yann E. MORIN

Not all packages that currently depend on udev really need an udev daemon; most may only require a libudev.so to be available. For example, libcec, mesa3d...

Currently, we conflate udev and libudev into a single virtual package.

Introduce a new virtual package 'libudev' that packages can select if they provide libudev.so (obviously, systemd and eudev are such packages) and which packages can depend on if they just need libudev.so and not an udev daemon.

Note: only the virtual package is added for now, providers and users will be converted in followup patches.

---
 package/Config.in          | 1 +
 package/libudev/Config.in  | 6 ++++++
 package/libudev/libudev.mk | 7 +++++++
 3 files changed, 14 insertions(+)
 create mode 100644 package/libudev/Config.in
 create mode 100644 package/libudev/libudev.mk
package/Config.in +1 -0
index 5886cfa..1996653 100644
@@ -663,6 +663,7 @@ menu "Hardware handling"
 	source "package/librtlsdr/Config.in"
 	source "package/libserial/Config.in"
 	source "package/libsoc/Config.in"
+	source "package/libudev/Config.in"
 	source "package/libusb/Config.in"
 	source "package/libusb-compat/Config.in"
 	source "package/libv4l/Config.in"
package/libudev/Config.in new file +6 -0
new file mode 100644
index 0000000..2745fcc
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_HAS_LIBUDEV
+	bool
+
+config BR2_PACKAGE_PROVIDES_LIBUDEV
+	depends on BR2_PACKAGE_HAS_LIBUDEV
+	string
package/libudev/libudev.mk new file +7 -0
new file mode 100644
index 0000000..af1b3dd
@@ -0,0 +1,7 @@
+################################################################################
+#
+# libudev
+#
+################################################################################
+
+$(eval $(virtual-package))
Signature · 1 line
1.9.1
#8 lore raw

PATCH v3 8/20 package/eudev: is a provider for libudev

In reply to Yann E. MORIN
---
 package/eudev/Config.in | 4 ++++
 package/eudev/eudev.mk  | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
package/eudev/Config.in +4 -0
index b204a90..db72e95 100644
@@ -12,6 +12,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_LIBUDEV
 	select BR2_PACKAGE_HAS_UDEV
 	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
@@ -19,6 +20,9 @@ config BR2_PACKAGE_EUDEV
 
 if BR2_PACKAGE_EUDEV
 
+config BR2_PACKAGE_PROVIDES_LIBUDEV
+	default "eudev"
+
 config BR2_PACKAGE_PROVIDES_UDEV
 	default "eudev"
 
package/eudev/eudev.mk +1 -1
index c6d020f..1cb6b26 100644
@@ -25,7 +25,7 @@ EUDEV_CONF_OPT =		\
 	--enable-libkmod
 
 EUDEV_DEPENDENCIES = host-gperf host-pkgconf util-linux kmod
-EUDEV_PROVIDES = udev
+EUDEV_PROVIDES = libudev udev
 
 ifeq ($(BR2_PACKAGE_EUDEV_RULES_GEN),y)
 EUDEV_CONF_OPT += --enable-rule_generator
Signature · 1 line
1.9.1
#9 lore raw

PATCH v3 9/20 package/systemd: is a provider for libudev

In reply to Yann E. MORIN
---
 package/systemd/Config.in  | 4 ++++
 package/systemd/systemd.mk | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
package/systemd/Config.in +4 -0
index 7ff36cc..97de4dc 100644
@@ -26,6 +26,7 @@ config BR2_PACKAGE_SYSTEMD
 	depends on !BR2_PREFER_STATIC_LIB # kmod
 	depends on BR2_TOOLCHAIN_HAS_THREADS # dbus
 	depends on BR2_USE_MMU # dbus
+	select BR2_PACKAGE_HAS_LIBUDEV
 	select BR2_PACKAGE_HAS_UDEV
 	select BR2_PACKAGE_DBUS # runtime dependency only
 	select BR2_PACKAGE_LIBCAP
@@ -39,6 +40,9 @@ if BR2_PACKAGE_SYSTEMD
 
 menu "systemd"
 
+config BR2_PACKAGE_PROVIDES_LIBUDEV
+	default "systemd"
+
 config BR2_PACKAGE_PROVIDES_UDEV
 	default "systemd"
 
package/systemd/systemd.mk +1 -1
index e781b30..9d4c3de 100644
@@ -17,7 +17,7 @@ SYSTEMD_DEPENDENCIES = \
 	kmod \
 	host-gperf
 
-SYSTEMD_PROVIDES = udev
+SYSTEMD_PROVIDES = libudev udev
 SYSTEMD_AUTORECONF = YES
 
 # Make sure that systemd will always be built after busybox so that we have
Signature · 1 line
1.9.1
#10 lore raw

PATCH v3 10/20 package/eudev: split udev/libudev

In reply to Yann E. MORIN

Quite a few packages are happy with just libudev, and not a full udev daemon running.

Split the eudev package so that we can install just libudev if /dev management is not handled by eudev.

When only the library is intalled, behave as a provider for the libudev virtual package. If /dev management is handled by eudev, then also be a provider for the udev virtual package.

Of course, libudev conflicts with systemd, but we tell the user that it is "provided" by systemd when it is selected.

Adjust comments of dependencies accordingly.

Note:
Most of the .mk splitting of the dependencies and the build/install rules are from Bernd. Thanks! :-)

---
Note: although the prompt is changed to 'libusb', we still call the package 'eudev', to avoid a mess of renaming the variables. If needed, that can be done in a separate patch.

Changes RFCv2-> v3:
- typo s/system/systemd/

Changes RFCv1 -> RFCv2:
- be a provider for libudev always, since udev is not such a provider any more (Thomas)

---
 package/Config.in       |  2 +-
 package/eudev/Config.in | 40 ++++++++++++++++++++++++++++++++++++--
 package/eudev/eudev.mk  | 51 ++++++++++++++++++++++++++++++++++++++++++++-----
 system/Config.in        |  7 ++++---
 4 files changed, 89 insertions(+), 11 deletions(-)
package/Config.in +1 -1
index 1996653..d014a1c 100644
@@ -296,7 +296,6 @@ endif
 	source "package/dvbsnoop/Config.in"
 	source "package/dtv-scan-tables/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"
@@ -663,6 +662,7 @@ menu "Hardware handling"
 	source "package/librtlsdr/Config.in"
 	source "package/libserial/Config.in"
 	source "package/libsoc/Config.in"
+	source "package/eudev/Config.in" # prompt is 'libudev'
 	source "package/libudev/Config.in"
 	source "package/libusb/Config.in"
 	source "package/libusb-compat/Config.in"
package/eudev/Config.in +38 -2
index db72e95..fca3b30 100644
@@ -4,8 +4,29 @@
 # However, it seems more logical to have the dependencies listed here,
 # so it is easier to uderstand why we have those, and duplicate them in
 # the choice entry.
+#
+# Note, although named 'eudev', this package primarily provides libudev,
+# unless the /dev management is selected to be eudev, in which case this
+# package will provide a full udev. That's why the prompt is 'libudev'.
 
 config BR2_PACKAGE_EUDEV
+	bool "libudev"
+	depends on !BR2_avr32 # no __NR_name_to_handle_at
+	depends on BR2_USE_WCHAR
+	depends on !BR2_PREFER_STATIC_LIB
+	depends on !BR2_PACKAGE_SYSTEMD
+	select BR2_PACKAGE_HAS_LIBUDEV if !BR2_PACKAGE_EUDEV_DAEMON
+	help
+	  eudev is a fork of systemd-udev with the goal of obtaining better
+	  compatibility with existing software.
+
+	  This installs only the libudev library.
+
+	  http://www.gentoo.org/proj/en/eudev/
+
+if BR2_PACKAGE_EUDEV
+
+config BR2_PACKAGE_EUDEV_DAEMON
 	bool
 	depends on !BR2_avr32 # no epoll_create1
 	depends on BR2_USE_MMU # uses fork()
@@ -18,7 +39,7 @@ config BR2_PACKAGE_EUDEV
 	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
 	select BR2_PACKAGE_KMOD
 
-if BR2_PACKAGE_EUDEV
+if BR2_PACKAGE_EUDEV_DAEMON
 
 config BR2_PACKAGE_PROVIDES_LIBUDEV
 	default "eudev"
@@ -31,4 +52,19 @@ config BR2_PACKAGE_EUDEV_RULES_GEN
 	help
 	  Enable persistent rules generator
 
-endif
+endif # BR2_PACKAGE_EUDEV_DAEMON
+
+# If the daemon is selected, it means we have a full udev, which is
+# responsible for providing libudev. So only provide libudev if the
+# daemon is not selected.
+config BR2_PACKAGE_PROVIDES_LIBUDEV
+	default "eudev" if !BR2_PACKAGE_EUDEV_DAEMON
+
+endif # BR2_PACKAGE_EUDEV
+
+comment "libudev needs a toolchain w/ wchar, dynamic library"
+	depends on !BR2_USE_WCHAR || BR2_PREFER_STATIC_LIB
+	depends on !BR2_PACKAGE_SYSTEMD
+
+comment "libudev provided by systemd"
+	depends on BR2_PACKAGE_SYSTEMD
package/eudev/eudev.mk +46 -5

69 lines not on this page · raw message

system/Config.in +4 -3
index e711d38..856b854 100644
@@ -160,12 +160,13 @@ config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV
 
 config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
 	bool "Dynamic using eudev"
-	depends on !BR2_avr32 # eudev (no epoll_create1)
+	depends on !BR2_avr32 # eudev
 	depends on BR2_USE_MMU # eudev (fork)
-	depends on BR2_LARGEFILE # eudev (util-linux)
+	depends on BR2_LARGEFILE # eudev-daemon (util-linux)
 	depends on BR2_USE_WCHAR # eudev (util-linux)
 	depends on !BR2_PREFER_STATIC_LIB # eudev
 	select BR2_PACKAGE_EUDEV
+	select BR2_PACKAGE_EUDEV_DAEMON
 	help
 	  Userspace device daemon. This is a standalone version,
 	  independent of systemd. It is a fork maintained by Gentoo.
@@ -174,7 +175,7 @@ config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
 	  and inotify.
 
 	  You can further configure systemd in:
-	    Target packages --> Hardware handling
+	    Target packages --> Libraries --> Hardware handling --> libudev
 
 	  http://github.com/gentoo/eudev/
 
Signature · 1 line
1.9.1
#11 lore raw

PATCH v3 11/20 package/libatasmart: needs libudev, not a udev daemon

In reply to Yann E. MORIN

Do as the comment says: it's only libudev that is required.

---
 package/libatasmart/Config.in | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
package/libatasmart/Config.in +1 -4
index 9db3b09..e218c6d 100644
@@ -1,11 +1,8 @@
 config BR2_PACKAGE_LIBATASMART
 	bool "libatasmart"
-	depends on BR2_PACKAGE_HAS_UDEV # libudev is configure dependency
+	depends on BR2_PACKAGE_HAS_LIBUDEV
 	help
 	  The libatasmart package is a disk reporting library.
 	  It only supports a subset of the ATA S.M.A.R.T. functionality.
 
 	  http://0pointer.de/blog/projects/being-smart.html
-
-comment "libatasmart requires udev to be enabled"
-	depends on !BR2_PACKAGE_HAS_UDEV
Signature · 1 line
1.9.1
#12 lore raw

PATCH v3 12/20 package/libcec: needs libudev, not a udev daemon

In reply to Yann E. MORIN

libcec is happy enough with just a libudev, which it uses to enumerate CEC devices, and does not require a udev daemon.

Propagate the new dependency to XBMC.

---
 package/libcec/libcec.mk | 4 ++--
 package/xbmc/Config.in   | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)
package/libcec/libcec.mk +2 -2
index ad919fc..49e4dbd 100644
@@ -18,8 +18,8 @@ ifeq ($(BR2_PACKAGE_LOCKDEV),y)
 LIBCEC_DEPENDENCIES += lockdev
 endif
 
-ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
-LIBCEC_DEPENDENCIES += udev
+ifeq ($(BR2_PACKAGE_HAS_LIBUDEV),y)
+LIBCEC_DEPENDENCIES += libudev
 endif
 
 ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
package/xbmc/Config.in +3 -3
index 592fdc1..db888ac 100644
@@ -99,14 +99,14 @@ comment "libbluray support needs a toolchain w/ dynamic library"
 config BR2_PACKAGE_XBMC_LIBCEC
 	bool "hdmi cec"
 	depends on !BR2_PREFER_STATIC_LIB # libcec
-	depends on BR2_PACKAGE_HAS_UDEV
+	depends on BR2_PACKAGE_HAS_LIBUDEV # libcec
 	select BR2_PACKAGE_LIBCEC
 	help
 	  Enable CEC (Consumer Electronics Control) support.
 	  Select this if you want XBMC to support HDMI CEC.
 
-comment "hdmi cec support needs udev /dev management and a toolchain w/ dynamic library"
-	depends on BR2_PREFER_STATIC_LIB || !BR2_PACKAGE_HAS_UDEV
+comment "hdmi cec support needs a toolchain w/ dynamic library"
+	depends on BR2_PREFER_STATIC_LIB
 
 config BR2_PACKAGE_XBMC_LIBMICROHTTPD
 	bool "web server"
Signature · 1 line
1.9.1
#13 lore raw

PATCH v3 13/20 package/libdrm: can also use only libudev

In reply to Yann E. MORIN

Even if a udev daemon is missing, libdrm can still use just libudev to enumerate devices.

In case both udev and libudev are enabled, depending on just udev would be enough to also get libudev (since any udev provider is also a libudev provider). But it is more logical to have separate conditions for udev and libudev.

---
 package/libdrm/libdrm.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/libdrm/libdrm.mk +2 -2
index d912d6d..925f20f 100644
@@ -62,9 +62,9 @@ else
 LIBDRM_CONF_OPT += --disable-freedreno-experimental-api
 endif
 
-ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
+ifeq ($(BR2_PACKAGE_HAS_LIBUDEV),y)
 LIBDRM_CONF_OPT += --enable-udev
-LIBDRM_DEPENDENCIES += udev
+LIBDRM_DEPENDENCIES += libudev
 else
 LIBDRM_CONF_OPT += --disable-udev
 endif
Signature · 1 line
1.9.1
#14 lore raw

PATCH v3 14/20 package/libinput: needs libudev, not a udev daemon

In reply to Yann E. MORIN

libinput is happy enough with just a libudev, and does not require a udev daemon.

---
 package/libinput/Config.in   | 5 +----
 package/libinput/libinput.mk | 2 +-
 2 files changed, 2 insertions(+), 5 deletions(-)
package/libinput/Config.in +1 -4
index 14e4e70..4445ade 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LIBINPUT
 	bool "libinput"
-	depends on BR2_PACKAGE_HAS_UDEV
+	depends on BR2_PACKAGE_HAS_LIBUDEV
 	select BR2_PACKAGE_LIBEVDEV
 	select BR2_PACKAGE_MTDEV
 	help
@@ -12,6 +12,3 @@ config BR2_PACKAGE_LIBINPUT
 	  set of functionality that users expect.
 
 	  http://freedesktop.org/wiki/Software/libinput/
-
-comment "libinput needs udev /dev management"
-	depends on !BR2_PACKAGE_HAS_UDEV
package/libinput/libinput.mk +1 -1
index b52101a..3f225cc 100644
@@ -10,7 +10,7 @@ LIBINPUT_SITE = http://www.freedesktop.org/software/libinput
 LIBINPUT_LICENSE = MIT
 LIBINPUT_LICENSE_FILES = COPYING
 
-LIBINPUT_DEPENDENCIES = host-pkgconf libevdev mtdev udev
+LIBINPUT_DEPENDENCIES = host-pkgconf libevdev mtdev libudev
 LIBINPUT_INSTALL_STAGING = YES
 
 # Tests need fork, so just disable them everywhere.
Signature · 1 line
1.9.1
#15 lore raw

PATCH v3 15/20 package/libusb: needs libudev, not a udev daemon

In reply to Yann E. MORIN

libusb is happy enough with just a libudev, and does not require a udev daemon.

---
 package/libusb/libusb.mk | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
package/libusb/libusb.mk +3 -2
index 7e0f877..8a07cd8 100644
@@ -21,8 +21,9 @@ ifeq ($(BR2_avr32),y)
 LIBUSB_CONF_OPT += --disable-timerfd
 endif
 
-ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
-LIBUSB_DEPENDENCIES += udev
+ifeq ($(BR2_PACKAGE_HAS_LIBUDEV),y)
+LIBUSB_CONF_OPT += --enable-udev
+LIBUSB_DEPENDENCIES += libudev
 else
 LIBUSB_CONF_OPT += --disable-udev
 endif
Signature · 1 line
1.9.1
#16 lore raw

PATCH v3 16/20 package/mesa3d: depends on libudev, not udev

In reply to Yann E. MORIN
---
 package/mesa3d/Config.in | 6 +++---
 package/mesa3d/mesa3d.mk | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
package/mesa3d/Config.in +3 -3
index c1be9e3..0a37cb8 100644
@@ -9,7 +9,7 @@ menuconfig BR2_PACKAGE_MESA3D
 	select BR2_PACKAGE_XLIB_LIBXDAMAGE if BR2_PACKAGE_XORG7
 	select BR2_PACKAGE_XLIB_LIBXFIXES if BR2_PACKAGE_XORG7
 	select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_XORG7
-	depends on BR2_PACKAGE_HAS_UDEV
+	depends on BR2_PACKAGE_HAS_LIBUDEV
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_LARGEFILE
 	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
@@ -125,6 +125,6 @@ config BR2_PACKAGE_PROVIDES_LIBGLES
 
 endif # BR2_PACKAGE_MESA3D
 
-comment "mesa3d needs udev /dev management and a toolchain w/ C++, largefile, NPTL"
+comment "mesa3d needs a toolchain w/ C++, largefile, NPTL"
 	depends on !BR2_LARGEFILE || !BR2_INSTALL_LIBSTDCPP || \
-		!BR2_TOOLCHAIN_HAS_THREADS_NPTL || !BR2_PACKAGE_HAS_UDEV
+		!BR2_TOOLCHAIN_HAS_THREADS_NPTL
package/mesa3d/mesa3d.mk +2 -2
index de6b1de..13d7362 100644
@@ -98,8 +98,8 @@ MESA3D_CONF_OPT += --enable-opengl
 
 ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y)
 MESA3D_PROVIDES += libegl
-# egl depends on gbm, gbm depends on udev
-MESA3D_DEPENDENCIES += udev
+# egl depends on gbm, gbm depends on libudev
+MESA3D_DEPENDENCIES += libudev
 MESA3D_EGL_PLATFORMS = drm
 ifeq ($(BR2_PACKAGE_WAYLAND),y)
 MESA3D_DEPENDENCIES += wayland
Signature · 1 line
1.9.1
#17 lore raw

PATCH v3 17/20 package/vlc: needs libudev, not a udev daemon

In reply to Yann E. MORIN

vlc is happy enough with just a libudev, and does
not require a udev daemon.

---
 package/vlc/vlc.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/vlc/vlc.mk +2 -2
index 6c4677a..11e157e 100644
@@ -284,9 +284,9 @@ else
 VLC_CONF_OPT += --disable-tremor
 endif
 
-ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
+ifeq ($(BR2_PACKAGE_HAS_LIBUDEV),y)
 VLC_CONF_OPT += --enable-udev
-VLC_DEPENDENCIES += udev
+VLC_DEPENDENCIES += libudev
 else
 VLC_CONF_OPT += --disable-udev
 endif
Signature · 1 line
1.9.1
#18 lore raw

PATCH v3 18/20 package/weston: needs libudev, not a udev daemon

In reply to Yann E. MORIN

weston is happy enough with just a libudev, and does not require a udev daemon.

---
 package/weston/Config.in | 6 +++---
 package/weston/weston.mk | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
package/weston/Config.in +3 -3
index aaef405..8e387ca 100644
@@ -1,6 +1,6 @@
-comment "weston needs udev and a toolchain w/ threads, headers >= 3.0"
+comment "weston needs a toolchain w/ threads, headers >= 3.0"
 	depends on !BR2_avr32
-	depends on !BR2_PACKAGE_HAS_UDEV || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
+	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
 
 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_HAS_UDEV
+	depends on BR2_PACKAGE_HAS_LIBUDEV
 	depends on !BR2_avr32 # wayland
 	depends on BR2_TOOLCHAIN_HAS_THREADS # wayland
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
package/weston/weston.mk +1 -1
index ed0707b..c1d023a 100644
@@ -11,7 +11,7 @@ WESTON_LICENSE = MIT
 WESTON_LICENSE_FILES = COPYING
 
 WESTON_DEPENDENCIES = host-pkgconf wayland libxkbcommon pixman libpng \
-	jpeg mtdev udev cairo
+	jpeg mtdev libudev cairo
 
 WESTON_CONF_OPT = \
 	--with-dtddir=$(STAGING_DIR)/usr/share/wayland \
Signature · 1 line
1.9.1
#19 lore raw

PATCH v3 19/20 package/xdriver_xf86-input-evdev: needs libudev, not a udev daemon

In reply to Yann E. MORIN

Do as the comment says: it's only libudev that is required.

---
 package/x11r7/xdriver_xf86-input-evdev/Config.in                   | 5 +----
 package/x11r7/xdriver_xf86-input-evdev/xdriver_xf86-input-evdev.mk | 3 ++-
 2 files changed, 3 insertions(+), 5 deletions(-)
package/x11r7/xdriver_xf86-input-evdev/Config.in +1 -4
index 6ec14bf..92f0324 100644
@@ -1,11 +1,8 @@
 config BR2_PACKAGE_XDRIVER_XF86_INPUT_EVDEV
 	bool "xf86-input-evdev"
-	depends on BR2_PACKAGE_HAS_UDEV # libudev is configure dependency
+	depends on BR2_PACKAGE_HAS_LIBUDEV
 	select BR2_PACKAGE_XPROTO_INPUTPROTO
 	select BR2_PACKAGE_XPROTO_RANDRPROTO
 	select BR2_PACKAGE_XPROTO_XPROTO
 	help
 	  Generic Linux input driver
-
-comment "xf86-input-evdev requires udev to be enabled"
-	depends on !BR2_PACKAGE_HAS_UDEV
package/x11r7/xdriver_xf86-input-evdev/xdriver_xf86-input-evdev.mk +2 -1
index 46e62c7..f2d5aad 100644
@@ -9,6 +9,7 @@ XDRIVER_XF86_INPUT_EVDEV_SOURCE = xf86-input-evdev-$(XDRIVER_XF86_INPUT_EVDEV_VE
 XDRIVER_XF86_INPUT_EVDEV_SITE = http://xorg.freedesktop.org/releases/individual/driver
 XDRIVER_XF86_INPUT_EVDEV_LICENSE = MIT
 XDRIVER_XF86_INPUT_EVDEV_LICENSE_FILES = COPYING
-XDRIVER_XF86_INPUT_EVDEV_DEPENDENCIES = xproto_inputproto xserver_xorg-server xproto_randrproto xproto_xproto udev
+XDRIVER_XF86_INPUT_EVDEV_DEPENDENCIES = xproto_inputproto xserver_xorg-server \
+					xproto_randrproto xproto_xproto libudev
 
 $(eval $(autotools-package))
Signature · 1 line
1.9.1
#20 lore raw

PATCH v3 20/20 package/xserver_xorg-server: needs libudev, not a udev daemon

In reply to Yann E. MORIN

xserver_xorg-server is happy enough with just a libudev, and does not require a udev daemon.

---
 package/x11r7/xserver_xorg-server/xserver_xorg-server.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/x11r7/xserver_xorg-server/xserver_xorg-server.mk +2 -2
index 779c46d..a83feec 100644
@@ -123,8 +123,8 @@ XSERVER_XORG_SERVER_DEPENDENCIES += tslib
 XSERVER_XORG_SERVER_CONF_OPT += --enable-tslib LDFLAGS="-lts"
 endif
 
-ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
-XSERVER_XORG_SERVER_DEPENDENCIES += udev
+ifeq ($(BR2_PACKAGE_HAS_LIBUDEV),y)
+XSERVER_XORG_SERVER_DEPENDENCIES += libudev
 XSERVER_XORG_SERVER_CONF_OPT += --enable-config-udev
 # udev kms support depends on libdrm
 ifeq ($(BR2_PACKAGE_LIBDRM),y)
Signature · 1 line
1.9.1
#21 lore raw

PATCH v3 20/20 package/xserver_xorg-server: needs libudev, not a udev daemon

"Yann E. MORIN" <[email protected]> wrote in news:7964be0c75358121baa69301d23eb93d72a64db9.1405777634.git.yann.morin.199 8 at free.fr:

Quoted 2 lines

xserver_xorg-server is happy enough with just a libudev, and does not require a udev daemon.

Hi,

although it is true that xserver_xorg-server compiles with libudev alone it segfaults at runtime when checking for video hardware without udev daemon:

========================================================================
(gdb) run
Starting program: /usr/bin/Xorg :0.0 vt01 -s 0 -noreset -allowMouseOpenFail -logfile /data/log/xorg.log
[...]
X.Org X Server 1.16.0
[...]
Program received signal SIGSEGV, Segmentation fault.
0x080e058a in xf86OutputClassDriverList (nmatches=20, matches=0xbffff710, index=0) at xf86platformBus.c:260
260 xf86platformBus.c: No such file or directory.
(gdb) bt full
#0 0x080e058a in xf86OutputClassDriverList (nmatches=20, matches= 0xbffff710, index=0) at xf86platformBus.c:260
cl = <optimized out>
i = 0
#1 xf86PlatformMatchDriver (matches=matches at entry=0xbffff710, nmatches=nmatches at entry=20) at xf86platformBus.c:297
i = 0
j = 0
info = <optimized out>
pass = 0
#2 0x080e3975 in listPossibleVideoDrivers (matches=matches at entry= 0xbffff710, nmatches=20) at xf86AutoConfig.c:203

        i = 0

#3 0x080e3b22 in xf86AutoConfig () at xf86AutoConfig.c:152
deviceList = {0x0 <repeats 20 times>}
p = <optimized out>
cp = <optimized out>
buf = "\b\000\000\000\b\000\000\000\b\000\000\000\b\000\000\000\200
\370\377\277", '\000' <repeats 60 times>, "\206\200\022\004\a\004\220\000 \006\000\000\003\000\000\000\000\004\000\000\360\000\000\000\000\f\000\000 \340\000\000\000\000\001\360\000\000\000\000\000\000\000\000\000\000I\030 \022\004\000\000\000\000\220\000\000\000\000\000\000\000\v\001\000\000\t \000\f\001m\200\204b\320\000DV\000\000\000\000A\002\000\000\071\000\000\000 \000\000\000\000\001\000\240\317\000\000\002", '\000' <repeats 45 times>...
ret = <optimized out>
#4 0x080c075a in InitOutput (pScreenInfo=pScreenInfo at entry=0x822b260 <screenInfo>, argc=argc at entry=9, argv=argv at entry=0xbffffd44)
at xf86Init.c:476
i = <optimized out>
j = <optimized out>
k = <optimized out>
scr_index = <optimized out>
modulelist = <optimized out>
optionlist = 0x822b260 <screenInfo>
screenpix24 = <optimized out>
pix24 = <optimized out>
pix24From = X_DEFAULT
pix24Fail = 0
autoconfig = 1
sigio_blocked = 0
want_hw_access = 0
configured_device = <optimized out>
#5 0x0807e7e4 in dix_main (argc=argc at entry=9, argv=argv at entry=0xbffffd44, envp=envp at entry=0xbffffd6c) at main.c:202
i = <optimized out>
alwaysCheckForInput = {0, 1}
#6 0x080686fe in main (argc=9, argv=0xbffffd44, envp=0xbffffd6c) at stubmain.c:34
No locals.
(gdb)
========================================================================
strace shows:

open("/etc/udev/udev.conf", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
access("/run/udev/control", F_OK) = -1 ENOENT (No such file or
directory)

Luckily enough xserver_xorg-server does not depend on udev/hal, configure just prints:

configure: WARNING:
***********************************************
Neither HAL nor udev backend will be enabled. Input device hotplugging will not be available!
***********************************************

which is fine for me, everything works good without udev/hal ;)

Regards, Bernd

#22 lore raw

PATCH v3 20/20 package/xserver_xorg-server: needs libudev, not a udev daemon

Bernd Kuhls <[email protected]> wrote in news:XnsA3777C2F4BB23berndkuhlsPkbjNfxxIA at bernd-kuhls.de:

Quoted 10 lines

Luckily enough xserver_xorg-server does not depend on udev/hal, configure just prints:

configure: WARNING:
***********************************************
Neither HAL nor udev backend will be enabled. Input device hotplugging will not be available!
***********************************************

which is fine for me, everything works good without udev/hal ;)

Hi,

a small, but important addition: To avoid xserver_xorg-server picking up libudev when the udev daemon is disabled this patch is needed for xserver_xorg-server.mk:

@@ -134,6 +134,7 @@
XSERVER_XORG_SERVER_CONF_OPT += --disable-config-udev-kms endif
else
+XSERVER_XORG_SERVER_CONF_OPT += --disable-config-udev
ifeq ($(BR2_PACKAGE_DBUS),y) XSERVER_XORG_SERVER_DEPENDENCIES += dbus XSERVER_XORG_SERVER_CONF_OPT += --enable-config-dbus

Regards, Bernd

#23 lore raw

PATCH v3 20/20 package/xserver_xorg-server: needs libudev, not a udev daemon

Bernd, All,

On 2014-07-27 13:38 +0200, Bernd Kuhls spake thusly:

Quoted 21 lines

Bernd Kuhls <[email protected]> wrote in news:XnsA3777C2F4BB23berndkuhlsPkbjNfxxIA at bernd-kuhls.de:

Quoted 10 lines

Luckily enough xserver_xorg-server does not depend on udev/hal, configure just prints:

configure: WARNING:
***********************************************
Neither HAL nor udev backend will be enabled. Input device hotplugging will not be available!
***********************************************

which is fine for me, everything works good without udev/hal ;)

Hi,

a small, but important addition: To avoid xserver_xorg-server picking up libudev when the udev daemon is disabled this patch is needed for xserver_xorg-server.mk:

Review line 140

Quoted 7 lines
(quoted diff) +1 -0
@@ -134,6 +134,7 @@
 XSERVER_XORG_SERVER_CONF_OPT += --disable-config-udev-kms
 endif
 else
+XSERVER_XORG_SERVER_CONF_OPT += --disable-config-udev
 ifeq ($(BR2_PACKAGE_DBUS),y)
 XSERVER_XORG_SERVER_DEPENDENCIES += dbus
 XSERVER_XORG_SERVER_CONF_OPT += --enable-config-dbus

So, we can make this package work in the three cases:
- _HAS_UDEV (implies _HAS_LIBUDEV)
- _HAS_LIBUDEV && !_HAS_UDEV
- !_HAS_LIBUDEV

Correct?

Regards,
Yann E. MORIN.

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

PATCH v3 20/20 package/xserver_xorg-server: needs libudev, not a udev daemon

In reply to Bernd Kuhls

Dear Bernd Kuhls,

Quoted 10 lines · Bernd Kuhls

"Yann E. MORIN" <[email protected]> wrote in news:7964be0c75358121baa69301d23eb93d72a64db9.1405777634.git.yann.morin.199 8 at free.fr:

Quoted 2 lines

xserver_xorg-server is happy enough with just a libudev, and does not require a udev daemon.

although it is true that xserver_xorg-server compiles with libudev alone it segfaults at runtime when checking for video hardware without udev daemon:

That's the kind of thing that worries me about the idea of allowing only libudev to be installed without the udev daemon running. I believe libudev and the udev daemon are meant to be used together, and we're likely to fall into various issues by allowing libudev to be installed separately from the udev daemon.

Best regards,

Thomas

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

PATCH v3 20/20 package/xserver_xorg-server: needs libudev, not a udev daemon

Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8 @public.gmane.org> wrote in news:20140727143111.7f5091a0 at free-electrons.com:

Quoted 5 lines

That's the kind of thing that worries me about the idea of allowing only libudev to be installed without the udev daemon running. I believe libudev and the udev daemon are meant to be used together, and we're likely to fall into various issues by allowing libudev to be installed separately from the udev daemon.

Hi Thomas,

and thats exactly the reason why I suggest to switch only those packages over to libudev which are proven to work without the udev daemon. This is true for mesa3d/libcec/xbmc/libdrm/xdriver_xf86-video-intel, the packages I am using on my non-udev-daemon system.

Regards, Bernd

#26 lore raw

PATCH v3 20/20 package/xserver_xorg-server: needs libudev, not a udev daemon

Bernd, All,

On 2014-07-27 14:38 +0200, Bernd Kuhls spake thusly:

Quoted 9 lines

Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8 @public.gmane.org> wrote in news:20140727143111.7f5091a0 at free-electrons.com:

Quoted 5 lines

That's the kind of thing that worries me about the idea of allowing only libudev to be installed without the udev daemon running. I believe libudev and the udev daemon are meant to be used together, and we're likely to fall into various issues by allowing libudev to be installed separately from the udev daemon.

Quoted 4 lines

and thats exactly the reason why I suggest to switch only those packages over to libudev which are proven to work without the udev daemon. This is true for mesa3d/libcec/xbmc/libdrm/xdriver_xf86-video-intel, the packages I am using on my non-udev-daemon system.

I can see the reasonning. But if we do not convert those packages, they will never be. If we do convert them. we can be sure to get complains by angry users! Adn we can then revert broken packages.

What I would suggest is the following plan:

- for the next release (-rc1 due shortly), only convert packages known to work with only libudev, that is the list provided by Bernd:
mesa3d libcec xbmc libdrm xdriver_xf86-video-intel
so we have a sane situation for the release, and not too much burden during the stabilisation phase.

- when -rc1 is out, or early after -next is merged back in master, convert the remaining packages in -next, after _testing_ the packages are still working. Unfortunately, I won't be able to test all such packages (e.g. xserver_xorg-server) as I do not use Xorg; but Bernd uses it, so he may be able to give a hand at it, correct?

How do you feel with this plan?

Regards,
Yann E. MORIN.

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

PATCH v3 20/20 package/xserver_xorg-server: needs libudev, not a udev daemon

In reply to Thomas Petazzoni

Thomas, All,

On 2014-07-27 14:31 +0200, Thomas Petazzoni spake thusly:

Quoted 9 lines · Bernd Kuhls
Quoted 7 lines

"Yann E. MORIN" <[email protected]> wrote in news:7964be0c75358121baa69301d23eb93d72a64db9.1405777634.git.yann.morin.199 8 at free.fr:

Quoted 2 lines

xserver_xorg-server is happy enough with just a libudev, and does not require a udev daemon.

Quoted 8 lines
Quoted 2 lines

although it is true that xserver_xorg-server compiles with libudev alone it segfaults at runtime when checking for video hardware without udev daemon:

That's the kind of thing that worries me about the idea of allowing only libudev to be installed without the udev daemon running. I believe libudev and the udev daemon are meant to be used together, and we're likely to fall into various issues by allowing libudev to be installed separately from the udev daemon.

Well, I was a bit overzealous when converting the xserver_xorg-server package, on purpose. I wanted to stirr some questionning about it.

Ditto for other packages in the series.

The reasonning was: if we do not switch them over to using libudev and we would never switch those packages. On the other hand, if we switch all packages to use libudev (except those we know require udev), then users will report breakage, and we can revert back.

So, I should not switch this package to use libudev, now we have a report it is broken. I'll remove it from the series.

But, as Bernd stated, there *are* packages that work very well with kust libudev and no udev daemon. And in some cases, an udev daemon may not be wanted (for different reasons.) So we must be able to just provide libudev if at all possible.

Regards,
Yann E. MORIN.

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

v3 cover Introduce libudev (branch yem/libudev)

In reply to Yann E. MORIN

Dear Yann E. MORIN,

Quoted 3 lines · Yann E. MORIN

package/xbmc: remove spurious build-dependency on udev support/gen-manual-lists.py: remove unneeded arg in private function support/gen-manual-lists.py: bail out early for legacy symbols

I've applied those first three patches. For the rest, I need to have a deeper look.

Thanks,

Thomas

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