From 80cde14b9c368f58e8f16ad121396ce2f1a50f44 Mon Sep 17 00:00:00 2001 From: tranch Date: Fri, 21 Aug 2026 08:42:38 +0800 Subject: Adapt to Bazzite 44 Update Deck identity matching for the new upstream scripts and add fixture coverage for patch idempotence. Move the live installer base to Fedora 44 while retaining the Fedora 43 Anaconda workaround for explicit legacy builds. --- tests/fixtures/bazzite-44/usr/bin/bazzite-steam | 10 ++++ .../bazzite-44/usr/libexec/bazzite-hardware-setup | 10 ++++ .../bazzite-44/usr/libexec/bazzite-user-setup | 14 ++++++ tests/test-patch-bazzite-deck-identity.sh | 58 ++++++++++++++++++++++ 4 files changed, 92 insertions(+) create mode 100644 tests/fixtures/bazzite-44/usr/bin/bazzite-steam create mode 100644 tests/fixtures/bazzite-44/usr/libexec/bazzite-hardware-setup create mode 100644 tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup create mode 100755 tests/test-patch-bazzite-deck-identity.sh (limited to 'tests') diff --git a/tests/fixtures/bazzite-44/usr/bin/bazzite-steam b/tests/fixtures/bazzite-44/usr/bin/bazzite-steam new file mode 100644 index 0000000..9249ce1 --- /dev/null +++ b/tests/fixtures/bazzite-44/usr/bin/bazzite-steam @@ -0,0 +1,10 @@ +#!/usr/bin/bash + +# Minimal structural fixture from Bazzite 44.20260820. +if [[ $IMAGE_NAME =~ "deck" ]]; then + if [[ ! -d $HOME/.local/share/Steam ]]; then + mkdir -p "$HOME/.local/share" + fi + + DECK_OPTION="-steamdeck" +fi diff --git a/tests/fixtures/bazzite-44/usr/libexec/bazzite-hardware-setup b/tests/fixtures/bazzite-44/usr/libexec/bazzite-hardware-setup new file mode 100644 index 0000000..54aa246 --- /dev/null +++ b/tests/fixtures/bazzite-44/usr/libexec/bazzite-hardware-setup @@ -0,0 +1,10 @@ +#!/usr/bin/bash + +# Minimal structural fixture from Bazzite 44.20260820. +if [[ "$IMAGE_NAME" != *deck* && "$IMAGE_NAME" != *dx* ]]; then + rm -f /etc/sddm.conf.d/steamos.conf +fi + +if [[ $IMAGE_NAME =~ "deck" ]]; then + systemctl mask tuned.service +fi diff --git a/tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup b/tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup new file mode 100644 index 0000000..90a1ea8 --- /dev/null +++ b/tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup @@ -0,0 +1,14 @@ +#!/usr/bin/bash + +# Minimal structural fixture from Bazzite 44.20260820. +if [[ $IMAGE_NAME =~ "deck" ]]; then + touch "$HOME/Desktop/Return.desktop" +fi + +if [[ $IMAGE_NAME =~ "deck" ]]; then + touch "$HOME/.config/bazzite/desktop-configured" +fi + +if [[ $IMAGE_NAME =~ "deck" ]]; then + systemctl --user enable --now sdgyrodsu.service +fi diff --git a/tests/test-patch-bazzite-deck-identity.sh b/tests/test-patch-bazzite-deck-identity.sh new file mode 100755 index 0000000..fa420ce --- /dev/null +++ b/tests/test-patch-bazzite-deck-identity.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +set -euo pipefail + +repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +fixture_root="${repo_root}/tests/fixtures/bazzite-44" +test_root="$(mktemp -d -t aerocore-deck-identity.XXXXXXXXXX)" +trap 'rm -rf "${test_root}"' EXIT + +cp -a "${fixture_root}/." "${test_root}/" + +run_patch() { + AEROCORE_DECK_COMPAT_ROOT="${test_root}" \ + bash "${repo_root}/build_files/patch-bazzite-deck-identity.sh" +} + +assert_count() { + local expected="$1" + local pattern="$2" + local file="$3" + local actual + + actual="$(grep -Foc "${pattern}" "${file}" || true)" + if [[ "${actual}" != "${expected}" ]]; then + echo "Expected ${expected} occurrence(s) of '${pattern}' in ${file}, found ${actual}" >&2 + exit 1 + fi +} + +hardware_setup="${test_root}/usr/libexec/bazzite-hardware-setup" +steam="${test_root}/usr/bin/bazzite-steam" +user_setup="${test_root}/usr/libexec/bazzite-user-setup" +# shellcheck disable=SC2016 +deck_condition='if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME == aerocore-os ]]; then' +# shellcheck disable=SC2016 +non_deck_condition='if [[ "$IMAGE_NAME" != aerocore-os && "$IMAGE_NAME" != *deck* && "$IMAGE_NAME" != *dx* ]]; then' + +run_patch + +assert_count 1 "${non_deck_condition}" "${hardware_setup}" +assert_count 1 "${deck_condition}" "${hardware_setup}" +assert_count 1 "${deck_condition}" "${steam}" +assert_count 3 "${deck_condition}" "${user_setup}" +assert_count 1 'AeroCore Steam state migration' "${steam}" + +# A second run must recognize the patched fixture and make no further changes. +first_digest="$(sha256sum "${hardware_setup}" "${steam}" "${user_setup}")" +run_patch +second_digest="$(sha256sum "${hardware_setup}" "${steam}" "${user_setup}")" + +if [[ "${first_digest}" != "${second_digest}" ]]; then + echo "Deck identity patch is not idempotent" >&2 + exit 1 +fi + +assert_count 1 'AeroCore Steam state migration' "${steam}" + +echo "Bazzite 44 Deck identity fixture passed" -- cgit v1.2.3 From 6cb356d3837ef5a9637c2f6df1de7ef85196c280 Mon Sep 17 00:00:00 2001 From: tranch Date: Wed, 26 Aug 2026 10:41:01 +0800 Subject: fix(installer): configure the GPT auto-root type Resolve Anaconda target mounts to their backing partition before marking it as the bootc GPT auto-root partition. --- tests/test-configure-target-gpt-root.sh | 51 +++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100755 tests/test-configure-target-gpt-root.sh (limited to 'tests') diff --git a/tests/test-configure-target-gpt-root.sh b/tests/test-configure-target-gpt-root.sh new file mode 100755 index 0000000..ed5e33e --- /dev/null +++ b/tests/test-configure-target-gpt-root.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash + +set -euo pipefail + +project_root="$(git rev-parse --show-toplevel)" +tmp_dir="$(mktemp -d)" +trap 'rm -rf "${tmp_dir}"' EXIT +mkdir -p "${tmp_dir}/bin" + +# shellcheck disable=SC2016 # The generated fixture expands this in its own process. +printf '%s\n' \ + '#!/usr/bin/env bash' \ + 'if [[ " $* " == *" -no SOURCE "* ]]; then' \ + ' [[ " $* " == *" --nofsroot "* ]] || exit 97' \ + ' printf "%s\\n" "${TEST_FINDMNT_SOURCE:?}"' \ + 'else' \ + " printf '252:3\\n'" \ + 'fi' > "${tmp_dir}/bin/findmnt" + +printf '%s\n' \ + '#!/usr/bin/env bash' \ + 'case " $* " in' \ + " *\" PKNAME \"*) printf 'vda\\n' ;;" \ + " *\" PARTN \"*) printf '3\\n' ;;" \ + " *\" PARTNUM \"*) exit 98 ;;" \ + " *) printf '/dev/vda3 252:3\\n' ;;" \ + 'esac' > "${tmp_dir}/bin/lsblk" + +# shellcheck disable=SC2016 # The generated fixture expands TEST_OUTPUT itself. +printf '%s\n' \ + '#!/usr/bin/env bash' \ + 'printf "%s\\n" "$*" > "${TEST_OUTPUT:?}"' > "${tmp_dir}/bin/sgdisk" + +printf '%s\n' '#!/usr/bin/env bash' 'exit 0' > "${tmp_dir}/bin/partprobe" + +chmod +x "${tmp_dir}/bin/"* + +run_fixture() { + local findmnt_source=$1 + + TEST_FINDMNT_SOURCE="${findmnt_source}" TEST_OUTPUT="${tmp_dir}/sgdisk.args" \ + PATH="${tmp_dir}/bin:${PATH}" \ + bash "${project_root}/installer/configure-target-gpt-root.sh" /mnt/sysroot + + grep -qx -- '--typecode=3:4f68bce3-e8cd-4db1-96e7-fbcaf984b709 /dev/vda' \ + "${tmp_dir}/sgdisk.args" +} + +run_fixture root +run_fixture '/dev/vda3[/root]' +printf 'GPT root bind-mount and Btrfs subvolume fixtures passed\n' -- cgit v1.2.3 From 10411b5e32b78f57b6ad995c434cfc4fc390d689 Mon Sep 17 00:00:00 2001 From: tranch Date: Wed, 26 Aug 2026 10:59:21 +0800 Subject: fix(config): make local dotenv optional Load a private .env when present, but keep CI configuration in GitHub runtime variables and retain the tracked template as a guide. --- tests/test-dotenv-precedence.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 tests/test-dotenv-precedence.sh (limited to 'tests') diff --git a/tests/test-dotenv-precedence.sh b/tests/test-dotenv-precedence.sh new file mode 100755 index 0000000..f2cc760 --- /dev/null +++ b/tests/test-dotenv-precedence.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +set -euo pipefail + +project_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +tmp_dir="$(mktemp -d)" +trap 'rm -rf "${tmp_dir}"' EXIT + +grep -Fqx 'set dotenv-filename := ".env"' "${project_root}/Justfile" +grep -Fqx '.env' "${project_root}/.gitignore" +if rg -F -- '--dotenv-path image-template.env' "${project_root}/.github/workflows"; then + echo 'CI must not load image-template.env as a dotenv file' >&2 + exit 1 +fi + +printf '%s\n' \ + 'set dotenv-load' \ + 'value := env_var("VALUE")' \ + 'show:' \ + ' @echo "{{value}}"' > "${tmp_dir}/justfile" +printf '%s\n' 'VALUE=from-dotenv' > "${tmp_dir}/.env" + +[[ "$(cd "${tmp_dir}" && just show)" == 'from-dotenv' ]] +[[ "$(cd "${tmp_dir}" && VALUE=from-runtime just show)" == 'from-runtime' ]] + +mkdir "${tmp_dir}/without-dotenv" +cp "${tmp_dir}/justfile" "${tmp_dir}/without-dotenv/justfile" +[[ "$(cd "${tmp_dir}/without-dotenv" && VALUE=from-runtime just show)" == 'from-runtime' ]] -- cgit v1.2.3 From cc2a2c630120627d8d89e6fec90fdeeb04ca1a51 Mon Sep 17 00:00:00 2001 From: tranch Date: Wed, 26 Aug 2026 10:41:53 +0800 Subject: fix(installer): restore interactive account setup Use an AeroCore Anaconda profile so the live installer keeps the accounts page that Fedora KDE hides. --- tests/test-aerocore-anaconda-profile.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 tests/test-aerocore-anaconda-profile.sh (limited to 'tests') diff --git a/tests/test-aerocore-anaconda-profile.sh b/tests/test-aerocore-anaconda-profile.sh new file mode 100755 index 0000000..3b3bb61 --- /dev/null +++ b/tests/test-aerocore-anaconda-profile.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -euo pipefail + +project_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +profile="${project_root}/installer/system_files/overrides/etc/anaconda/profile.d/aerocore.conf" +build_script="${project_root}/installer/build.sh" + +grep -qx 'profile_id = aerocore' "${profile}" +grep -qx 'os_id = aerocore' "${profile}" +grep -Fqx "sed -i 's/^ID=.*/ID=aerocore/' /usr/lib/os-release" "${build_script}" + +if grep -Eq '^[[:space:]]*(UserSpoke|anaconda-screen-accounts)[[:space:]]*$' "${profile}"; then + echo "AeroCore's Anaconda profile must leave account creation visible" >&2 + exit 1 +fi -- cgit v1.2.3 From 8f9bc7c6133f466355e5538e066379e7f3366ae4 Mon Sep 17 00:00:00 2001 From: tranch Date: Wed, 26 Aug 2026 17:29:49 +0800 Subject: fix: align testing channel metadata Make the build tag authoritative for image branch and version metadata. Avoid hard-coded stable image tags and add regression coverage. --- tests/test-build-channel-metadata.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/test-build-channel-metadata.sh (limited to 'tests') diff --git a/tests/test-build-channel-metadata.sh b/tests/test-build-channel-metadata.sh new file mode 100644 index 0000000..75a2827 --- /dev/null +++ b/tests/test-build-channel-metadata.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +set -euo pipefail + +repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" + +# The build recipe's positional tag must be authoritative for channel +# metadata. This protects `just build ... testing` from stale dotenv values. +grep -Fqx ' "--build-arg" "IMAGE_BRANCH={{ tag }}"' "${repo_root}/Justfile" +grep -Fqx ' "--build-arg" "VERSION_TAG={{ tag }}"' "${repo_root}/Justfile" +grep -Fqx ' "--build-arg" "VERSION_PRETTY={{ tag }}"' "${repo_root}/Justfile" +grep -Fqx ' LABELS+=("--label" "org.opencontainers.image.version={{ tag }}-${GIT_SHA}")' "${repo_root}/Justfile" +grep -Fqx ' "image-tag": "$IMAGE_BRANCH_NORMALIZED",' "${repo_root}/build_files/image-info" + +if grep -Fq ' "image-tag": "stable",' "${repo_root}/build_files/image-info"; then + echo 'image-info must not hard-code stable as the image tag' >&2 + exit 1 +fi + +echo 'Build channel metadata checks passed' -- cgit v1.2.3 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') 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') 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 --- .../bazzite-44/usr/libexec/bazzite-user-setup | 2 ++ tests/test-desktop-branding-migration.sh | 21 +++++++++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) (limited to 'tests') diff --git a/tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup b/tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup index 90a1ea8..9466a0b 100644 --- a/tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup +++ b/tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup @@ -1,5 +1,7 @@ #!/usr/bin/bash +pkexec /usr/libexec/bazzite-privileged-user-setup "$USER" + # Minimal structural fixture from Bazzite 44.20260820. if [[ $IMAGE_NAME =~ "deck" ]]; then touch "$HOME/Desktop/Return.desktop" 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 From a2fb7a7f2c9f91569568cfda674968487d52497f Mon Sep 17 00:00:00 2001 From: tranch Date: Thu, 10 Sep 2026 07:50:08 +0800 Subject: Add mirrored Decky ujust setup Provide an explicit setup-decky-mirror recipe that keeps upstream setup-decky intact while routing Decky Loader installer scripts through AeroCore's Decky mirror. Add a focused shell test to catch accidental fallbacks to the GitHub installer URL. --- tests/test-decky-mirror-ujust.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 tests/test-decky-mirror-ujust.sh (limited to 'tests') diff --git a/tests/test-decky-mirror-ujust.sh b/tests/test-decky-mirror-ujust.sh new file mode 100755 index 0000000..bb15f26 --- /dev/null +++ b/tests/test-decky-mirror-ujust.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +set -euo pipefail + +project_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +recipe="${project_root}/system_files/usr/share/ublue-os/just/92-aerocore-decky-mirror.just" + +if [[ ! -f "${recipe}" ]]; then + echo "Missing Decky mirror ujust recipe: ${recipe}" >&2 + exit 1 +fi + +if ! rg -q '^setup-decky-mirror ACTION=""' "${recipe}"; then + echo "Decky mirror recipe must expose ujust setup-decky-mirror" >&2 + exit 1 +fi + +if ! rg -q 'decky\.mirror\.aerocore\.com\.cn' "${recipe}"; then + echo "Decky mirror recipe must default to the AeroCore Decky mirror host" >&2 + exit 1 +fi + +if rg -q 'https://github\.com/SteamDeckHomebrew/decky-installer' "${recipe}"; then + echo "Decky mirror recipe must not install from GitHub" >&2 + exit 1 +fi + +for script_name in install_release.sh install_prerelease.sh uninstall.sh; do + if ! rg -q "\\$\\{DECKY_INSTALLER_BASE\\}/${script_name}" "${recipe}"; then + echo "Decky mirror recipe does not route ${script_name} through the mirror base" >&2 + exit 1 + fi +done -- cgit v1.2.3 From b7cf961255e1f1efbae76c9a6a1a63e5a0f3bae7 Mon Sep 17 00:00:00 2001 From: tranch Date: Fri, 11 Sep 2026 02:09:29 +0800 Subject: Configure Decky plugin store mirror Persist the AeroCore plugin store URL after installation. Avoid service startup races when updating loader.json. --- tests/test-decky-mirror-ujust.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests') diff --git a/tests/test-decky-mirror-ujust.sh b/tests/test-decky-mirror-ujust.sh index bb15f26..125983b 100755 --- a/tests/test-decky-mirror-ujust.sh +++ b/tests/test-decky-mirror-ujust.sh @@ -24,6 +24,18 @@ if rg -q 'https://github\.com/SteamDeckHomebrew/decky-installer' "${recipe}"; th exit 1 fi +if ! rg -q 'configure_plugin_store\(\)' "${recipe}" || \ + ! rg -q 'plugins\.decky\.mirror\.aerocore\.com\.cn' "${recipe}" || \ + ! rg -q 'DECKY_PLUGIN_STORE_URL=.*\/plugins' "${recipe}"; then + echo "Decky mirror recipe must configure the AeroCore plugin store URL" >&2 + exit 1 +fi + +if ! rg -q 'loader\.json' "${recipe}" || ! rg -q '\.store = 2' "${recipe}" || ! rg -q 'store-url' "${recipe}"; then + echo "Decky mirror recipe must persist the custom plugin store in loader.json" >&2 + exit 1 +fi + for script_name in install_release.sh install_prerelease.sh uninstall.sh; do if ! rg -q "\\$\\{DECKY_INSTALLER_BASE\\}/${script_name}" "${recipe}"; then echo "Decky mirror recipe does not route ${script_name} through the mirror base" >&2 -- cgit v1.2.3 From c18aff5d552f359386736aea68a0ac9541cc5820 Mon Sep 17 00:00:00 2001 From: tranch Date: Fri, 11 Sep 2026 09:22:21 +0800 Subject: Make Decky uninstall idempotent Tolerate missing loader and CEF debug paths during uninstall. Verify all patched removal paths in the recipe test. --- tests/test-decky-mirror-ujust.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests') diff --git a/tests/test-decky-mirror-ujust.sh b/tests/test-decky-mirror-ujust.sh index 125983b..6950c31 100755 --- a/tests/test-decky-mirror-ujust.sh +++ b/tests/test-decky-mirror-ujust.sh @@ -36,6 +36,13 @@ if ! rg -q 'loader\.json' "${recipe}" || ! rg -q '\.store = 2' "${recipe}" || ! exit 1 fi +if ! rg -q 'rm -rf.*HOMEBREW_FOLDER.*/services/PluginLoader' "${recipe}" || + ! rg -q 'rm -f.*USER_DIR.*/\.steam/steam/\.cef-enable-remote-debugging' "${recipe}" || + ! rg -q 'rm -f.*USER_DIR.*/\.var/app/com\.valvesoftware\.Steam/data/Steam/\.cef-enable-remote-debugging' "${recipe}"; then + echo "Decky mirror recipe must make uninstall safe for missing paths" >&2 + exit 1 +fi + for script_name in install_release.sh install_prerelease.sh uninstall.sh; do if ! rg -q "\\$\\{DECKY_INSTALLER_BASE\\}/${script_name}" "${recipe}"; then echo "Decky mirror recipe does not route ${script_name} through the mirror base" >&2 -- cgit v1.2.3 From 9f1490f28db8643e78cd26e3cd8f0c92909f16a2 Mon Sep 17 00:00:00 2001 From: tranch Date: Sun, 13 Sep 2026 13:58:34 +0800 Subject: Migrate legacy gaming mode shortcut Repair existing user desktop launchers that still reference the removed return-to-gamemode systemd service. --- tests/test-patch-bazzite-deck-identity.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests') diff --git a/tests/test-patch-bazzite-deck-identity.sh b/tests/test-patch-bazzite-deck-identity.sh index fa420ce..0b0586c 100755 --- a/tests/test-patch-bazzite-deck-identity.sh +++ b/tests/test-patch-bazzite-deck-identity.sh @@ -42,6 +42,7 @@ assert_count 1 "${deck_condition}" "${hardware_setup}" assert_count 1 "${deck_condition}" "${steam}" assert_count 3 "${deck_condition}" "${user_setup}" assert_count 1 'AeroCore Steam state migration' "${steam}" +assert_count 1 'AeroCore Return to Gaming Mode shortcut migration' "${user_setup}" # A second run must recognize the patched fixture and make no further changes. first_digest="$(sha256sum "${hardware_setup}" "${steam}" "${user_setup}")" @@ -54,5 +55,6 @@ if [[ "${first_digest}" != "${second_digest}" ]]; then fi assert_count 1 'AeroCore Steam state migration' "${steam}" +assert_count 1 'AeroCore Return to Gaming Mode shortcut migration' "${user_setup}" echo "Bazzite 44 Deck identity fixture passed" -- cgit v1.2.3 From f068acf3b1c2a4551c5119997fd40909ddd35386 Mon Sep 17 00:00:00 2001 From: tranch Date: Sun, 13 Sep 2026 19:05:58 +0800 Subject: Run shortcut migration before setup guard Ensure legacy Return.desktop files are repaired even when Bazzite user setup has already completed for the user. --- tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup | 2 ++ tests/test-patch-bazzite-deck-identity.sh | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'tests') diff --git a/tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup b/tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup index 9466a0b..4f40af4 100644 --- a/tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup +++ b/tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup @@ -2,6 +2,8 @@ pkexec /usr/libexec/bazzite-privileged-user-setup "$USER" +# Run script if updated + # Minimal structural fixture from Bazzite 44.20260820. if [[ $IMAGE_NAME =~ "deck" ]]; then touch "$HOME/Desktop/Return.desktop" diff --git a/tests/test-patch-bazzite-deck-identity.sh b/tests/test-patch-bazzite-deck-identity.sh index 0b0586c..cbe4382 100755 --- a/tests/test-patch-bazzite-deck-identity.sh +++ b/tests/test-patch-bazzite-deck-identity.sh @@ -43,6 +43,10 @@ assert_count 1 "${deck_condition}" "${steam}" assert_count 3 "${deck_condition}" "${user_setup}" assert_count 1 'AeroCore Steam state migration' "${steam}" assert_count 1 'AeroCore Return to Gaming Mode shortcut migration' "${user_setup}" +if [[ "$(grep -nF 'AeroCore Return to Gaming Mode shortcut migration' "${user_setup}" | cut -d: -f1)" -ge "$(grep -nF '# Run script if updated' "${user_setup}" | cut -d: -f1)" ]]; then + echo "Return to Gaming Mode migration must run before the user setup early-exit guard" >&2 + exit 1 +fi # A second run must recognize the patched fixture and make no further changes. first_digest="$(sha256sum "${hardware_setup}" "${steam}" "${user_setup}")" -- cgit v1.2.3 From 47ede79dece8e8e04f8105c8f2ef9c8883d9c738 Mon Sep 17 00:00:00 2001 From: tranch Date: Sun, 13 Sep 2026 19:16:12 +0800 Subject: Revert "Run shortcut migration before setup guard" This reverts commit f068acf3b1c2a4551c5119997fd40909ddd35386. --- tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup | 2 -- tests/test-patch-bazzite-deck-identity.sh | 4 ---- 2 files changed, 6 deletions(-) (limited to 'tests') diff --git a/tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup b/tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup index 4f40af4..9466a0b 100644 --- a/tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup +++ b/tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup @@ -2,8 +2,6 @@ pkexec /usr/libexec/bazzite-privileged-user-setup "$USER" -# Run script if updated - # Minimal structural fixture from Bazzite 44.20260820. if [[ $IMAGE_NAME =~ "deck" ]]; then touch "$HOME/Desktop/Return.desktop" diff --git a/tests/test-patch-bazzite-deck-identity.sh b/tests/test-patch-bazzite-deck-identity.sh index cbe4382..0b0586c 100755 --- a/tests/test-patch-bazzite-deck-identity.sh +++ b/tests/test-patch-bazzite-deck-identity.sh @@ -43,10 +43,6 @@ assert_count 1 "${deck_condition}" "${steam}" assert_count 3 "${deck_condition}" "${user_setup}" assert_count 1 'AeroCore Steam state migration' "${steam}" assert_count 1 'AeroCore Return to Gaming Mode shortcut migration' "${user_setup}" -if [[ "$(grep -nF 'AeroCore Return to Gaming Mode shortcut migration' "${user_setup}" | cut -d: -f1)" -ge "$(grep -nF '# Run script if updated' "${user_setup}" | cut -d: -f1)" ]]; then - echo "Return to Gaming Mode migration must run before the user setup early-exit guard" >&2 - exit 1 -fi # A second run must recognize the patched fixture and make no further changes. first_digest="$(sha256sum "${hardware_setup}" "${steam}" "${user_setup}")" -- cgit v1.2.3 From d734f2c746632772b794143762f2fcea78e62011 Mon Sep 17 00:00:00 2001 From: tranch Date: Sun, 13 Sep 2026 19:16:12 +0800 Subject: Revert "Migrate legacy gaming mode shortcut" This reverts commit 9f1490f28db8643e78cd26e3cd8f0c92909f16a2. --- tests/test-patch-bazzite-deck-identity.sh | 2 -- 1 file changed, 2 deletions(-) (limited to 'tests') diff --git a/tests/test-patch-bazzite-deck-identity.sh b/tests/test-patch-bazzite-deck-identity.sh index 0b0586c..fa420ce 100755 --- a/tests/test-patch-bazzite-deck-identity.sh +++ b/tests/test-patch-bazzite-deck-identity.sh @@ -42,7 +42,6 @@ assert_count 1 "${deck_condition}" "${hardware_setup}" assert_count 1 "${deck_condition}" "${steam}" assert_count 3 "${deck_condition}" "${user_setup}" assert_count 1 'AeroCore Steam state migration' "${steam}" -assert_count 1 'AeroCore Return to Gaming Mode shortcut migration' "${user_setup}" # A second run must recognize the patched fixture and make no further changes. first_digest="$(sha256sum "${hardware_setup}" "${steam}" "${user_setup}")" @@ -55,6 +54,5 @@ if [[ "${first_digest}" != "${second_digest}" ]]; then fi assert_count 1 'AeroCore Steam state migration' "${steam}" -assert_count 1 'AeroCore Return to Gaming Mode shortcut migration' "${user_setup}" echo "Bazzite 44 Deck identity fixture passed" -- cgit v1.2.3