desktops: replace legacy machinery with armbian-config module_desktops#9683
desktops: replace legacy machinery with armbian-config module_desktops#9683igorpecovnik wants to merge 16 commits intomainfrom
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Adds the `mode=build` parameter to the command synopsis and the install lifecycle table. Each step is now tagged: [B] = runs in both modes (build + runtime) [R] = runtime-only (skipped when mode=build) Explains when/why mode=build is used (image-build time, no user) and how the first boot inherits skel + graphical.target. Matches armbian/configng#859 (implementation) and armbian/build#9683 (build framework consumer).
ddbbcc0 to
bda6655
Compare
9e10a14 to
e7fbcdc
Compare
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
bef77d3 to
f2b2344
Compare
4e957b7 to
8cefebb
Compare
chroot_custom / chroot_custom_long_running: add LC_ALL="C" LANG="C" LANGUAGE="" SUDO_USER="" (parity with chroot_sdcard/chroot_mount). disable_systemd_service_sdcard: use systemctl --root= instead of D-Bus; output at debug level only.
config/desktop/ (~229 files)
lib/functions/artifacts/artifact-armbian-{desktop,bsp-desktop}.sh
lib/functions/compilation/packages/armbian-desktop-deb.sh
lib/functions/bsp/armbian-bsp-desktop-deb.sh
lib/functions/rootfs/rootfs-desktop.sh
Interactive DE selection: clones configng, queries the Python
parser for JSON DE list + tier menu (no host armbian-config needed).
New DESKTOP_TIER variable replaces DESKTOP_ENVIRONMENT_CONFIG_NAME
and DESKTOP_APPGROUPS_SELECTED.
Desktop install in rootfs-create.sh (cached):
chroot_sdcard "SUDO_USER= DEBIAN_FRONTEND=noninteractive
DIALOG=read armbian-config --api module_desktops install
de=$DE tier=$TIER mode=build"
Plymouth artifact moved to rootfs-create (before cache).
DM disable moved to distro-agnostic (after cache restore).
Rootfs hash tracks configng desktops HEAD commit.
Cleanup: artifacts registry, aggregation pipeline, Python tools,
CLI commands, action.yml, templates, library-functions.sh sources.
The configng API landed two orthogonal catalog filters: --filter (computed availability) and --status (editorial status keep-list). Push the EXPERT-mode policy server-side: default: --status supported EXPERT: --status supported,community unsupported DEs are never offered from the build dialog — they're vendor-specific (bianbu) and only reachable via armbian-config on a running system, not baked into an image. Also rename the JSON field probed by the inline python from the old 'supported' to 'available' (the configng rename), and replace the generic '[status]' label suffix with a '[CSC]' marker on community DEs.
module_desktops install mode=build (invoked before the rootfs cache is saved) already runs srv_disable for $DESKTOP_DM, display-manager, and psd.service when mode=build. The cache is therefore saved with DMs already disabled, so the post-cache disable_systemd_service_sdcard calls in distro-agnostic.sh are no-ops and can go.
When a userpatch or board config still sets the pre-tier DESKTOP_APPGROUPS_SELECTED variable (office, multimedia, programming, etc.) and hasn't explicitly chosen a DESKTOP_TIER, auto-select tier=full — the old appgroup extras are the full tier's package set — and emit a warning so the auto-choice is visible in the log. Explicit DESKTOP_TIER values are preserved.
Promote per-package download/install progress to the default mmdebstrap output. With DEBUG=yes escalate to --debug (superset of --verbose) which also adds mmdebstrap's own debug messages and bash xtrace on every --setup-hook / --customize-hook.
find_armbian_src_path() raised 'Can't find config/desktop' the moment
that directory went away, breaking userspace-inventory.py,
mapper-oci-uptodate.py, and download-debs.py at import time. Make
core_desktop_path optional (None when absent), short-circuit
get_desktop_inventory_for_distro to return [] in that case, and mark
the downstream desktop-target loop in targets-compositor.py with a
TODO pointing at the proper fix: invoke configng's
parse_desktop_yaml.py --list-json and translate its JSON into the
{id, support, arches} shape the compositor consumes.
Visible regression until the TODO is done: the desktop build matrix
emits no targets (CLI / minimal / cloud images still work).
…moval Cleanups spotted while reviewing the desktop-to-armbian-config PR: - .github/labeler.yml: drop the 'Desktop' label rule and the config/desktop/** exclusion from 'Hardware'; the path no longer exists so those globs never match. - config/boards/olimex-som204-a20.eos, virtual-qemu.eos: remove PACKAGE_LIST_DESKTOP_BOARD (xinput-calibrator / spice-vdagent). Both boards are EOS and the variable has no consumer since the old desktop aggregation went away. - lib/tools/info/targets-compositor.py: drop the dead appgroups_comma variable (never referenced). - lib/tools/aggregation.py: prune several 'Desktop ... removed — armbian-config handles it now' tombstone comments; the git log already says what went and why. - config/templates/targets-default.yaml: the comment claimed 'Ubuntu LTS without appgroups / config_base', neither of which is accurate — update to reflect the actual sid + tier=mid vars on this target.
The quick fix in bd9bb71 left the desktop build matrix empty because get_desktop_inventory_for_distro had no data source after config/desktop/ was deleted. Wire it up to armbian-configng's parse_desktop_yaml.py: - find_armbian_src_path(): expose configng_yaml_dir and configng_parser (resolved from cache/sources/armbian-configng) instead of the dead core_desktop_path. Both are None when the cache is missing; callers already short-circuit on None. - get_desktop_inventory_for_distro(): shell out to parse_desktop_yaml.py --list-json <release> amd64 --filter all, translate each JSON entry to the existing {id, support, arches} shape. Drop status: unsupported DEs (vendor-specific); keep status: supported and status: community. - cli-jsoninfo.sh: fetch_from_repo armbian-configng before running userspace-inventory.py so the cache exists when Python reads it. - targets-compositor.py: drop the now-obsolete TODO banner. Smoke-tested with userspace-inventory.py against a populated cache: noble returns 10 desktops (kde-neon, 6 supported DEs, 3 community); trixie/bookworm 9 (no kde-neon, Ubuntu-only); sid/forky/jammy/resolute 7 (supported-only — community DEs don't declare those releases yet). bianbu and xmonad correctly excluded under status: unsupported.
Tighten get_desktop_inventory_for_distro so only status: supported DEs populate userspace["desktops"]. Community-status DEs (budgie, deepin, enlightenment) stay installable interactively via the EXPERT-mode dialog and explicitly via DESKTOP_ENVIRONMENT=..., but shouldn't silently generate CI build targets by default — leave that choice to whoever wires a custom targets.yaml. After this change: noble → 7 DEs (6 supported + kde-neon) trixie, bookworm, sid, forky, jammy, resolute → 6 first-tier DEs each EOS releases remain empty
Lets targets.yaml scope board-based inventory items by ARCH:
items-from-inventory:
not-eos-with-video:
skip-arches: [loong64, riscv64] # or only-arches: [arm64]
Stops the compositor from emitting combinations that compile.sh
will just reject downstream as 'target not supported' (e.g.
noble + uefi-loong64, because noble doesn't declare loong64 in
its architectures list). Cuts log noise and runner minutes.
Resolution of the board's ARCH:
- armbian_utils.armbian_parse_board_file_for_static_info already
picks up any ARCH='…' line it finds in the board conf via the
generic top-level var regex.
- armbian_get_all_boards_inventory now falls back to the board's
BOARDFAMILY family conf (config/sources/families/<fam>.conf)
for boards that don't carry an explicit ARCH. The family conf
is bash-sourced in a throwaway subshell with an EXIT trap so
ARCH is captured even when the family conf aborts mid-source
on a ${FOO:?required} check (ls1046a, etc).
- Family-file results are cached per family.
- Five boards with unresolvable ARCH under the fallback get an
explicit ARCH="arm64" declaration:
aml-t95z-plus.tvb (comment apostrophe breaks BOARDFAMILY regex)
ayn-odin2mini.csc (sources ayn-odin2.csc — parser doesn't follow)
ayn-odin2portal.csc (ditto)
ayn-thor.csc (ditto)
gateway-dk.conf (family conf aborts before subshell captures ARCH)
All 367 boards now report ARCH; breakdown: arm64=272, armhf=76,
riscv64=15, amd64=3, loong64=1. Smoke-tested with a targets.yaml
carrying skip-arches: [loong64, riscv64] — compositor drops 17
entries cleanly, no leakage of filtered arches in final output.
userspace inventory has its own internal arch filtering via the
existing 'arches:' key and is not affected.
The backwards-compat path added in 74af496 auto-selects tier=full whenever DESKTOP_APPGROUPS_SELECTED is non-empty — but the legacy targets at armbian/os hardcode DESKTOP_APPGROUPS_SELECTED="none" (the old sentinel for no appgroups) on every matrix entry, so every existing CI run gets bumped to tier=full instead of keeping the intended tier=mid default. Treat "none" as empty so only a genuine appgroup selection triggers the bump.
Restore the pre-branch install location for armbian-plymouth-theme: post-cache in distro-agnostic.sh, alongside the 'if PLYMOUTH != yes then apt-get remove plymouth' branch. That keeps both halves of the PLYMOUTH toggle in one spot and stops straddling the rootfs-create → distro-agnostic boundary. Previously moved to rootfs-create.sh (before the rootfs cache) so that module_desktops install could apt-install armbian-plymouth-theme from the just-populated apt source. The configng side is changing in lockstep: when mode=build, module_desktops no longer tries to install armbian-plymouth-theme — the build framework installs the locally-built .deb artifact directly instead, here in distro-agnostic.sh.
With the new armbian-config-driven desktop install path running inside rootfs-create.sh (module_desktops install mode="build"), the rootfs-build chroot needs apt.armbian.com's <release>-utils and <release>-desktop components reachable: armbian-config itself lives in -utils, and firefox / chromium / gnome-branded packages live in -desktop. Forcing SKIP_ARMBIAN_REPO=yes at artifact-rootfs time meant create_sources_list_and_deploy_repo_key renamed armbian.sources to armbian.sources.disabled before the desktop install ran, so every apt install for those packages 404'd and the rootfs cache shipped without them. Drop the force. Default is now "no" (repo enabled, components still intentionally exclude 'main' at this stage — see distro-specific.sh:295 — so armbian/build's own .debs don't collide). Boards / userpatches that specifically want the repo-free rootfs behaviour can still set SKIP_ARMBIAN_REPO=yes explicitly, and the existing downstream readers (rootfs-image.sh, distro-specific.sh, bcm2711.conf, change-tracking.sh) honour it unchanged. Also fix the inverted documentation in config/boards/README.md: it claimed SKIP_ARMBIAN_REPO=yes meant "Include (default)" and no meant "Do NO include", which is the opposite of what the variable name and all readers in the codebase actually do.
4dfe80e to
ca3f9e9
Compare
Summary
Replaces the entire build-time desktop machinery with armbian-config's YAML-driven
module_desktops. Three commits:1.
build: clean up chroot environment + systemd disable noisechroot_custom/chroot_custom_long_running: addLC_ALL="C" LANG="C" LANGUAGE="" SUDO_USER=""(parity withchroot_sdcard/chroot_mount).disable_systemd_service_sdcard: usesystemctl --root=to operate directly on the chroot filesystem instead of D-Bus. Output routed throughdisplay_alertat debug level — silent in normal builds, visible withDEBUG=yes.2.
desktops: delete legacy config tree + package buildersconfig/desktop/(~229 files)artifact-armbian-desktop.sh+artifact-armbian-bsp-desktop.sharmbian-desktop-deb.sh+armbian-bsp-desktop-deb.shrootfs-desktop.sh3.
desktops: wire armbian-config module_desktops into rootfs creationNew variable:
DESKTOP_TIER(minimal/mid/full) replacesDESKTOP_ENVIRONMENT_CONFIG_NAME+DESKTOP_APPGROUPS_SELECTED.Interactive menu: clones configng via
fetch_from_repo, queries the standalone Python parser for DE list + tier selection. Tier dialog notes that tiers can be upgraded/downgraded at runtime via armbian-config.Desktop install in
rootfs-create.sh(before cache — desktop packages are cached):Plymouth artifact moved to
rootfs-create.sh(before cache, before desktop install).DM disable in
distro-agnostic.sh(after cache restore — runs on every build including cache hits).Rootfs cache hash includes
DESKTOP_TIER+ configng desktops HEAD commit hash — any change to YAML/parser/module code invalidates the cache.Cleanup across 17 files: artifacts registry, aggregation pipeline, Python tools, CLI commands,
action.yml, templates,library-functions.shsource lines.Net effect
DESKTOP_ENVIRONMENT+CONFIG_NAME+APPGROUPSDESKTOP_ENVIRONMENT+DESKTOP_TIER.debvia artifact systemarmbian-config --api module_desktops installconfig/desktop/<release>/environments/Test plan
BUILD_DESKTOP=yes DESKTOP_ENVIRONMENT=gnome DESKTOP_TIER=minimal