Skip to content

feat(agent,agent-installer): add macOS installer package - #2192

Open
Marc-André Moreau (mamoreau-devolutions) wants to merge 3 commits into
masterfrom
agent-macos-port
Open

Marc-André Moreau (mamoreau-devolutions) wants to merge 3 commits into
masterfrom
agent-macos-port

Conversation

@mamoreau-devolutions

@mamoreau-devolutions Marc-André Moreau (mamoreau-devolutions) commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Enable Devolutions Agent on macOS with separate arm64 and x64 installer packages.
Install and start the Agent as a root launchd daemon, preserve configuration during upgrades, and provide an uninstaller with an optional purge.

Build, sign, notarize, and publish the packages through the release workflows using the configured Apple credentials.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

Devolutions Agent now ships for macOS as one installer package per architecture.
The package installs the `com.devolutions.agent` launchd daemon, which runs as root, starts at boot, and restarts after a crash.
Installing creates a default configuration when none exists, and upgrading keeps the existing one.
`devolutions-agent-uninstall` removes the Agent, and `--purge` also removes its configuration and logs.
On macOS, `devolutions-agent start` and `stop` act on the installed daemon.

The macOS identity, tunnel, and PowerShell Universal features match Linux.
The Package workflow signs the executable, signs the installer with a Developer ID Installer certificate, and notarizes it.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reuse the existing Developer ID Application and Apple notarization
secrets. Add separate Installer certificate secrets for the Agent
package, and verify both architecture binaries and packages in
production.

Fail macOS signing errors and document the required environment
secrets.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 9, 2026 21:53
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

Let maintainers know that an action is required on their side

  • Add the label release-required Please cut a new release (Devolutions Gateway, Devolutions Agent, Jetsocat, PowerShell module) when you request a maintainer to cut a new release (Devolutions Gateway, Devolutions Agent, Jetsocat, PowerShell module)

  • Add the label release-blocker Follow-up is required before cutting a new release if a follow-up is required before cutting a new release

  • Add the label publish-required Please publish libraries (`Devolutions.Gateway.Utils`, OpenAPI clients, etc) when you request a maintainer to publish libraries (Devolutions.Gateway.Utils, OpenAPI clients, etc.)

  • Add the label publish-blocker Follow-up is required before publishing libraries if a follow-up is required before publishing libraries

@mamoreau-devolutions

Marc-André Moreau (mamoreau-devolutions) commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor Author

Change summary

  • Production code: devolutions-agent/src/cli.rs:18-22,106 uses the packaged launchd label. package/AgentMacOS/ adds the launch daemon, install and uninstall scripts, and architecture-specific installer configuration.
  • Tests: package/AgentMacOS/Test-Package.sh:1-64 checks installation, service control, upgrade, and uninstall. I did not run this privileged system-install test locally; CI is configured to run it on macOS arm64.
  • Other files: ci/tlk.ps1:922-1003 builds the .pkg; .github/workflows/ci.yml adds macOS builds and the smoke test; .github/workflows/package.yml signs, notarizes, and verifies both architectures; .github/workflows/release.yml publishes the packages; .github/workflows/README.md documents the required secrets.

UNTESTED: package.yml:241-242 notes that CI access to the Developer ID Installer private key must be verified by building a signed package. With APPLE_DEV_ID_INSTALLER_CERTIFICATE and APPLE_DEV_ID_INSTALLER_CERTIFICATE_PASSWORD available to publish-prod, confirm productbuild can sign both architecture packages without prompting.

Note

Human-tuned, LLM-assisted content.

Reference the Developer ID Installer certificate and password under
the names available to the package workflow. Update the signing
documentation to match.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@mamoreau-devolutions Marc-André Moreau (mamoreau-devolutions) changed the title ci(package): verify macOS package signing feat(agent,agent-installer): add macOS installer package Nov 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Critical issues permit root execution of user-controlled PowerShell when PSU is enabled and expose credentials through insecure permissions on existing configuration directories.

3 open issues
What changed in this PR

This PR adds macOS Agent installer packages to the build and release pipeline, with production signing and notarization verification for both architectures.

Changes:

  • Add architecture-specific packages, launchd configuration, installation scripts, and lifecycle checks.
  • Sign Agent binaries and packages, notarize packages, and verify production artifacts.
  • Publish macOS packages and document installation and required signing secrets.
File Description
package/​AgentMacOS/​Test-Package.sh Checks installation, service control, upgrade, and removal.
package/​AgentMacOS/​scripts/​preinstall Stops the existing service before payload replacement.
package/​AgentMacOS/​scripts/​postinstall Initializes configuration and loads the daemon.
package/​AgentMacOS/​README.md Documents installation, operation, removal, and packaging.
package/​AgentMacOS/​distribution.xml Defines architecture and OS requirements for the installer.
package/​AgentMacOS/​devolutions-agent-uninstall Removes the service and optionally purges stored data.
package/​AgentMacOS/​com.devolutions.agent.plist Defines the launchd daemon and its environment.
devolutions-agent/​src/​cli.rs Uses the package’s launchd label for macOS service control.
ci/​tlk.ps1 Builds and optionally signs macOS Agent packages.
.github/​workflows/​release.yml Includes both macOS packages in release outputs.
.github/​workflows/​README.md Documents macOS signing and notarization secrets.
.github/​workflows/​package.yml Signs, notarizes, and verifies macOS Agent artifacts.
.github/​workflows/​ci.yml Builds macOS Agent packages and checks arm64 installation.

Review effort: Balanced

<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
Comment on lines +11 to +14
if [ ! -d "$DATA_DIR" ]; then
/bin/mkdir -p "$DATA_DIR"
/bin/chmod 700 "$DATA_DIR"
fi
Comment on lines +12 to +15
while /bin/launchctl print "system/$LABEL" >/dev/null 2>&1 && [ "$i" -lt 60 ]; do
/bin/sleep 1
i=$((i + 1))
done

This branch was successfully deployed

1 active deployment
publish-prod — 0b1f1d9e Deployed Nov 10, 2026 by mamoreau-devolutions via Codesign (devolutions-agent, windows) #274
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