]> git.ipfire.org Git - thirdparty/openwrt.git/commit
tools/coreutils: replace symlinks to build prerequisites
authorMichael Pratt <mcpratt@pm.me>
Mon, 30 Sep 2024 07:55:14 +0000 (03:55 -0400)
committerRobert Marko <robimarko@gmail.com>
Sat, 26 Jul 2025 12:38:08 +0000 (14:38 +0200)
commitb8c0ed469238291298732512045ed8659ac22ea8
tree13704be4b5cd24598c64a6d73a225974a1b2c49e
parent5c832d783381831289c4f65d2a821a0eecfc435f
tools/coreutils: replace symlinks to build prerequisites

Before building, symlinks are made from existing utilities
on the host machine, because they are necessary before
coreutils can be built.

Instead of leaving these utilities as symlinks,
replace them with the copy provided by the coreutils build
in order to increase version control for these utilities
and to have a real copy for targets like the SDK.

The utilities required before building and provided by coreutils are
cp, install, realpath, seq, and stat.

Let all of the utilities be installed with the "g" prefix,
then, existing symlinks named without the "g" prefix are safely replaced
with a new symlink using the coreutils version of `ln` just built
in order to prevent an inconsistent state of the file
since these utilities must always be available.

While at it, sort the list alphabetically.

Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/16522
Signed-off-by: Robert Marko <robimarko@gmail.com>
tools/coreutils/Makefile