[Buildroot] [PATCH 35/40] package/uboot-tools: preserve /usr/sbin symlink

Arnout Vandecappelle arnout at rnout.be
Mon May 18 20:29:45 UTC 2026



On 08/05/2026 20:09, James Hilliard wrote:
> On Fri, May 8, 2026 at 3:57 AM Ferdinand Bachmann
> <ferdinand.bachmann at go-e.com> wrote:
>>
>> Hi James!
>>
>> -D normally doesn't replace symlinks with directories, but Ubuntu 26.04 ships with Rust uutils instead of GNU coreutils, which has a bug in `install` that causes this:

  Ah, I should have read the rest of the thread before replying to patch 1/40 :-)

> Oh, that makes more sense, I had assumed it was due to merged bin
> since the rsync error was basically the same as this:
> https://github.com/buildroot/buildroot/commit/28694dcec72b11faca6e9d9371fb0f65c590de8b
> 
> I tested with the documented workaround on github and it seems to have
> fixed the issue:
> update-alternatives --install /usr/bin/install install /usr/bin/gnuinstall 100
> 
>>
>> https://github.com/uutils/coreutils/issues/12166
>>
>> This also affects lots of other packages (e.g. lvm2) and patching every single one of them to not use `install -D` is probably out of the question.

  Actually, if it's really a uutils issue, please report it to Ubuntu. They are 
very good at fixing this stuff quickly. I expect the issue to disappear shortly.

> 
> Hmm, yeah, that's not ideal, not sure if we should still change the 40
> I patched or not.

  No, we shouldn't. I marked the entire series as Rejected.

  Please don't throw away your branch yet though. If Ubuntu claims that it's not 
actuallly a bug, we're going to need it after all.

  Regards,
  Arnout


> 
>> Also, can you look at my patch for issue 173 (https://gitlab.com/buildroot.org/buildroot/-/work_items/173)? uboot-tools currently silently builds without FIT_SIGNATURE support even if enabled. This should be fixed.
>>
>> Best regards,
>> Ferdinand Bachmann
>>
>> On Thu, 7 May 2026 at 00:34, James Hilliard <james.hilliard1 at gmail.com> wrote:
>>>
>>> With BR2_ROOTFS_MERGED_BIN=y, /usr/sbin is a symlink to bin.
>>> Using install -D for files below $(TARGET_DIR)/usr/sbin can create
>>> the parent directory path and replace that symlink with a real
>>> directory.
>>>
>>> With per-package directories, this can later make rsync fail when a
>>> package target directory contains a non-empty usr/sbin directory and
>>> the skeleton provides usr/sbin -> bin.
>>>
>>> The skeleton dependency has already created /usr/sbin, either as a
>>> directory or as the merged-bin symlink, so use plain install and let it
>>> follow the existing path.
>>>
>>> Signed-off-by: James Hilliard <james.hilliard1 at gmail.com>
>>> ---
>>>   package/uboot-tools/uboot-tools.mk | 4 ++--
>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/package/uboot-tools/uboot-tools.mk b/package/uboot-tools/uboot-tools.mk
>>> index fa0b6aba78..89d2ec38ea 100644
>>> --- a/package/uboot-tools/uboot-tools.mk
>>> +++ b/package/uboot-tools/uboot-tools.mk
>>> @@ -92,14 +92,14 @@ endif
>>>
>>>   ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FWPRINTENV),y)
>>>   define UBOOT_TOOLS_INSTALL_FWPRINTENV
>>> -       $(INSTALL) -m 0755 -D $(@D)/tools/env/fw_printenv $(TARGET_DIR)/usr/sbin/fw_printenv
>>> +       $(INSTALL) -m 0755 $(@D)/tools/env/fw_printenv $(TARGET_DIR)/usr/sbin/fw_printenv
>>>          ln -sf fw_printenv $(TARGET_DIR)/usr/sbin/fw_setenv
>>>   endef
>>>   endif
>>>
>>>   ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_DUMPIMAGE),y)
>>>   define UBOOT_TOOLS_INSTALL_DUMPIMAGE
>>> -       $(INSTALL) -m 0755 -D $(@D)/tools/dumpimage $(TARGET_DIR)/usr/sbin/dumpimage
>>> +       $(INSTALL) -m 0755 $(@D)/tools/dumpimage $(TARGET_DIR)/usr/sbin/dumpimage
>>>   endef
>>>   endif
>>>
>>> --
>>> 2.53.0
>>>
>>> _______________________________________________
>>> buildroot mailing list
>>> buildroot at buildroot.org
>>> https://lists.buildroot.org/mailman/listinfo/buildroot
> _______________________________________________
> buildroot mailing list
> buildroot at buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot



More information about the buildroot mailing list