fix(install): install polkitd on Trixie+ manage-network path; minimize apt updates - #3060
Merged
Merged
Conversation
- NetworkManager only Recommends polkitd, so minimal Armbian Trixie images ship NM without it and have no /etc/polkit-1/rules.d - the rules copy task then failed: "Destination directory /etc/polkit-1/rules.d does not exist", aborting the install - install polkitd explicitly so the rule has a home and a daemon to enforce it Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
There was a problem hiding this comment.
Pull request overview
This PR fixes the Debian 13 (Trixie)+ “manage network” installer path by ensuring polkitd is installed before writing the NetworkManager polkit rule, preventing failures when /etc/polkit-1/rules.d is missing on minimal images.
Changes:
- Install
polkitdwhenmanage_networkis enabled on Debian major version >= 13. - Keep the existing Trixie+ polkit rule creation step, now guaranteed to have its destination directory provided by the package.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- the network role runs after the system role's apt update + dist upgrade, so the cache is already fresh - matches the splashscreen role's mid-playbook package installs, which carry no update_cache Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- guard install.sh's two apt-get updates behind apt_update_once so a minimal image no longer double-updates; reset only when the legacy Raspbian mirror is actually rewritten - drop redundant update_cache on the libc6-dev reinstall; the cache is already fresh from install.sh - net result: one base update + one per added repo (Docker) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Issues Fixed
No tracked issue. Found while bootstrapping a fresh Rock Pi 4 (Armbian 26.8.0 trixie, kernel 6.18) with the installer's "manage network" option enabled: the install aborted at
Description
1. polkitd missing on minimal Trixie (the bug). NetworkManager only Recommends
polkitd, so a minimal Trixie image (e.g. Armbian on a Rock Pi / Orange Pi) can ship NetworkManager without polkit installed at all. The Trixie+ branch of the network role writes/etc/polkit-1/rules.d/50-network-manager.ruleswithansible.builtin.copy, which does not create parent directories — and with no polkit there is neither that directory nor a daemon to enforce the rule. This adds an explicitpolkitdinstall on the Trixie+ manage-network path, ahead of the rules copy. Scope: onlymanage_network+ Debian major >= 13; the<= 12(Pi OS Bookworm) path is unchanged.2. Minimize
apt-get updateruns (follow-on cleanup). Audited the host install flow so it refreshes the apt lists only when needed — one base update, plus one per added repo:install.shnow routes both its updates through anapt_update_onceguard, so a minimal image missing whiptail no longer double-updates; the flag resets only when the legacyapt.screenlyapp.commirror is actually rewritten (a genuine source change).update_cache: trueon the libc6-dev reinstall and on the new polkitd task — the cache is already fresh by the time those run.update_cache: true— that is the legitimate post-repo-add refresh.Checklist
End-to-end validated on a Rock Pi 4 (generic
arm64device type) running Armbian 26.8.0 trixie: with the polkitd fix the full installer completes and all four containers (anthias-server,anthias-viewer,anthias-celery,redis) come up, web UI returns HTTP 200. Not separately run on Pi-OS/x86 — those don't reach the Trixie+ polkit code path (Pi OS Bookworm uses the<= 12pkla branch). The apt-update changes are no-ops behaviorally (same packages installed, fewer redundant list refreshes).🤖 Generated with Claude Code