-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
podman does not adhere to path set with LIBEXECDIR (e.g. for catatonit) #1110
Comments
This seems to only work if the default configuration (which has I was not able to figure out based on the codebase where exactly the implicit default of How does podman assemble the configuration default, if |
FWIW, I've corrected a few typos in my initial report. |
Historically it always needed patching (code), even if there were some attempts to make it configurable |
init_path default is set in containers/common/pkg/config/default.go |
IMO there is no reason to only use one path for the init binary. We already have the helper_binaries_dir field to specify a list of directories. I think we should look there as well. |
Talking about |
@dvzrv Interested in opening a PR to change defaults.go to specify the default location of inits_path based on searching helper_binaries_dir=["/usr/libexec/podman", ...] |
I'm afraid my go skills are not really sufficient to do this in a reasonable time frame. Potentially @Foxboron might be interested though! |
I think I used And a patch to remove the array, but if you want it runtime-configurable... |
Sure, this can be worked around in downstreams, but doing this for all sorts of packages is not feasible and does not scale at all (especially if you maintain hundreds of packages) :) |
We should keep init_path for backwards compat but if it does not exists we should lookup catatonit in helper_binaries_dir. |
Some Linux distributions does not install files into `/usr/libexec` and would fail to lookup the init binary. This change first checks if the file exists in the default location, else we look for the binary in helper_binaries_dir as they should encompass all the possible installation directories. Fixes containers#1110 Signed-off-by: Morten Linderud <morten@linderud.pw>
Should we consider addressing it afterwards? |
Hi! What's the status on this? |
Interested in opening a PR to fix the issue? |
AFAIK, there's already #1115 by @Foxboron attempting to fix it. Meanwhile I still have to patch this downstream and it would be very nice if this wasn't needed! |
I tackle this one. |
Forcing a single upstream default for the init path is bad as some distro use differnt install locations for various reasons. To fix this use the existing helper_binaries_dir field to lookup in all directories. To keep backwards compatibility we keep using the old default and both Containers.InitPath and Engine.InitPath. Yes that is right somehow we ended up with the same config field under the contianers and engine section and they are both used in podman! Thus we need to keep supporting both, only the field under the container section was documnted and it will now be marked as deprecated. To make the docs more clear also document what binaries are currently looked up in helper_binaries_dir. Note this needs further integration in podman. Fixes containers#1110 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Forcing a single upstream default for the init path is bad as some distro use different install locations for various reasons. To fix this use the existing helper_binaries_dir field to lookup in all directories. To keep backwards compatibility we keep using the old default and both Containers.InitPath and Engine.InitPath. Yes that is right, somehow we ended up with the same config field under the containers and engine section and they are both used in podman! Thus we need to keep supporting both, only the field under the container section was documented and it will now be marked as deprecated. To make the docs more clear also document what binaries are currently looked up in helper_binaries_dir. Note this needs further integration in podman. Fixes containers#1110 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Use the new FindInitBinary() function to lookup the init binary, this allows the use of helper_binaries_dir in contianers.conf[1] [NO NEW TESTS NEEDED] [1] containers/common#1110 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Use the new FindInitBinary() function to lookup the init binary, this allows the use of helper_binaries_dir in contianers.conf[1] [NO NEW TESTS NEEDED] [1] containers/common#1110 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Forcing a single upstream default for the init path is bad as some distro use different install locations for various reasons. To fix this use the existing helper_binaries_dir field to lookup in all directories. To keep backwards compatibility we keep using the old default and both Containers.InitPath and Engine.InitPath. Yes that is right, somehow we ended up with the same config field under the containers and engine section and they are both used in podman! Thus we need to keep supporting both, only the field under the container section was documented and now recommends the use of helper_binaries_dir. To make the docs more clear also document what binaries are currently looked up in helper_binaries_dir. Note this needs further integration in podman. Fixes containers#1110 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Use the new FindInitBinary() function to lookup the init binary, this allows the use of helper_binaries_dir in contianers.conf[1] [NO NEW TESTS NEEDED] [1] containers/common#1110 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Use the new FindInitBinary() function to lookup the init binary, this allows the use of helper_binaries_dir in contianers.conf[1] [NO NEW TESTS NEEDED] [1] containers/common#1110 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
@Luap99 Thank you! |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Podman only accepts executables in /usr/libexec/podman (even if
LIBEXECDIR
is set to something else). This conflicts with OSes, that do not use /usr/libexec (e.g. Arch Linux) and package catatonit in /usr/lib/podman/catatonit.Steps to reproduce the issue:
make EXTRA_LDFLAGS='-s -w -linkmode=external' -C $pkgbase
&make install install.completions DESTDIR="$pkgdir" PREFIX=/usr LIBEXECDIR=/usr/lib -C $pkgbase
(or install podman 4.1.1-2 on Arch Linux, which pulls in catatonit symlinked to /usr/lib/podman/catatonit)Run
podman run --init docker.io/library/busybox
Describe the results you received:
(see downstream bug report https://bugs.archlinux.org/task/75493)
Describe the results you expected:
Podman's build system can be configured with
LIBEXECDIR
and podman afterwards adheres to that configured directory.Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes (not relevant for this ticket)
Additional environment details (AWS, VirtualBox, physical, etc.):
Locations in which hardcoding in the codebase takes place:
https://github.com/containers/podman/blob/c09457e34a429622475e27fe68e17effe47fe0c3/pkg/rootless/rootless_linux.c#L137
https://github.com/containers/podman/blob/c09457e34a429622475e27fe68e17effe47fe0c3/test/e2e/run_test.go#L319
Locations in containers/common that hardcode /usr/libexec/podman:
common/pkg/config/containers.conf
Line 149 in ab553b9
common/pkg/config/containers.conf
Line 360 in ab553b9
common/pkg/config/default.go
Line 53 in ab553b9
There are probably more, but it's hard to estimate with the components being a bit of a moving target.
The text was updated successfully, but these errors were encountered: