Skip to content

Refactor mesa-vpu extension: add architecture-specific browser selection#9347

Merged
igorpecovnik merged 3 commits intomainfrom
mesafixes
Feb 3, 2026
Merged

Refactor mesa-vpu extension: add architecture-specific browser selection#9347
igorpecovnik merged 3 commits intomainfrom
mesafixes

Conversation

@igorpecovnik
Copy link
Member

@igorpecovnik igorpecovnik commented Feb 3, 2026

Summary

  • Refactor mesa-vpu extension to simplify and modernize browser selection logic
  • Add architecture-dependent browser selection: google-chrome-stable for amd64, chromium for arm64/armhf, firefox for other archs
  • Remove legacy panfork/kisak PPAs and image suffix logic
  • Restrict Rockchip multimedia to noble+vendor branch only

Changes

  • extensions/mesa-vpu.sh:
    • Remove legacy panfork/kisak PPAs and image suffix definitions
    • Simplify chromium installation (remove distribution checks)
    • Add new post_armbian_repo_customize_image__browser() function for arch-specific browser selection
    • Restrict Rockchip multimedia PPA to noble with vendor kernel only

Also includes commits from branch:

  • Change PIN-ing policy for Firefox and Thunderbird (to promote non-snap versions from our repo)
  • Enable riscv64 architecture support for Gnome

Test plan

  • Build and test on amd64 (should install google-chrome-stable)
  • Build and test on arm64 (should install chromium)
  • Build and test on armhf (should install chromium)
  • Build and test on rsicv64 (should install firefox)
  • Verify Rockchip multimedia packages install correctly on noble+vendor

Summary by CodeRabbit

  • New Features

    • Added RISC-V (riscv64) architecture support for GNOME environments
    • New automated browser selection during image customization (Chrome on amd64, Chromium on arm, Firefox fallback)
  • Improvements

    • Consolidated 3D graphics and multimedia package handling for simpler, more consistent installs
    • Simplified package pinning for Firefox/Thunderbird for more predictable updates
    • Broadened release compatibility for desktop images

@igorpecovnik igorpecovnik requested a review from a team as a code owner February 3, 2026 14:14
@github-actions github-actions bot added the size/medium PR with more then 50 and less then 250 lines label Feb 3, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 3, 2026

📝 Walkthrough

Walkthrough

Adds riscv64 to GNOME architectures, refactors mesa-vpu multimedia and package-install flows (including a new architecture-aware browser installation function), and consolidates apt pinning for Firefox/Thunderbird to Armbian origin.

Changes

Cohort / File(s) Summary
Architecture Support
config/desktop/common/environments/gnome/architectures
Appended riscv64 to the supported architectures list (was arm64, amd64).
Desktop & Multimedia Configuration
extensions/mesa-vpu.sh
Significant refactor of 3D/mesa VPU installation logic: removed per-image-suffix and distro-backport branches, unified package install paths, simplified Rockchip multimedia handling and PPA/pinning logic, broadened release denials (added jammy), and added a new exported function post_armbian_repo_customize_image__browser() that installs a browser by architecture (google-chrome-stable for amd64, chromium for arm64/armhf, fallback firefox).
Apt Preferences
packages/bsp/common/etc/apt/preferences.d/armbian
Replaced multiple per-origin pin blocks with a single pin policy that pins firefox, firefox-esr, and thunderbird to the Armbian origin (apt.armbian.com) at priority 700; removed previous Ubuntu/Chromium-specific pin entries.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 I hopped into configs, added riscv cheer,
Streamlined packages, made the pathways clear,
Browsers chosen by arch with gentle care,
Pins pruned tidy—less clutter to bear,
A nimble build garden, carrots in the air 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary change: adding architecture-specific browser selection to the mesa-vpu extension.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch mesafixes

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 02 Milestone: First quarter release Desktop Graphical user interface Needs review Seeking for review Framework Framework components BSP Board Support Packages labels Feb 3, 2026
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: 1

🤖 Fix all issues with AI agents
In `@extensions/mesa-vpu.sh`:
- Around line 108-130: The function post_armbian_repo_customize_image__browser
can call do_with_retries chroot_sdcard_apt_get_install with an uninitialized
pkgs array when BUILD_DESKTOP != "yes"; add an early return when BUILD_DESKTOP
is not "yes" (or alternatively move the do_with_retries call inside the
BUILD_DESKTOP == "yes" branch) so that pkgs is only referenced after being set;
update the logic around BUILD_DESKTOP, pkgs, and the do_with_retries
chroot_sdcard_apt_get_install invocation accordingly.
🧹 Nitpick comments (1)
extensions/mesa-vpu.sh (1)

54-57: Potential redundant chromium installation.

Chromium is added to the package list here (line 56), and also installed separately in the new post_armbian_repo_customize_image__browser function (line 119) for arm64/armhf architectures. This results in chromium being installed twice for those architectures.

Consider whether the browser-related logic in lines 54-57 should be removed now that browser selection is handled by the dedicated post_armbian_repo_customize_image__browser function.

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: 1

🤖 Fix all issues with AI agents
In `@extensions/mesa-vpu.sh`:
- Around line 108-130: In post_armbian_repo_customize_image__browser(), do not
call do_with_retries chroot_sdcard_apt_get_install when BUILD_DESKTOP is not
"yes" because pkgs is only set inside that branch; either move the display_alert
and do_with_retries (chroot_sdcard_apt_get_install "${pkgs[@]}") lines inside
the if [[ "${BUILD_DESKTOP}" == "yes" ]] block after pkgs is populated, or add a
guard (e.g., check BUILD_DESKTOP or that pkgs is non-empty) before invoking
do_with_retries; reference symbols: post_armbian_repo_customize_image__browser,
BUILD_DESKTOP, pkgs, display_alert, do_with_retries,
chroot_sdcard_apt_get_install.
🧹 Nitpick comments (1)
extensions/mesa-vpu.sh (1)

54-57: Consider removing duplicate chromium installation.

Chromium is added to pkgs here for all desktop builds, but the new post_armbian_repo_customize_image__browser function also installs chromium specifically for arm64/armhf. While apt handles duplicate requests gracefully, this creates redundant work.

Consider either:

  1. Remove this block entirely (let the new function handle browser selection), or
  2. Exclude arm64/armhf from this block if chromium should remain in the base packages for some reason.

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: 3

🤖 Fix all issues with AI agents
In `@extensions/mesa-vpu.sh`:
- Around line 108-128: post_install_kernel_debs__3d currently unconditionally
adds "chromium", conflicting with the arch-specific browser choice in
post_armbian_repo_customize_image__browser; update post_install_kernel_debs__3d
to stop unconditionally installing chromium and instead only add chromium when
BUILD_DESKTOP=="yes" and ARCH matches the arm64|armhf pattern (or remove the
chromium addition entirely), so post_armbian_repo_customize_image__browser can
control browser selection based on ARCH and avoid duplicate/conflicting
installs.
- Around line 108-128: In post_armbian_repo_customize_image__browser(): pkgs can
be unset when BUILD_DESKTOP != "yes", causing chroot_sdcard_apt_get_install to
run with no args and abort under set -e; make pkgs a local variable (e.g., local
pkgs) and add an early return when BUILD_DESKTOP is not "yes" so the function
exits before calling do_with_retries/chroot_sdcard_apt_get_install; keep the
existing ARCH-based assignments to pkgs inside the BUILD_DESKTOP branch and only
call display_alert/do_with_retries when pkgs is populated.
- Line 34: The release deny list in extension_prepare_config__3d does not match
post_install_kernel_debs__3d, which allows the config hook to run on releases
(bookworm, jammy) where kernel installation is skipped; update the deny list
used in extension_prepare_config__3d to include bookworm and jammy so it matches
the pattern used in post_install_kernel_debs__3d (i.e., deny
bookworm|bullseye|buster|focal|jammy) ensuring both hooks consistently skip the
same releases.

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: 3

🤖 Fix all issues with AI agents
In `@extensions/mesa-vpu.sh`:
- Around line 54-57: The code currently unconditionally appends "chromium" to
the pkgs array when BUILD_DESKTOP=="yes" (the pkgs+=("chromium") block), which
conflicts with the later architecture-specific browser selection; remove that
unconditional addition so the desktop build does not force chromium and let the
subsequent browser-selection logic (the arch-specific branches that add
google-chrome-stable, chromium, or firefox) manage which browser package is
appended to pkgs.
- Around line 108-127: The function post_armbian_repo_customize_image__browser
should return early when BUILD_DESKTOP is not "yes" and should declare the
package array with local scope to avoid clobbering a global pkgs; update
post_armbian_repo_customize_image__browser to check BUILD_DESKTOP at the top and
return immediately if not "yes", and change the pkgs assignment lines to use a
local pkgs array (local pkgs) before setting values for the
amd64/arm64/armhf/other branches, then proceed with display_alert and
do_with_retries using the local pkgs.

In `@packages/bsp/common/etc/apt/preferences.d/armbian`:
- Around line 1-4: The apt preferences file currently pins "Package: firefox
thunderbird" to apt.armbian.com; add "firefox-esr" to that Package line so
Bookworm/Trixie desktop installs of firefox-esr are also pinned to
apt.armbian.com (update the "Package:" entry in the apt preferences block to
include firefox-esr).

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: 1

🤖 Fix all issues with AI agents
In `@extensions/mesa-vpu.sh`:
- Around line 108-127: In post_armbian_repo_customize_image__browser, guard
non-desktop builds with an early return: after the RELEASE check, return
immediately if BUILD_DESKTOP is not "yes" so pkgs is never left uninitialized
and do_with_retries chroot_sdcard_apt_get_install "${pkgs[@]}" is not invoked
with an empty array; update the function to explicitly check BUILD_DESKTOP and
return early (refer to the BUILD_DESKTOP variable and the
chroot_sdcard_apt_get_install call) to match the pattern used by
post_install_kernel_debs__3d.

@igorpecovnik igorpecovnik force-pushed the mesafixes branch 3 times, most recently from ae9c5b3 to 6b1ede7 Compare February 3, 2026 15:52
…election

- Remove legacy panfork/kisak PPAs and image suffix logic
- Restrict Rockchip multimedia to noble+vendor only
- Simplify chromium installation (remove distribution checks)
- Add new post_armbian_repo_customize_image__browser() function for
  architecture-dependent browser selection:
  - amd64: google-chrome-stable
  - arm64/armhf: chromium
  - other: firefox

Signed-off-by: Igor Pecovnik <igor@armbian.com>
@igorpecovnik
Copy link
Member Author

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 3, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@igorpecovnik igorpecovnik added 05 Milestone: Second quarter release 02 Milestone: First quarter release and removed 02 Milestone: First quarter release 05 Milestone: Second quarter release labels Feb 3, 2026
@igorpecovnik igorpecovnik merged commit 5abb974 into main Feb 3, 2026
13 checks passed
@igorpecovnik igorpecovnik deleted the mesafixes branch February 3, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

02 Milestone: First quarter release BSP Board Support Packages Desktop Graphical user interface Framework Framework components Needs review Seeking for review size/medium PR with more then 50 and less then 250 lines

Development

Successfully merging this pull request may close these issues.

1 participant