Skip to content

Conversation

@Duncaen
Copy link
Member

@Duncaen Duncaen commented Jan 9, 2026

Changes the PATH to match /etc/runit/{1,2,3}.

void-containers% podman run --rm -it ghcr.io/void-linux/void-glibc sh -c 'echo $PATH'
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

void-containers% podman build --target "image-default" --build-arg="LIBC=musl" . --tag fixed-path
void-containers% podman run --rm -it fixed-path sh -c 'echo $PATH'
/usr/bin:/usr/sbin

This resolves void-linux/void-packages#58440.

@Duncaen Duncaen marked this pull request as draft January 9, 2026 04:17
@Duncaen
Copy link
Member Author

Duncaen commented Jan 9, 2026

Drafted, it should probably include /usr/local PATHs, our containers might even depend on it, so matching /etc/runit/{1,2,3} is not good unless we change it there.

@classabbyamp
Copy link
Member

I think what /etc/profile gives by default is the right way to go (/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/sbin:/bin)

@Duncaen
Copy link
Member Author

Duncaen commented Jan 12, 2026

Changed it to /usr/local/sbin:/usr/local/bin:/usr/bin to it still has the standard local paths and only the real bin directory.

Don't think having all the other symlinks provides any benefit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Command resolution prefers /usr/sbin over /usr/bin despite identical PATH order

2 participants