-
Notifications
You must be signed in to change notification settings - Fork 3k
Improve DESTDIR/PREFIX/ETCDIR handling #3278
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
Improve DESTDIR/PREFIX/ETCDIR handling #3278
Conversation
|
Hi @llchan. Thanks for your PR. I'm waiting for a containers or openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
I don't know if I like |
|
Can one of the admins verify this patch?
|
|
Yeah, I actually had it originally in |
|
Also FYI, my heuristic for which paths to touch was "can the Makefile install something to this path", so stuff like runc/conmon paths were left alone, but the podman config files were made relative to the install prefix. I wasn't quite sure what to do with the cataonit stuff so I left it alone. Once we make the catatonit install less hacky and have it respect the Makefile PREFIX, I think we should also make the default init path relative. |
|
☔ The latest upstream changes (presumably #3282) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@llchan Needs a rebase. |
|
LGTM |
cb5218c to
165d186
Compare
165d186 to
8675eab
Compare
|
Rebased and re-pushed, and added missing sign-off to the second commit. Can squash if preferred. |
libpod/runtime.go
Outdated
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.
Go Lint does not like the string here.
installPrefix = "/usr/local"
is preferred.
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.
Fixed, and updated my vim setup to lint in the future.
libpod/runtime.go
Outdated
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.
Go Lint does not like the string here.
etcDir = "/etc"
is preferred.
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.
Fixed
|
/ok-to-test |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: llchan, mheon The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm |
|
☔ The latest upstream changes (presumably #3328) made this pull request unmergeable. Please resolve the merge conflicts. |
8d9a6b0 to
c581a83
Compare
- PREFIX is now passed saved in the binary at build-time so that default paths match installation paths. - ETCDIR is also overridable in a similar way. - DESTDIR is now applied on top of PREFIX for install/uninstall steps. Previously, a DESTDIR=/foo PREFIX=/bar make would install into /bar, rather than /foo/bar. Signed-off-by: Lawrence Chan <[email protected]>
Signed-off-by: Lawrence Chan <[email protected]>
Signed-off-by: Lawrence Chan <[email protected]>
c581a83 to
7baa6b6
Compare
|
Rebased |
|
/lgtm |
|
/hold cancel |
We install our podman in a non-standard prefix, e.g.
PREFIX=/path/to/podman-1.3.1, and during the installation process we stage the files in aDESTDIR=/path/to/sandbox. This changeset makes the DESTDIR apply even if PREFIX is specified. It also makes the constants in the binary prefix-aware, so it's able to find its own conf files rather than the hardcoded/usr/localpath. We could also make it search by relative path to the binary, but that's a little more involved.One thing to note is that some of the constants were converted to vars so that they can be overridden at build time. I don't think this should be an issue, but worth mentioning.
Work in progress, just wanted to push this up for comments/discussion.