-
Notifications
You must be signed in to change notification settings - Fork 202
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
Add additionalHelperBinariesDir #946
Conversation
Different packaging for different distributions have their own prefix for where helper binaries should live. additionalHelperBinariesDir is a variable that can be set during link-time so that a packager can change the location without having to carry patches for their default location. [NO NEW TESTS NEEDED] Signed-off-by: Ashley Cui <[email protected]>
Partially solves #12161 |
// additionalHelperBinariesDir is an extra helper binaries directory that | ||
// should be set during link-time, if different packagers put their | ||
// helper binary in a different location | ||
additionalHelperBinariesDir string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be a list rather then just one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the go linker only allows you to set strings? Not sure though. An alternative would be to take a string, split it by commas, and then put it into a list to allow setting more than one additional helper binary dir.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I thought this was a function call.
LGTM
@containers/podman-maintainers PTAL |
LGTM |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ashley-cui, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This should make it easier to locate helper binaries relative to where the main binary was installed, which should be useful in installations such as Homebrew which install packages under a versioned directory. Use a `$BINDIR` magic token as a prefix in the helper path to indicate it should be relative to the directory where the binary is located. This is somewhat familiar to the syntax used in the shell and Makefile and is still quite explicit about the behavior (as opposed to, say, making all relative paths be relative to the directory of the binary.) Update `podman` config on Darwin to look for helpers such as `gvproxy` under `$BINDIR/../libexec/podman`, which is the ultimate objective of this code change. Tested: Updated vendored package in podman, built it with `podman-remote`, copied `gvproxy` to a `libexec/podman` at the same level as `bin/podman` and confirmed that `podman machine start` worked as expected. Fixes: containers/podman#12161 Related: PR containers#946 Signed-off-by: Filipe Brandenburger <[email protected]>
Different packaging for different distributions have their own prefix for where helper binaries should live. additionalHelperBinariesDir is a variable that can be set during link-time so that a packager can change the location without having to carry patches for their default location.
[NO NEW TESTS NEEDED]
I have no idea how to test this.
Signed-off-by: Ashley Cui [email protected]