Skip to content

Conversation

@tabrisnet
Copy link
Collaborator

@tabrisnet tabrisnet commented Nov 25, 2025

Description

fixes for APA, with caveat that it only really works now for desktop builds. This isn't a good idea to merge until there's more work on APA itself, specifically minimal & CLI meta-packages.

alternative to #8999, trying to fix #8965
armbian/apa#25 has to be merged/deployed first.

How Has This Been Tested?

  • time ./compile.sh artifact WHAT=rootfs BOARD=rock-5b BRANCH=current BUILD_DESKTOP=yes DESKTOP_ENVIRONMENT=gnome BUILD_MINIMAL=no RELEASE=questing KERNEL_CONFIGURE=no KERNEL_GIT=full MANAGE_ACNG='http://squid.tabris.net:3142/' COMPRESS_OUTPUTIMAGE=xz DEB_COMPRESS=xz ARTIFACT_IGNORE_CACHE=yes
  • time ./compile.sh artifact WHAT=rootfs BOARD=rock-5b BRANCH=current BUILD_DESKTOP=yes DESKTOP_ENVIRONMENT=gnome BUILD_MINIMAL=no RELEASE=noble KERNEL_CONFIGURE=no KERNEL_GIT=full MANAGE_ACNG='http://squid.tabris.net:3142/' COMPRESS_OUTPUTIMAGE=xz DEB_COMPRESS=xz ARTIFACT_IGNORE_CACHE=yes
  • sid fails

Checklist:

Please delete options that are not relevant.

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Summary by CodeRabbit

  • New Features

    • Added support for a new desktop environment variant with multiple desktop managers: GNOME, Cinnamon, KDE Plasma, XFCE, i3-wm, and KDE Plasma Mobile.
    • Added custom wallpapers and branding assets for GNOME desktop.
    • Enhanced architecture support across multiple desktop environments.
  • Improvements

    • Desktop configuration now conditional based on system state for better integration with package management.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 25, 2025

Warning

Rate limit exceeded

@tabrisnet has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 8 minutes and 38 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between ebd816c and 45d54cd.

📒 Files selected for processing (36)
  • config/cli/questing/debootstrap/components (1 hunks)
  • config/cli/questing/debootstrap/packages (1 hunks)
  • config/cli/questing/main/config_desktop (1 hunks)
  • config/cli/questing/main/packages (1 hunks)
  • config/cli/resolute (1 hunks)
  • config/desktop/questing/appgroups (1 hunks)
  • config/desktop/questing/environments/cinnamon/architectures (1 hunks)
  • config/desktop/questing/environments/cinnamon/armbian (1 hunks)
  • config/desktop/questing/environments/cinnamon/config_base/packages (1 hunks)
  • config/desktop/questing/environments/cinnamon/debian (1 hunks)
  • config/desktop/questing/environments/cinnamon/support (1 hunks)
  • config/desktop/questing/environments/gnome/architectures (1 hunks)
  • config/desktop/questing/environments/gnome/armbian (1 hunks)
  • config/desktop/questing/environments/gnome/config_base/packages (1 hunks)
  • config/desktop/questing/environments/gnome/debian (1 hunks)
  • config/desktop/questing/environments/gnome/support (1 hunks)
  • config/desktop/questing/environments/i3-wm/architectures (1 hunks)
  • config/desktop/questing/environments/i3-wm/armbian (1 hunks)
  • config/desktop/questing/environments/i3-wm/config_base/packages (1 hunks)
  • config/desktop/questing/environments/i3-wm/debian (1 hunks)
  • config/desktop/questing/environments/i3-wm/support (1 hunks)
  • config/desktop/questing/environments/kde-plasma-mobile (1 hunks)
  • config/desktop/questing/environments/kde-plasma/architectures (1 hunks)
  • config/desktop/questing/environments/kde-plasma/config_base/packages (1 hunks)
  • config/desktop/questing/environments/kde-plasma/debian (1 hunks)
  • config/desktop/questing/environments/kde-plasma/support (1 hunks)
  • config/desktop/questing/environments/xfce/architectures (1 hunks)
  • config/desktop/questing/environments/xfce/armbian (1 hunks)
  • config/desktop/questing/environments/xfce/config_base/packages (1 hunks)
  • config/desktop/questing/environments/xfce/debian (1 hunks)
  • config/desktop/questing/environments/xfce/support (1 hunks)
  • config/desktop/resolute (1 hunks)
  • lib/functions/bsp/armbian-bsp-cli-deb.sh (1 hunks)
  • lib/functions/configuration/config-desktop.sh (1 hunks)
  • lib/functions/main/config-prepare.sh (1 hunks)
  • lib/functions/rootfs/rootfs-create.sh (2 hunks)

Walkthrough

This PR introduces desktop environment configuration for the Questing variant and gates desktop installation behind the APA extension. It adds configuration files for GNOME, Cinnamon, KDE Plasma, i3-wm, and XFCE environments, modifies rootfs bootstrap argument construction to be conditional, and implements APA lifecycle hooks in the build flow.

Changes

Cohort / File(s) Summary
Desktop sanity check gating
lib/functions/main/config-prepare.sh
Desktop environment checks now skip when APA_IS_ACTIVE is true, deferring desktop setup to the APA extension
Rootfs bootstrap conditionals
lib/functions/rootfs/rootfs-create.sh
Debootstrap arguments built conditionally based on AGGREGATED_PACKAGES_DEBOOTSTRAP_COMMA and AGGREGATED_DEBOOTSTRAP_COMPONENTS_COMMA; added APA hook invocations (post_armbian_repo_customize_image__install_from_apa)
Desktop configuration gating
lib/functions/configuration/config-desktop.sh
Early-return gate added: skips interactive desktop configuration when APA_IS_ACTIVE is unset
CLI Questing configuration
config/cli/questing/debootstrap/components, config/cli/questing/debootstrap/packages, config/cli/questing/main/config_desktop, config/cli/questing/main/packages
New configuration files for Questing CLI variant; debootstrap packages reference locales and apt; configuration delegated to common paths
CLI Questing resolver
config/cli/resolute
Points to "questing"
GNOME Questing desktop environment
config/desktop/questing/environments/gnome/architectures, config/desktop/questing/environments/gnome/config_base/packages, config/desktop/questing/environments/gnome/support, config/desktop/questing/environments/gnome/debian, config/desktop/questing/environments/gnome/armbian/create_desktop_package.sh
GNOME desktop configuration; armbian script installs LightDM, creates desktop skeleton, icons, wallpapers, and generates armbian.xml wallpaper metadata
Cinnamon Questing desktop environment
config/desktop/questing/environments/cinnamon/architectures, config/desktop/questing/environments/cinnamon/config_base/packages, config/desktop/questing/environments/cinnamon/support, config/desktop/questing/environments/cinnamon/armbian, config/desktop/questing/environments/cinnamon/debian
Cinnamon desktop configuration; references GNOME packages and delegated to plucky armbian/debian paths
i3-wm Questing desktop environment
config/desktop/questing/environments/i3-wm/architectures, config/desktop/questing/environments/i3-wm/armbian, config/desktop/questing/environments/i3-wm/config_base/packages, config/desktop/questing/environments/i3-wm/debian, config/desktop/questing/environments/i3-wm/support
i3-wm desktop configuration; references delegated to common and plucky paths; packages reference GNOME
KDE Plasma Questing desktop environment
config/desktop/questing/environments/kde-plasma/architectures, config/desktop/questing/environments/kde-plasma/config_base/packages, config/desktop/questing/environments/kde-plasma/support, config/desktop/questing/environments/kde-plasma/debian
KDE Plasma configuration; references plucky debian path and GNOME packages
KDE Plasma Mobile Questing environment
config/desktop/questing/environments/kde-plasma-mobile
References "kde-plasma"
XFCE Questing desktop environment
config/desktop/questing/environments/xfce/architectures, config/desktop/questing/environments/xfce/config_base/packages, config/desktop/questing/environments/xfce/support, config/desktop/questing/environments/xfce/armbian, config/desktop/questing/environments/xfce/debian
XFCE configuration; broader architecture support (arm64, amd64, armhf, riscv64); references plucky paths and GNOME packages
Desktop Questing resolver and appgroups
config/desktop/resolute, config/desktop/questing/appgroups
Desktop resolver points to "questing"; appgroups references plucky appgroups

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Path correctness verification: Over 30 new config files with relative path references to common, plucky, and gnome paths require confirmation that all references resolve correctly
  • APA hook duplication in rootfs-create.sh: The post_armbian_repo_customize_image__install_from_apa hook appears twice in the script; verify intentionality and correct hook invocation context
  • Package list consistency: Verify that package lists (locales, apt) and component references are appropriate for Questing variant given the linked bug about missing/problematic packages
  • Desktop environment completeness: Ensure all desktop environment configurations (GNOME, Cinnamon, i3-wm, KDE Plasma, XFCE) have complete and consistent architecture/support declarations
  • GNOME armbian script validation: The new create_desktop_package.sh script with wallpaper metadata generation should be verified for correctness and completeness

Possibly related PRs

Suggested reviewers

  • igorpecovnik
  • rpardini
  • EvilOlaf

Poem

🐰 Questing hops into focus,
With desktops now delegated to APA,
Wallpapers bloom like clover,
While packages find their true home,
The build path resolves at last! 🌱

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'rely on APA for bootstrapping' clearly summarizes the main change: integrating APA (Armbian Package Assistant) into the bootstrapping process for rootfs creation.
Linked Issues check ✅ Passed The PR addresses issue #8965 by implementing APA-based bootstrapping to resolve package resolution failures in Questing desktop builds, with successful desktop builds confirmed for gnome and kde-plasma environments.
Out of Scope Changes check ✅ Passed All changes are scoped to APA integration: conditional desktop checks, debootstrap argument building, APA hook invocations, and new Questing environment configurations align with the bootstrapping objective.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added 11 Milestone: Fourth quarter release size/small PR with less then 50 lines Needs review Seeking for review Framework Framework components labels Nov 25, 2025
@tabrisnet
Copy link
Collaborator Author

tabrisnet commented Nov 25, 2025

current status: busted
@leggewie
time ./compile.sh artifact WHAT=rootfs BOARD=rock-5b BRANCH=current BUILD_DESKTOP=yes DESKTOP_ENVIRONMENT=gnome BUILD_MINIMAL=no RELEASE=questing KERNEL_CONFIGURE=no KERNEL_GIT=full MANAGE_ACNG='http://squid.tabris.net:3142/' COMPRESS_OUTPUTIMAGE=xz DEB_COMPRESS=xz ARTIFACT_IGNORE_CACHE=yes
https://paste.armbian.com/colanibemi

[🐳|🔨]   removed '/armbian/.tmp/rootfs-47103777-e85c-49ca-a59d-77ce6c1e92b0/etc/resolv.conf'
[🐳|🔨]   rm: cannot remove '/armbian/.tmp/rootfs-47103777-e85c-49ca-a59d-77ce6c1e92b0/var/lib/dbus/machine-id': No such file or directory
[🐳|💥] Error 1 occurred in main shell [ at /armbian/lib/functions/logging/runners.sh:223
    run_host_command_logged_raw() --> lib/functions/logging/runners.sh:223
        run_host_command_logged() --> lib/functions/logging/runners.sh:205
   create_new_rootfs_cache_via_debootstrap() --> lib/functions/rootfs/rootfs-create.sh:355
        create_new_rootfs_cache() --> lib/functions/rootfs/create-cache.sh:70
                do_with_logging() --> lib/functions/logging/section-logging.sh:81
   artifact_rootfs_build_from_sources() --> lib/functions/artifacts/artifact-rootfs.sh:81
    artifact_build_from_sources() --> lib/functions/artifacts/artifacts-obtain.sh:34
       obtain_complete_artifact() --> lib/functions/artifacts/artifacts-obtain.sh:280
          do_with_default_build() --> lib/functions/main/default-build.sh:42
               cli_artifact_run() --> lib/functions/cli/cli-artifact.sh:72
        armbian_cli_run_command() --> lib/functions/cli/utils-cli.sh:136
                 cli_entrypoint() --> lib/functions/cli/entrypoint.sh:208
                           main() --> compile.sh:50
 ]
[🐳|💥] Cleaning up [ please wait for cleanups to finish ]

@tabrisnet
Copy link
Collaborator Author

tabrisnet commented Nov 25, 2025

status: working, but the APA hook needs some adjustments.
https://paste.armbian.com/epezelamum

@tabrisnet tabrisnet marked this pull request as ready for review November 25, 2025 23:06
@tabrisnet tabrisnet requested a review from a team as a code owner November 25, 2025 23:06
@tabrisnet tabrisnet added 02 Milestone: First quarter release and removed 11 Milestone: Fourth quarter release labels Nov 25, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
lib/functions/rootfs/rootfs-create.sh (1)

164-166: Address FIXME: Consider pushing locales-gen logic into APA extension.

Line 164 raises a design question about whether the locales+apt fallback should be handled by the APA extension rather than as a debootstrap default. This is reasonable as APA matures. However, leaving this unresolved creates maintenance debt. Clarify ownership:

  • If locales must remain in debootstrap, document why it cannot be in extensions.
  • If this is a planned refactoring for a future PR, track it as a follow-up issue.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 6aa7828 and cbf445f.

📒 Files selected for processing (2)
  • lib/functions/main/config-prepare.sh (1 hunks)
  • lib/functions/rootfs/rootfs-create.sh (2 hunks)
🧰 Additional context used
🧠 Learnings (10)
📓 Common learnings
Learnt from: leggewie
Repo: armbian/build PR: 8559
File: config/desktop/sid/environments/kde-plasma:1-1
Timestamp: 2025-08-29T18:57:26.930Z
Learning: APA (Armbian Packaging Archive) is a project that focuses on defining package dependencies and will replace the aggregation part of the current build system, but not the entire build system. It is not a full replacement for desktop environment configuration approaches.
Learnt from: tabrisnet
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-10-24T04:46:22.901Z
Learning: In lib/functions/rootfs/rootfs-create.sh, the FIXME comment about mmdebstrap usage with --aptopt is a future note related to PR #8785, which hasn't been merged yet.
Learnt from: Grippy98
Repo: armbian/build PR: 8202
File: config/desktop/trixie/environments/gnome/armbian/create_desktop_package.sh:2-3
Timestamp: 2025-05-16T15:34:34.672Z
Learning: The shell scripts in the Armbian build system's desktop configuration files, such as config/desktop/trixie/environments/gnome/armbian/create_desktop_package.sh, rely on environment variables like $SRC and $destination that are expected to be set externally before the script is executed.
📚 Learning: 2025-10-24T04:46:22.901Z
Learnt from: tabrisnet
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-10-24T04:46:22.901Z
Learning: In lib/functions/rootfs/rootfs-create.sh, the FIXME comment about mmdebstrap usage with --aptopt is a future note related to PR #8785, which hasn't been merged yet.

Applied to files:

  • lib/functions/rootfs/rootfs-create.sh
📚 Learning: 2025-08-29T18:57:26.930Z
Learnt from: leggewie
Repo: armbian/build PR: 8559
File: config/desktop/sid/environments/kde-plasma:1-1
Timestamp: 2025-08-29T18:57:26.930Z
Learning: APA (Armbian Packaging Archive) is a project that focuses on defining package dependencies and will replace the aggregation part of the current build system, but not the entire build system. It is not a full replacement for desktop environment configuration approaches.

Applied to files:

  • lib/functions/rootfs/rootfs-create.sh
📚 Learning: 2025-10-24T04:46:22.901Z
Learnt from: tabrisnet
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-10-24T04:46:22.901Z
Learning: The `debootstrap` tool doesn't use `apt`, which is important context when reviewing apt-related configuration in rootfs creation code.

Applied to files:

  • lib/functions/rootfs/rootfs-create.sh
📚 Learning: 2025-11-20T18:20:11.985Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8968
File: patch/u-boot/u-boot-sunxi/arm64-dts-sun50i-h6-orangepi.dtsi-Rollback-r_rsb-to-r_i2c.patch:36-36
Timestamp: 2025-11-20T18:20:11.985Z
Learning: The rewrite-patches tool (REWRITE_PATCHES=yes) in the Armbian build system can inadvertently introduce semantic changes when the u-boot/kernel git base revision differs from expected state. The tool applies patches, commits them, and re-exports them using git format-patch, which can cause the re-exported patch to reflect the base revision's state rather than preserving the original patch intent. This is particularly problematic for device tree changes like interrupt specifications. The tool currently lacks validation mechanisms to detect such semantic drift, and affected patches must be manually corrected after rewriting.

Applied to files:

  • lib/functions/rootfs/rootfs-create.sh
📚 Learning: 2025-06-22T00:45:26.182Z
Learnt from: djurny
Repo: armbian/build PR: 8315
File: lib/functions/rootfs/distro-agnostic.sh:54-68
Timestamp: 2025-06-22T00:45:26.182Z
Learning: In Armbian build system, external command dependencies like envsubst are handled by adding the required packages (e.g., gettext for envsubst) to host_dependencies in adaptative_prepare_host_dependencies function in lib/functions/host/prepare-host.sh, rather than checking command availability at runtime.

Applied to files:

  • lib/functions/rootfs/rootfs-create.sh
📚 Learning: 2025-06-14T05:53:10.627Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8298
File: extensions/https_proxy.sh:1-9
Timestamp: 2025-06-14T05:53:10.627Z
Learning: Armbian build framework extensions are NOT designed to run standalone but are called by the supervisor. The framework provides environment variables like USERPATCHES_PATH and SDCARD, and commands are executed with protection via run_host_command_logged and chroot_sdcard functions that use bash -e -o pipefail.

Applied to files:

  • lib/functions/rootfs/rootfs-create.sh
📚 Learning: 2025-09-24T09:54:07.968Z
Learnt from: amazingfate
Repo: armbian/build PR: 8668
File: extensions/ufs.sh:2-2
Timestamp: 2025-09-24T09:54:07.968Z
Learning: In Armbian's build system, DOCKER_ARMBIAN_BASE_IMAGE must be set globally at file load time in extensions, not inside extension_prepare_config functions, because docker operations happen early in the build process and would default to ubuntu:noble if not set before docker_cli_prepare() runs.

Applied to files:

  • lib/functions/rootfs/rootfs-create.sh
📚 Learning: 2025-05-16T15:34:34.672Z
Learnt from: Grippy98
Repo: armbian/build PR: 8202
File: config/desktop/trixie/environments/gnome/armbian/create_desktop_package.sh:2-3
Timestamp: 2025-05-16T15:34:34.672Z
Learning: The shell scripts in the Armbian build system's desktop configuration files, such as config/desktop/trixie/environments/gnome/armbian/create_desktop_package.sh, rely on environment variables like $SRC and $destination that are expected to be set externally before the script is executed.

Applied to files:

  • lib/functions/rootfs/rootfs-create.sh
📚 Learning: 2025-08-19T04:55:45.648Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-08-19T04:55:45.648Z
Learning: In Armbian build configurations, HTTP is preferred over HTTPS for APT repository URLs because: 1) APT package signing provides sufficient tamper protection through cryptographic verification, 2) HTTPS complicates package caching with tools like Squid, and 3) this is an established pattern across their repository configurations.

Applied to files:

  • lib/functions/rootfs/rootfs-create.sh
🧬 Code graph analysis (1)
lib/functions/rootfs/rootfs-create.sh (1)
extensions/apa.sh (1)
  • post_armbian_repo_customize_image__install_from_apa (12-25)
🔇 Additional comments (3)
lib/functions/rootfs/rootfs-create.sh (2)

160-171: Verify aggregation.py generates AGGREGATED_ variables consistently.*

The debootstrap argument construction now depends on variables (AGGREGATED_PACKAGES_DEBOOTSTRAP_COMMA, AGGREGATED_DEBOOTSTRAP_COMPONENTS_COMMA) generated by aggregation.py. The fallback to locales,apt is reasonable, but confirm:

  1. Aggregation consistency: Ensure aggregation.py is invoked and these variables are always defined before this code path, regardless of build mode (minimal, desktop, APA-active, etc.). If aggregation fails silently, builds may proceed with insufficient packages.

  2. Conditional components: The --components argument is only added if AGGREGATED_DEBOOTSTRAP_COMPONENTS_COMMA is non-empty. Verify this is the intended behavior and that omitting this argument has the expected default behavior for all supported distributions (Debian, Ubuntu).

Based on learnings, debootstrap doesn't use apt, so these package selections are critical for base image integrity.


337-339: I'm encountering persistent repository cloning issues that prevent me from directly verifying the concerns in the review comment. However, based on the learnings provided and the nature of the concerns, I can assess the situation:

From the provided learnings:

  • The learning from EvilOlaf explains that hook names follow the pattern hook_point__unique_identifier(), where the part before __ defines execution timing and the part after is just a unique identifier.
  • The current hook name post_armbian_repo_customize_image__install_from_apa appears to follow this standard pattern correctly (post_armbian_repo_customize_image = hook point, install_from_apa = unique identifier).

Cannot fully verify without codebase access:

  1. The actual count of hook invocations (whether single or duplicate)
  2. The specific DESKTOP_ENVIRONMENT handling when APA_IS_ACTIVE is true
  3. The exact behavior of the validation bypass mentioned in config-prepare.sh line 361

Since I cannot execute shell scripts to definitively verify the three key concerns raised in the review comment, I must mark this as requiring manual verification:


Verify hook naming convention compliance and duplicate invocation claims.

The FIXME comment regarding hook renaming at line 338 may be obsolete if the name already follows Armbian's standard pattern (hook_point__unique_identifier). The claim of duplicate invocation and DESKTOP_ENVIRONMENT dependency issues requires direct codebase inspection that infrastructure limitations prevent me from completing.

lib/functions/main/config-prepare.sh (1)

361-361: I'm unable to access the repository to verify the concerns directly due to cloning failures. However, based on the review comment provided and the code snippet shown, I can see the specific issues raised are theoretically valid but require verification against the actual codebase.

Let me provide a rewritten review comment that maintains the concerns while being clear about what needs verification:


Verify APA_IS_ACTIVE initialization and validate DESKTOP_ENVIRONMENT requirements in APA mode.

The desktop environment validation is now conditionally skipped when APA_IS_ACTIVE is true. While this may be intentional for APA-based builds, the implementation has potential fragility:

  1. Bare variable test syntax: The condition uses ! $APA_IS_ACTIVE without quotes. This relies on shell truthiness (unset/empty = false) rather than explicit value comparison. Consider [[ "${APA_IS_ACTIVE}" != "yes" ]] or similar for clarity and to catch accidental uninitialized states.

  2. Downstream DESKTOP_ENVIRONMENT dependency: The hook post_armbian_repo_customize_image__install_from_apa in rootfs-create.sh (lines 337–339) references DESKTOP_ENVIRONMENT. Verify that validation bypass does not leave DESKTOP_ENVIRONMENT in an invalid state when the hook executes, or ensure the hook has its own safeguards.

  3. Validation strategy: Per the learnings, APA is not a full desktop environment configuration replacement. Consider whether running APA-specific validation in addition to existing checks (rather than skipping them) would catch misconfigurations earlier.

@tabrisnet tabrisnet added the Work in progress Unfinished / work in progress label Nov 25, 2025
@leggewie
Copy link
Collaborator

I think I have an idea for a quicker way to transition that will be less disruptive

@tabrisnet
Copy link
Collaborator Author

  • sid fails: time ./compile.sh artifact WHAT=rootfs BOARD=rock-5b BRANCH=current BUILD_DESKTOP=yes DESKTOP_ENVIRONMENT=gnome BUILD_MINIMAL=no RELEASE=sid KERNEL_CONFIGURE=no KERNEL_GIT=full MANAGE_ACNG='http://squid.tabris.net:3142/' COMPRESS_OUTPUTIMAGE=xz DEB_COMPRESS=xz ARTIFACT_IGNORE_CACHE=yes
[🐳|🌱] Installing 0 desktop packages [ sid gnome ]
[🐳|🔨]   E: Unable to satisfy dependencies. Reached two conflicting decisions:
[🐳|🔨]      1. armbian-common:arm64=251126.4 is selected for install
[🐳|🔨]      2. armbian-common:arm64 Depends linux-image
[🐳|🔨]         but none of the choices are installable:
[🐳|🔨]         [no choices]
[🐳|💥] Error 1 occurred in main shell [ at /armbian/extensions/apa.sh:15
   post_armbian_repo_customize_image__install_from_apa() --> extensions/apa.sh:15
   create_new_rootfs_cache_via_debootstrap() --> lib/functions/rootfs/rootfs-create.sh:338
        create_new_rootfs_cache() --> lib/functions/rootfs/create-cache.sh:70
                do_with_logging() --> lib/functions/logging/section-logging.sh:81
   artifact_rootfs_build_from_sources() --> lib/functions/artifacts/artifact-rootfs.sh:81
    artifact_build_from_sources() --> lib/functions/artifacts/artifacts-obtain.sh:34
       obtain_complete_artifact() --> lib/functions/artifacts/artifacts-obtain.sh:280
          do_with_default_build() --> lib/functions/main/default-build.sh:42
               cli_artifact_run() --> lib/functions/cli/cli-artifact.sh:72
        armbian_cli_run_command() --> lib/functions/cli/utils-cli.sh:136
                 cli_entrypoint() --> lib/functions/cli/entrypoint.sh:208
                           main() --> compile.sh:50

@leggewie
Copy link
Collaborator

leggewie commented Nov 26, 2025

my suggestion is #9001 and to gradually simplify sid over time as more logic has shifted over and been tested in APA

@leggewie
Copy link
Collaborator

  • sid fails

let me have a look at that

@leggewie
Copy link
Collaborator

leggewie commented Nov 26, 2025

  • sid fails:

this appears to be specific to the board in question, my guess is the Armbian kernel for the rock-5b fails to provide the linux-image virtual package and it really should.

On my Banana Pi M2+ the armbian kernel package for that board does indeed provide linux-image and hence fulfills the dependency.

Furthermore, the quickest I could test this was nice -n 20 ./compile.sh build BOARD=uefi-x86 BRANCH=current BUILD_DESKTOP=yes BUILD_MINIMAL=no DESKTOP_APPGROUPS_SELECTED= DESKTOP_ENVIRONMENT=gnome DESKTOP_ENVIRONMENT_CONFIG_NAME=config_base ENABLE_EXTENSIONS=image-output-qcow2 KERNEL_BTF=no KERNEL_CONFIGURE=no RELEASE=sid SHARE_LOG=yes and that compiled just fine

@leggewie
Copy link
Collaborator

leggewie commented Nov 26, 2025

Make APA somewhat useful,

BTW, I don't appreciate your categorization of APA as useless, especially when you don't understand what it does in a number of ways.

Breakage with APA was to be expected and as you can see I am dealing with it swiftly and it is being brought in as a canary for edge release pockets where breakage should be expected. Armbian will have a much more sane and manageable way going forward with APA, so no it is not useless at all.

@tabrisnet
Copy link
Collaborator Author

a) I am not intending to throw shade at anyone b) at no point was I saying it would never be useful.
The goal is to make it more useful, to live up to its ambitions.

Despite being a Debian user [for personal stuff] for many many years, I know more of RPM spec files [as working on RH derivatives used to pay my bills] than debian pkgs, so this is also a learning opportunity for me.

@tabrisnet tabrisnet changed the title APA bootstrapping rely on APA for bootstrapping Dec 1, 2025
@tabrisnet tabrisnet force-pushed the tabrisnet_apa_bootstrap branch from cbf445f to 88b4c12 Compare December 1, 2025 02:22
@github-actions github-actions bot added 11 Milestone: Fourth quarter release size/large PR with 250 lines or more Desktop Graphical user interface and removed size/small PR with less then 50 lines labels Dec 1, 2025
@tabrisnet tabrisnet removed the 11 Milestone: Fourth quarter release label Dec 1, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

🧹 Nitpick comments (13)
config/desktop/questing/environments/kde-plasma/armbian/create_desktop_package.sh (1)

1-22: Consider adding error handling for blob asset operations.

The script copies multiple asset blobs via cp and mkdir without error checking. If a source blob path doesn't exist or permissions fail, the script continues silently. Consider adding explicit error handling or relying on set -e at the script level to fail fast if any operation fails.

If error handling is not already managed by the calling context, consider adding:

+set -e
+
 # install lightdm greeter
 cp -R "${SRC}"/packages/blobs/desktop/lightdm "${destination}"/etc/armbian

Alternatively, add explicit checks before critical operations:

 # install default desktop settings
+if [[ ! -d "${SRC}/packages/blobs/desktop/skel" ]]; then
+  echo "Error: Desktop skel template not found" >&2
+  exit 1
+fi
 mkdir -p "${destination}"/etc/skel
 cp -R "${SRC}"/packages/blobs/desktop/skel/. "${destination}"/etc/skel
config/desktop/questing/environments/kde-plasma/debian/postinst (1)

4-5: Consider a more robust approach for PulseAudio configuration.

The current sed pattern only matches if the line ends exactly with "load-module module-udev-detect" (no trailing whitespace or existing arguments). This makes it fragile.

Consider using a pattern that:

  • Checks if tsched=0 is already present to ensure idempotency
  • Handles existing arguments on the line
  • Is more tolerant of whitespace variations

Apply this diff for a more robust implementation:

 # Disable Pulseaudio timer scheduling which does not work with sndhdmi driver
-if [ -f /etc/pulse/default.pa ]; then sed "s/load-module module-udev-detect$/& tsched=0/g" -i  /etc/pulse/default.pa; fi
+if [ -f /etc/pulse/default.pa ]; then
+  if ! grep -q "load-module module-udev-detect.*tsched=0" /etc/pulse/default.pa; then
+    sed -i "s/load-module module-udev-detect\(\s\|$\)/load-module module-udev-detect tsched=0\1/" /etc/pulse/default.pa
+  fi
+fi
config/desktop/questing/appgroups/browsers/debian/postinst (1)

1-12: Add explicit exit status.

Debian postinst scripts should explicitly exit with status 0 on successful completion. Without this, the script returns the exit status of the last command, which could cause package configuration to fail if the final conditional evaluates to false or a command fails.

Add at the end of the script:

 	echo 'pref("general.config.filename", "mozilla.cfg");' >> /usr/lib/firefox-esr/defaults/pref/local-settings.js
 fi
+
+exit 0
config/desktop/questing/environments/xfce/debian/postinst (3)

1-2: LightDM config copy: consider preserving attributes and confirm overwrite policy

Using cp -R will not preserve all attributes and will overwrite any locally modified /etc/lightdm files on every install/upgrade.

  • Prefer cp -a to preserve permissions, ownership, symlinks, and timestamps.
  • Confirm that overwriting user changes on every run is intended; if not, you may want a more conservative merge strategy.
-if [ -d /etc/armbian/lightdm ]; then cp -R /etc/armbian/lightdm /etc/; fi
+if [ -d /etc/armbian/lightdm ]; then cp -a /etc/armbian/lightdm /etc/; fi

Also, please verify that this snippet is appended to a common postinst stub that provides #!/bin/sh and (ideally) set -e; if not, those should be added here.


5-9: XFCE menu sed: very dense and brittle; consider making it more maintainable

The sed -i -n '...{p;:a;N;...;s/.../...\n.../};p' one-liner is hard to read and assumes the presence of both <Menuname>Settings</Menuname> and <Filename>xfce4-session-logout.desktop</Filename> in the expected order.

  • This will be fragile to upstream changes in xfce-applications.menu.
  • Future contributors will struggle to safely modify or debug this logic.

Consider either:

  • Breaking the sed script out into a multi-line, commented cat <<'EOF' | sed -f - style block, or
  • Using a simpler approach (e.g., insert only when both markers are found, with explicit checks) to fail more gracefully when the structure changes.

11-15: Hiding applications by renaming /usr/share/applications/*.desktop may fight dpkg

Renaming package-owned .desktop files in /usr/share/applications to .desktop.hidden modifies the package-managed tree:

  • Upgrades or reinstalls of the respective packages may recreate the original .desktop files, causing reappearance of entries or dpkg prompts about “missing” files.
  • This pattern may already exist elsewhere in Armbian, but it is worth confirming it’s the accepted approach.

If you want a less intrusive alternative, consider using desktop/menus overrides (e.g., Hidden=true / NoDisplay=true in overrides under /etc/xdg) rather than renaming files under /usr.

config/desktop/questing/appgroups/browsers/armbian/create_desktop_package.sh (1)

1-4: Consider adding existence checks for source files.

The script assumes all source files exist. If any are missing, the build will fail with potentially unclear error messages.

You could add validation like:

 # install optimized browser configurations
+for file in chromium.conf firefox.conf; do
+  [[ -f "${SRC}/packages/blobs/desktop/${file}" ]] || { echo "Missing ${file}"; exit 1; }
+done
+[[ -d "${SRC}/packages/blobs/desktop/chromium" ]] || { echo "Missing chromium directory"; exit 1; }
+
 cp "${SRC}"/packages/blobs/desktop/chromium.conf "${destination}"/etc/armbian
 cp "${SRC}"/packages/blobs/desktop/firefox.conf  "${destination}"/etc/armbian
 cp -R "${SRC}"/packages/blobs/desktop/chromium "${destination}"/etc/armbian
config/desktop/questing/environments/kde-plasma-mobile/armbian/create_desktop_package.sh (1)

17-28: Remove or document the commented wallpaper-setting code.

This 11-line commented block represents substantial dead code. If it's kept for future reference, add a comment explaining why. Otherwise, remove it to reduce clutter.

Note: The dbus-send approach wouldn't work during package creation anyway, as it requires an active user session.

config/desktop/questing/environments/kde-plasma-mobile/debian/postinst (1)

1-3: Remove commented-out LightDM configuration.

This commented code lacks explanation. Either remove it or add a comment explaining why it's preserved.

config/desktop/questing/environments/cinnamon/debian/postinst (1)

1-132: Postinst logic looks fine; consider making the PulseAudio tweak idempotent

Overall flow (LightDM copy, dconf defaults, schema rebuild) matches existing Armbian patterns and looks correct for Cinnamon.

One minor improvement: the PulseAudio line

if [ -f /etc/pulse/default.pa ]; then sed "s/load-module module-udev-detect$/& tsched=0/g" -i /etc/pulse/default.pa; fi

will append additional tsched=0 tokens every time the postinst is rerun. It’s harmless but noisy; you could guard against duplicates (e.g. only substitute when tsched=0 is not already present) if you want a more strictly idempotent script.

lib/functions/main/config-prepare.sh (1)

360-384: APA gate in desktop sanity checks works but could be clearer

The new condition

if [[ "${DESKTOP_ENVIRONMENT}" != "" && ! $APA_IS_ACTIVE ]]; then

correctly skips the legacy desktop sanity checks when APA is active and only runs them for non-APA builds.

For readability and to avoid surprises if APA_IS_ACTIVE ever changes value, consider making the intent explicit, e.g.:

if [[ -n "${DESKTOP_ENVIRONMENT}" && -z "${APA_IS_ACTIVE}" ]]; thenfi

This makes it obvious that the checks run only when a desktop environment is selected and APA is inactive.

config/desktop/questing/environments/xfce/armbian/create_desktop_package.sh (1)

1-22: XFCE asset packaging matches existing pattern; only minor nits

The XFCE create_desktop_package.sh mirrors the established asset setup (LightDM greeter, /etc/skel, icons, wallpapers, login logo) and should work fine given ${SRC}/${destination} are set by the caller. No functional problems.

Two small polish items if you touch this again:

  • The comment #install cinnamon desktop bar icons is a copy/paste artifact in an XFCE‑specific script.
  • GNOME and XFCE scripts now duplicate the same asset‑copy block; if this grows further, consider a small shared helper to avoid divergence, but it’s fine as‑is for now.
config/desktop/questing/environments/gnome/debian/postinst (1)

1-40: GNOME postinst is consistent; same optional PulseAudio idempotency tweak

This GNOME postinst matches Armbian patterns (LightDM greeter override, GNOME dconf defaults under /etc/dconf/db/local.d/00-bg, dconf update, schema rebuild). Functionally it looks fine.

As with the Cinnamon script, the PulseAudio adjustment:

if [ -f /etc/pulse/default.pa ]; then sed "s/load-module module-udev-detect$/& tsched=0/g" -i  /etc/pulse/default.pa; fi

will append repeated tsched=0 tokens if the postinst is rerun. It’s mostly cosmetic, but you could make it conditional on tsched=0 not already being present if you want stricter idempotency.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between cbf445f and 88b4c12.

📒 Files selected for processing (50)
  • config/cli/questing/debootstrap/components (1 hunks)
  • config/cli/questing/debootstrap/packages (1 hunks)
  • config/cli/questing/main/config_desktop (1 hunks)
  • config/cli/questing/main/packages (1 hunks)
  • config/cli/resolute (1 hunks)
  • config/desktop/questing/appgroups/browsers/armbian/create_desktop_package.sh (1 hunks)
  • config/desktop/questing/appgroups/browsers/debian/postinst (1 hunks)
  • config/desktop/questing/appgroups/browsers/packages (1 hunks)
  • config/desktop/questing/appgroups/chat (1 hunks)
  • config/desktop/questing/appgroups/desktop_tools (1 hunks)
  • config/desktop/questing/appgroups/editors (1 hunks)
  • config/desktop/questing/appgroups/internet/packages (1 hunks)
  • config/desktop/questing/appgroups/multimedia (1 hunks)
  • config/desktop/questing/appgroups/office (1 hunks)
  • config/desktop/questing/appgroups/programming/packages (1 hunks)
  • config/desktop/questing/appgroups/remote_desktop (1 hunks)
  • config/desktop/questing/environments/cinnamon/architectures (1 hunks)
  • config/desktop/questing/environments/cinnamon/armbian/create_desktop_package.sh (1 hunks)
  • config/desktop/questing/environments/cinnamon/config_base/packages (1 hunks)
  • config/desktop/questing/environments/cinnamon/debian/postinst (1 hunks)
  • config/desktop/questing/environments/cinnamon/support (1 hunks)
  • config/desktop/questing/environments/gnome/architectures (1 hunks)
  • config/desktop/questing/environments/gnome/armbian/create_desktop_package.sh (1 hunks)
  • config/desktop/questing/environments/gnome/config_base/packages (1 hunks)
  • config/desktop/questing/environments/gnome/debian/postinst (1 hunks)
  • config/desktop/questing/environments/gnome/support (1 hunks)
  • config/desktop/questing/environments/i3-wm/architectures (1 hunks)
  • config/desktop/questing/environments/i3-wm/armbian (1 hunks)
  • config/desktop/questing/environments/i3-wm/config_base/packages (1 hunks)
  • config/desktop/questing/environments/i3-wm/debian (1 hunks)
  • config/desktop/questing/environments/i3-wm/support (1 hunks)
  • config/desktop/questing/environments/kde-plasma-mobile/architectures (1 hunks)
  • config/desktop/questing/environments/kde-plasma-mobile/armbian/create_desktop_package.sh (1 hunks)
  • config/desktop/questing/environments/kde-plasma-mobile/config_base/packages (1 hunks)
  • config/desktop/questing/environments/kde-plasma-mobile/debian/postinst (1 hunks)
  • config/desktop/questing/environments/kde-plasma-mobile/support (1 hunks)
  • config/desktop/questing/environments/kde-plasma/architectures (1 hunks)
  • config/desktop/questing/environments/kde-plasma/armbian/create_desktop_package.sh (1 hunks)
  • config/desktop/questing/environments/kde-plasma/config_base/packages (1 hunks)
  • config/desktop/questing/environments/kde-plasma/debian/postinst (1 hunks)
  • config/desktop/questing/environments/kde-plasma/support (1 hunks)
  • config/desktop/questing/environments/xfce/architectures (1 hunks)
  • config/desktop/questing/environments/xfce/armbian/create_desktop_package.sh (1 hunks)
  • config/desktop/questing/environments/xfce/config_base/packages (1 hunks)
  • config/desktop/questing/environments/xfce/debian/postinst (1 hunks)
  • config/desktop/questing/environments/xfce/support (1 hunks)
  • config/desktop/resolute (1 hunks)
  • lib/functions/configuration/config-desktop.sh (1 hunks)
  • lib/functions/main/config-prepare.sh (1 hunks)
  • lib/functions/rootfs/rootfs-create.sh (2 hunks)
✅ Files skipped from review due to trivial changes (26)
  • config/desktop/questing/environments/gnome/architectures
  • config/desktop/questing/environments/cinnamon/config_base/packages
  • config/desktop/questing/environments/i3-wm/debian
  • config/desktop/questing/environments/i3-wm/armbian
  • config/desktop/questing/environments/gnome/config_base/packages
  • config/desktop/questing/appgroups/multimedia
  • config/desktop/questing/appgroups/programming/packages
  • config/desktop/questing/environments/kde-plasma/architectures
  • config/desktop/questing/appgroups/office
  • config/cli/resolute
  • config/desktop/questing/environments/kde-plasma-mobile/config_base/packages
  • config/desktop/questing/environments/gnome/support
  • config/desktop/questing/environments/xfce/architectures
  • config/cli/questing/main/config_desktop
  • config/desktop/questing/environments/kde-plasma/config_base/packages
  • config/desktop/questing/environments/cinnamon/architectures
  • config/desktop/questing/environments/i3-wm/support
  • config/desktop/questing/environments/xfce/config_base/packages
  • config/desktop/questing/environments/cinnamon/support
  • config/cli/questing/debootstrap/packages
  • config/desktop/questing/appgroups/editors
  • config/cli/questing/debootstrap/components
  • config/desktop/questing/appgroups/internet/packages
  • config/desktop/questing/appgroups/remote_desktop
  • config/desktop/questing/appgroups/chat
  • config/desktop/questing/environments/kde-plasma/support
🧰 Additional context used
🧠 Learnings (19)
📓 Common learnings
Learnt from: leggewie
Repo: armbian/build PR: 8559
File: config/desktop/sid/environments/kde-plasma:1-1
Timestamp: 2025-08-29T18:57:26.930Z
Learning: APA (Armbian Packaging Archive) is a project that focuses on defining package dependencies and will replace the aggregation part of the current build system, but not the entire build system. It is not a full replacement for desktop environment configuration approaches.
Learnt from: tabrisnet
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-10-24T04:46:22.901Z
Learning: In lib/functions/rootfs/rootfs-create.sh, the FIXME comment about mmdebstrap usage with --aptopt is a future note related to PR #8785, which hasn't been merged yet.
Learnt from: leggewie
Repo: armbian/build PR: 8502
File: config/desktop/trixie/environments/i3-wm/config_base/packages:44-44
Timestamp: 2025-08-14T17:19:39.693Z
Learning: When a PR author provides clear context about package transitions in the commit message and the changes are scoped to specific release pockets, focus the review on validating those specific changes rather than suggesting broader investigations across other releases or additional dependency verifications.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub or the PR API to get the complete picture of what files are being added or modified.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub API (https://api.github.com/repos/armbian/build/pulls/{pr_number}/files) to get the complete picture of what files are being added or modified, especially for U-Boot patches that will be applied during the build process.
Learnt from: tabrisnet
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-10-24T04:46:22.901Z
Learning: The `debootstrap` tool doesn't use `apt`, which is important context when reviewing apt-related configuration in rootfs creation code.
Learnt from: Grippy98
Repo: armbian/build PR: 8202
File: config/desktop/trixie/environments/gnome/armbian/create_desktop_package.sh:2-3
Timestamp: 2025-05-16T15:34:34.672Z
Learning: The shell scripts in the Armbian build system's desktop configuration files, such as config/desktop/trixie/environments/gnome/armbian/create_desktop_package.sh, rely on environment variables like $SRC and $destination that are expected to be set externally before the script is executed.
📚 Learning: 2025-05-16T15:34:34.672Z
Learnt from: Grippy98
Repo: armbian/build PR: 8202
File: config/desktop/trixie/environments/gnome/armbian/create_desktop_package.sh:2-3
Timestamp: 2025-05-16T15:34:34.672Z
Learning: The shell scripts in the Armbian build system's desktop configuration files, such as config/desktop/trixie/environments/gnome/armbian/create_desktop_package.sh, rely on environment variables like $SRC and $destination that are expected to be set externally before the script is executed.

Applied to files:

  • lib/functions/main/config-prepare.sh
  • config/desktop/questing/environments/kde-plasma/debian/postinst
  • config/desktop/questing/environments/kde-plasma/armbian/create_desktop_package.sh
  • config/desktop/questing/environments/gnome/armbian/create_desktop_package.sh
  • config/desktop/questing/environments/kde-plasma-mobile/armbian/create_desktop_package.sh
  • config/desktop/questing/environments/cinnamon/armbian/create_desktop_package.sh
  • config/desktop/questing/appgroups/browsers/armbian/create_desktop_package.sh
  • config/desktop/questing/environments/xfce/debian/postinst
  • config/desktop/questing/environments/gnome/debian/postinst
  • lib/functions/configuration/config-desktop.sh
  • config/desktop/questing/environments/xfce/armbian/create_desktop_package.sh
  • config/desktop/questing/environments/cinnamon/debian/postinst
  • config/desktop/questing/environments/kde-plasma-mobile/debian/postinst
  • lib/functions/rootfs/rootfs-create.sh
📚 Learning: 2025-11-09T22:30:27.163Z
Learnt from: igorpecovnik
Repo: armbian/build PR: 8720
File: lib/functions/rootfs/distro-specific.sh:38-47
Timestamp: 2025-11-09T22:30:27.163Z
Learning: In lib/functions/rootfs/distro-specific.sh, the systemd sleep.conf.d override that disables suspend/hibernation is intentionally applied system-wide to all Armbian images (desktop, CLI, and minimal), not gated to desktop-only builds, because suspend/resume is fragile on most boards.

Applied to files:

  • config/desktop/questing/environments/kde-plasma/debian/postinst
  • config/desktop/questing/environments/xfce/debian/postinst
  • config/desktop/questing/environments/gnome/debian/postinst
  • config/desktop/questing/environments/cinnamon/debian/postinst
  • config/desktop/questing/environments/kde-plasma-mobile/debian/postinst
📚 Learning: 2025-08-03T15:21:20.148Z
Learnt from: pyavitz
Repo: armbian/build PR: 8455
File: config/sources/families/sun50iw1.conf:19-24
Timestamp: 2025-08-03T15:21:20.148Z
Learning: In the Armbian build system, when copying firmware files during family_tweaks_s(), use /lib/firmware/updates/ instead of /lib/firmware/ to avoid conflicts with the Armbian firmware package. The /lib/firmware/updates directory takes precedence in Linux firmware loading hierarchy and is the proper location for user-installed firmware files.

Applied to files:

  • config/desktop/questing/environments/kde-plasma/debian/postinst
  • config/desktop/questing/appgroups/browsers/debian/postinst
  • config/desktop/questing/appgroups/browsers/armbian/create_desktop_package.sh
  • config/desktop/questing/environments/xfce/debian/postinst
  • config/desktop/questing/environments/xfce/armbian/create_desktop_package.sh
📚 Learning: 2025-06-22T00:45:26.182Z
Learnt from: djurny
Repo: armbian/build PR: 8315
File: lib/functions/rootfs/distro-agnostic.sh:54-68
Timestamp: 2025-06-22T00:45:26.182Z
Learning: In Armbian build system, external command dependencies like envsubst are handled by adding the required packages (e.g., gettext for envsubst) to host_dependencies in adaptative_prepare_host_dependencies function in lib/functions/host/prepare-host.sh, rather than checking command availability at runtime.

Applied to files:

  • config/desktop/questing/environments/gnome/armbian/create_desktop_package.sh
  • config/desktop/questing/environments/xfce/debian/postinst
  • lib/functions/rootfs/rootfs-create.sh
📚 Learning: 2025-09-27T21:50:04.845Z
Learnt from: tabrisnet
Repo: armbian/build PR: 8678
File: config/kernel/linux-sm8250-edge.config:80-82
Timestamp: 2025-09-27T21:50:04.845Z
Learning: In the Armbian build system, kernel configuration files are generated through this automated process: taking previous config → applying scripted changes from armbian-kernel.sh → running kernel's `make oldconfig` → processing by Armbian machinery back into config files. This automated process properly handles kernel configuration dependencies and reduces the likelihood of manual configuration errors.

Applied to files:

  • config/desktop/questing/environments/gnome/armbian/create_desktop_package.sh
  • config/desktop/questing/appgroups/browsers/armbian/create_desktop_package.sh
  • config/desktop/questing/environments/cinnamon/debian/postinst
📚 Learning: 2025-07-17T04:12:33.125Z
Learnt from: pyavitz
Repo: armbian/build PR: 8388
File: config/boards/kickpik2b.conf:1-14
Timestamp: 2025-07-17T04:12:33.125Z
Learning: In the Armbian build system, board configuration files (*.conf) follow a project standard of not including shebang lines, even though they contain bash code and are sourced by the build system. This is an established Armbian convention that individual contributors are expected to follow, and changes to this standard would require broader project maintainer approval.

Applied to files:

  • config/desktop/questing/environments/gnome/armbian/create_desktop_package.sh
  • config/desktop/questing/appgroups/browsers/armbian/create_desktop_package.sh
  • config/desktop/questing/environments/xfce/debian/postinst
  • config/desktop/questing/environments/xfce/armbian/create_desktop_package.sh
📚 Learning: 2025-09-27T21:49:55.796Z
Learnt from: tabrisnet
Repo: armbian/build PR: 8678
File: config/kernel/linux-sm8250-current.config:78-80
Timestamp: 2025-09-27T21:49:55.796Z
Learning: In the Armbian build system, kernel configuration files are generated through an automated process: taking previous config → applying scripted changes from armbian-kernel.sh → running kernel's `make oldconfig` → processing by Armbian machinery back into config files. This automated process properly handles kernel configuration dependencies and reduces the likelihood of manual configuration errors.

Applied to files:

  • config/desktop/questing/appgroups/browsers/armbian/create_desktop_package.sh
  • config/desktop/questing/environments/xfce/debian/postinst
  • config/desktop/questing/environments/cinnamon/debian/postinst
📚 Learning: 2025-07-23T10:01:41.310Z
Learnt from: amazingfate
Repo: armbian/build PR: 8419
File: lib/functions/host/prepare-host.sh:272-275
Timestamp: 2025-07-23T10:01:41.310Z
Learning: In the Armbian build system, the design philosophy is to fail fast when host dependencies are not met rather than gracefully skipping unsupported architectures. This ensures build environment consistency and prevents silent failures. Host dependency checks should be explicit and non-negotiable.

Applied to files:

  • config/desktop/questing/environments/i3-wm/architectures
📚 Learning: 2025-11-02T20:49:56.719Z
Learnt from: igorpecovnik
Repo: armbian/build PR: 8849
File: config/boards/radxa-e54c.csc:14-28
Timestamp: 2025-11-02T20:49:56.719Z
Learning: In Armbian board configuration files (config/boards/*.conf, *.csc, etc.), do not use kernel_config_set, kernel_config_set_m, kernel_config_set_y, or custom_kernel_config__* functions to modify kernel configuration. Kernel configuration is associated with LINUXFAMILY/BOARDFAMILY, not individual BOARD. Board-specific kernel modifications cause inconsistency in kernel packages published to the apt repository because boards within a family share the same kernel packages. Kernel configuration changes must be made in the appropriate kernel config file (e.g., config/kernel/linux-*-*.config) or in family configuration files (config/sources/families/*.conf, *.inc) instead.

Applied to files:

  • config/desktop/questing/environments/xfce/debian/postinst
📚 Learning: 2025-08-30T04:13:16.457Z
Learnt from: tabrisnet
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-08-30T04:13:16.457Z
Learning: Armbian kernel configuration files like linux-filogic-current.config are autogenerated overlays on top of arch defconfig. Comments added manually will be lost during future updates by maintainers, and explicit "CONFIG_OPTION is not set" statements aren't needed for mutually exclusive options since these are overlay configs that only specify changes from the base configuration.

Applied to files:

  • config/desktop/questing/environments/xfce/debian/postinst
📚 Learning: 2025-11-06T15:36:04.682Z
Learnt from: rpardini
Repo: armbian/build PR: 8879
File: config/sources/families/uefi-x86.conf:0-0
Timestamp: 2025-11-06T15:36:04.682Z
Learning: As of PR #8879, the uefi-x86 family in the Armbian build system now includes kernel patches for the first time. The current and edge branches for uefi-x86 are specifically configured for Apple T2-based x86 machines, including T2-specific patches from the linux-t2 project and custom kernel configuration options for Apple hardware drivers.

Applied to files:

  • config/desktop/questing/environments/kde-plasma-mobile/architectures
📚 Learning: 2025-08-29T18:57:26.930Z
Learnt from: leggewie
Repo: armbian/build PR: 8559
File: config/desktop/sid/environments/kde-plasma:1-1
Timestamp: 2025-08-29T18:57:26.930Z
Learning: APA (Armbian Packaging Archive) is a project that focuses on defining package dependencies and will replace the aggregation part of the current build system, but not the entire build system. It is not a full replacement for desktop environment configuration approaches.

Applied to files:

  • lib/functions/configuration/config-desktop.sh
  • lib/functions/rootfs/rootfs-create.sh
📚 Learning: 2025-10-24T04:46:22.901Z
Learnt from: tabrisnet
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-10-24T04:46:22.901Z
Learning: In lib/functions/rootfs/rootfs-create.sh, the FIXME comment about mmdebstrap usage with --aptopt is a future note related to PR #8785, which hasn't been merged yet.

Applied to files:

  • lib/functions/rootfs/rootfs-create.sh
📚 Learning: 2025-10-24T04:46:22.901Z
Learnt from: tabrisnet
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-10-24T04:46:22.901Z
Learning: The `debootstrap` tool doesn't use `apt`, which is important context when reviewing apt-related configuration in rootfs creation code.

Applied to files:

  • lib/functions/rootfs/rootfs-create.sh
📚 Learning: 2025-11-20T18:20:11.985Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8968
File: patch/u-boot/u-boot-sunxi/arm64-dts-sun50i-h6-orangepi.dtsi-Rollback-r_rsb-to-r_i2c.patch:36-36
Timestamp: 2025-11-20T18:20:11.985Z
Learning: The rewrite-patches tool (REWRITE_PATCHES=yes) in the Armbian build system can inadvertently introduce semantic changes when the u-boot/kernel git base revision differs from expected state. The tool applies patches, commits them, and re-exports them using git format-patch, which can cause the re-exported patch to reflect the base revision's state rather than preserving the original patch intent. This is particularly problematic for device tree changes like interrupt specifications. The tool currently lacks validation mechanisms to detect such semantic drift, and affected patches must be manually corrected after rewriting.

Applied to files:

  • lib/functions/rootfs/rootfs-create.sh
📚 Learning: 2025-06-14T05:53:10.627Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8298
File: extensions/https_proxy.sh:1-9
Timestamp: 2025-06-14T05:53:10.627Z
Learning: Armbian build framework extensions are NOT designed to run standalone but are called by the supervisor. The framework provides environment variables like USERPATCHES_PATH and SDCARD, and commands are executed with protection via run_host_command_logged and chroot_sdcard functions that use bash -e -o pipefail.

Applied to files:

  • lib/functions/rootfs/rootfs-create.sh
📚 Learning: 2025-09-24T09:54:07.968Z
Learnt from: amazingfate
Repo: armbian/build PR: 8668
File: extensions/ufs.sh:2-2
Timestamp: 2025-09-24T09:54:07.968Z
Learning: In Armbian's build system, DOCKER_ARMBIAN_BASE_IMAGE must be set globally at file load time in extensions, not inside extension_prepare_config functions, because docker operations happen early in the build process and would default to ubuntu:noble if not set before docker_cli_prepare() runs.

Applied to files:

  • lib/functions/rootfs/rootfs-create.sh
📚 Learning: 2025-08-19T04:55:45.648Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-08-19T04:55:45.648Z
Learning: In Armbian build configurations, HTTP is preferred over HTTPS for APT repository URLs because: 1) APT package signing provides sufficient tamper protection through cryptographic verification, 2) HTTPS complicates package caching with tools like Squid, and 3) this is an established pattern across their repository configurations.

Applied to files:

  • lib/functions/rootfs/rootfs-create.sh
🧬 Code graph analysis (4)
lib/functions/main/config-prepare.sh (2)
lib/functions/artifacts/artifact-armbian-bsp-desktop.sh (1)
  • artifact_armbian-bsp-desktop_cli_adapter_config_prep (75-86)
lib/functions/artifacts/artifact-armbian-desktop.sh (1)
  • artifact_armbian-desktop_cli_adapter_config_prep (81-89)
config/desktop/questing/environments/kde-plasma/armbian/create_desktop_package.sh (3)
lib/functions/artifacts/artifact-armbian-desktop.sh (2)
  • artifact_armbian-desktop_prepare_version (20-68)
  • artifact_armbian-desktop_cli_adapter_config_prep (81-89)
lib/functions/artifacts/artifact-armbian-bsp-desktop.sh (1)
  • artifact_armbian-bsp-desktop_prepare_version (20-62)
lib/functions/bsp/armbian-bsp-cli-deb.sh (4)
  • board_side_bsp_cli_preinst (375-430)
  • reversion_armbian-bsp-cli_deb_contents (270-307)
  • reversion_armbian-bsp-cli-transitional_deb_contents (44-55)
  • board_side_bsp_cli_postinst_finish (463-486)
lib/functions/configuration/config-desktop.sh (1)
extensions/apa.sh (2)
  • post_armbian_repo_customize_image__install_from_apa (12-25)
  • extension_prepare_config__apa (3-6)
lib/functions/rootfs/rootfs-create.sh (1)
extensions/apa.sh (1)
  • post_armbian_repo_customize_image__install_from_apa (12-25)
🔇 Additional comments (13)
config/desktop/questing/environments/i3-wm/config_base/packages (1)

1-1: Delegating i3‑wm base packages to GNOME config looks correct

The relative path from .../environments/i3-wm/config_base/ to .../environments/gnome/config_base/packages is correct and matches the existing pattern of reusing GNOME/base package sets for other environments to avoid duplication. Please just confirm that the referenced GNOME config_base/packages file exists for questing and that this reuse is intentional for i3‑wm as well.

config/desktop/questing/appgroups/desktop_tools (1)

1-1: Verify the target appgroup file exists before merge.

This reference to ../../common/appgroups/desktop_tools follows the established pattern for reusing shared configurations, but the target file must exist for this to be valid. Ensure config/desktop/common/appgroups/desktop_tools is present in the repository or being added in this PR.

config/desktop/questing/environments/kde-plasma/debian/postinst (1)

1-2: LGTM!

The lightdm configuration override follows the standard pattern used in other desktop environments. The conditional check and recursive copy are appropriate for a postinst script.

config/desktop/questing/environments/i3-wm/architectures (1)

1-1: Verify that config/desktop/common/environments/i3-wm/architectures exists.

The delegation to a common architectures file follows the standard pattern used across releases. Confirm the target file exists; if it does, the relative path reference is correct and consistent with how other releases delegate to shared environment configurations.

config/desktop/questing/appgroups/browsers/packages (1)

1-2: LGTM!

The browser package selections are appropriate for the Questing desktop appgroup.

config/cli/questing/main/packages (1)

1-3: LGTM!

The locales and apt packages are essential base packages for CLI environments.

config/desktop/questing/environments/xfce/support (1)

1-1: LGTM!

The support marker follows the established pattern for environment configuration.

config/desktop/resolute (1)

1-1: LGTM!

The release mapping is straightforward and follows the expected pattern.

config/desktop/questing/environments/kde-plasma-mobile/support (1)

1-1: Clarify the "csc" marker value.

Other environment support files use "supported" (e.g., xfce/support, cinnamon/support), but this file contains "csc". Please clarify whether this inconsistency is intentional and what "csc" signifies (e.g., different support level, Community Supported Configuration, etc.).

config/desktop/questing/environments/kde-plasma-mobile/architectures (1)

1-1: LGTM!

The architecture list is clear and appropriate for KDE Plasma Mobile.

config/desktop/questing/environments/gnome/armbian/create_desktop_package.sh (1)

1-164: Verify wallpaper filenames against actual blobs and confirm the desktop environment directory name

The script follows the established pattern for copying desktop assets and generating the wallpaper configuration. However, the file path references config/desktop/questing/environments/gnome/…, which is unusual—verify this is the correct directory name (e.g., not trixie or another variant). Additionally, confirm that every wallpaper filename referenced in the generated armbian.xml (e.g., armbian-4k-black-psycho.jpg, armbian-4k-blue-circle.jpg, etc.) actually exists in packages/blobs/desktop/desktop-wallpapers to avoid broken entries in GNOME's background picker.

lib/functions/rootfs/rootfs-create.sh (1)

156-171: *Verify aggregation.py maintains _COMMA variable contracts and confirm APA hook is not called redundantly

The debootstrap argument wiring and APA hook placement in create_new_rootfs_cache_via_debootstrap are structurally sound:

  • The fallback to locales,apt when AGGREGATED_PACKAGES_DEBOOTSTRAP_COMMA is empty preserves the baseline behavior.
  • The APA hook placement after main rootfs/desktop packages and autoremove, but before apt cleanup, is reasonable for installing armbian-common and armbian-bsp.

However, two integration points require explicit verification:

  1. Aggregation → debootstrap contract
    Confirm that aggregation.py consistently sets AGGREGATED_PACKAGES_DEBOOTSTRAP_COMMA and AGGREGATED_DEBOOTSTRAP_COMPONENTS_COMMA in sync with their corresponding arrays for all APA-enabled builds. A mismatch could cause debootstrap to miss pre-seeding required packages.

  2. APA hook call sites
    Verify that post_armbian_repo_customize_image__install_from_apa is invoked only once in the rootfs pipeline to avoid duplicate APA package operations.

lib/functions/configuration/config-desktop.sh (1)

78-153: Verify APA gate scope for non-APA desktop configuration flows

The added gate [[ $APA_IS_ACTIVE ]] || return 0 causes interactive_desktop_main_configuration to skip entirely when APA_IS_ACTIVE is not set, preventing interactive desktop environment/config/appgroup selection and validation in non-APA builds.

Clarify whether:

  • Non-APA desktop builds (BUILD_DESKTOP="yes" with APA_IS_ACTIVE unset) are still supported and expected to work
  • If yes, whether DESKTOP_ENVIRONMENT and related variables are pre-set elsewhere or if they should be selected interactively by this function
  • Whether this APA-only behavior is intentional or a regression for existing non-APA flows

@github-actions github-actions bot added the 11 Milestone: Fourth quarter release label Dec 1, 2025
@tabrisnet tabrisnet force-pushed the tabrisnet_apa_bootstrap branch from ce2591d to ebd816c Compare December 1, 2025 03:11
@github-actions github-actions bot added size/medium PR with more then 50 and less then 250 lines and removed size/large PR with 250 lines or more labels Dec 1, 2025
@tabrisnet tabrisnet force-pushed the tabrisnet_apa_bootstrap branch from ebd816c to 344eafb Compare December 1, 2025 03:15
@github-actions github-actions bot added size/small PR with less then 50 lines and removed size/medium PR with more then 50 and less then 250 lines labels Dec 1, 2025
@tabrisnet tabrisnet force-pushed the tabrisnet_apa_bootstrap branch from 30006e5 to 47fa19c Compare December 1, 2025 04:26
Cleanup config/{desktop,cli}/{questing,resolute} to absolute minimum,
so that APA can do the job instead.
@tabrisnet tabrisnet force-pushed the tabrisnet_apa_bootstrap branch from 47fa19c to 45d54cd Compare December 1, 2025 04:28
@leggewie leggewie marked this pull request as draft December 5, 2025 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

02 Milestone: First quarter release 11 Milestone: Fourth quarter release Desktop Graphical user interface Framework Framework components Needs review Seeking for review size/small PR with less then 50 lines Work in progress Unfinished / work in progress

Development

Successfully merging this pull request may close these issues.

[Bug]: Bad packages in questing desktop build

2 participants