Meson build can't detect coreutils on systems with non-monolith coreutils #376

Closed
opened 2024-06-05 09:04:23 +00:00 by k900 · 3 comments
Member

Line 313 in 6e59b4b
coreutils = find_program('coreutils', native : true)

looks for a binary literally named coreutils, which is the multi-call binary, which does not exist for non-monolith builds of coreutils, e.g. Debian. We probably need to detect the actual executables we use.

Originally spotted by @vigress9:matrix.org on Matrix.

https://git.lix.systems/lix-project/lix/src/commit/6e59b4b407c577e838ec39a4912be71f0aca36ca/meson.build#L313 looks for a binary literally named `coreutils`, which is the [multi-call binary](https://www.gnu.org/software/coreutils/manual/html_node/Multi_002dcall-invocation.html), which does not exist for non-monolith builds of coreutils, e.g. Debian. We probably need to detect the actual executables we use. Originally spotted by @vigress9:matrix.org on Matrix.
k900 added the
bug
OS/Linux
Area/build-packaging
labels 2024-06-05 09:04:48 +00:00
Owner

It seems like that's only ultimately used in two places:

sed -e "s|@localstatedir@|$TEST_ROOT/profile-var|g" -e "s|@coreutils@|$coreutils|g" < ../../scripts/nix-profile.sh.in > $TEST_ROOT/nix-profile.sh

and

path = "@coreutils@";

both simply to Have A Path where coreutils are. I'd really love to not need these things to depend on coreutils in the first place, honestly, but short of that, we could probably have Meson just look a specific coreutil and pass that

It seems like that's only ultimately used in two places: https://git.lix.systems/lix-project/lix/src/commit/6e59b4b407c577e838ec39a4912be71f0aca36ca/tests/functional/bash-profile.sh#L3 and https://git.lix.systems/lix-project/lix/src/commit/6e59b4b407c577e838ec39a4912be71f0aca36ca/tests/functional/config.nix.in#L13 both simply to Have A Path where coreutils are. I'd really love to not need these things to depend on coreutils in the first place, honestly, but short of that, we could probably have Meson just look a specific coreutil and pass that
qyriad added the
E/easy
label 2024-06-06 19:21:22 +00:00
Member

This issue was mentioned on Gerrit on the following CLs:

  • commit message in cl/2108 ("chore: remove monolithic coreutils requirement")
<!-- GERRIT_LINKBOT: {"cls": [{"backlink": "https://gerrit.lix.systems/c/lix/+/2108", "number": 2108, "kind": "commit message"}], "cl_meta": {"2108": {"change_title": "chore: remove monolithic `coreutils` requirement"}}} --> This issue was mentioned on Gerrit on the following CLs: * commit message in [cl/2108](https://gerrit.lix.systems/c/lix/+/2108) ("chore: remove monolithic `coreutils` requirement")

Filed https://github.com/NixOS/nix/issues/11975 against nix as it has the same bug.

Filed https://github.com/NixOS/nix/issues/11975 against `nix` as it has the same bug.
Sign in to join this conversation.
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#376
No description provided.