2014-02-07 14:21:32 +01:00
|
|
|
config BR2_PACKAGE_EUDEV
|
|
|
|
bool "eudev"
|
|
|
|
depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
|
|
|
|
depends on BR2_USE_MMU # uses fork()
|
2016-12-26 16:22:35 +01:00
|
|
|
depends on BR2_USE_WCHAR # needs C99 compiler
|
2014-12-03 22:41:29 +01:00
|
|
|
depends on !BR2_STATIC_LIBS # kmod
|
2014-02-07 14:21:33 +01:00
|
|
|
select BR2_PACKAGE_HAS_UDEV
|
2020-02-27 15:51:23 +01:00
|
|
|
select BR2_PACKAGE_UDEV_GENTOO_SCRIPTS if BR2_INIT_OPENRC
|
2014-02-07 14:21:32 +01:00
|
|
|
select BR2_PACKAGE_UTIL_LINUX
|
package/util-linux: build programs and libraries in separate packages
The different tools and libraries in util-linux have a lot of optional
dependencies. When we want to support those optional dependencies, we
can easily generate dependency cycles. For instance, findmount and lsblk
need udev to work correctly, but eudev and systemd both depend libblkid,
which comes from util-linux.
Normal distros (e.g. Debian) solve this by first building a minimal
package that has no dependencies at all, then build the packages that
depend on util-linux, and finally rebuild util-linux with all bells and
whistles. Solve it in Buildroot by means of the following changes:
- Split util-linux into two packages:
- util-linux-libs, providing lib{blkid,fdisk,mount,smartcols,uuid}.
- util-linux, providing both the aforementioned libs and the programs.
- Add a blind selection for util-linux-libs, i.e. it is indirectly
selected according to the util-linux options.
- Make host and target util-linux have a build dependencies on the -libs
packages.
- Make eudev and systemd have build dependencies on util-linux-libs.
This can be extended to other packages in the future but is not needed
right now because the configuration options are backward-compatible.
- Make util-linux have an optional build dependency on the package that
provides libudev (either eudev or systemd), if it is selected.
Installing util-linux overrides files installed by util-linux-libs but
this is not a problem: it's allowed for a package to overwrite files
from another package, as long as there is a dependency between the two.
util-linux-libs has a Config.in symbol for the package as a whole, but
not for the individual libraries: it simply reuses the symbols of the
full package.
The build dependency of util-linux on util-linux-libs ensures that
util-linux overwrites the files installed by util-linux-libs and not
vice versa. In practice this dependency shouldn't be needed: the only
reason for util-linux-libs to be built is to break a circular
dependency. In that case, there is already a transitive dependency of
util-linux on util-linux-libs, so adding it explicitly is redundant.
Still, better safe than sorry.
host-util-linux-libs is not needed at the moment. It can be added if we
have a dependency cycle problem later.
With this approach we don't need to patch configuration files neither
change packages other than eudev and systemd.
Other packages that require util-linux libraries and whose libraries may
be used by util-linux programs can be updated later. We also don't need
to change any existing defconfig, since all configuration options are
kept in the util-linux package.
Fixes: https://bugs.busybox.net/show_bug.cgi?id=11811
Signed-off-by: Carlos Santos <unixmania@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-09-29 16:01:35 +02:00
|
|
|
select BR2_PACKAGE_UTIL_LINUX_LIBS
|
2014-02-07 14:21:32 +01:00
|
|
|
select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
|
|
|
|
select BR2_PACKAGE_KMOD
|
|
|
|
help
|
2017-07-31 15:53:41 +02:00
|
|
|
eudev is a fork of systemd-udev with the goal of obtaining
|
|
|
|
better compatibility with existing software such as OpenRC and
|
|
|
|
Upstart, older kernels, various toolchains and anything else
|
|
|
|
required by users and various distributions.
|
2014-02-07 14:21:32 +01:00
|
|
|
|
2016-05-26 15:24:33 +02:00
|
|
|
https://wiki.gentoo.org/wiki/Project:Eudev
|
2014-02-07 14:21:32 +01:00
|
|
|
|
|
|
|
if BR2_PACKAGE_EUDEV
|
|
|
|
|
2014-02-24 10:25:41 +01:00
|
|
|
config BR2_PACKAGE_PROVIDES_UDEV
|
|
|
|
default "eudev"
|
|
|
|
|
2014-02-07 14:21:32 +01:00
|
|
|
config BR2_PACKAGE_EUDEV_RULES_GEN
|
|
|
|
bool "enable rules generator"
|
|
|
|
help
|
|
|
|
Enable persistent rules generator
|
|
|
|
|
2015-06-15 21:53:34 +02:00
|
|
|
config BR2_PACKAGE_EUDEV_ENABLE_HWDB
|
|
|
|
bool "enable hwdb installation"
|
|
|
|
default y
|
2019-10-29 23:07:54 +01:00
|
|
|
select BR2_PACKAGE_HOST_EUDEV # for udevadm, during target-finalize
|
2015-06-15 21:53:34 +02:00
|
|
|
help
|
2019-10-29 23:07:54 +01:00
|
|
|
Enables hardware database installation to /etc/udev/hwdb.bin
|
2015-06-15 21:53:34 +02:00
|
|
|
|
2014-02-07 14:21:32 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
comment "eudev needs eudev /dev management"
|
|
|
|
depends on BR2_USE_MMU
|
|
|
|
depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
|
|
|
|
|
2015-03-30 23:07:30 +02:00
|
|
|
comment "eudev needs a toolchain w/ wchar, dynamic library"
|
2014-02-07 14:21:32 +01:00
|
|
|
depends on BR2_USE_MMU
|
2015-03-30 23:07:30 +02:00
|
|
|
depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS
|