-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
systemd service files contain hardcoded paths #10787
Comments
I would prefer to keep the fixes and have the make install modify the path based on the PREFIX value. |
Interested in opening a PR? |
But why include these only then? I mean, we've got way more configs, which are needed or optional in podman, but don't get installed by
|
So you want to make it more complex. In a perfect world, we should specify man installs for each of these config files in their subpackages. |
My main problem was that
"1" doesn't seem that hard to make. I'd just insert a placeholder in the contrib config and replace them using We could end in |
Yes both seem reasonable. We probably should not install the configs with make install. I would be willing to take that as long as we add a make install.configs. Handling the PREFIX change would be nice also. Interested in opening a PR? |
Yes, but I can't start until the week after next at the earliest. And my knowledge of "go" is limited, so I can do it on Makefile and shell level only ;) |
SGTM |
A friendly reminder that this issue had no activity for 30 days. |
@tobwen Did you ever get a chance to look at this? |
@vrothberg PTAL |
A friendly reminder that this issue had no activity for 30 days. |
@tobwen are you still interested in this? Interested in opening a PR? |
A friendly reminder that this issue had no activity for 30 days. |
@vrothberg PTAL |
Set Podman's install path in the systemd service file. Fixes: containers#10787 Signed-off-by: Valentin Rothberg <[email protected]>
We discussed various ways to address the issue in #11788 but I am not convinced at all. IMHO, it's common to ship hard-coded (and absolute) paths in .service files and I think we're getting more problems than we'd fix by changing the current state. |
I tried, but I really can't get along with Go. Sorry :( |
Don't hardcode /usr/bin/podman in unit files: instead, use template files with a path replaced at install time. Because 'make' can be invoked repeatedly, with different PREFIX, do not leave the generated files behind in our work directory: wipe them immediately after install. To get this to work, fix a longstanding bug in podman.spec.in, a PREFIX that should've been DESTDIR. Side note: containers#7023 made contrib/systemd/user a symlink to .../system but did not update paths in Makefile. The unrelated-looking path change you see here is a belated correction for that. Fixes: containers#10787 Signed-off-by: Ed Santiago <[email protected]>
/kind bug
Description
On installation via
make install
, the systemd service files contain hardcoded paths even whenDESTDIR
orPREFIX
are set.Describe the results you received:
https://github.com/containers/podman/tree/master/contrib/systemd
Describe the results you expected:
These files should be created with the settings that the user has specified. Alternatively, it is questionable whether the data is necessary at all, as it can usually be generated from podman (at least the systemd files).
Another alternative would be to include these configuration files only as example files. In that case, however, the installation in the currently selected folders would be wrong.
PREFIX/share/doc/podman/examples/
might be expected.The text was updated successfully, but these errors were encountered: