fix(dgw): bundle systemd unit file into the rpm package#1747
fix(dgw): bundle systemd unit file into the rpm package#1747Benoît Cortier (CBenoit) wants to merge 7 commits intomasterfrom
Conversation
The postinst was calling `devolutions-gateway service register` which used ceviche to create both a base service file and a drop-in. systemd rejected this because two ExecStart= directives were present. Bundle the service file directly in the .rpm package (matching how the .deb package already works), and update the postinst/prerm scripts to use systemctl directly instead of the binary's service subcommand.
There was a problem hiding this comment.
Pull request overview
Updates Devolutions Gateway Linux packaging to ship a static systemd unit file in the RPM (aligning with the DEB approach) and adjusts install/remove scripts and CI smoke tests to avoid the previous “multiple ExecStart” systemd rejection.
Changes:
- Bundle
devolutions-gateway.servicedirectly into the RPM and set proper file attributes during packaging. - Update RPM maintainer scripts to manage the service via
systemctlinstead ofdevolutions-gateway service register/unregister. - Strengthen DEB/RPM smoke tests to require the unit file presence and add a regression check for
ExecStartdirectives.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| package/Linux/gateway/rpm/service | Adds a packaged systemd unit file for RPM installs. |
| package/Linux/gateway/rpm/prerm | Switches uninstall behavior to systemctl stop/disable instead of binary-driven unregister. |
| package/Linux/gateway/rpm/postinst | Removes service registration call; relies on packaged unit + systemctl. |
| package/Linux/gateway/debian/service | Aligns DEB unit file metadata by adding Description=. |
| devolutions-gateway/src/main.rs | Adjusts the Linux service registration unit template to clear ExecStart before setting it. |
| ci/package-gateway-rpm.ps1 | Adds the unit file to the RPM payload and sets its RPM permissions/ownership. |
| .github/scripts/smoke-test-rpm.sh | Updates RPM smoke test expectations to require the packaged unit file and adds ExecStart regression guard. |
| .github/scripts/smoke-test-lib.sh | Adds check_single_execstart() helper used by DEB/RPM smoke tests. |
| .github/scripts/smoke-test-deb.sh | Adds the ExecStart regression guard to the DEB smoke test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The postinst was calling
devolutions-gateway service registerwhich used ceviche to create both a base service file and a drop-in. systemd rejected this because two ExecStart= directives were present.Bundle the service file directly in the .rpm package (matching how the .deb package already works), and update the postinst/prerm scripts to use systemctl directly instead of the binary's service subcommand.