rootless panel installation - #23
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe change adds Linux system and user installation scopes. It introduces scoped paths, user-systemd support, scope-aware panel and daemon lifecycle commands, rootless installation rules, scoped updates and uninstallation, and documentation. ChangesRootless installation and scoped operations
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Comment |
Coverage Report for CI Build 30702561603Coverage increased (+0.7%) to 14.011%Details
Uncovered Changes
Coverage Regressions23 previously-covered lines in 13 files lost coverage.
Coverage Stats
💛 - Coveralls |
There was a problem hiding this comment.
Actionable comments posted: 11
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/actions/panel/changepassword/changepassword.go`:
- Around line 56-61: Update Handle around panelpkg.ResolveScope to return the
ResolveScope error immediately instead of proceeding with an empty
opts.ConfigPath; preserve assigning paths.ConfigFilePath on success, then call
ChangePassword only after scope resolution succeeds.
In `@internal/actions/panel/install/checkers_v4.go`:
- Around line 191-199: In the user-scope SELinux branch of the checker, replace
the log-only warning call with the file’s existing user-facing output mechanism,
fmt.Println, while preserving the warning text and early return from the check.
In `@internal/actions/panel/install/panel_install_v4.go`:
- Around line 644-700: Fix the certificate setup flow around updateCACommand so
the ca-certificates installation and trust-store refresh branch can execute when
the certificate bundle is missing, rather than checking availability of a
command already selected as available. Check the certificate bundle itself or
restructure the command-selection logic so the missing-command/package-install
path is reachable, while preserving the existing distro-specific refresh
commands and installer rerun behavior.
In `@internal/actions/panel/status/status.go`:
- Around line 15-18: Update the ResolveScope handling in the status action to
add an error branch that logs the returned error when scope resolution fails,
while preserving the existing installation-scope log on success.
In `@internal/actions/panel/uninstall/uninstall_linux.go`:
- Around line 54-58: Update uninstallDaemon to return nil when neither
paths.DaemonFilePath exists nor the gameap-daemon command is available, matching
uninstallGameAP’s missing-installation behavior. Preserve normal daemon removal
for installed binaries and allow stopAndUninstallDaemon to continue into the
remaining Handle cleanup blocks.
In `@internal/app/app.go`:
- Around line 611-631: Update logDirCandidates and the related initLogFile
candidate-selection flow so tempLogDir is not called while constructing the
candidate list; defer creating the temporary directory until all system and
user-state candidates have failed, preserving the existing preference order and
fallback behavior.
- Around line 598-609: Update the os.OpenFile call in openLogFile to use a
restrictive file mode such as 0644 or 0640 instead of 0666, ensuring only the
owner (and optionally the owning group) can write to the log file while
preserving the existing open flags and error handling.
In `@README.md`:
- Line 53: Update the existing-database configuration documentation in the
README table to list --database-name and --database-username alongside the host
and password requirements, and mention --database-port for non-default ports.
- Around line 28-29: The README claim that the installer enables lingering is
inaccurate. Update the lingering documentation to state that users must run sudo
loginctl enable-linger $USER when lingering is disabled, matching the
installer’s lingerEnabled check and printed guidance.
- Line 52: Update the low-port limitation statement in the README table to say
ports below 1024 are normally unavailable, and document that they can be used
when an administrator lowers net.ipv4.ip_unprivileged_port_start.
- Line 54: Update the system-packages documentation in the README to distinguish
panel requirements from daemon installation prerequisites. Explicitly state that
user-scope daemon installation requires preinstalled curl, gpg, tmux, and
docker, and that SteamCMD may additionally require 32-bit libraries.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3d5853e6-764c-4757-9a01-4113e0b27334
📒 Files selected for processing (60)
README.mdinternal/actions/daemon/install/daemon_install.gointernal/actions/panel/changepassword/changepassword.gointernal/actions/panel/install/askv4.gointernal/actions/panel/install/checkers_v4.gointernal/actions/panel/install/panel_install_v4.gointernal/actions/panel/install/scope_v4_test.gointernal/actions/panel/letsencrypt/disable.gointernal/actions/panel/letsencrypt/setup.gointernal/actions/panel/restart/restart.gointernal/actions/panel/start/start.gointernal/actions/panel/status/status.gointernal/actions/panel/stop/stop.gointernal/actions/panel/uninstall/uninstall.gointernal/actions/panel/uninstall/uninstall_darwin.gointernal/actions/panel/uninstall/uninstall_linux.gointernal/actions/panel/uninstall/uninstall_windows.gointernal/actions/panel/update/panel_update.gointernal/actions/panel/update/panel_update_v4.gointernal/app/app.gointernal/pkg/gameapctl/panel_install_state.gointernal/pkg/panel/commands.gointernal/pkg/panel/install.gointernal/pkg/panel/scope.gointernal/pkg/panel/scope_test.gopkg/daemon/daemon_restart_unix.gopkg/daemon/daemon_start_unix.gopkg/daemon/daemon_start_unix_test.gopkg/daemon/daemon_stop_unix.gopkg/daemon/linger_unix.gopkg/daemon/options.gopkg/gameap/daemon_paths.gopkg/gameap/panel_paths.gopkg/gameap/panel_paths_unix.gopkg/gameap/panel_paths_unix_test.gopkg/gameap/panel_paths_windows.gopkg/gameap/scope.gopkg/gameap/scope_test.gopkg/panel/defaults_linux.gopkg/panel/install.gopkg/panel/install_linux.gopkg/panel/install_unix_test.gopkg/panel/options.gopkg/panel/options_unsupported.gopkg/panel/preflight_linux.gopkg/panel/preflight_other.gopkg/panel/restart_darwin.gopkg/panel/restart_linux.gopkg/panel/restart_windows.gopkg/panel/start_darwin.gopkg/panel/start_linux.gopkg/panel/start_windows.gopkg/panel/stop_darwin.gopkg/panel/stop_linux.gopkg/panel/stop_windows.gopkg/panel/templates_linux.gopkg/panel/templates_unix.gopkg/panel/templates_unix_test.gopkg/systemd/systemd_unix.gopkg/systemd/systemd_unix_test.go
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
gameap/gameap.github.io(manual)
💤 Files with no reviewable changes (4)
- pkg/panel/templates_linux.go
- pkg/daemon/daemon_start_unix_test.go
- pkg/gameap/daemon_paths.go
- pkg/daemon/linger_unix.go
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Around line 54-58: Update the README limitation describing Let's Encrypt
challenges to specify that http-01 is unavailable only with --scope=user, while
system scope may use it when port 80 is publicly reachable; retain the existing
recommendation to use --challenge=dns-01 for user scope.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1d964f2d-6b5d-4f67-ae2d-edcdb267fc05
📒 Files selected for processing (7)
README.mdinternal/actions/panel/changepassword/changepassword.gointernal/actions/panel/install/checkers_v4.gointernal/actions/panel/install/panel_install_v4.gointernal/actions/panel/status/status.gointernal/actions/panel/uninstall/uninstall_linux.gointernal/app/app.go
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
gameap/gameap.github.io(manual)
🚧 Files skipped from review as they are similar to previous changes (6)
- internal/actions/panel/status/status.go
- internal/actions/panel/install/checkers_v4.go
- internal/actions/panel/uninstall/uninstall_linux.go
- internal/app/app.go
- internal/actions/panel/install/panel_install_v4.go
- internal/actions/panel/changepassword/changepassword.go
# Conflicts: # internal/actions/panel/install/panel_install_v4.go # pkg/daemon/daemon_start_unix.go # pkg/panel/install_linux.go # pkg/panel/templates_linux.go
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pkg/panel/templates_unix_test.go (1)
70-104: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winReject system network targets in the user-scope unit test.
systemdUserUnitTemplatestill emitsWants=network-online.targetandAfter=network.target network-online.target. Add both target names to the forbidden list.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/panel/templates_unix_test.go` around lines 70 - 104, Update TestRenderSystemdUnit_User’s forbidden directives list to also reject “Wants=network-online.target” and “After=network.target network-online.target”, ensuring the user-scope unit test catches system network targets emitted by systemdUserUnitTemplate.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@pkg/panel/templates_unix_test.go`:
- Around line 70-104: Update TestRenderSystemdUnit_User’s forbidden directives
list to also reject “Wants=network-online.target” and “After=network.target
network-online.target”, ensuring the user-scope unit test catches system network
targets emitted by systemdUserUnitTemplate.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6b8dbbbb-c808-4faa-8996-d2fa244d5af9
📒 Files selected for processing (6)
internal/actions/panel/install/panel_install_v4.gopkg/panel/install_linux.gopkg/panel/install_linux_test.gopkg/panel/templates_unix.gopkg/panel/templates_unix_test.gopkg/systemd/systemd_unix.go
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
gameap/gameap.github.io(manual)
🚧 Files skipped from review as they are similar to previous changes (4)
- pkg/panel/templates_unix.go
- pkg/panel/install_linux.go
- pkg/systemd/systemd_unix.go
- internal/actions/panel/install/panel_install_v4.go
Summary by CodeRabbit
New Features
Bug Fixes