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

Add option --deb-systemd-path #2063

Merged
merged 2 commits into from
Dec 8, 2024

Conversation

skoef
Copy link
Contributor

@skoef skoef commented Jun 26, 2024

This option will allow you to override the path within the staging directory systemd service files are moved to in debian packages.

On some systems systemd should not go in the hardcoded /lib/systemd/system but in /usr/lib/systemd/system instead. Many systems have the both symlinked, but not all so assuming /lib/systemd/system can be dangerous.

This option will allow you to override the path within the staging directory
systemd service files are moved to in debian packages.

On some systems systemd should not go in the hardcoded /lib/systemd/system but
in /usr/lib/systemd/system instead. Many systems have the both symlinked, but
not all so assuming /lib/systemd/system can be dangerous.

Signed-off-by: Reinier Schoof <reinier@skoef.nl>
@jordansissel
Copy link
Owner

Tested, works! Thank you for improving fpm :)

Test:

% touch /tmp/example.service ; bundle exec bin/fpm -s empty -t deb --deb-systemd-path fancypants --deb-systemd /tmp/example.service -n example
Adding action files
Created package {:path=>"example_1.0_all.deb"}

% ar p example_1.0_all.deb data.tar.gz | tar -zt | grep example.service
./fancypants/example.service

And testing default behavior:

% touch /tmp/example.service ; bundle exec bin/fpm -s empty -t deb --deb-systemd /tmp/example.service -n example
Adding action files
Created package {:path=>"example_1.0_all.deb"}

% ar p example_1.0_all.deb data.tar.gz | tar -zt | grep example.service
./lib/systemd/system/example.service

@jordansissel jordansissel merged commit 13a3c69 into jordansissel:main Dec 8, 2024
@Jmennius
Copy link

This also helps with installing user services under /usr/lib/systemd/user!

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 this pull request may close these issues.

3 participants