From 699d4cfd7f09f18efafd1c9343392c59ae526c16 Mon Sep 17 00:00:00 2001 From: Fiona Klute Date: Fri, 1 May 2026 02:23:20 +0200 Subject: [PATCH] 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] https://github.com/eudev-project/eudev/blob/9e7c4e744b9e7813af9acee64b5e8549ea1fbaa3/src/udev/Makefile.am#L139-L140 Signed-off-by: Fiona Klute Signed-off-by: Marcus Hoffmann (cherry picked from commit a063c89dc2d3af3f98d9679571a4972210e3390c) Signed-off-by: Thomas Perale --- package/eudev/eudev.mk | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/package/eudev/eudev.mk b/package/eudev/eudev.mk index 1a56cfd2f0..3c22b13d86 100644 --- a/package/eudev/eudev.mk +++ b/package/eudev/eudev.mk @@ -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)