-
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 HelperBinariesDir field to engine config #758
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Luap99 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 |
@baude @rhatdan @vrothberg @mheon @ashley-cui PTAL |
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.
Two mini nits but LGTM
Nice idea!
# A is a list of directories which are used to search for helper binaries. | ||
# | ||
#helper_binaries_dir = [ | ||
# "/usr/local/libexec/podman", |
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.
Indentation is off in the first entry.
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.
This is intentional, check the other config options in the file.
pkg/config/config_darwin.go
Outdated
@@ -15,3 +15,11 @@ func customConfigFile() (string, error) { | |||
func ifRootlessConfigPath() (string, error) { | |||
return rootlessConfigPath() | |||
} | |||
|
|||
var defaultHelperBinariesDir = []string{ | |||
// FIXME: What paths can we use on mac? |
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.
/usr/libexec
seems to exist on Mac OS, so we could make that the first entry.
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.
Yes I have no idea about what paths can be used for mac or where homebrew install this ATM. That's why I marked this as draft.
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.
At the moment, Homebrew installs gvproxy
into /usr/local/bin
or /opt/homebrew/bin
(depending... long story), but the general consensus seems that we no longer want gvproxy
to be in the executable path. The next-best option seems to be to have Homebrew leave it in-key at ${HOMEBREW_PREFIX}/Cellar/podman/${version}/libexec
, but you can see that that version in the middle of the keg means we'll just need to put out a containers.conf
file with the configured directory as part of the Homebrew install anyway. So, for the moment, I'd not worry about the Mac for the default list -- what's here LGTM for defaults.
Which leads me to the search path for containers.conf
... reviewing that now.
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 reread (again) the Homebrew Formula Cookbook and discovered "the opt prefix". If we add /usr/local/opt/podman/libexec
, /opt/homebrew/bin
, and /opt/homebrew/opt/podman/lib exec
to the defaults list, we should be okay.
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.
@Luap99 Are you good to add the 3 directories above or shall I file a PR against your repo?
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 will add them, thanks for the list.
We're getting there, but I still have some concerns about hard-coded paths. Looking at Lines 21 to 31 in 0be74e4
Heaven forefend we have to do a patch during that build :) |
@jonpspri Can we just put the config file in |
Homebrew spec says it should got to |
Given that we can work with the path list in the code (for now), I suggest we defer the "where do the configurations live" conversation to a separate issue. |
b178e13
to
5ee26cc
Compare
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.
Just a problem with /usr/local/bin
needing to be there for the current x86_64 Homebrew install. I think it disappeared through a lack of clarity in my comment.
This field contains a list of directories which should be used to store some helper binaries, e.g. gvproxy. Also add a FindHelperBinary method to the config struct to get the full path to a helper binary. Signed-off-by: Paul Holzinger <[email protected]>
5ee26cc
to
04a59d4
Compare
@jonpspri updated with |
LGTM |
/lgtm |
Once we release a new version of containers/common, both podman main branch and v3.3 branch will be ready to support macOS Apple silicon |
This field contains a list of directories which should be used to store
some helper binaries, e.g. gvproxy.
Also add a FindHelperBinary method to the config struct to get the full
path to a helper binary.
Signed-off-by: Paul Holzinger [email protected]