From e4608f18bc3a5ad307e1a1deaa7ac0048d03f991 Mon Sep 17 00:00:00 2001 From: tranch Date: Thu, 27 Aug 2026 08:08:00 +0800 Subject: fix: replace symlinked desktop branding assets --- tests/test-desktop-branding-migration.sh | 51 ++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100755 tests/test-desktop-branding-migration.sh (limited to 'tests/test-desktop-branding-migration.sh') diff --git a/tests/test-desktop-branding-migration.sh b/tests/test-desktop-branding-migration.sh new file mode 100755 index 0000000..23ebdd2 --- /dev/null +++ b/tests/test-desktop-branding-migration.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash + +set -euo pipefail + +repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +test_root="$(mktemp -d -t aerocore-desktop-branding.XXXXXXXXXX)" +trap 'rm -rf "${test_root}"' EXIT + +mkdir -p \ + "${test_root}/usr/share/aerocore/desktop-branding" \ + "${test_root}/etc/xdg" \ + "${test_root}/var/home/stock/.config" \ + "${test_root}/var/home/custom/.config" + +cp "${repo_root}/system_files/usr/share/aerocore/desktop-branding/kcm-about-distrorc" \ + "${test_root}/usr/share/aerocore/desktop-branding/kcm-about-distrorc" +printf '%s\n' '[General]' 'Name=Bazzite' > "${test_root}/etc/xdg/kcm-about-distrorc" +printf '%s\n' 'icon=distributor-logo-steamdeck' \ + > "${test_root}/var/home/stock/.config/plasma-org.kde.plasma.desktop-appletsrc" +printf '%s\n' 'icon=user-selected-logo' \ + > "${test_root}/var/home/custom/.config/plasma-org.kde.plasma.desktop-appletsrc" + +AEROCORE_DESKTOP_BRANDING_ROOT="${test_root}" \ + bash "${repo_root}/system_files/usr/libexec/aerocore-desktop-branding" + +grep -Fxq 'Name=AeroCore OS' "${test_root}/etc/xdg/kcm-about-distrorc" +grep -Fxq 'icon=aerocore-logo' \ + "${test_root}/var/home/stock/.config/plasma-org.kde.plasma.desktop-appletsrc" +grep -Fxq 'icon=user-selected-logo' \ + "${test_root}/var/home/custom/.config/plasma-org.kde.plasma.desktop-appletsrc" + +# The migration must also be idempotent. +first_digest="$(sha256sum \ + "${test_root}/etc/xdg/kcm-about-distrorc" \ + "${test_root}/var/home/stock/.config/plasma-org.kde.plasma.desktop-appletsrc")" +AEROCORE_DESKTOP_BRANDING_ROOT="${test_root}" \ + bash "${repo_root}/system_files/usr/libexec/aerocore-desktop-branding" +second_digest="$(sha256sum \ + "${test_root}/etc/xdg/kcm-about-distrorc" \ + "${test_root}/var/home/stock/.config/plasma-org.kde.plasma.desktop-appletsrc")" +test "${first_digest}" = "${second_digest}" + +for path in \ + bazzite.webm \ + bazzite-oled.webm \ + bazzite-suspend.webm \ + bazzite-suspend-oled.webm; do + grep -Fq "${path}" "${repo_root}/build_files/build.sh" +done + +echo "Desktop branding migration fixture passed" -- cgit v1.2.3 From 258e7422812b1a18f75c5a48030c64ccb16766ba Mon Sep 17 00:00:00 2001 From: tranch Date: Thu, 27 Aug 2026 23:00:51 +0800 Subject: fix: replace About System logo symlink Ensure KDE About System uses the AeroCore asset in both payload and live installer builds. --- tests/test-desktop-branding-migration.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/test-desktop-branding-migration.sh') diff --git a/tests/test-desktop-branding-migration.sh b/tests/test-desktop-branding-migration.sh index 23ebdd2..4948b39 100755 --- a/tests/test-desktop-branding-migration.sh +++ b/tests/test-desktop-branding-migration.sh @@ -48,4 +48,11 @@ for path in \ grep -Fq "${path}" "${repo_root}/build_files/build.sh" done +# The About System logo may be a symlink in the Bazzite base image. Both image +# build paths must explicitly replace that directory entry with AeroCore's PNG. +grep -Fq '"/usr/share/pixmaps/system-logo-white.png"' \ + "${repo_root}/build_files/build.sh" +grep -Fq 'rm -f /usr/share/pixmaps/system-logo-white.png' \ + "${repo_root}/installer/build.sh" + echo "Desktop branding migration fixture passed" -- cgit v1.2.3 From 7889a92c2eea98189330ad1fbfbef4c33a7e3071 Mon Sep 17 00:00:00 2001 From: tranch Date: Fri, 28 Aug 2026 08:57:25 +0800 Subject: Move branding migration into user setup --- tests/test-desktop-branding-migration.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'tests/test-desktop-branding-migration.sh') diff --git a/tests/test-desktop-branding-migration.sh b/tests/test-desktop-branding-migration.sh index 4948b39..4715010 100755 --- a/tests/test-desktop-branding-migration.sh +++ b/tests/test-desktop-branding-migration.sh @@ -7,23 +7,17 @@ test_root="$(mktemp -d -t aerocore-desktop-branding.XXXXXXXXXX)" trap 'rm -rf "${test_root}"' EXIT mkdir -p \ - "${test_root}/usr/share/aerocore/desktop-branding" \ - "${test_root}/etc/xdg" \ "${test_root}/var/home/stock/.config" \ "${test_root}/var/home/custom/.config" -cp "${repo_root}/system_files/usr/share/aerocore/desktop-branding/kcm-about-distrorc" \ - "${test_root}/usr/share/aerocore/desktop-branding/kcm-about-distrorc" -printf '%s\n' '[General]' 'Name=Bazzite' > "${test_root}/etc/xdg/kcm-about-distrorc" printf '%s\n' 'icon=distributor-logo-steamdeck' \ > "${test_root}/var/home/stock/.config/plasma-org.kde.plasma.desktop-appletsrc" printf '%s\n' 'icon=user-selected-logo' \ > "${test_root}/var/home/custom/.config/plasma-org.kde.plasma.desktop-appletsrc" -AEROCORE_DESKTOP_BRANDING_ROOT="${test_root}" \ +HOME="${test_root}/var/home/stock" \ bash "${repo_root}/system_files/usr/libexec/aerocore-desktop-branding" -grep -Fxq 'Name=AeroCore OS' "${test_root}/etc/xdg/kcm-about-distrorc" grep -Fxq 'icon=aerocore-logo' \ "${test_root}/var/home/stock/.config/plasma-org.kde.plasma.desktop-appletsrc" grep -Fxq 'icon=user-selected-logo' \ @@ -31,12 +25,10 @@ grep -Fxq 'icon=user-selected-logo' \ # The migration must also be idempotent. first_digest="$(sha256sum \ - "${test_root}/etc/xdg/kcm-about-distrorc" \ "${test_root}/var/home/stock/.config/plasma-org.kde.plasma.desktop-appletsrc")" -AEROCORE_DESKTOP_BRANDING_ROOT="${test_root}" \ +HOME="${test_root}/var/home/stock" \ bash "${repo_root}/system_files/usr/libexec/aerocore-desktop-branding" second_digest="$(sha256sum \ - "${test_root}/etc/xdg/kcm-about-distrorc" \ "${test_root}/var/home/stock/.config/plasma-org.kde.plasma.desktop-appletsrc")" test "${first_digest}" = "${second_digest}" @@ -55,4 +47,13 @@ grep -Fq '"/usr/share/pixmaps/system-logo-white.png"' \ grep -Fq 'rm -f /usr/share/pixmaps/system-logo-white.png' \ "${repo_root}/installer/build.sh" +# Branding migration is user setup, not a system boot service. +if rg -n 'aerocore-desktop-branding\.service|systemctl enable aerocore-desktop-branding' \ + "${repo_root}/build_files" "${repo_root}/system_files"; then + echo "Desktop branding must not be enabled as a system service" >&2 + exit 1 +fi +test ! -e "${repo_root}/system_files/usr/lib/systemd/system/aerocore-desktop-branding.service" +test -x "${repo_root}/system_files/usr/libexec/aerocore-desktop-branding-privileged" + echo "Desktop branding migration fixture passed" -- cgit v1.2.3