Conversation
* linux daemon packaging updates * clean up linux ffi comment wording * Update README
There was a problem hiding this comment.
Pull request overview
This pull request introduces systemd-based daemon support for running Lantern on Linux, establishing a two-process architecture where a privileged lanternd system service handles VPN operations while the Flutter app runs as a regular user and communicates via IPC. The changes include comprehensive packaging updates for Debian/RPM distributions, build system enhancements, and application-level modifications to support the new architecture.
Changes:
- Added
lanterndsystemd service with security hardening and Linux packaging infrastructure (deb/rpm with install/uninstall scripts) - Updated build system (Makefile, distribute_options.yaml) to build and stage the service binary and systemd unit files
- Refactored window management to separate "close to tray" from "quit", and updated Linux-specific UI behavior (tray icons, IPC handling)
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| linux/packaging/systemd/lantern.service | New systemd unit file with security hardening directives and network capabilities |
| linux/packaging/deb/scripts/postinst | Post-installation script to create lantern group, add users, and enable service |
| linux/packaging/deb/scripts/prerm | Pre-removal script to stop the service before package removal |
| linux/packaging/deb/scripts/postrm | Post-removal script to disable service and reload systemd |
| linux/packaging/deb/make_config.yaml | Updated packaging configuration with install/uninstall scripts (contains errors) |
| scripts/ci/verify_linux_package.sh | New CI verification script to validate package contents and configuration |
| Makefile | Added targets to build lanternd service binary and stage systemd artifacts |
| .github/workflows/build-linux.yml | Integrated package verification into Linux build workflow |
| distribute_options.yaml | Added Linux deb and rpm build targets |
| lib/features/window/window_wrapper.dart | Updated to call new closeToTray() method for proper window management |
| lib/features/window/provider/window_notifier.dart | Refactored close() to closeToTray() and added quit() for process termination |
| lib/features/system_tray/provider/system_tray_notifier.dart | Updated quit action to use new quit() method and added Linux tray icon paths |
| lantern-core/vpn_tunnel/vpn_tunnel.go | Skip IPC initialization on Linux (handled by daemon) |
| lantern-core/core.go | Added debug logging for Linux IPC settings path |
| go.mod, go.sum | Updated radiance dependency to newer version |
| README-dev.md | Added comprehensive Linux daemon build, install, and troubleshooting instructions |
| macos/Runner.xcodeproj/project.pbxproj | Changed provisioning profile for Debug configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Actually, the daemon isn't being packaged in..converting to draft. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 21 out of 21 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| MACOSX_DEPLOYMENT_TARGET = 15.0; | ||
| PROVISIONING_PROFILE_SPECIFIER = ""; | ||
| "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "Macos Development Profile"; | ||
| "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = runner; |
There was a problem hiding this comment.
The provisioning profile specifier has been changed from "Macos Development Profile" to just runner (without proper quoting). This appears unrelated to the Linux daemon changes in this PR. Additionally, this creates an inconsistency - the Debug configuration now uses "runner" (line 1186) while the Release configuration still uses "Macos Development Profile" (line 1220). This change should either be reverted or applied consistently to both configurations with proper explanation.
|
|
||
| - name: linux-deb | ||
| package: | ||
| platform: linux | ||
| target: deb | ||
| build_args: | ||
| dart-define: | ||
| APP_ENV: dev | ||
|
|
||
| - name: linux-rpm | ||
| package: | ||
| platform: linux | ||
| target: rpm | ||
| build_args: | ||
| dart-define: | ||
| APP_ENV: dev |
There was a problem hiding this comment.
The linux-deb and linux-rpm entries added to distribute_options.yaml will not be used because the Linux build process has switched to using nfpm (see Makefile lines 314-319) instead of flutter_distributor. flutter_distributor is still used for macOS and Windows builds, but not for Linux. These Linux entries should be removed to avoid confusion.
| - name: linux-deb | |
| package: | |
| platform: linux | |
| target: deb | |
| build_args: | |
| dart-define: | |
| APP_ENV: dev | |
| - name: linux-rpm | |
| package: | |
| platform: linux | |
| target: rpm | |
| build_args: | |
| dart-define: | |
| APP_ENV: dev |
This pull request introduces a comprehensive overhaul of the Linux packaging and installation process, focusing on systemd service integration, improved build automation, and enhanced developer documentation. The changes migrate packaging to use
nfpm, add robust service management scripts for DEB, RPM, and Arch Linux, and update the app to handle Linux-specific behaviors more gracefully.Key changes include:
Linux Packaging and Service Integration
nfpm, supporting DEB, RPM, and Arch Linux formats, and added a unifiednfpm.yamlconfiguration with appropriate dependencies, file layout, and post-install/remove scripts for systemd service management. [1] [2]linux/packaging/deb/scripts/*) and Arch (linux/packaging/arch/*.sh), and Makefile rules to build, stage, and package thelanternddaemon and its unit. [1] [2] [3] [4] [5] [6] [7]Build Automation and Verification
lanterndservice for both amd64 and arm64, stage systemd unit files, and verify package contents in CI. Also ensuresnfpmis installed as a build dependency. [1] [2] [3]lantern.desktop) and application icon installation for better desktop integration. [1] [2]App and Core Logic Improvements (Linux-specific)
Developer Documentation
README-dev.md, including systemd usage and uninstall steps.Miscellaneous
These updates collectively modernize and streamline the Linux packaging, installation, and service management experience for both developers and end-users.