From 4cebc1656fdd3a1f1e06b9e912ffea0028c37f54 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Sat, 22 Mar 2025 15:18:22 -0700 Subject: feat: Avoid copying build files into image, add option for linting (#93) --- build_files/build.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 build_files/build.sh (limited to 'build_files') diff --git a/build_files/build.sh b/build_files/build.sh new file mode 100755 index 0000000..f1e659a --- /dev/null +++ b/build_files/build.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +set -ouex pipefail + +### Install packages + +# Packages can be installed from any enabled yum repo on the image. +# RPMfusion repos are available by default in ublue main images +# List of rpmfusion packages can be found here: +# https://mirrors.rpmfusion.org/mirrorlist?path=free/fedora/updates/39/x86_64/repoview/index.html&protocol=https&redirect=1 + +# this installs a package from fedora repos +dnf5 install -y tmux + +# Use a COPR Example: +# +# dnf5 -y copr enable ublue-os/staging +# dnf5 -y install package +# Disable COPRs so they don't end up enabled on the final image: +# dnf5 -y copr disable ublue-os/staging + +#### Example for enabling a System Unit File + +systemctl enable podman.socket -- cgit v1.2.3 From 9caf29078b7b582768710844a4987fa0051bbf81 Mon Sep 17 00:00:00 2001 From: yodatak Date: Sat, 3 Jan 2026 16:59:50 +0100 Subject: Update build.sh (#182) --- build_files/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build_files') diff --git a/build_files/build.sh b/build_files/build.sh index f1e659a..ebffafc 100755 --- a/build_files/build.sh +++ b/build_files/build.sh @@ -7,7 +7,7 @@ set -ouex pipefail # Packages can be installed from any enabled yum repo on the image. # RPMfusion repos are available by default in ublue main images # List of rpmfusion packages can be found here: -# https://mirrors.rpmfusion.org/mirrorlist?path=free/fedora/updates/39/x86_64/repoview/index.html&protocol=https&redirect=1 +# https://mirrors.rpmfusion.org/mirrorlist?path=free/fedora/updates/43/x86_64/repoview/index.html&protocol=https&redirect=1 # this installs a package from fedora repos dnf5 install -y tmux -- cgit v1.2.3 From a65bb3da1f7c5ed04ac3d8b5f69878c5ecee14ea Mon Sep 17 00:00:00 2001 From: renner <80410025+renner0e@users.noreply.github.com> Date: Wed, 17 Jun 2026 16:16:34 +0200 Subject: refactor: rewrite in just, saner defaults (#218) * refactor: rewrite in just, saner defaults I think it makes sense to do this as it is longterm easier to maintain, locally iterate and extend. Documents how to rebase to a local image, it pains me greatly when people iterate on github and wait forever for things to build and then to download the image for trivial things they could also quickly do locally. Rpm-ostree rechunker by default instead of opt-in legacy-rechunker, chunkah is also available if people want to use it already, if we deem it ready then we can enable it later on. They can all be opted-out of. Have a way to copy files to /{usr,etc} by default. We should sign the digest of the image instead of the tag. Co-Authored-by: a lot of sugar and bad music * docs: bump fedora-bootc version Co-authored-by: Jill Fiore * fix: formatting inconsistency Co-authored-by: Jill Fiore * docs: remove variable mentions from workflows These are now defined in the image-template.env file * fix: small nits in labels Co-authored-by: Adam Fidel --------- Co-authored-by: Jill Fiore Co-authored-by: Adam Fidel --- build_files/build.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'build_files') diff --git a/build_files/build.sh b/build_files/build.sh index ebffafc..0bb290c 100755 --- a/build_files/build.sh +++ b/build_files/build.sh @@ -2,6 +2,9 @@ set -ouex pipefail +# Copy the contents of system_files/ of the git repo to / +cp -avf "/ctx/system_files"/. / + ### Install packages # Packages can be installed from any enabled yum repo on the image. @@ -10,7 +13,7 @@ set -ouex pipefail # https://mirrors.rpmfusion.org/mirrorlist?path=free/fedora/updates/43/x86_64/repoview/index.html&protocol=https&redirect=1 # this installs a package from fedora repos -dnf5 install -y tmux +dnf5 install -y tmux # Use a COPR Example: # -- cgit v1.2.3 From ed40e44b610cac878f17fa4233d8e3d19b8d67bb Mon Sep 17 00:00:00 2001 From: tranch Date: Thu, 9 Jul 2026 16:53:52 +0800 Subject: Configure AeroCore image mirrors Add build-time mirror configuration for Flatpak and Homebrew, expose the related build args, and install an AeroCore-owned profile script to load mirror environment files. Rename the mirror configuration files from the Bazzite-prefixed names to AeroCore-prefixed names while keeping the upstream Bazzite helper reference intact. Verification: bash -n system_files/etc/profile.d/aerocore-mirrors.sh && bash -n build_files/build.sh --- build_files/build.sh | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) (limited to 'build_files') diff --git a/build_files/build.sh b/build_files/build.sh index 0bb290c..f1709da 100755 --- a/build_files/build.sh +++ b/build_files/build.sh @@ -5,23 +5,30 @@ set -ouex pipefail # Copy the contents of system_files/ of the git repo to / cp -avf "/ctx/system_files"/. / -### Install packages +mkdir -p /etc/environment.d -# Packages can be installed from any enabled yum repo on the image. -# RPMfusion repos are available by default in ublue main images -# List of rpmfusion packages can be found here: -# https://mirrors.rpmfusion.org/mirrorlist?path=free/fedora/updates/43/x86_64/repoview/index.html&protocol=https&redirect=1 +if [[ -n "${FLATPAK_REMOTE_URL:-}" || -n "${HOMEBREW_BOTTLE_DOMAIN:-}" || -n "${HOMEBREW_API_DOMAIN:-}" ]]; then + : > /etc/environment.d/99-aerocore-mirrors.conf +fi -# this installs a package from fedora repos -dnf5 install -y tmux +if [[ -n "${FLATPAK_REMOTE_URL:-}" ]]; then + printf '%s\n' "FLATPAK_REMOTE_URL=${FLATPAK_REMOTE_URL}" >> /etc/environment.d/99-aerocore-mirrors.conf + if [[ -f /usr/libexec/bazzite-mirror-utils.sh ]]; then + bash /usr/libexec/bazzite-mirror-utils.sh update_flathub_repo_url "${FLATPAK_REMOTE_URL}" + fi +fi -# Use a COPR Example: -# -# dnf5 -y copr enable ublue-os/staging -# dnf5 -y install package -# Disable COPRs so they don't end up enabled on the final image: -# dnf5 -y copr disable ublue-os/staging +if [[ -n "${HOMEBREW_BOTTLE_DOMAIN:-}" || -n "${HOMEBREW_API_DOMAIN:-}" ]]; then + mkdir -p /etc/skel/.config/environment.d + : > /etc/skel/.config/environment.d/99-aerocore-mirrors.conf +fi -#### Example for enabling a System Unit File +if [[ -n "${HOMEBREW_BOTTLE_DOMAIN:-}" ]]; then + printf '%s\n' "HOMEBREW_BOTTLE_DOMAIN=${HOMEBREW_BOTTLE_DOMAIN}" | tee -a /etc/environment.d/99-aerocore-mirrors.conf /etc/skel/.config/environment.d/99-aerocore-mirrors.conf >/dev/null +fi -systemctl enable podman.socket +if [[ -n "${HOMEBREW_API_DOMAIN:-}" ]]; then + printf '%s\n' "HOMEBREW_API_DOMAIN=${HOMEBREW_API_DOMAIN}" | tee -a /etc/environment.d/99-aerocore-mirrors.conf /etc/skel/.config/environment.d/99-aerocore-mirrors.conf >/dev/null +fi + +find /etc/environment.d /etc/skel/.config/environment.d -name 99-aerocore-mirrors.conf -type f -exec chmod 0644 {} + 2>/dev/null || true -- cgit v1.2.3 From 739b2e36ca393a8f9452280ac86bd59390df0c7a Mon Sep 17 00:00:00 2001 From: tranch Date: Fri, 10 Jul 2026 18:59:48 +0800 Subject: Complete OS rename metadata migration Move the image metadata and desktop naming to the new AeroCore OS\nidentity, and wire the build so the generated os-release data is\nwritten during image construction. --- build_files/image-info | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100755 build_files/image-info (limited to 'build_files') diff --git a/build_files/image-info b/build_files/image-info new file mode 100755 index 0000000..d441917 --- /dev/null +++ b/build_files/image-info @@ -0,0 +1,78 @@ +#!/usr/bin/bash + +set -eoux pipefail + +IMAGE_PRETTY_NAME="AeroCore OS" +IMAGE_ID="aerocore" +IMAGE_LIKE="fedora" +HOME_URL="https://os.aerocore.com.cn" +DOCUMENTATION_URL="https://docs.os.aerocore.com.cn" +SUPPORT_URL="https://os.aerocore.com.cn/support" +BUG_SUPPORT_URL="https://github.com/AeroCore-IO/AeroCore-OS/issues/" +LOGO_ICON="distributor-logo" +LOGO_COLOR="0;38;2;12;109;129" + +IMAGE_INFO="/usr/share/ublue-os/image-info.json" +OSTREE_REGISTRY="${OSTREE_REGISTRY:-docker://ghcr.io}" +OSTREE_NAMESPACE="${OSTREE_NAMESPACE:-$IMAGE_VENDOR}" +IMAGE_REF="ostree-image-signed:${OSTREE_REGISTRY%/}/$OSTREE_NAMESPACE/$IMAGE_NAME" +IMAGE_BRANCH_NORMALIZED="$IMAGE_BRANCH" +BASE_IMAGE_NAME="bazzite-deck" + +if [[ $IMAGE_BRANCH_NORMALIZED == "main" ]]; then + IMAGE_BRANCH_NORMALIZED="stable" +fi + +FEDORA_VERSION=$(rpm -E %fedora) + +mkdir -p "$(dirname "$IMAGE_INFO")" +cat > "$IMAGE_INFO" < /etc/system-release + +if grep -q '^BUILD_ID=' /usr/lib/os-release; then + sed -i "s/^BUILD_ID=.*/BUILD_ID=\"$VERSION_PRETTY\"/" /usr/lib/os-release +else + echo "BUILD_ID=\"$VERSION_PRETTY\"" >> /usr/lib/os-release +fi + +if grep -q '^BOOTLOADER_NAME=' /usr/lib/os-release; then + sed -i "s/^BOOTLOADER_NAME=.*/BOOTLOADER_NAME=\"$IMAGE_PRETTY_NAME $VERSION_PRETTY\"/" /usr/lib/os-release +else + echo "BOOTLOADER_NAME=\"$IMAGE_PRETTY_NAME $VERSION_PRETTY\"" >> /usr/lib/os-release +fi + +# Keep hibernation images tied to this exact image version. +if grep -q '^IMAGE_ID=' /usr/lib/os-release; then + sed -i "s/^IMAGE_ID=.*/IMAGE_ID=\"$IMAGE_NAME-$VERSION_TAG\"/" /usr/lib/os-release +else + echo "IMAGE_ID=\"$IMAGE_NAME-$VERSION_TAG\"" >> /usr/lib/os-release +fi -- cgit v1.2.3 From 84df0042ca51743e2ef228d25a664a139ce8f9b3 Mon Sep 17 00:00:00 2001 From: tranch Date: Sun, 12 Jul 2026 23:35:37 +0800 Subject: Rebuild initramfs with custom branding Regenerate initramfs after applying AeroCore image metadata and assets. --- build_files/build-initramfs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 build_files/build-initramfs (limited to 'build_files') diff --git a/build_files/build-initramfs b/build_files/build-initramfs new file mode 100755 index 0000000..9eec951 --- /dev/null +++ b/build_files/build-initramfs @@ -0,0 +1,17 @@ +#!/usr/bin/bash + +set -eoux pipefail + +echo "::group::Executing build-initramfs" +trap 'echo "::endgroup::"' EXIT + +if [[ "${KERNEL_FLAVOR:-}" == "surface" ]]; then + KERNEL_SUFFIX="surface" +else + KERNEL_SUFFIX="" +fi + +QUALIFIED_KERNEL="$(dnf5 repoquery --installed --queryformat='%{evr}.%{arch}' "kernel${KERNEL_SUFFIX:+-${KERNEL_SUFFIX}}")" +/usr/bin/dracut --no-hostonly --kver "$QUALIFIED_KERNEL" --reproducible --zstd -v --add ostree --add fido2 -f "/usr/lib/modules/$QUALIFIED_KERNEL/initramfs.img" + +chmod 0600 /usr/lib/modules/"$QUALIFIED_KERNEL"/initramfs.img -- cgit v1.2.3 From 78bc16acebffcffcb5e544139cb4c5169f652985 Mon Sep 17 00:00:00 2001 From: tranch Date: Mon, 13 Jul 2026 00:17:46 +0800 Subject: Allow env override for image update ref Pass OSTREE_IMAGE_REF from GitHub repository variables into the image build so image-info.json can point systems at the configured update source. --- build_files/image-info | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build_files') diff --git a/build_files/image-info b/build_files/image-info index d441917..6c13612 100755 --- a/build_files/image-info +++ b/build_files/image-info @@ -15,7 +15,7 @@ LOGO_COLOR="0;38;2;12;109;129" IMAGE_INFO="/usr/share/ublue-os/image-info.json" OSTREE_REGISTRY="${OSTREE_REGISTRY:-docker://ghcr.io}" OSTREE_NAMESPACE="${OSTREE_NAMESPACE:-$IMAGE_VENDOR}" -IMAGE_REF="ostree-image-signed:${OSTREE_REGISTRY%/}/$OSTREE_NAMESPACE/$IMAGE_NAME" +IMAGE_REF="${OSTREE_IMAGE_REF:-ostree-image-signed:${OSTREE_REGISTRY%/}/$OSTREE_NAMESPACE/$IMAGE_NAME}" IMAGE_BRANCH_NORMALIZED="$IMAGE_BRANCH" BASE_IMAGE_NAME="bazzite-deck" -- cgit v1.2.3 From 5a41b4c5daf60b45105d0dc552c4d46022c92b04 Mon Sep 17 00:00:00 2001 From: tranch Date: Wed, 15 Jul 2026 14:04:06 +0800 Subject: Integrate Instruments release seed Download and verify the selected release during image builds. Bootstrap it once into the first graphical user's XDG directories. --- build_files/build.sh | 2 + build_files/install-instruments.sh | 182 +++++++++++++++++++++++++++++++++++++ 2 files changed, 184 insertions(+) create mode 100755 build_files/install-instruments.sh (limited to 'build_files') diff --git a/build_files/build.sh b/build_files/build.sh index f1709da..b89907a 100755 --- a/build_files/build.sh +++ b/build_files/build.sh @@ -32,3 +32,5 @@ if [[ -n "${HOMEBREW_API_DOMAIN:-}" ]]; then fi find /etc/environment.d /etc/skel/.config/environment.d -name 99-aerocore-mirrors.conf -type f -exec chmod 0644 {} + 2>/dev/null || true + +/ctx/install-instruments.sh diff --git a/build_files/install-instruments.sh b/build_files/install-instruments.sh new file mode 100755 index 0000000..f85bd3b --- /dev/null +++ b/build_files/install-instruments.sh @@ -0,0 +1,182 @@ +#!/usr/bin/env bash + +set -euo pipefail + +: "${INSTRUMENTS_ENABLED:=true}" +: "${INSTRUMENTS_RELEASE_REPOSITORY:=AeroCore-IO/booster-installer}" +: "${INSTRUMENTS_VERSION:=latest}" +: "${INSTRUMENTS_RELEASE_API_BASE:=https://api.github.com}" +: "${INSTRUMENTS_SEED_ROOT:=/usr/share/aerocore-booster-release}" + +if [[ "${INSTRUMENTS_ENABLED}" != "true" ]]; then + echo "AeroCore Booster image integration is disabled" + exit 0 +fi + +case "$(uname -m)" in + x86_64 | amd64) + asset_suffix="_linux-x86_64.tar.gz" + ;; + *) + echo "Unsupported AeroCore Booster image architecture: $(uname -m)" >&2 + exit 1 + ;; +esac + +for command in curl jq sha256sum tar; do + command -v "$command" >/dev/null 2>&1 || { + echo "Required command is unavailable: $command" >&2 + exit 1 + } +done + +workdir="$(mktemp -d)" +trap 'rm -rf "$workdir"' EXIT + +github_curl() { + local args=( + --fail + --location + --retry 3 + --retry-delay 2 + --retry-max-time 60 + --silent + --show-error + ) + + if [[ -s /run/secrets/GITHUB_TOKEN ]]; then + args+=(--header "Authorization: Bearer $(&2 + exit 1 +fi + +IFS=$'\t' read -r asset_name asset_url <<<"${payload_assets[0]}" +checksum_name="${asset_name}.sha256" +checksum_url="$( + jq -er --arg name "$checksum_name" \ + '.assets[] | select(.name == $name) | .browser_download_url' \ + "$release_json" +)" + +archive="$workdir/$asset_name" +checksum_file="$workdir/$checksum_name" +github_curl "$asset_url" --output "$archive" +github_curl "$checksum_url" --output "$checksum_file" + +expected_checksum="$(awk 'NR == 1 { print $1 }' "$checksum_file")" +actual_checksum="$(sha256sum "$archive" | awk '{ print $1 }')" +if [[ ! "$expected_checksum" =~ ^[[:xdigit:]]{64}$ ]] || + [[ "${actual_checksum,,}" != "${expected_checksum,,}" ]]; then + echo "Checksum verification failed for $asset_name" >&2 + exit 1 +fi + +while IFS= read -r entry; do + case "$entry" in + /* | ../* | */../* | */..) + echo "Unsafe path in release archive: $entry" >&2 + exit 1 + ;; + esac +done < <(tar -tzf "$archive") + +extract_dir="$workdir/extracted" +install -d "$extract_dir" +tar --extract --gzip --file "$archive" --directory "$extract_dir" \ + --no-same-owner + +if [[ -d "$extract_dir/aerocore-booster-release" ]]; then + payload="$extract_dir/aerocore-booster-release" +elif [[ -d "$extract_dir/instruments-ng-release" ]]; then + payload="$extract_dir/instruments-ng-release" +else + echo "Release archive does not contain a supported payload root" >&2 + exit 1 +fi + +required_paths=( + install.sh + appimage/AppRun + appimage/AppRun.wrapped + sidecar/hhd-input-helper.cjs + sidecar/vendor/hhd-input-helper/instruments_hhd_input/__init__.py + runtime/avionics + runtime/cabin + runtime/wing + runtime/node/bin/node + python-wheelhouse + pkg/systemd/ac-avionics.service + pkg/systemd/ac-cabin.service + pkg/systemd/ac-wing.service + pkg/systemd/ac-instruments.service + scripts/check-runtime-health.cjs + manifest.yaml +) + +for path in "${required_paths[@]}"; do + if [[ ! -e "$payload/$path" ]]; then + echo "Required path is missing from Booster release: $path" >&2 + exit 1 + fi +done + +if [[ ! -f "$payload/pkg/aerocore-booster.sh" && + ! -f "$payload/pkg/instruments-ng.sh" ]]; then + echo "Booster launcher is missing from the release payload" >&2 + exit 1 +fi + +# Remove the first implementation's image-owned runtime when upgrading an +# existing AeroCore OS image. The release seed itself remains immutable. +rm -rf /usr/lib/aerocore-booster +rm -f /usr/bin/aerocore-booster +for unit in ac-avionics.service ac-cabin.service ac-wing.service \ + ac-instruments.service; do + rm -f "/usr/lib/systemd/system/$unit" +done + +rm -rf "$INSTRUMENTS_SEED_ROOT" +install -d -m 0755 "$INSTRUMENTS_SEED_ROOT" +cp -a "$payload/." "$INSTRUMENTS_SEED_ROOT/" + +cat >"$INSTRUMENTS_SEED_ROOT/image-release" < Date: Wed, 15 Jul 2026 14:39:34 +0800 Subject: Recognize AeroCore as a Deck image Preserve Bazzite's Deck configuration for AeroCore images. Restore SDDM defaults removed by earlier deployments. --- build_files/build.sh | 1 + build_files/image-info | 2 +- build_files/patch-bazzite-deck-identity.sh | 47 ++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100755 build_files/patch-bazzite-deck-identity.sh (limited to 'build_files') diff --git a/build_files/build.sh b/build_files/build.sh index b89907a..3d37e31 100755 --- a/build_files/build.sh +++ b/build_files/build.sh @@ -34,3 +34,4 @@ fi find /etc/environment.d /etc/skel/.config/environment.d -name 99-aerocore-mirrors.conf -type f -exec chmod 0644 {} + 2>/dev/null || true /ctx/install-instruments.sh +/ctx/patch-bazzite-deck-identity.sh diff --git a/build_files/image-info b/build_files/image-info index 6c13612..84c6495 100755 --- a/build_files/image-info +++ b/build_files/image-info @@ -33,7 +33,7 @@ cat > "$IMAGE_INFO" <&2 + exit 1 +fi + +add_base_image_assignment=0 +if ! grep -Fqx "$base_image_assignment" "$hardware_setup"; then + add_base_image_assignment=1 +fi + +patched_file=$(mktemp) +trap 'rm -f "$patched_file"' EXIT + +awk \ + -v old_condition="$old_condition" \ + -v new_condition="$new_condition" \ + -v base_image_assignment="$base_image_assignment" \ + -v add_base_image_assignment="$add_base_image_assignment" \ + '$0 == old_condition { + if (add_base_image_assignment) { + print base_image_assignment + } + print new_condition + next + } + { print }' "$hardware_setup" > "$patched_file" + +cp "$patched_file" "$hardware_setup" + +grep -Fqx "$new_condition" "$hardware_setup" -- cgit v1.2.3 From f2a767a9cdc51384115c054020611a980451f074 Mon Sep 17 00:00:00 2001 From: tranch Date: Wed, 15 Jul 2026 15:41:48 +0800 Subject: Preserve upstream desktop metadata Keep the base image's kinoite or silverblue identity intact. Detect AeroCore Deck behavior from its image name instead. --- build_files/image-info | 2 +- build_files/patch-bazzite-deck-identity.sh | 14 +------------- 2 files changed, 2 insertions(+), 14 deletions(-) (limited to 'build_files') diff --git a/build_files/image-info b/build_files/image-info index 84c6495..a52d666 100755 --- a/build_files/image-info +++ b/build_files/image-info @@ -17,7 +17,7 @@ OSTREE_REGISTRY="${OSTREE_REGISTRY:-docker://ghcr.io}" OSTREE_NAMESPACE="${OSTREE_NAMESPACE:-$IMAGE_VENDOR}" IMAGE_REF="${OSTREE_IMAGE_REF:-ostree-image-signed:${OSTREE_REGISTRY%/}/$OSTREE_NAMESPACE/$IMAGE_NAME}" IMAGE_BRANCH_NORMALIZED="$IMAGE_BRANCH" -BASE_IMAGE_NAME="bazzite-deck" +BASE_IMAGE_NAME=$(jq -er '."base-image-name"' < "$IMAGE_INFO") if [[ $IMAGE_BRANCH_NORMALIZED == "main" ]]; then IMAGE_BRANCH_NORMALIZED="stable" diff --git a/build_files/patch-bazzite-deck-identity.sh b/build_files/patch-bazzite-deck-identity.sh index 600d97e..078b76c 100755 --- a/build_files/patch-bazzite-deck-identity.sh +++ b/build_files/patch-bazzite-deck-identity.sh @@ -7,9 +7,7 @@ hardware_setup="${1:-/usr/libexec/bazzite-hardware-setup}" # shellcheck disable=SC2016 old_condition='if [[ "$IMAGE_NAME" != *deck* && "$IMAGE_NAME" != *dx* ]]; then' # shellcheck disable=SC2016 -new_condition='if [[ "$IMAGE_NAME" != aerocore-os && "$IMAGE_NAME" != *deck* && "$IMAGE_NAME" != *dx* && "$BASE_IMAGE_NAME" != *deck* && "$BASE_IMAGE_NAME" != *dx* ]]; then' -# shellcheck disable=SC2016 -base_image_assignment='BASE_IMAGE_NAME=$(jq -r '\''."base-image-name"'\'' < $IMAGE_INFO)' +new_condition='if [[ "$IMAGE_NAME" != aerocore-os && "$IMAGE_NAME" != *deck* && "$IMAGE_NAME" != *dx* ]]; then' if grep -Fqx "$new_condition" "$hardware_setup"; then exit 0 @@ -20,23 +18,13 @@ if [[ "$(grep -Fxc "$old_condition" "$hardware_setup")" -ne 1 ]]; then exit 1 fi -add_base_image_assignment=0 -if ! grep -Fqx "$base_image_assignment" "$hardware_setup"; then - add_base_image_assignment=1 -fi - patched_file=$(mktemp) trap 'rm -f "$patched_file"' EXIT awk \ -v old_condition="$old_condition" \ -v new_condition="$new_condition" \ - -v base_image_assignment="$base_image_assignment" \ - -v add_base_image_assignment="$add_base_image_assignment" \ '$0 == old_condition { - if (add_base_image_assignment) { - print base_image_assignment - } print new_condition next } -- cgit v1.2.3 From fc07365cdc27a2e78a57cdf673fa19a99d7cf57f Mon Sep 17 00:00:00 2001 From: tranch Date: Wed, 22 Jul 2026 08:40:43 +0800 Subject: Constrain builds to bazzite-deck Keep the live installer Fedora version aligned with the deck base image and fail early if BASE_IMAGE is overridden to a non-deck variant. --- build_files/build.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'build_files') diff --git a/build_files/build.sh b/build_files/build.sh index 3d37e31..03adff0 100755 --- a/build_files/build.sh +++ b/build_files/build.sh @@ -2,6 +2,15 @@ set -ouex pipefail +case "${BASE_IMAGE:-}" in + ghcr.io/ublue-os/bazzite-deck:* | ghcr.io/ublue-os/bazzite-deck@*) + ;; + *) + echo "AeroCore OS only supports bazzite-deck BASE_IMAGE values for HTPC game-mode builds: ${BASE_IMAGE:-}" >&2 + exit 1 + ;; +esac + # Copy the contents of system_files/ of the git repo to / cp -avf "/ctx/system_files"/. / -- cgit v1.2.3 From 50ff7ec0acaea2b426aa026772ae6c1eb944df23 Mon Sep 17 00:00:00 2001 From: tranch Date: Sat, 25 Jul 2026 09:30:11 +0800 Subject: Preserve Deck runtime checks for AeroCore Patch Bazzite Steam and user setup scripts to recognize aerocore-os as a Deck image, keeping Steam bootstrap and gamescope-related initialization active after rebranding. --- build_files/patch-bazzite-deck-identity.sh | 107 ++++++++++++++++++++++------- 1 file changed, 82 insertions(+), 25 deletions(-) (limited to 'build_files') diff --git a/build_files/patch-bazzite-deck-identity.sh b/build_files/patch-bazzite-deck-identity.sh index 078b76c..05b6e5f 100755 --- a/build_files/patch-bazzite-deck-identity.sh +++ b/build_files/patch-bazzite-deck-identity.sh @@ -2,34 +2,91 @@ set -euo pipefail -hardware_setup="${1:-/usr/libexec/bazzite-hardware-setup}" -# These are literal source lines; variable expansion must happen at boot time. -# shellcheck disable=SC2016 -old_condition='if [[ "$IMAGE_NAME" != *deck* && "$IMAGE_NAME" != *dx* ]]; then' -# shellcheck disable=SC2016 -new_condition='if [[ "$IMAGE_NAME" != aerocore-os && "$IMAGE_NAME" != *deck* && "$IMAGE_NAME" != *dx* ]]; then' +root="${AEROCORE_DECK_COMPAT_ROOT:-}" +root="${root%/}" + +target_path() { + printf '%s%s\n' "$root" "$1" +} + +patch_condition() { + local file="$1" + local old_condition="$2" + local new_condition="$3" + local expected_count="$4" + local old_count new_count patched_file + + if [[ ! -f "$file" ]]; then + echo "Unable to locate expected Bazzite Deck file: $file" >&2 + exit 1 + fi + + new_count="$(grep -Foc "$new_condition" "$file" || true)" + if [[ "$new_count" -eq "$expected_count" ]]; then + return 0 + fi -if grep -Fqx "$new_condition" "$hardware_setup"; then - exit 0 -fi + old_count="$(grep -Foc "$old_condition" "$file" || true)" + if [[ "$old_count" -ne "$expected_count" ]]; then + echo "Unable to locate the expected Bazzite Deck image check in $file" >&2 + echo "Expected $expected_count occurrence(s), found old=$old_count new=$new_count" >&2 + exit 1 + fi -if [[ "$(grep -Fxc "$old_condition" "$hardware_setup")" -ne 1 ]]; then - echo "Unable to locate the Bazzite Deck image check in $hardware_setup" >&2 - exit 1 -fi + patched_file="$(mktemp)" + awk \ + -v old_condition="$old_condition" \ + -v new_condition="$new_condition" \ + ' { + position = index($0, old_condition) + if (position) { + $0 = substr($0, 1, position - 1) new_condition substr($0, position + length(old_condition)) + } + print + }' "$file" > "$patched_file" -patched_file=$(mktemp) -trap 'rm -f "$patched_file"' EXIT + cp "$patched_file" "$file" + rm -f "$patched_file" -awk \ - -v old_condition="$old_condition" \ - -v new_condition="$new_condition" \ - '$0 == old_condition { - print new_condition - next - } - { print }' "$hardware_setup" > "$patched_file" + new_count="$(grep -Foc "$new_condition" "$file" || true)" + if [[ "$new_count" -ne "$expected_count" ]]; then + echo "Failed to patch the Bazzite Deck image check in $file" >&2 + exit 1 + fi +} -cp "$patched_file" "$hardware_setup" +# Keep AeroCore's public image-name, while restoring the Deck capability checks +# used by Bazzite's runtime scripts. These are literal source lines; variable +# expansion must happen later, when the scripts run on the installed system. +# shellcheck disable=SC2016 +patch_condition \ + "${1:-$(target_path /usr/libexec/bazzite-hardware-setup)}" \ + 'if [[ "$IMAGE_NAME" != *deck* && "$IMAGE_NAME" != *dx* ]]; then' \ + 'if [[ "$IMAGE_NAME" != aerocore-os && "$IMAGE_NAME" != *deck* && "$IMAGE_NAME" != *dx* ]]; then' \ + 1 + +# The hardware setup has a second Deck-only block after the top-level image +# guard. Keep it active for AeroCore as well. +# shellcheck disable=SC2016 +patch_condition \ + "${1:-$(target_path /usr/libexec/bazzite-hardware-setup)}" \ + 'if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" ]]; then' \ + 'if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME == aerocore-os ]]; then' \ + 1 -grep -Fqx "$new_condition" "$hardware_setup" +# bazzite-steam gates the Steam bootstrap archive and -steamdeck flag on the +# image name. The user setup script has the same Deck-only gating in three +# places. +# shellcheck disable=SC2016 +patch_condition \ + "$(target_path /usr/bin/bazzite-steam)" \ + 'if [[ $IMAGE_NAME =~ "deck" ]]; then' \ + 'if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME == aerocore-os ]]; then' \ + 1 + +# shellcheck disable=SC2016 +patch_condition \ + "$(target_path /usr/libexec/bazzite-user-setup)" \ + 'if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" ]]; then' \ + 'if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME == aerocore-os ]]; then' \ + 3 -- cgit v1.2.3 From db108b8b23c86ba39a2ba289fc6129a6325f045f Mon Sep 17 00:00:00 2001 From: tranch Date: Sat, 25 Jul 2026 09:57:45 +0800 Subject: Normalize installer payload and host naming Use a formal local installer image tag and set aerocore-os as the default hostname in both the live image and installed target system. --- build_files/image-info | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build_files') diff --git a/build_files/image-info b/build_files/image-info index a52d666..bd66383 100755 --- a/build_files/image-info +++ b/build_files/image-info @@ -49,7 +49,7 @@ sed -i "s|^DOCUMENTATION_URL=.*|DOCUMENTATION_URL=\"$DOCUMENTATION_URL\"|" /usr/ sed -i "s|^SUPPORT_URL=.*|SUPPORT_URL=\"$SUPPORT_URL\"|" /usr/lib/os-release sed -i "s|^BUG_REPORT_URL=.*|BUG_REPORT_URL=\"$BUG_SUPPORT_URL\"|" /usr/lib/os-release sed -i "s|^CPE_NAME=.*|CPE_NAME=\"cpe:/o:universal-blue:$IMAGE_ID\"|" /usr/lib/os-release -sed -i "s/^DEFAULT_HOSTNAME=.*/DEFAULT_HOSTNAME=\"$IMAGE_ID\"/" /usr/lib/os-release +sed -i "s/^DEFAULT_HOSTNAME=.*/DEFAULT_HOSTNAME=\"$IMAGE_NAME\"/" /usr/lib/os-release sed -i "s/^ID=fedora/ID=$IMAGE_ID\nID_LIKE=\"$IMAGE_LIKE\"/" /usr/lib/os-release sed -i "s/^LOGO=.*/LOGO=$LOGO_ICON/" /usr/lib/os-release sed -i "s/^ANSI_COLOR=.*/ANSI_COLOR=\"$LOGO_COLOR\"/" /usr/lib/os-release -- cgit v1.2.3 From 63e9dd98331d0ef7c9c9984cbcf6a7aaba9572dc Mon Sep 17 00:00:00 2001 From: tranch Date: Sat, 25 Jul 2026 18:15:12 +0800 Subject: Repair stale Steam user state --- build_files/patch-bazzite-deck-identity.sh | 57 ++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) (limited to 'build_files') diff --git a/build_files/patch-bazzite-deck-identity.sh b/build_files/patch-bazzite-deck-identity.sh index 05b6e5f..ea561e4 100755 --- a/build_files/patch-bazzite-deck-identity.sh +++ b/build_files/patch-bazzite-deck-identity.sh @@ -55,6 +55,61 @@ patch_condition() { fi } +patch_steam_state_migration() { + local file="$1" + # shellcheck disable=SC2016 + local condition='if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME == aerocore-os ]]; then' + local marker='AeroCore Steam state migration' + local patched_file + + if [[ ! -f "$file" ]]; then + echo "Unable to locate expected Bazzite Deck file: $file" >&2 + exit 1 + fi + + if grep -Fq "$marker" "$file"; then + return 0 + fi + + if [[ "$(grep -Foc "$condition" "$file" || true)" -ne 1 ]]; then + echo "Unable to locate the AeroCore Steam bootstrap condition in $file" >&2 + exit 1 + fi + + patched_file="$(mktemp)" + awk -v condition="$condition" ' + !inserted && $0 == condition { + print + print " # AeroCore Steam state migration" + print " # Older AeroCore images could leave ~/.steam/steam as a directory." + print " # Preserve it before restoring the symlink expected by Steam." + print " STEAM_DATA_HOME=\"$HOME/.local/share/Steam\"" + print " STEAM_DATA_LINK=\"$HOME/.steam/steam\"" + print " if [[ -d \"$STEAM_DATA_LINK\" && ! -L \"$STEAM_DATA_LINK\" && -x \"$STEAM_DATA_HOME/steam.sh\" ]]; then" + print " STEAM_DATA_BACKUP=\"${STEAM_DATA_LINK}.aerocore-backup-$(date +%s)-$$\"" + print " STEAM_DATA_TEMP=\"${STEAM_DATA_LINK}.aerocore-link-$$\"" + print " if ln -s \"$STEAM_DATA_HOME\" \"$STEAM_DATA_TEMP\" && mv -- \"$STEAM_DATA_LINK\" \"$STEAM_DATA_BACKUP\" && mv -- \"$STEAM_DATA_TEMP\" \"$STEAM_DATA_LINK\"; then" + print " :" + print " else" + print " rm -f -- \"$STEAM_DATA_TEMP\"" + print " fi" + print " fi" + inserted=1 + next + } + { print } + END { if (!inserted) exit 1 } + ' "$file" > "$patched_file" + + cp "$patched_file" "$file" + rm -f "$patched_file" + + if ! grep -Fq "$marker" "$file"; then + echo "Failed to add the AeroCore Steam state migration to $file" >&2 + exit 1 + fi +} + # Keep AeroCore's public image-name, while restoring the Deck capability checks # used by Bazzite's runtime scripts. These are literal source lines; variable # expansion must happen later, when the scripts run on the installed system. @@ -84,6 +139,8 @@ patch_condition \ 'if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME == aerocore-os ]]; then' \ 1 +patch_steam_state_migration "$(target_path /usr/bin/bazzite-steam)" + # shellcheck disable=SC2016 patch_condition \ "$(target_path /usr/libexec/bazzite-user-setup)" \ -- cgit v1.2.3 From 959986e9d96c65fab30da939005a6880dfa77d52 Mon Sep 17 00:00:00 2001 From: tranch Date: Fri, 14 Aug 2026 11:58:13 +0800 Subject: Enable HDMI CEC sleep standby by default --- build_files/build.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'build_files') diff --git a/build_files/build.sh b/build_files/build.sh index 03adff0..5618d20 100755 --- a/build_files/build.sh +++ b/build_files/build.sh @@ -14,6 +14,20 @@ esac # Copy the contents of system_files/ of the git repo to / cp -avf "/ctx/system_files"/. / +# Default HDMI-CEC to putting the TV into standby when the system sleeps. +# `ujust toggle-cec-sleep enable` changes this same setting at runtime. Keep +# the default in the base image's config so users do not need to run the +# command manually after a fresh install; the runtime command can still +# change it later. +CEC_CONFIG=/etc/default/cec-control +if [[ -f "${CEC_CONFIG}" ]]; then + if grep -q '^CEC_ONSLEEP_STANDBY=' "${CEC_CONFIG}"; then + sed -i 's/^CEC_ONSLEEP_STANDBY=.*/CEC_ONSLEEP_STANDBY=true/' "${CEC_CONFIG}" + else + printf '%s\n' 'CEC_ONSLEEP_STANDBY=true' >> "${CEC_CONFIG}" + fi +fi + mkdir -p /etc/environment.d if [[ -n "${FLATPAK_REMOTE_URL:-}" || -n "${HOMEBREW_BOTTLE_DOMAIN:-}" || -n "${HOMEBREW_API_DOMAIN:-}" ]]; then -- cgit v1.2.3 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. --- build_files/patch-bazzite-deck-identity.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'build_files') diff --git a/build_files/patch-bazzite-deck-identity.sh b/build_files/patch-bazzite-deck-identity.sh index ea561e4..ea32cf3 100755 --- a/build_files/patch-bazzite-deck-identity.sh +++ b/build_files/patch-bazzite-deck-identity.sh @@ -125,8 +125,8 @@ patch_condition \ # shellcheck disable=SC2016 patch_condition \ "${1:-$(target_path /usr/libexec/bazzite-hardware-setup)}" \ - 'if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" ]]; then' \ - 'if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME == aerocore-os ]]; then' \ + 'if [[ $IMAGE_NAME =~ "deck" ]]; then' \ + 'if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME == aerocore-os ]]; then' \ 1 # bazzite-steam gates the Steam bootstrap archive and -steamdeck flag on the @@ -144,6 +144,6 @@ patch_steam_state_migration "$(target_path /usr/bin/bazzite-steam)" # shellcheck disable=SC2016 patch_condition \ "$(target_path /usr/libexec/bazzite-user-setup)" \ - 'if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" ]]; then' \ - 'if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME == aerocore-os ]]; then' \ + 'if [[ $IMAGE_NAME =~ "deck" ]]; then' \ + 'if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME == aerocore-os ]]; then' \ 3 -- cgit v1.2.3 From ed4bd0d089d41c5d95fe74937acc2a779c6de6d4 Mon Sep 17 00:00:00 2001 From: tranch Date: Tue, 25 Aug 2026 10:44:18 +0800 Subject: fix(installer): validate ISO payload metadata Rewrite system-release atomically and reject stale or NUL-bearing payload metadata before it reaches Anaconda bootupd. --- build_files/build.sh | 33 +++++++++++++++++++++++++++++++++ build_files/image-info | 29 ++++++++++++++++++++++++++++- 2 files changed, 61 insertions(+), 1 deletion(-) (limited to 'build_files') diff --git a/build_files/build.sh b/build_files/build.sh index 5618d20..dd58852 100755 --- a/build_files/build.sh +++ b/build_files/build.sh @@ -14,6 +14,39 @@ esac # Copy the contents of system_files/ of the git repo to / cp -avf "/ctx/system_files"/. / +# KDE's Deck presets use distributor-logo-steamdeck.svg for the Kickoff +# launcher. In the Bazzite base image that name (and the related aliases) +# may already exist as links to the upstream distributor-logo.svg. Install +# the AeroCore asset explicitly after the general overlay so the final image +# cannot silently retain the upstream Bazzite logo. +AEROCORE_DISTRIBUTOR_LOGO="/ctx/system_files/usr/share/icons/hicolor/scalable/places/distributor-logo.svg" +AEROCORE_ICON_DIR="/usr/share/icons/hicolor/scalable/places" +mkdir -p "${AEROCORE_ICON_DIR}" +for icon_name in \ + distributor-logo.svg \ + distributor-logo-steamdeck.svg \ + bazzite-logo.svg \ + start-here.svg; do + cp -f "${AEROCORE_DISTRIBUTOR_LOGO}" "${AEROCORE_ICON_DIR}/${icon_name}" +done + +# The Plasma launcher resolves the standard start-here name from both scalable +# and per-size places directories. Populate every existing Bazzite icon size +# in the installed payload, not only in the live installer image. +for icon_dir in /usr/share/icons/hicolor/*/places; do + [[ -d "${icon_dir}" ]] || continue + source_icon="${icon_dir}/bazzite-logo-icon.png" + if [[ -f "${source_icon}" ]]; then + cp -f "${source_icon}" "${icon_dir}/start-here.png" + cp -f "${source_icon}" "${icon_dir}/fedora-logo-icon.png" + fi +done + +if ! cmp -s "${AEROCORE_DISTRIBUTOR_LOGO}" "${AEROCORE_ICON_DIR}/distributor-logo.svg"; then + echo "AeroCore distributor logo was not installed into the image" >&2 + exit 1 +fi + # Default HDMI-CEC to putting the TV into standby when the system sleeps. # `ujust toggle-cec-sleep enable` changes this same setting at runtime. Keep # the default in the base image's config so users do not need to run the diff --git a/build_files/image-info b/build_files/image-info index bd66383..ae4406a 100755 --- a/build_files/image-info +++ b/build_files/image-info @@ -40,6 +40,20 @@ cat > "$IMAGE_INFO" <&2 + exit 1 +fi + +jq -e \ + --arg image_name "$IMAGE_NAME" \ + --arg image_vendor "$IMAGE_VENDOR" \ + '.["image-name"] == $image_name and .["image-vendor"] == $image_vendor and .["image-ref"] != null' \ + "$IMAGE_INFO" >/dev/null + # Keep the display name consistent across desktop settings and os-release. sed -i "s/^VARIANT_ID=.*/VARIANT_ID=$IMAGE_ID/" /usr/lib/os-release sed -i "s/^PRETTY_NAME=.*/PRETTY_NAME=\"$IMAGE_PRETTY_NAME\"/" /usr/lib/os-release @@ -56,7 +70,20 @@ sed -i "s/^ANSI_COLOR=.*/ANSI_COLOR=\"$LOGO_COLOR\"/" /usr/lib/os-release sed -i "/^REDHAT_BUGZILLA_PRODUCT=/d; /^REDHAT_BUGZILLA_PRODUCT_VERSION=/d; /^REDHAT_SUPPORT_PRODUCT=/d; /^REDHAT_SUPPORT_PRODUCT_VERSION=/d" /usr/lib/os-release sed -i "s|^VERSION_CODENAME=.*|VERSION_CODENAME=\"Deck\"|" /usr/lib/os-release -echo "$IMAGE_PRETTY_NAME release $FEDORA_VERSION (Deck)" > /etc/system-release +# /etc/system-release is normally a symlink to the RPM-owned fedora-release. +# Write through that link and verify the final bytes: bootupd uses this value as +# the efibootmgr label, where even a trailing NUL makes Anaconda fail before +# any %post installer hook can run. +SYSTEM_RELEASE="/etc/system-release" +SYSTEM_RELEASE_TARGET="$(readlink -f "$SYSTEM_RELEASE")" +EXPECTED_SYSTEM_RELEASE="$IMAGE_PRETTY_NAME release $FEDORA_VERSION (Deck)" +printf '%s\n' "$EXPECTED_SYSTEM_RELEASE" > "$SYSTEM_RELEASE" + +if ! cmp -s <(printf '%s\n' "$EXPECTED_SYSTEM_RELEASE") "$SYSTEM_RELEASE_TARGET"; then + echo "Failed to write a clean AeroCore system-release to ${SYSTEM_RELEASE_TARGET}" >&2 + od -An -v -tx1 "$SYSTEM_RELEASE_TARGET" >&2 + exit 1 +fi if grep -q '^BUILD_ID=' /usr/lib/os-release; then sed -i "s/^BUILD_ID=.*/BUILD_ID=\"$VERSION_PRETTY\"/" /usr/lib/os-release -- 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. --- build_files/image-info | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build_files') diff --git a/build_files/image-info b/build_files/image-info index ae4406a..46d4326 100755 --- a/build_files/image-info +++ b/build_files/image-info @@ -31,7 +31,7 @@ cat > "$IMAGE_INFO" < Date: Thu, 27 Aug 2026 04:14:34 +0800 Subject: fix: install payload PNG branding aliases Copy each size root icon into the launcher alias paths. --- build_files/build.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'build_files') diff --git a/build_files/build.sh b/build_files/build.sh index dd58852..5a7f780 100755 --- a/build_files/build.sh +++ b/build_files/build.sh @@ -33,12 +33,13 @@ done # The Plasma launcher resolves the standard start-here name from both scalable # and per-size places directories. Populate every existing Bazzite icon size # in the installed payload, not only in the live installer image. -for icon_dir in /usr/share/icons/hicolor/*/places; do +for icon_dir in /usr/share/icons/hicolor/*; do [[ -d "${icon_dir}" ]] || continue source_icon="${icon_dir}/bazzite-logo-icon.png" if [[ -f "${source_icon}" ]]; then - cp -f "${source_icon}" "${icon_dir}/start-here.png" - cp -f "${source_icon}" "${icon_dir}/fedora-logo-icon.png" + mkdir -p "${icon_dir}/apps" "${icon_dir}/places" + cp -f "${source_icon}" "${icon_dir}/places/start-here.png" + cp -f "${source_icon}" "${icon_dir}/apps/fedora-logo-icon.png" fi done -- 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 --- build_files/build.sh | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) (limited to 'build_files') diff --git a/build_files/build.sh b/build_files/build.sh index 5a7f780..b4acb10 100755 --- a/build_files/build.sh +++ b/build_files/build.sh @@ -14,6 +14,17 @@ esac # Copy the contents of system_files/ of the git repo to / cp -avf "/ctx/system_files"/. / +install_regular_file() { + local source_file="$1" + local destination_file="$2" + + # Several Bazzite branding paths are symlinks. cp follows an existing + # destination symlink, which leaves the name Plasma resolves untouched. + # Replace the link itself so the final immutable image owns this exact path. + rm -f -- "${destination_file}" + install -Dm0644 -- "${source_file}" "${destination_file}" +} + # KDE's Deck presets use distributor-logo-steamdeck.svg for the Kickoff # launcher. In the Bazzite base image that name (and the related aliases) # may already exist as links to the upstream distributor-logo.svg. Install @@ -27,9 +38,37 @@ for icon_name in \ distributor-logo-steamdeck.svg \ bazzite-logo.svg \ start-here.svg; do - cp -f "${AEROCORE_DISTRIBUTOR_LOGO}" "${AEROCORE_ICON_DIR}/${icon_name}" + install_regular_file "${AEROCORE_DISTRIBUTOR_LOGO}" "${AEROCORE_ICON_DIR}/${icon_name}" +done + +# Use a downstream-specific, non-upstream icon name for Plasma's launcher. +install_regular_file \ + "/ctx/system_files/usr/share/pixmaps/bazzite-logo-le.svg" \ + "/usr/share/icons/hicolor/scalable/apps/aerocore-logo.svg" + +# Game Mode's Vapor splash asset is an upstream symlink on current Bazzite +# images, while VGUI is a regular file. Replace both exact paths explicitly. +for look_and_feel in com.valve.vapor.desktop com.valve.vgui.desktop; do + install_regular_file \ + "/ctx/system_files/usr/share/plasma/look-and-feel/${look_and_feel}/contents/splash/images/bazzite_logo.svgz" \ + "/usr/share/plasma/look-and-feel/${look_and_feel}/contents/splash/images/bazzite_logo.svgz" done +# Steam's Game Mode transitions load these four assets directly. They are +# symlinks in some upstream layers, so replace their directory entries just +# like the Plasma splash assets above. +for animation in \ + bazzite.webm \ + bazzite-oled.webm \ + bazzite-suspend.webm \ + bazzite-suspend-oled.webm; do + install_regular_file \ + "/ctx/system_files/usr/share/ublue-os/bazzite/${animation}" \ + "/usr/share/ublue-os/bazzite/${animation}" +done + +gtk-update-icon-cache -f /usr/share/icons/hicolor || true + # The Plasma launcher resolves the standard start-here name from both scalable # and per-size places directories. Populate every existing Bazzite icon size # in the installed payload, not only in the live installer image. @@ -90,5 +129,7 @@ fi find /etc/environment.d /etc/skel/.config/environment.d -name 99-aerocore-mirrors.conf -type f -exec chmod 0644 {} + 2>/dev/null || true +systemctl enable aerocore-desktop-branding.service + /ctx/install-instruments.sh /ctx/patch-bazzite-deck-identity.sh -- 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. --- build_files/build.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'build_files') diff --git a/build_files/build.sh b/build_files/build.sh index b4acb10..916e29d 100755 --- a/build_files/build.sh +++ b/build_files/build.sh @@ -46,6 +46,13 @@ install_regular_file \ "/ctx/system_files/usr/share/pixmaps/bazzite-logo-le.svg" \ "/usr/share/icons/hicolor/scalable/apps/aerocore-logo.svg" +# KDE's About System KCM loads this path from kcm-about-distrorc. The base +# image may provide it as a symlink, so replace the directory entry itself or +# the KCM can continue rendering the upstream Bazzite logo. +install_regular_file \ + "/ctx/system_files/usr/share/pixmaps/system-logo-white.png" \ + "/usr/share/pixmaps/system-logo-white.png" + # Game Mode's Vapor splash asset is an upstream symlink on current Bazzite # images, while VGUI is a regular file. Replace both exact paths explicitly. for look_and_feel in com.valve.vapor.desktop com.valve.vgui.desktop; do -- 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 --- build_files/build.sh | 2 -- build_files/patch-bazzite-deck-identity.sh | 50 ++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 2 deletions(-) (limited to 'build_files') diff --git a/build_files/build.sh b/build_files/build.sh index 916e29d..559dc7b 100755 --- a/build_files/build.sh +++ b/build_files/build.sh @@ -136,7 +136,5 @@ fi find /etc/environment.d /etc/skel/.config/environment.d -name 99-aerocore-mirrors.conf -type f -exec chmod 0644 {} + 2>/dev/null || true -systemctl enable aerocore-desktop-branding.service - /ctx/install-instruments.sh /ctx/patch-bazzite-deck-identity.sh diff --git a/build_files/patch-bazzite-deck-identity.sh b/build_files/patch-bazzite-deck-identity.sh index ea32cf3..d3ee860 100755 --- a/build_files/patch-bazzite-deck-identity.sh +++ b/build_files/patch-bazzite-deck-identity.sh @@ -110,6 +110,54 @@ patch_steam_state_migration() { fi } +patch_desktop_branding_migration() { + local file="$1" + local marker='AeroCore desktop branding migration' + local condition='pkexec /usr/libexec/bazzite-privileged-user-setup "$USER"' + local patched_file + + if [[ ! -f "$file" ]]; then + echo "Unable to locate expected Bazzite user setup file: $file" >&2 + exit 1 + fi + + if grep -Fq "$marker" "$file"; then + return 0 + fi + + if [[ "$(grep -Foc "$condition" "$file" || true)" -ne 1 ]]; then + echo "Unable to locate the Bazzite privileged user setup call in $file" >&2 + exit 1 + fi + + patched_file="$(mktemp)" + awk -v condition="$condition" ' + !inserted && $0 == condition { + print + print "" + print " # AeroCore desktop branding migration" + print " # The image contains the correct defaults. This only repairs values" + print " # persisted by an older Bazzite/AeroCore deployment." + print " if [[ -f /etc/xdg/kcm-about-distrorc ]] && grep -Fxq \"Name=Bazzite\" /etc/xdg/kcm-about-distrorc; then" + print " pkexec /usr/libexec/aerocore-desktop-branding-privileged" + print " fi" + print " /usr/libexec/aerocore-desktop-branding" + inserted=1 + next + } + { print } + END { if (!inserted) exit 1 } + ' "$file" > "$patched_file" + + cp "$patched_file" "$file" + rm -f "$patched_file" + + if ! grep -Fq "$marker" "$file"; then + echo "Failed to add the AeroCore desktop branding migration to $file" >&2 + exit 1 + fi +} + # Keep AeroCore's public image-name, while restoring the Deck capability checks # used by Bazzite's runtime scripts. These are literal source lines; variable # expansion must happen later, when the scripts run on the installed system. @@ -147,3 +195,5 @@ patch_condition \ 'if [[ $IMAGE_NAME =~ "deck" ]]; then' \ 'if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME == aerocore-os ]]; then' \ 3 + +patch_desktop_branding_migration "$(target_path /usr/libexec/bazzite-user-setup)" -- cgit v1.2.3 From 90c5e5ad9754825b7fbfb419f80a6816ec416e85 Mon Sep 17 00:00:00 2001 From: tranch Date: Fri, 28 Aug 2026 12:16:30 +0800 Subject: fix: avoid corrupted system-release in ISO --- build_files/image-info | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'build_files') diff --git a/build_files/image-info b/build_files/image-info index 46d4326..4e66bc1 100755 --- a/build_files/image-info +++ b/build_files/image-info @@ -71,13 +71,15 @@ sed -i "/^REDHAT_BUGZILLA_PRODUCT=/d; /^REDHAT_BUGZILLA_PRODUCT_VERSION=/d; /^RE sed -i "s|^VERSION_CODENAME=.*|VERSION_CODENAME=\"Deck\"|" /usr/lib/os-release # /etc/system-release is normally a symlink to the RPM-owned fedora-release. -# Write through that link and verify the final bytes: bootupd uses this value as -# the efibootmgr label, where even a trailing NUL makes Anaconda fail before -# any %post installer hook can run. +# Replace the directory entry instead of writing through that link. In the +# bootc/ostree build chain, an in-place write to the RPM-owned target can be +# lost while the final image is assembled, leaving Anaconda to read the +# upstream file (which may contain a trailing NUL). SYSTEM_RELEASE="/etc/system-release" -SYSTEM_RELEASE_TARGET="$(readlink -f "$SYSTEM_RELEASE")" EXPECTED_SYSTEM_RELEASE="$IMAGE_PRETTY_NAME release $FEDORA_VERSION (Deck)" +rm -f -- "$SYSTEM_RELEASE" printf '%s\n' "$EXPECTED_SYSTEM_RELEASE" > "$SYSTEM_RELEASE" +SYSTEM_RELEASE_TARGET="$SYSTEM_RELEASE" if ! cmp -s <(printf '%s\n' "$EXPECTED_SYSTEM_RELEASE") "$SYSTEM_RELEASE_TARGET"; then echo "Failed to write a clean AeroCore system-release to ${SYSTEM_RELEASE_TARGET}" >&2 -- cgit v1.2.3 From 70005b370221220e3a315c6fe6698b1f0b3b8f75 Mon Sep 17 00:00:00 2001 From: tranch Date: Fri, 28 Aug 2026 17:04:21 +0800 Subject: fix: replace release target inode --- build_files/image-info | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'build_files') diff --git a/build_files/image-info b/build_files/image-info index 4e66bc1..71ab60f 100755 --- a/build_files/image-info +++ b/build_files/image-info @@ -71,15 +71,15 @@ sed -i "/^REDHAT_BUGZILLA_PRODUCT=/d; /^REDHAT_BUGZILLA_PRODUCT_VERSION=/d; /^RE sed -i "s|^VERSION_CODENAME=.*|VERSION_CODENAME=\"Deck\"|" /usr/lib/os-release # /etc/system-release is normally a symlink to the RPM-owned fedora-release. -# Replace the directory entry instead of writing through that link. In the -# bootc/ostree build chain, an in-place write to the RPM-owned target can be -# lost while the final image is assembled, leaving Anaconda to read the -# upstream file (which may contain a trailing NUL). +# Keep that relationship, but replace the target inode explicitly. This +# avoids relying on an in-place write through an RPM-owned symlink, which can +# be lost while the bootc/ostree image is assembled, leaving Anaconda to read +# the upstream file (which may contain a trailing NUL). SYSTEM_RELEASE="/etc/system-release" +SYSTEM_RELEASE_TARGET="$(readlink -f "$SYSTEM_RELEASE")" EXPECTED_SYSTEM_RELEASE="$IMAGE_PRETTY_NAME release $FEDORA_VERSION (Deck)" -rm -f -- "$SYSTEM_RELEASE" -printf '%s\n' "$EXPECTED_SYSTEM_RELEASE" > "$SYSTEM_RELEASE" -SYSTEM_RELEASE_TARGET="$SYSTEM_RELEASE" +rm -f -- "$SYSTEM_RELEASE_TARGET" +printf '%s\n' "$EXPECTED_SYSTEM_RELEASE" > "$SYSTEM_RELEASE_TARGET" if ! cmp -s <(printf '%s\n' "$EXPECTED_SYSTEM_RELEASE") "$SYSTEM_RELEASE_TARGET"; then echo "Failed to write a clean AeroCore system-release to ${SYSTEM_RELEASE_TARGET}" >&2 -- cgit v1.2.3 From ff102db146c813632f53a8f2d910763bcc19c4d1 Mon Sep 17 00:00:00 2001 From: tranch Date: Fri, 11 Sep 2026 01:09:57 +0800 Subject: Fix ujust Decky mirror recipe registration --- build_files/build.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'build_files') diff --git a/build_files/build.sh b/build_files/build.sh index 559dc7b..e3e94a1 100755 --- a/build_files/build.sh +++ b/build_files/build.sh @@ -14,6 +14,15 @@ esac # Copy the contents of system_files/ of the git repo to / cp -avf "/ctx/system_files"/. / +# ujust loads explicit imports, not every fragment in the just/ directory. +# Preserve upstream recipes and register our overlay after copying its files. +AEROCORE_DECKY_IMPORT='import "/usr/share/ublue-os/just/92-aerocore-decky-mirror.just"' +if ! grep -Fxq "${AEROCORE_DECKY_IMPORT}" /usr/share/ublue-os/justfile; then + printf '\n%s\n' "${AEROCORE_DECKY_IMPORT}" >> /usr/share/ublue-os/justfile +fi +# Fail the image build if the public entry point cannot resolve the recipe. +ujust --show setup-decky-mirror >/dev/null + install_regular_file() { local source_file="$1" local destination_file="$2" -- cgit v1.2.3 From cc6d75a6db0a316de56cb0abc78206fa1bcef1cd Mon Sep 17 00:00:00 2001 From: tranch Date: Fri, 11 Sep 2026 16:56:22 +0800 Subject: Patch brh to preserve current image registry --- build_files/build.sh | 1 + build_files/patch-bazzite-rollback-helper.sh | 43 ++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 build_files/patch-bazzite-rollback-helper.sh (limited to 'build_files') diff --git a/build_files/build.sh b/build_files/build.sh index e3e94a1..9e13cfd 100755 --- a/build_files/build.sh +++ b/build_files/build.sh @@ -147,3 +147,4 @@ find /etc/environment.d /etc/skel/.config/environment.d -name 99-aerocore-mirror /ctx/install-instruments.sh /ctx/patch-bazzite-deck-identity.sh +/ctx/patch-bazzite-rollback-helper.sh diff --git a/build_files/patch-bazzite-rollback-helper.sh b/build_files/patch-bazzite-rollback-helper.sh new file mode 100644 index 0000000..d5b3f21 --- /dev/null +++ b/build_files/patch-bazzite-rollback-helper.sh @@ -0,0 +1,43 @@ +#!/usr/bin/bash + +set -euo pipefail + +file=/usr/bin/bazzite-rollback-helper + +if [[ ! -f "$file" ]]; then + echo "Unable to locate Bazzite rollback helper: $file" >&2 + exit 1 +fi + +if grep -Fq 'current_image_prefix()' "$file"; then + exit 0 +fi + +patched_file=$(mktemp) +awk ' + /^signing_scheme\(\) \{/ { + print "signing_scheme() {" + print " local current=$(rpm-ostree status -b --json | jq -r '\''.deployments[] | select(.booted == true) | .["container-image-reference"]'\'')" + print " local scheme=\"ostree-unverified-registry\"" + print " [[ \"$current\" == *\"ostree-image-signed\"* ]] && scheme=\"ostree-image-signed\"" + print " echo \"$scheme:docker://\"" + print "}" + print "" + print "current_image_prefix() {" + print " local current" + print " current=$(rpm-ostree status -b --json | jq -r '\''.deployments[] | select(.booted == true) | .["container-image-reference"]'\'')" + print " current=\"${current#ostree-image-signed:}\"" + print " current=\"${current#ostree-unverified-registry:}\"" + print " current=\"${current#docker://}\"" + print " echo \"${current%/*}\"" + print "}" + skip=1 + next + } + skip && /^warn_if_de_mismatch\(\) \{/ { skip=0; print; next } + skip { next } + { gsub("ostree-image-signed:docker://ghcr.io/ublue-os/", "$(signing_scheme)/$(current_image_prefix)/"); print } +' "$file" > "$patched_file" + +install -m 0755 "$patched_file" "$file" +rm -f "$patched_file" -- cgit v1.2.3 From f715d88bb1efd97aa45f0e836418027ab642dce6 Mon Sep 17 00:00:00 2001 From: tranch Date: Fri, 11 Sep 2026 17:01:42 +0800 Subject: Fix brh patch script permissions --- build_files/patch-bazzite-rollback-helper.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 build_files/patch-bazzite-rollback-helper.sh (limited to 'build_files') diff --git a/build_files/patch-bazzite-rollback-helper.sh b/build_files/patch-bazzite-rollback-helper.sh old mode 100644 new mode 100755 -- cgit v1.2.3 From bb6bc344477d55748033c286db707d75ab9c954c Mon Sep 17 00:00:00 2001 From: tranch Date: Fri, 11 Sep 2026 17:45:26 +0800 Subject: Fix booted image reference parsing --- build_files/patch-bazzite-rollback-helper.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'build_files') diff --git a/build_files/patch-bazzite-rollback-helper.sh b/build_files/patch-bazzite-rollback-helper.sh index d5b3f21..eb4341f 100755 --- a/build_files/patch-bazzite-rollback-helper.sh +++ b/build_files/patch-bazzite-rollback-helper.sh @@ -17,7 +17,7 @@ patched_file=$(mktemp) awk ' /^signing_scheme\(\) \{/ { print "signing_scheme() {" - print " local current=$(rpm-ostree status -b --json | jq -r '\''.deployments[] | select(.booted == true) | .["container-image-reference"]'\'')" + print " local current=$(rpm-ostree status -b --json | jq -r '\''.deployments | map(select(.booted == true)) | first | .["container-image-reference"] // empty'\'')" print " local scheme=\"ostree-unverified-registry\"" print " [[ \"$current\" == *\"ostree-image-signed\"* ]] && scheme=\"ostree-image-signed\"" print " echo \"$scheme:docker://\"" @@ -25,7 +25,11 @@ awk ' print "" print "current_image_prefix() {" print " local current" - print " current=$(rpm-ostree status -b --json | jq -r '\''.deployments[] | select(.booted == true) | .["container-image-reference"]'\'')" + print " current=$(rpm-ostree status -b --json | jq -r '\''.deployments | map(select(.booted == true)) | first | .["container-image-reference"] // empty'\'')" + print " if [[ -z \"$current\" ]]; then" + print " echo \"Unable to determine the current booted image reference.\" >&2" + print " return 1" + print " fi" print " current=\"${current#ostree-image-signed:}\"" print " current=\"${current#ostree-unverified-registry:}\"" print " current=\"${current#docker://}\"" -- cgit v1.2.3 From 305ab714399a343e6fd9eeeb18d7b210b2903bad Mon Sep 17 00:00:00 2001 From: tranch Date: Fri, 11 Sep 2026 17:57:19 +0800 Subject: Fix generated brh jq field access --- build_files/patch-bazzite-rollback-helper.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'build_files') diff --git a/build_files/patch-bazzite-rollback-helper.sh b/build_files/patch-bazzite-rollback-helper.sh index eb4341f..e944d17 100755 --- a/build_files/patch-bazzite-rollback-helper.sh +++ b/build_files/patch-bazzite-rollback-helper.sh @@ -17,7 +17,7 @@ patched_file=$(mktemp) awk ' /^signing_scheme\(\) \{/ { print "signing_scheme() {" - print " local current=$(rpm-ostree status -b --json | jq -r '\''.deployments | map(select(.booted == true)) | first | .["container-image-reference"] // empty'\'')" + print " local current=$(rpm-ostree status -b --json | jq -r '\''.deployments | map(select(.booted == true)) | first | .[\"container-image-reference\"] // empty'\'')" print " local scheme=\"ostree-unverified-registry\"" print " [[ \"$current\" == *\"ostree-image-signed\"* ]] && scheme=\"ostree-image-signed\"" print " echo \"$scheme:docker://\"" @@ -25,7 +25,7 @@ awk ' print "" print "current_image_prefix() {" print " local current" - print " current=$(rpm-ostree status -b --json | jq -r '\''.deployments | map(select(.booted == true)) | first | .["container-image-reference"] // empty'\'')" + print " current=$(rpm-ostree status -b --json | jq -r '\''.deployments | map(select(.booted == true)) | first | .[\"container-image-reference\"] // empty'\'')" print " if [[ -z \"$current\" ]]; then" print " echo \"Unable to determine the current booted image reference.\" >&2" print " return 1" -- cgit v1.2.3 From 07853e72cb08f745c04e04f756452a76fd4cc8cf Mon Sep 17 00:00:00 2001 From: tranch Date: Fri, 11 Sep 2026 22:39:55 +0800 Subject: Fix brh image ref slash handling --- build_files/patch-bazzite-rollback-helper.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'build_files') diff --git a/build_files/patch-bazzite-rollback-helper.sh b/build_files/patch-bazzite-rollback-helper.sh index e944d17..6d565b0 100755 --- a/build_files/patch-bazzite-rollback-helper.sh +++ b/build_files/patch-bazzite-rollback-helper.sh @@ -40,7 +40,12 @@ awk ' } skip && /^warn_if_de_mismatch\(\) \{/ { skip=0; print; next } skip { next } - { gsub("ostree-image-signed:docker://ghcr.io/ublue-os/", "$(signing_scheme)/$(current_image_prefix)/"); print } + { + gsub("ostree-image-signed:docker://[^\"]+/", "$(signing_scheme)$(current_image_prefix)/") + gsub("\\$\\(signing_scheme\\)/\\$\\(current_image_prefix\\)/", "$(signing_scheme)$(current_image_prefix)/") + gsub("\\$\\(signing_scheme\\)/", "$(signing_scheme)") + print + } ' "$file" > "$patched_file" install -m 0755 "$patched_file" "$file" -- cgit v1.2.3 From c1c1027f3664db21397a7175465f31777b591504 Mon Sep 17 00:00:00 2001 From: tranch Date: Sun, 13 Sep 2026 13:57:32 +0800 Subject: Fix Return to Gaming Mode desktop launcher Use the current Bazzite script entry point instead of the legacy privileged systemd service, which is absent from current images. --- build_files/build.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'build_files') diff --git a/build_files/build.sh b/build_files/build.sh index 9e13cfd..40b9efd 100755 --- a/build_files/build.sh +++ b/build_files/build.sh @@ -14,6 +14,15 @@ esac # Copy the contents of system_files/ of the git repo to / cp -avf "/ctx/system_files"/. / +# Bazzite's Kinoite/Plasma desktop shortcut used to start a privileged +# return-to-gamemode.service. Current Bazzite invokes the user-session entry +# point directly; keep the shortcut correct when the base image still ships +# the legacy Exec= line. +RETURN_TO_GAMING_DESKTOP="/etc/skel/Desktop/Return.desktop" +if [[ -f "${RETURN_TO_GAMING_DESKTOP}" ]]; then + sed -i 's|^Exec=.*|Exec=/usr/bin/return-to-gamemode|' "${RETURN_TO_GAMING_DESKTOP}" +fi + # ujust loads explicit imports, not every fragment in the just/ directory. # Preserve upstream recipes and register our overlay after copying its files. AEROCORE_DECKY_IMPORT='import "/usr/share/ublue-os/just/92-aerocore-decky-mirror.just"' -- 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. --- build_files/patch-bazzite-deck-identity.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'build_files') diff --git a/build_files/patch-bazzite-deck-identity.sh b/build_files/patch-bazzite-deck-identity.sh index d3ee860..da2a74e 100755 --- a/build_files/patch-bazzite-deck-identity.sh +++ b/build_files/patch-bazzite-deck-identity.sh @@ -158,6 +158,29 @@ patch_desktop_branding_migration() { fi } +patch_gamemode_shortcut_migration() { + local file="$1" + local marker='AeroCore Return to Gaming Mode shortcut migration' + + if [[ ! -f "$file" ]]; then + echo "Unable to locate expected Bazzite user setup file: $file" >&2 + exit 1 + fi + + if grep -Fq "$marker" "$file"; then + return 0 + fi + + cat >> "$file" <<'EOF' + +# AeroCore Return to Gaming Mode shortcut migration +# Replace the legacy privileged systemd launcher left by older Bazzite images. +if [[ -f "$HOME/Desktop/Return.desktop" ]]; then + sed -i 's|^Exec=systemctl start return-to-gamemode\.service$|Exec=/usr/bin/return-to-gamemode|' "$HOME/Desktop/Return.desktop" +fi +EOF +} + # Keep AeroCore's public image-name, while restoring the Deck capability checks # used by Bazzite's runtime scripts. These are literal source lines; variable # expansion must happen later, when the scripts run on the installed system. @@ -197,3 +220,4 @@ patch_condition \ 3 patch_desktop_branding_migration "$(target_path /usr/libexec/bazzite-user-setup)" +patch_gamemode_shortcut_migration "$(target_path /usr/libexec/bazzite-user-setup)" -- 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. --- build_files/patch-bazzite-deck-identity.sh | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) (limited to 'build_files') diff --git a/build_files/patch-bazzite-deck-identity.sh b/build_files/patch-bazzite-deck-identity.sh index da2a74e..8ddacf9 100755 --- a/build_files/patch-bazzite-deck-identity.sh +++ b/build_files/patch-bazzite-deck-identity.sh @@ -161,6 +161,8 @@ patch_desktop_branding_migration() { patch_gamemode_shortcut_migration() { local file="$1" local marker='AeroCore Return to Gaming Mode shortcut migration' + local insertion='# Run script if updated' + local patched_file if [[ ! -f "$file" ]]; then echo "Unable to locate expected Bazzite user setup file: $file" >&2 @@ -171,14 +173,28 @@ patch_gamemode_shortcut_migration() { return 0 fi - cat >> "$file" <<'EOF' + if [[ "$(grep -Foc "$insertion" "$file" || true)" -ne 1 ]]; then + echo "Unable to locate the Bazzite user setup version guard in $file" >&2 + exit 1 + fi -# AeroCore Return to Gaming Mode shortcut migration -# Replace the legacy privileged systemd launcher left by older Bazzite images. -if [[ -f "$HOME/Desktop/Return.desktop" ]]; then - sed -i 's|^Exec=systemctl start return-to-gamemode\.service$|Exec=/usr/bin/return-to-gamemode|' "$HOME/Desktop/Return.desktop" -fi -EOF + patched_file="$(mktemp)" + awk -v insertion="$insertion" ' + !inserted && $0 == insertion { + print "# AeroCore Return to Gaming Mode shortcut migration" + print "# Replace the legacy privileged systemd launcher left by older Bazzite images." + print "if [[ -f \"$HOME/Desktop/Return.desktop\" ]]; then" + print " sed -i '\''s|^Exec=systemctl start return-to-gamemode\\.service$|Exec=/usr/bin/return-to-gamemode|'\'' \"$HOME/Desktop/Return.desktop\"" + print "fi" + print "" + inserted=1 + } + { print } + END { if (!inserted) exit 1 } + ' "$file" > "$patched_file" + + cp "$patched_file" "$file" + rm -f "$patched_file" } # Keep AeroCore's public image-name, while restoring the Deck capability checks -- 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. --- build_files/patch-bazzite-deck-identity.sh | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) (limited to 'build_files') diff --git a/build_files/patch-bazzite-deck-identity.sh b/build_files/patch-bazzite-deck-identity.sh index 8ddacf9..da2a74e 100755 --- a/build_files/patch-bazzite-deck-identity.sh +++ b/build_files/patch-bazzite-deck-identity.sh @@ -161,8 +161,6 @@ patch_desktop_branding_migration() { patch_gamemode_shortcut_migration() { local file="$1" local marker='AeroCore Return to Gaming Mode shortcut migration' - local insertion='# Run script if updated' - local patched_file if [[ ! -f "$file" ]]; then echo "Unable to locate expected Bazzite user setup file: $file" >&2 @@ -173,28 +171,14 @@ patch_gamemode_shortcut_migration() { return 0 fi - if [[ "$(grep -Foc "$insertion" "$file" || true)" -ne 1 ]]; then - echo "Unable to locate the Bazzite user setup version guard in $file" >&2 - exit 1 - fi + cat >> "$file" <<'EOF' - patched_file="$(mktemp)" - awk -v insertion="$insertion" ' - !inserted && $0 == insertion { - print "# AeroCore Return to Gaming Mode shortcut migration" - print "# Replace the legacy privileged systemd launcher left by older Bazzite images." - print "if [[ -f \"$HOME/Desktop/Return.desktop\" ]]; then" - print " sed -i '\''s|^Exec=systemctl start return-to-gamemode\\.service$|Exec=/usr/bin/return-to-gamemode|'\'' \"$HOME/Desktop/Return.desktop\"" - print "fi" - print "" - inserted=1 - } - { print } - END { if (!inserted) exit 1 } - ' "$file" > "$patched_file" - - cp "$patched_file" "$file" - rm -f "$patched_file" +# AeroCore Return to Gaming Mode shortcut migration +# Replace the legacy privileged systemd launcher left by older Bazzite images. +if [[ -f "$HOME/Desktop/Return.desktop" ]]; then + sed -i 's|^Exec=systemctl start return-to-gamemode\.service$|Exec=/usr/bin/return-to-gamemode|' "$HOME/Desktop/Return.desktop" +fi +EOF } # Keep AeroCore's public image-name, while restoring the Deck capability checks -- 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. --- build_files/patch-bazzite-deck-identity.sh | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'build_files') diff --git a/build_files/patch-bazzite-deck-identity.sh b/build_files/patch-bazzite-deck-identity.sh index da2a74e..d3ee860 100755 --- a/build_files/patch-bazzite-deck-identity.sh +++ b/build_files/patch-bazzite-deck-identity.sh @@ -158,29 +158,6 @@ patch_desktop_branding_migration() { fi } -patch_gamemode_shortcut_migration() { - local file="$1" - local marker='AeroCore Return to Gaming Mode shortcut migration' - - if [[ ! -f "$file" ]]; then - echo "Unable to locate expected Bazzite user setup file: $file" >&2 - exit 1 - fi - - if grep -Fq "$marker" "$file"; then - return 0 - fi - - cat >> "$file" <<'EOF' - -# AeroCore Return to Gaming Mode shortcut migration -# Replace the legacy privileged systemd launcher left by older Bazzite images. -if [[ -f "$HOME/Desktop/Return.desktop" ]]; then - sed -i 's|^Exec=systemctl start return-to-gamemode\.service$|Exec=/usr/bin/return-to-gamemode|' "$HOME/Desktop/Return.desktop" -fi -EOF -} - # Keep AeroCore's public image-name, while restoring the Deck capability checks # used by Bazzite's runtime scripts. These are literal source lines; variable # expansion must happen later, when the scripts run on the installed system. @@ -220,4 +197,3 @@ patch_condition \ 3 patch_desktop_branding_migration "$(target_path /usr/libexec/bazzite-user-setup)" -patch_gamemode_shortcut_migration "$(target_path /usr/libexec/bazzite-user-setup)" -- cgit v1.2.3