diff options
| author | 2025-03-19 10:30:13 +0100 | |
|---|---|---|
| committer | 2025-03-19 14:50:50 +0100 | |
| commit | 364b0b8f628d567cd7c063c75470569749e89302 (patch) | |
| tree | b4e23f2cfb82e397efeb9032dbb9e07220eb5abc /teams/cloud | |
| parent | b57a77e5717e31914faddf5c258d74a0db5e988f (diff) | |
| download | kiwi-descriptions-364b0b8f628d567cd7c063c75470569749e89302.tar.gz kiwi-descriptions-364b0b8f628d567cd7c063c75470569749e89302.zip | |
Drop /usr/local/sbin:/usr/sbin from $PATH
If $PATH is not set, we get the default from crun [1]:
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
This is not useful, because in the image, /bin, /sbin, /usr/sbin are all
symlinks. /usr/local/sbin does not exist.
When /usr/sbin is a symlink to /usr/bin, and we use have a $PATH with
/usr/sbin before /usr/bin, various tools will discover /usr/sbin/foo when
looking for 'foo' [2], which is confusing and ugly.
[1] https://github.com/containers/crun/blob/a980c89665bb488ff206e47e9083f75b48528714/src/libcrun/container.c#L183
[2] https://src.fedoraproject.org/rpms/setup/pull-request/18#comment-253719
Co-authored-by: Simon de Vlieger <cmdr@supakeen.com>
Diffstat (limited to 'teams/cloud')
| -rw-r--r-- | teams/cloud/container.xml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/teams/cloud/container.xml b/teams/cloud/container.xml index 733fc87..2e7f0e8 100644 --- a/teams/cloud/container.xml +++ b/teams/cloud/container.xml @@ -35,6 +35,7 @@ </labels> <environment> <env name="container" value="oci"/> + <env name="PATH" value="/usr/local/bin:/usr/bin"/> </environment> </containerconfig> </type> @@ -65,6 +66,7 @@ </labels> <environment> <env name="container" value="oci"/> + <env name="PATH" value="/usr/local/bin:/usr/bin"/> </environment> </containerconfig> </type> @@ -124,6 +126,7 @@ </labels> <environment> <env name="container" value="oci"/> + <env name="PATH" value="/usr/local/bin:/usr/bin"/> </environment> </containerconfig> </type> |