desktops: migrate from config/desktop/ tree to armbian-config module_desktops#9683
Open
igorpecovnik wants to merge 7 commits intomainfrom
Open
desktops: migrate from config/desktop/ tree to armbian-config module_desktops#9683igorpecovnik wants to merge 7 commits intomainfrom
igorpecovnik wants to merge 7 commits intomainfrom
Conversation
Contributor
|
Important Review skippedToo many files! This PR contains 300 files, which is 150 over the limit of 150. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (300)
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 |
Merged
3 tasks
igorpecovnik
added a commit
to armbian/documentation
that referenced
this pull request
Apr 16, 2026
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
Contributor
|
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
4dfe80e to
ca3f9e9
Compare
0ea3727 to
43eae27
Compare
config/desktop/ tree to armbian-config module_desktops
…ule_desktops
Desktop builds no longer synthesise a per-DE, per-release, per-appgroup
package list from config/desktop/*/environments/*/config_base/packages
plus config/desktop/*/appgroups/*/packages. Instead, rootfs-create.sh
calls `armbian-config --api module_desktops install de=$DESKTOP_ENVIRONMENT
tier=$DESKTOP_TIER mode=build` inside the chroot, and armbian-config's
YAML-driven module_desktops assembles the install from its
tools/modules/desktops/yaml/*.yaml definitions at build time.
* config/desktop/ tree (hundreds of config_base/packages, postinst,
create_desktop_package.sh, architectures, support files) is
deleted wholesale. The source of truth for desktop packages,
branding, tiers, custom repos, and per-arch/per-release overrides
now lives in armbian/configng under tools/modules/desktops/.
* interactive_desktop_main_configuration in config-desktop.sh
rewritten: clones armbian-configng to cache/sources/, runs the
standalone Python parser for the DE list, shows the menu with a
[CSC] marker for community-maintained DEs, collects DESKTOP_TIER
(minimal / mid / full). Menu filters on the parser's --status
flag: 'supported' by default, 'supported,community' under EXPERT.
* rootfs-create.sh installs armbian-config via apt + runs
`module_desktops install mode=build` while the Armbian apt repo
is still attached, so apt.armbian.com's <release>-utils and
<release>-desktop components (armbian-config itself, firefox,
chromium, GNOME-branded bits) are reachable.
* aggregation.py simplified: the per-appgroup fan-out is gone, so
the rootfs package list no longer tries to resolve appgroup paths
that don't exist anymore.
* Redundant display-manager disable was in distro-agnostic.sh to
work around the old post-cache DM auto-enable; module_desktops in
mode=build already handles srv_disable internally. Drop the
duplicate.
* Misc chroot hygiene: systemd disable noise suppressed where the
service never existed in the chroot; library-functions.sh
regenerated to match the new loader surface.
No backwards-compat yet for users passing legacy
DESKTOP_ENVIRONMENT_CONFIG_NAME / DESKTOP_APPGROUPS_SELECTED — that
comes in a follow-up commit in this PR.
armbian_utils.armbian_get_all_userspace_inventory used to walk
config/desktop/{release}/environments/ and config/desktop/common/
to discover which desktops a release shipped + which arches each
DE supported. That tree was removed in the previous commit.
Re-derive the same inventory by subprocessing armbian-configng's
standalone parse_desktop_yaml.py with --list-json. The parser
reads tools/modules/desktops/yaml/*.yaml and emits a
{name, status, architectures, ...} record per DE; we keep only
entries with status == 'supported' for the auto-generated build
matrix (status == 'community' is installable on a running system
but shouldn't spawn CI matrix slots by default — that's the
operator's call; status == 'unsupported' is vendor-specific and
never built).
Drop:
- the now-unreachable per-arch / per-release walkers in
targets-compositor.py and the tombstone .eos + labeler.yml
entries that pointed at config/desktop/.
- the 'any appgroup combination' matrix expansion in
aggregation.py — the tier model subsumes that axis.
The armbian-configng clone under cache/sources/armbian-configng
is populated by interactive_desktop_main_configuration (see the
earlier commit) and refreshed on every desktop build. The
cli-jsoninfo.sh CLI gained a parallel fetch for the same clone
so 'compile.sh configdump-json' can report the new inventory
without relying on an interactive-path side-effect.
Two orthogonal knobs for userspace blocks in
userpatches/targets-*.yaml:
* tiers: [minimal, mid, full]
Emit one item per tier for every matched (release, arch,
desktop) triple. armbian-config's module_desktops treats
minimal / mid / full as separate install targets with
different package sets, so they can't share a rootfs
artifact — they need separate matrix items. Default stays
['mid'] so pre-existing targets that don't know about this
knob keep producing one userspace per desktop, same as
before. Targets that want the full fan-out set
'tiers: [minimal, mid, full]' explicitly.
* skip-arches: [loong64]
only-arches: [armhf]
Post-filter the arch set after the inventory expansion.
Existed on the desktops axis before ('skip-desktops' /
'only-desktops'); now mirrored on the arches axis. Used
by the os-repo targets yaml to e.g. skip loong64 from an
otherwise all-arches block that would normally pick it up.
Also fold a few per-board ARCH overrides into
config/boards/ (aml-t95z-plus.tvb gains its fourth arch, the
new ayn-odin2* boards declare arm64 explicitly, etc.) since the
inventory expansion is now arch-aware at the target-yaml level
and boards need to declare their arch for the filter to match.
The tier model (minimal / mid / full) subsumes the old per-group package axis — 'full' already includes everything the old appgroups provided (office, multimedia, programming, chat, remote_desktop, desktop_tools, editors, email, internet). Userpatches and board configs in the wild still set DESKTOP_APPGROUPS_SELECTED, and silently ignoring it would produce a thinner desktop than the user expects. Map it to tier=full when DESKTOP_TIER isn't set explicitly, with one carve-out: the sentinel 'none' (meaning 'base DE, no extras') is treated as empty — the user didn't actually pick any appgroups, so don't upgrade them to tier=full on the basis of a placeholder value. Print a one-liner warning so the operator sees the mapping and can switch to explicit tier= when they next edit the config.
armbian-plymouth-theme was installed from rootfs-create.sh after the rootfs cache was extracted. That's the wrong place for it: distro-agnostic.sh already owns the 'post-cache, pre-image' step where branding and bsp packages land, and splitting plymouth out into its own call in rootfs-create means it runs in the per-chroot pre-cache path on builds that hit a cache miss, but NOT in the post-cache path on a cache hit — inconsistent. Move the install back into distro-agnostic.sh where every desktop build passes through it regardless of rootfs cache state, and drop the corresponding stanza from rootfs-create.sh. Net: plymouth ends up on every desktop image, cache-hit or cache-miss, with no code duplication.
artifact_rootfs_cli_adapter_config_prep set SKIP_ARMBIAN_REPO=yes unconditionally, which made sense when rootfs assembly only needed the distro archive. It doesn't anymore: the new desktop install path runs 'armbian-config --api module_desktops install mode=build' from inside rootfs-create.sh (see earlier commit in this PR), and armbian-config itself lives in the <release>-utils component of apt.armbian.com, with firefox / chromium / GNOME branding in <release>-desktop. With SKIP_ARMBIAN_REPO=yes forced on, the install step would hit 'E: Unable to locate package armbian-config' at rootfs-create time for every desktop build. Default the variable to 'no' instead, so apt.armbian.com is attached during rootfs assembly, and make it a readonly '-g -r' declaration so a hook can't flip it back under our feet. Boards / userpatches that still need the old repo-free behaviour (air-gapped mirror setups, exotic embedded use cases) can still pre-set SKIP_ARMBIAN_REPO=yes before the function runs — the ':-' default only kicks in when it's unset.
…nto cache_type
Two bugs that conspired to make 'new configng commit but still
served the old rootfs from cache' the default behaviour.
1. The fetch_from_repo for armbian-configng was gated inside the
'[[ -z $DESKTOP_ENVIRONMENT ]]' branch of
interactive_desktop_main_configuration, so it only fired when
the user picked a DE from the interactive dialog. Every
non-interactive build (CI, items-from-inventory, scripted
local with DESKTOP_ENVIRONMENT= pre-set) skipped the fetch —
which left whatever stale clone happened to live in
cache/sources/armbian-configng/ as the source of truth for
the CONFIGNG_DESKTOPS_HASH input.
Hoist the fetch + parser-path sanity check up above the gate
so every BUILD_DESKTOP=yes invocation pulls branch:main.
fetch_from_repo is idempotent on an already-cloned tree
(just a git pull) so the warm-cache cost is one up-to-date
check.
2. The resolved rootfs tarball filename is
rootfs-<arch>-<release>-<cache_type>_<yyyymm>-<cache_id>.tar.zst.
cache_id = packages_hash came from AGGREGATED_ROOTFS_HASH +
hook hash + bash hash — none of which see armbian-configng.
cache_type encoded DESKTOP_ENVIRONMENT ('xfce-desktop',
'gnome-desktop', …) but not DESKTOP_TIER and not any
fingerprint of the configng tree. Consequences:
- A tier=minimal rootfs and a tier=full rootfs for the same
DE collided on one filename. Whichever built first got
cached; every subsequent tier silently reused its tarball.
- A configng commit that changed which packages a DE
installs (yaml edit, tier_override bump, new browser
mapping) produced a different CONFIGNG_DESKTOPS_HASH in
artifact_input_variables, but the local tarball was still
named the same, so the lookup kept hitting the pre-change
artifact.
Fold both into cache_type. Net rename:
rootfs-arm64-trixie-xfce-desktop_…tar.zst
→
rootfs-arm64-trixie-xfce-desktop-mid-a1b2c3d4_…tar.zst
8-char suffix is the configng commit prefix. Only injected
for BUILD_DESKTOP=yes; only when the value is a real SHA
(not the 'undetermined' / 'unknown' sentinels the
computation falls back to on clone failures).
43eae27 to
0f8c676
Compare
5 tasks
config/desktop/ tree to armbian-config module_desktops
igorpecovnik
added a commit
to armbian/documentation
that referenced
this pull request
Apr 20, 2026
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).
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.
Overview
Replaces Armbian's legacy
config/desktop/machinery (~10,000 lines of package lists, per-DE/per-release postinst scripts, create-package shell scripts, and build-sidearmbian-desktop/armbian-bsp-desktopmeta-package producers) with a single YAML-driven desktop pipeline maintained inarmbian/configngundertools/modules/desktops/.At image-build time the rootfs-create pipeline now calls:
inside the chroot. configng's
module_desktopsreads its YAML definitions, resolves packages / repo pins / branding / tier overrides for the target(release, arch, DE, tier)and installs the result. The build framework no longer synthesises package lists fromconfig/desktop/…/config_base/packages+ appgroup fan-out — that tree is deleted wholesale.What's in this PR
7 commits, each a self-contained logical unit, in dependency order:
desktops: replace legacy config/desktop/ tree with armbian-config module_desktops— the core wire-up. Rewritesinteractive_desktop_main_configuration, hooksmodule_desktops install mode=buildintorootfs-create.sh, deletesconfig/desktop/+artifact-armbian-desktop+artifact-armbian-bsp-desktop+rootfs-desktop.sh, drops the duplicate DM-disable, regenerates the library-functions loader. ~9,500 deletions, ~200 insertions.tools: source desktop inventory from armbian-configng YAMLs—armbian_utils.armbian_get_all_userspace_inventorynow subprocessesparse_desktop_yaml.py --list-jsoninstead of walking the removed tree. Keepsstatus: supportedfor the auto-generated matrix (community DEs are installable but don't fan out into CI by default; unsupported DEs never).targets-compositor: add tiers + skip/only-arches to items-from-inventory— two orthogonal knobs foruserpatches/targets-*.yaml:tiers: [minimal, mid, full]to emit one rootfs per tier per matched DE, andskip-arches:/only-arches:for arch-level filtering on the items side (mirrors the existing desktops-side filters).desktops: backwards-compat for legacy DESKTOP_APPGROUPS_SELECTED— userpatches in the wild still set this; map non-empty values totier=fullwhenDESKTOP_TIERisn't explicit, with"none"treated as empty.rootfs-create: restore armbian-plymouth-theme install to distro-agnostic— move the install back into the post-cache path so it lands on every desktop image, cache-hit or cache-miss.artifact-rootfs: stop forcing SKIP_ARMBIAN_REPO=yes; default to no—armbian-configlives in<release>-utilson apt.armbian.com; the new rootfs-create flow needs the repo attached during assembly.rootfs cache: refresh configng every build; fingerprint tier + hash into cache_type— two cache-correctness bugs: (a)fetch_from_repo armbian-configngwas gated on-z $DESKTOP_ENVIRONMENTso non-interactive (CI / items-from-inventory) builds never refreshed the clone and the cache-key input was stale; (b)cache_typeencoded DE but notDESKTOP_TIERand not any fingerprint of the configng tree, so tier=minimal and tier=full collided, and configng commits didn't produce cache misses. Both fixed.Non-desktop-related cleanup commits were split out of this PR into #9704 (verbose mmdebstrap,
DOCKER_PRUNE=yesopt-in, broken drm/xe patches disabled). #9704 is not a prerequisite here and vice-versa.Companion work in other repos
This PR lands alongside a large body of work in the rest of the Armbian org:
armbian/configng— new home of everything desktoptools/modules/desktops/subsystem: 11 per-DE YAML files,common.yamlwith shared tier definitions + browser substitution table +tier_overrides(arch-wide and per-release-per-arch), the standalonescripts/parse_desktop_yaml.pyCLI, the mainmodule_desktops.shdispatcher, per-module helpers (module_desktop_branding.sh,module_desktop_repo.sh,module_desktop_yamlparse.sh,module_desktop_getuser.sh,module_update_skel.sh), optionalpostinst/<de>.shhooks, shared branding (wallpapers, greeters, skel, browser policy files), and greeter configs (lightdm + sddm plasma-chili theme).module_desktopssupports:install/remove/upgrade/downgrade/set-tier/tier/at-tier/status/auto/manual/login/supported/installed.install mode=buildskips user / DM / skel work for image-build contexts.apt installof resolved package list → DM install → armbian-plymouth-theme (runtime only) → manifest + tier marker under/etc/armbian/desktop/→ branding copy → (if live) group adds, skel propagation, DM start, auto-login config.apt-get -s purgedry-run, drop anything flagged as essential-breaking, then real purge) — avoids thee2fsprogs/libext2fs2t64vetos that cancel the whole transaction on post-t64 base images._module_desktops_configure_networkingflips/etc/netplan/fromrenderer: networkdtorenderer: NetworkManageron a live install so the NM applet actually controls the link, mirroring the build-time extension inarmbian/build/extensions/network/.parse_desktop_yaml.pyemitsDESKTOP_PACKAGES/DESKTOP_PACKAGES_UNINSTALL/DESKTOP_DM/DESKTOP_STATUS/DESKTOP_AVAILABLE/DESKTOP_PRIMARY_PKG/DESKTOP_REPO_*, plus--list/--list-json/--primariesmodes with--filter available|unavailable|alland--status <csv>axes.maintenance-desktop-audit.yml(weekly, Claude-assisted YAML drift PRs),maintenance-unit-tests.yml(multi-arch matrix with native + qemu-emulated runners, per-test JSON results, publish to armbian.github.io, backfill for runner-killed jobs).tests/<DE>NN.confwithRELEASE/TESTARCH/tierknobs. Current coverage: XFCE01/02 + GNME01/02 on bookworm/trixie/noble/resolute × arm64/amd64/armhf/riscv64 where supported.armbian/os— targets YAML catch-upuserpatches/targets-all-not-eos.yamlrewritten:tiers: [minimal, mid, full]on everyitems-from-inventory.userspaceblock,skip-releases: [questing, sid],only-desktops:dropped (rely on configng'sstatusfilter in the compositor), loong64 scoped tosid+tiers: [minimal]only.external/widevine-noble.confadded — pullslibwidevinecdm0arm64/armhf fromliujianfeng1994/rockchip-multimediaPPA so Chromium can play DRM-protected streams on noble desktops.external/chromium-*.conf+firefox-*.confsuite aligned with the browser map in configng'scommon.yaml.armbian/documentation— Developer-Guide_Desktops.mdFull rewrite of the Desktops developer guide: YAML schema, tier model, resolution algorithm, browser virtual-token lookup,
tier_overridestwo-layer schema,module_desktopsbash API surface, lifecycle diagrams for install / remove / upgrade / downgrade / set-tier, container/CI awareness, "adding a new desktop" recipe, matrix-audit automation, common pitfalls (packages_uninstall cascade, gdm3 daemon.conf vs custom.conf, login-regex anchoring), security notes (path traversal, shell-escaping, GPG keyring fetch, apt[signed-by=]).armbian/docker-armbian-build— build-time container images.github/workflows/build-docker-images.ymlgained riscv64 + armhf in its matrix so the configng unit-test workflow can pull per-(release, arch) base images for every slot including the qemu-emulated ones..github/dependabot.ymladded for github-actions ecosystem tracking.armbian/armbian.github.io— publish + repo plumbinginfrastructure-download-external.yml:preclean/postcleanpurge jobs now gated onCHUNK_INDEX == 0so the repo-side delete op runs exactly once per workflow instead of 4× in parallel (the fan-out is only useful for per-package download, not for shared-state aptly deletes).infrastructure-repository-update.yml: addedFix workspace ownershippre-checkout steps on everyruns-on: repositoryjob so rerun / multi-runner handoffs don't tripactions/checkout@v6on root-owned workspace leftovers.databranch feed) modelled afterdata-update-jira-excerpt.yml— commits todatabranch with retry-rebase, thenrepository_dispatch→Web: Directory listingto trigger the site rebuild.Test plan
./compile.sh BOARD=uefi-x86 BRANCH=current RELEASE=trixie BUILD_DESKTOP=yes DESKTOP_ENVIRONMENT=xfce DESKTOP_TIER=mid— rootfs assembles, armbian-config installs from apt.armbian.com,module_desktops install mode=buildpulls xfce from configng YAML, image boots with NM-driven network + lightdm + XFCE default wallpaper.BUILD_MINIMAL=yes, CLI) unaffected — no configng clone pulled, no desktop code paths touched.parse_desktop_yaml.py --list-json <release> <arch>resolves the expected supported DEs for every non-eos release we ship.items-from-inventoryexpansion produces the right slot count fortargets-all-not-eos.yaml(~360 userspace rootfs + board-basedall-desktop/all-cliimages).CONFIGNG_DESKTOPS_HASHfingerprint incache_type).DESKTOP_APPGROUPS_SELECTED=office,multimedia ./compile.sh …logs the back-compat mapping and produces atier=fullrootfs.Rollback
Revert in reverse order. Commit #1 is the hardest to roll back cleanly (legacy
config/desktop/tree is recoverable from git history but is 10K+ lines). Commits #2–#7 are each small and independently revertable.