Skip to content
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

Install systemd service files to /usr/lib/systemd/system so that they can be overwritten #259

Open
behrmann opened this issue Feb 15, 2021 · 1 comment · May be fixed by #260
Open

Install systemd service files to /usr/lib/systemd/system so that they can be overwritten #259

behrmann opened this issue Feb 15, 2021 · 1 comment · May be fixed by #260

Comments

@behrmann
Copy link

The service files generated by this module cannot be as easily overwritten as they ought to be, since they are too far up in the unit search path.

The files created by this module should be considered vendor supplied and hence be installed to /usr/lib/systemd/system instead of /etc/systemd/system, which is for config by the local sysadmin. Installing the units to /usr/lib/systemd/system would therefore allow sysadmins to completely shadow the units generated by this module.

The reason for this issue is that gitlab-runner uses this module and on update overwrites the unit file in /etc/systemd/system, which can only be solved by the drastic measure of using dpkg-divert, which wouldn't be necessary if this module were to use a lower priority path.

behrmann added a commit to behrmann/service that referenced this issue Feb 15, 2021
Using /usr/lib/systemd/system allows local sysadmins to overwrite to unit file
by placing one of the same name in /etc/systemd/system.

Fixes: kardianos#259
@behrmann behrmann linked a pull request Feb 15, 2021 that will close this issue
behrmann added a commit to behrmann/service that referenced this issue Jun 10, 2021
Using /usr/lib/systemd/system allows local sysadmins to overwrite to unit file
by placing one of the same name in /etc/systemd/system.

Fixes: kardianos#259
behrmann added a commit to behrmann/service that referenced this issue Jun 10, 2021
Using /usr/lib/systemd/system allows local sysadmins to overwrite to unit file
by placing one of the same name in /etc/systemd/system.

Fixes: kardianos#259
behrmann added a commit to behrmann/service that referenced this issue Jun 10, 2021
Using /usr/lib/systemd/system allows local sysadmins to overwrite to unit file
by placing one of the same name in /etc/systemd/system.

Fixes: kardianos#259
@gregharvey
Copy link

For anyone who finds this while the PR is in limbo, workarounds are possible - see use of override configs in https://askubuntu.com/a/659268

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants