package/eudev: fix install with BR2_ROOTFS_MERGED_BIN=y

Eudev install creates a symlink from $(sbindir)/udevadm to
$(bindir)/udevadm if sbindir and bindir are different [1].
Unfortunately the check considers only the configured values as
strings and does not resolve symlinks. This means that in a merged-bin
setup with sbindir=/sbin (symlink to /usr/sbin, which is a symlink to
/usr/bin) and bindir=/usr/bin the /usr/bin/udevadm binary gets
overwritten with a link to itself.

Set sbindir according to the merge setup to avoid the problem, bindir
defaults to /usr/bin in any case.

[1] 9e7c4e744b/src/udev/Makefile.am (L139-L140)

Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>
This commit is contained in:
Fiona Klute
2026-05-01 02:23:20 +02:00
committed by Marcus Hoffmann
parent 6558eb3d65
commit a063c89dc2

View File

@@ -12,7 +12,6 @@ EUDEV_INSTALL_STAGING = YES
EUDEV_CONF_OPTS = \
--disable-manpages \
--sbindir=/sbin \
--libexecdir=/lib \
--enable-kmod \
--enable-blkid
@@ -21,8 +20,14 @@ EUDEV_CONF_OPTS = \
EUDEV_DEPENDENCIES = host-gperf host-pkgconf util-linux-libs
EUDEV_PROVIDES = udev
ifeq ($(BR2_ROOTFS_MERGED_USR),)
EUDEV_CONF_OPTS += --with-rootlibdir=/lib --enable-split-usr
ifeq ($(BR2_ROOTFS_MERGED_USR),y)
ifeq ($(BR2_ROOTFS_MERGED_BIN),y)
EUDEV_CONF_OPTS += --sbindir=/usr/bin
else
EUDEV_CONF_OPTS += --sbindir=/usr/sbin
endif
else
EUDEV_CONF_OPTS += --sbindir=/sbin --with-rootlibdir=/lib --enable-split-usr
endif
ifeq ($(BR2_PACKAGE_EUDEV_MODULE_LOADING),y)