[Buildroot] [PATCH 3/3] package/eudev: fix install with BR2_ROOTFS_MERGED_BIN=y

Thomas Perale thomas.perale at mind.be
Fri May 15 17:45:57 UTC 2026


In reply of:
> 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 <fiona.klute at gmx.de>

Applied to 2026.02.x. Thanks

> ---
>  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)
> -- 
> 2.53.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot


More information about the buildroot mailing list