Skip to content

fix(dgw): bundle systemd unit file into the rpm package#1747

Open
Benoît Cortier (CBenoit) wants to merge 7 commits intomasterfrom
fix/systemd-npm
Open

fix(dgw): bundle systemd unit file into the rpm package#1747
Benoît Cortier (CBenoit) wants to merge 7 commits intomasterfrom
fix/systemd-npm

Conversation

@CBenoit
Copy link
Copy Markdown
Member

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.

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.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.service directly into the RPM and set proper file attributes during packaging.
  • Update RPM maintainer scripts to manage the service via systemctl instead of devolutions-gateway service register/unregister.
  • Strengthen DEB/RPM smoke tests to require the unit file presence and add a regression check for ExecStart directives.

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants