From 96aac6e87ac41b27383d1839687f391925080007 Mon Sep 17 00:00:00 2001 From: Tranch Xiao Date: Wed, 22 Jul 2026 01:15:45 +0800 Subject: ci: Disable daily scheduled build --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 56f8da9..95f2f1c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,8 +4,8 @@ on: pull_request: branches: - main - schedule: - - cron: '05 10 * * *' # 10:05am UTC everyday + #schedule: + # - cron: '05 10 * * *' # 10:05am UTC everyday workflow_dispatch: env: -- cgit v1.2.3 From 33ccd0f64b93bb615a771b6f246bcdb4cb3969f1 Mon Sep 17 00:00:00 2001 From: tranch Date: Fri, 24 Jul 2026 08:18:08 +0800 Subject: Fix live installer EFI fallback Copy Fedora grubx64.efi to the fallback EFI path expected by bootc-image-builder. --- installer/build.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/installer/build.sh b/installer/build.sh index 033fe9b..921e628 100755 --- a/installer/build.sh +++ b/installer/build.sh @@ -61,5 +61,8 @@ if compgen -G '/usr/lib/efi/*/*/EFI' >/dev/null; then cp -a /usr/lib/efi/*/*/EFI /boot/efi/ fi +# bootc-image-builder needs the Fedora live ISO fallback EFI loader. +cp -v /boot/efi/EFI/fedora/grubx64.efi /boot/efi/EFI/BOOT/fbx64.efi + systemd-firstboot --timezone UTC dnf clean all -- cgit v1.2.3 From 986e450e1ab476e35012370d97b7e4526e113d88 Mon Sep 17 00:00:00 2001 From: tranch Date: Fri, 24 Jul 2026 09:17:07 +0800 Subject: Fix live installer GRUB EFI fallback Install the full EFI GRUB package and create the fallback directory. --- installer/build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/installer/build.sh b/installer/build.sh index 921e628..6f1561f 100755 --- a/installer/build.sh +++ b/installer/build.sh @@ -19,6 +19,7 @@ dnf --setopt=excludepkgs= install -y \ libblockdev-lvm \ dracut-live \ livesys-scripts \ + grub2-efi-x64 \ grub2-efi-x64-cdboot # Apply the same AeroCore overlay to the live session where possible. @@ -62,6 +63,7 @@ if compgen -G '/usr/lib/efi/*/*/EFI' >/dev/null; then fi # bootc-image-builder needs the Fedora live ISO fallback EFI loader. +mkdir -p /boot/efi/EFI/BOOT cp -v /boot/efi/EFI/fedora/grubx64.efi /boot/efi/EFI/BOOT/fbx64.efi systemd-firstboot --timezone UTC -- cgit v1.2.3 From 2de184fb8db64a900ed2e64e292fd7b77f3deae4 Mon Sep 17 00:00:00 2001 From: tranch Date: Fri, 24 Jul 2026 09:39:33 +0800 Subject: Find live installer EFI files robustly Avoid assuming the Fedora EFI directory layout when creating fbx64.efi. --- installer/build.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/installer/build.sh b/installer/build.sh index 6f1561f..2f8a26b 100755 --- a/installer/build.sh +++ b/installer/build.sh @@ -58,13 +58,21 @@ sed -i 's/^livesys_session=.*/livesys_session=kde/' /etc/sysconfig/livesys systemctl enable livesys.service livesys-late.service mkdir -p /boot/efi -if compgen -G '/usr/lib/efi/*/*/EFI' >/dev/null; then - cp -a /usr/lib/efi/*/*/EFI /boot/efi/ +efi_dir="$(find /usr/lib/efi -type d -name EFI -print -quit 2>/dev/null || true)" +if [[ -n "${efi_dir}" ]]; then + cp -a "${efi_dir}" /boot/efi/ fi # bootc-image-builder needs the Fedora live ISO fallback EFI loader. +grubx64="$(find /usr/lib/efi /boot/efi -type f \ + -path '*/EFI/fedora/grubx64.efi' -print -quit 2>/dev/null || true)" +if [[ -z "${grubx64}" ]]; then + echo "grubx64.efi was not found in the installed EFI tree" >&2 + find /usr/lib/efi /boot/efi -type f -path '*/EFI/*' -print >&2 || true + exit 1 +fi mkdir -p /boot/efi/EFI/BOOT -cp -v /boot/efi/EFI/fedora/grubx64.efi /boot/efi/EFI/BOOT/fbx64.efi +cp -v "${grubx64}" /boot/efi/EFI/BOOT/fbx64.efi systemd-firstboot --timezone UTC dnf clean all -- cgit v1.2.3 From e41af95f56d4cbfee68081f82dd329ee68486267 Mon Sep 17 00:00:00 2001 From: tranch Date: Fri, 24 Jul 2026 09:44:48 +0800 Subject: Restore EFI GRUB files in Kinoite build Reinstall EFI packages so missing payload files are materialized. --- installer/build.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/installer/build.sh b/installer/build.sh index 2f8a26b..efce782 100755 --- a/installer/build.sh +++ b/installer/build.sh @@ -22,6 +22,12 @@ dnf --setopt=excludepkgs= install -y \ grub2-efi-x64 \ grub2-efi-x64-cdboot +# Kinoite can carry the EFI packages in the RPM database without their files +# materialized in the container filesystem. Restore the files for the ISO. +dnf --setopt=excludepkgs= reinstall -y \ + grub2-efi-x64 \ + grub2-efi-x64-cdboot + # Apply the same AeroCore overlay to the live session where possible. if [[ -d /src/system_files ]]; then cp -a /src/system_files/. / -- cgit v1.2.3 From 1d0659a9f5ac7e18639a88b772f0766afa3910db Mon Sep 17 00:00:00 2001 From: tranch Date: Fri, 24 Jul 2026 13:34:08 +0800 Subject: Add standard UEFI fallback loader Include BOOTX64.EFI alongside the bootc-image-builder fbx64.efi so removable-media UEFI firmware can boot the live installer ISO. --- installer/build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/installer/build.sh b/installer/build.sh index efce782..3ee1744 100755 --- a/installer/build.sh +++ b/installer/build.sh @@ -78,6 +78,8 @@ if [[ -z "${grubx64}" ]]; then exit 1 fi mkdir -p /boot/efi/EFI/BOOT +# UEFI removable-media fallback; keep fbx64.efi for bootc-image-builder. +cp -v "${grubx64}" /boot/efi/EFI/BOOT/BOOTX64.EFI cp -v "${grubx64}" /boot/efi/EFI/BOOT/fbx64.efi systemd-firstboot --timezone UTC -- cgit v1.2.3 From d3698fbc897c39cdc723cb85b5e03daf3e1bbc31 Mon Sep 17 00:00:00 2001 From: tranch Date: Fri, 24 Jul 2026 16:58:29 +0800 Subject: Brand live installer sidebar Copy installer branding assets into Anaconda's pixmaps directory after the shared live-session overlay so AeroCore resources take precedence. Ignore local .DS_Store files to keep macOS metadata out of commits. --- .gitignore | 1 + installer/branding/sidebar-bg.png | Bin 0 -> 163156 bytes installer/branding/sidebar-logo.png | Bin 0 -> 4425 bytes installer/build.sh | 6 ++++++ 4 files changed, 7 insertions(+) create mode 100644 installer/branding/sidebar-bg.png create mode 100644 installer/branding/sidebar-logo.png diff --git a/.gitignore b/.gitignore index 9eee28b..d4fa7cf 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ cosign.key _build_* output _build-*/** +.DS_Store diff --git a/installer/branding/sidebar-bg.png b/installer/branding/sidebar-bg.png new file mode 100644 index 0000000..f957fec Binary files /dev/null and b/installer/branding/sidebar-bg.png differ diff --git a/installer/branding/sidebar-logo.png b/installer/branding/sidebar-logo.png new file mode 100644 index 0000000..0f47606 Binary files /dev/null and b/installer/branding/sidebar-logo.png differ diff --git a/installer/build.sh b/installer/build.sh index 3ee1744..f9eb210 100755 --- a/installer/build.sh +++ b/installer/build.sh @@ -33,6 +33,12 @@ if [[ -d /src/system_files ]]; then cp -a /src/system_files/. / fi +BRANDING_DIR="${SCRIPT_DIR}/branding" +if [[ -d "${BRANDING_DIR}" ]]; then + mkdir -p /usr/share/anaconda/pixmaps + cp -a "${BRANDING_DIR}/." /usr/share/anaconda/pixmaps/ +fi + # Make the install payload available to Anaconda. if [[ -n "${INSTALL_IMAGE_PAYLOAD_ARCHIVE}" && -f "${INSTALL_IMAGE_PAYLOAD_ARCHIVE}" ]]; then podman load --storage-opt additionalimagestore='' < "${INSTALL_IMAGE_PAYLOAD_ARCHIVE}" -- cgit v1.2.3 From 4dd41315acaa07112864a3833dfb7775d9b44274 Mon Sep 17 00:00:00 2001 From: tranch Date: Fri, 24 Jul 2026 17:29:04 +0800 Subject: Rename live installer to installer ISO Use installer ISO terminology across Just, workflows, scripts, docs, and image payloads while preserving compatibility aliases for existing commands. --- .github/workflows/build-installer-iso.yml | 180 ++++++++++++++++++++++++++ .github/workflows/build-live-installer.yml | 180 -------------------------- .github/workflows/validate-installer-iso.yml | 40 ++++++ .github/workflows/validate-live-installer.yml | 40 ------ Justfile | 21 +-- README.md | 8 +- installer/Containerfile | 2 +- installer/iso.yaml | 6 +- just_scripts/build-installer-iso.sh | 122 +++++++++++++++++ just_scripts/build-live-installer.sh | 122 ----------------- just_scripts/run-installer-iso.sh | 23 ++++ just_scripts/run-live-installer.sh | 23 ---- 12 files changed, 386 insertions(+), 381 deletions(-) create mode 100644 .github/workflows/build-installer-iso.yml delete mode 100644 .github/workflows/build-live-installer.yml create mode 100644 .github/workflows/validate-installer-iso.yml delete mode 100644 .github/workflows/validate-live-installer.yml create mode 100755 just_scripts/build-installer-iso.sh delete mode 100755 just_scripts/build-live-installer.sh create mode 100755 just_scripts/run-installer-iso.sh delete mode 100755 just_scripts/run-live-installer.sh diff --git a/.github/workflows/build-installer-iso.yml b/.github/workflows/build-installer-iso.yml new file mode 100644 index 0000000..cfa7b80 --- /dev/null +++ b/.github/workflows/build-installer-iso.yml @@ -0,0 +1,180 @@ +name: Build installer ISO + +on: + workflow_dispatch: + inputs: + image_tag: + description: "AeroCore image tag to install" + required: false + default: latest + type: string + workflow_call: + workflow_run: + workflows: + - Build container image + types: + - completed + branches: + - main + +permissions: {} + +concurrency: + group: ${{ github.workflow }}-${{ github.ref || github.run_id }} + cancel-in-progress: true + +jobs: + build-installer-iso: + name: Build KDE installer ISO + if: github.event_name != 'workflow_run' || (github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push') + runs-on: ubuntu-24.04 + permissions: + contents: read + packages: read + + env: + IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} + IMAGE_TAG: ${{ inputs.image_tag || 'latest' }} + ISO_FILE_TAG: ${{ github.ref_name == 'testing' && 'testing' || (inputs.image_tag || 'latest') }} + # Keep these aligned with the Fedora major used by the target bazzite-deck base image. + LIVE_BASE_IMAGE: quay.io/fedora/fedora-kinoite:43 + FEDORA_VERSION: "43" + + steps: + - name: Maximize build space + uses: ublue-os/remove-unwanted-software@cc0becac701cf642c8f0a6613bbdaf5dc36b259e # v9 + with: + remove-codeql: true + + - name: Mount container storage BTRFS loopback + run: | + sudo truncate -s 70G /mnt/podman-storage.img + sudo mkfs.btrfs -f /mnt/podman-storage.img + sudo podman system reset --force + sudo systemctl stop podman.service + sudo mount -o compress-force=zstd:2 /mnt/podman-storage.img /var/lib/containers/storage + sudo systemctl start podman.service + + - name: Checkout + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 + + - name: Install just + uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4 + + - name: Prepare image references + run: | + image_name="$(just image_name)" + image_registry="${IMAGE_REGISTRY,,}" + echo "IMAGE_NAME=${image_name,,}" >> "$GITHUB_ENV" + echo "IMAGE_REGISTRY=${image_registry}" >> "$GITHUB_ENV" + + - name: Login to GHCR + run: | + echo '${{ secrets.GITHUB_TOKEN }}' | sudo podman login ghcr.io \ + --username '${{ github.actor }}' --password-stdin + + - name: Pull AeroCore install image + run: | + sudo podman pull "${IMAGE_REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG}" + + - name: Build installer ISO payload + run: | + mkdir -p output + sudo podman tag \ + "${IMAGE_REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG}" \ + localhost/aerocore-installer-payload:latest + sudo podman save \ + --format oci-archive \ + --output output/install-payload.oci \ + localhost/aerocore-installer-payload:latest + + sudo podman build \ + --cap-add sys_admin \ + --security-opt label=disable \ + --build-arg "BASE_IMAGE=${LIVE_BASE_IMAGE}" \ + --build-arg "INSTALL_IMAGE_PAYLOAD=localhost/aerocore-installer-payload:latest" \ + --build-arg "INSTALL_IMAGE_PAYLOAD_ARCHIVE=/install-payload.oci" \ + --tag localhost/aerocore-installer-payload:latest \ + --file installer/Containerfile \ + . + + - name: Build ISO + id: build + uses: Zeglius/titanoboa@7737f4748458252ac827dca14b3d6dd09298472a # revamp-pr + with: + image-ref: localhost/aerocore-installer-payload:latest + iso-dest: ${{ github.workspace }}/output/aerocore-os-${{ env.ISO_FILE_TAG }}-amd64.iso + + - name: Normalize ISO output path + shell: bash + env: + GENERATED_ISO: ${{ steps.build.outputs.iso-dest }} + EXPECTED_ISO: ${{ github.workspace }}/output/aerocore-os-${{ env.ISO_FILE_TAG }}-amd64.iso + run: | + if [[ ! -f "${GENERATED_ISO}" ]]; then + echo "::error::Generated ISO does not exist at ${GENERATED_ISO}" + exit 1 + fi + if [[ "${GENERATED_ISO}" != "${EXPECTED_ISO}" ]]; then + mkdir -p "$(dirname "${EXPECTED_ISO}")" + mv "${GENERATED_ISO}" "${EXPECTED_ISO}" + fi + + - name: Display checksum + shell: bash + run: | + set -o pipefail + iso_path="output/aerocore-os-${ISO_FILE_TAG}-amd64.iso" + checksum_path="${iso_path}-CHECKSUM" + sha256sum "${iso_path}" | tee "${checksum_path}" + { + echo "# ISO Checksum (SHA256)" + echo + echo "ISO: $(basename "${iso_path}")" + echo + echo '```' + cat "${checksum_path}" + echo '```' + } >> "$GITHUB_STEP_SUMMARY" + + - name: Move ISO to upload directory + id: upload-directory + shell: bash + run: | + iso_upload_dir="${{ github.workspace }}/output/upload" + iso_path="${{ github.workspace }}/output/aerocore-os-${ISO_FILE_TAG}-amd64.iso" + iso_name="$(basename "${iso_path}")" + + mkdir -p "${iso_upload_dir}" + mv "${iso_path}" "${iso_upload_dir}/" + ( + cd "${iso_upload_dir}" + sha256sum "${iso_name}" | tee "${iso_name}-CHECKSUM" + ) + echo "iso-upload-dir=${iso_upload_dir}" >> "$GITHUB_OUTPUT" + + - name: Upload ISO checksum to Job Artifacts + if: github.ref_name == 'testing' + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 + with: + name: aerocore-os-installer-iso-${{ env.ISO_FILE_TAG }}-checksum + path: ${{ steps.upload-directory.outputs.iso-upload-dir }}/*-CHECKSUM + if-no-files-found: error + retention-days: 1 + compression-level: 0 + + - name: Upload ISO and checksum to R2 + if: github.event_name == 'workflow_dispatch' && github.ref_name == 'main' + shell: bash + env: + RCLONE_CONFIG_R2_TYPE: s3 + RCLONE_CONFIG_R2_PROVIDER: Cloudflare + RCLONE_CONFIG_R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }} + RCLONE_CONFIG_R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }} + RCLONE_CONFIG_R2_REGION: auto + RCLONE_CONFIG_R2_ENDPOINT: ${{ secrets.R2_ENDPOINT }} + SOURCE_DIR: ${{ steps.upload-directory.outputs.iso-upload-dir }} + run: | + sudo apt-get update + sudo apt-get install -y rclone + rclone copy "$SOURCE_DIR" R2:bazzite diff --git a/.github/workflows/build-live-installer.yml b/.github/workflows/build-live-installer.yml deleted file mode 100644 index 0965c33..0000000 --- a/.github/workflows/build-live-installer.yml +++ /dev/null @@ -1,180 +0,0 @@ -name: Build live installer - -on: - workflow_dispatch: - inputs: - image_tag: - description: "AeroCore image tag to install" - required: false - default: latest - type: string - workflow_call: - workflow_run: - workflows: - - Build container image - types: - - completed - branches: - - main - -permissions: {} - -concurrency: - group: ${{ github.workflow }}-${{ github.ref || github.run_id }} - cancel-in-progress: true - -jobs: - build-live-installer: - name: Build KDE live installer - if: github.event_name != 'workflow_run' || (github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push') - runs-on: ubuntu-24.04 - permissions: - contents: read - packages: read - - env: - IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} - IMAGE_TAG: ${{ inputs.image_tag || 'latest' }} - ISO_FILE_TAG: ${{ github.ref_name == 'testing' && 'testing' || (inputs.image_tag || 'latest') }} - # Keep these aligned with the Fedora major used by the target bazzite-deck base image. - LIVE_BASE_IMAGE: quay.io/fedora/fedora-kinoite:43 - FEDORA_VERSION: "43" - - steps: - - name: Maximize build space - uses: ublue-os/remove-unwanted-software@cc0becac701cf642c8f0a6613bbdaf5dc36b259e # v9 - with: - remove-codeql: true - - - name: Mount container storage BTRFS loopback - run: | - sudo truncate -s 70G /mnt/podman-storage.img - sudo mkfs.btrfs -f /mnt/podman-storage.img - sudo podman system reset --force - sudo systemctl stop podman.service - sudo mount -o compress-force=zstd:2 /mnt/podman-storage.img /var/lib/containers/storage - sudo systemctl start podman.service - - - name: Checkout - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 - - - name: Install just - uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4 - - - name: Prepare image references - run: | - image_name="$(just image_name)" - image_registry="${IMAGE_REGISTRY,,}" - echo "IMAGE_NAME=${image_name,,}" >> "$GITHUB_ENV" - echo "IMAGE_REGISTRY=${image_registry}" >> "$GITHUB_ENV" - - - name: Login to GHCR - run: | - echo '${{ secrets.GITHUB_TOKEN }}' | sudo podman login ghcr.io \ - --username '${{ github.actor }}' --password-stdin - - - name: Pull AeroCore install image - run: | - sudo podman pull "${IMAGE_REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG}" - - - name: Build live installer payload - run: | - mkdir -p output - sudo podman tag \ - "${IMAGE_REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG}" \ - localhost/aerocore-live-payload:latest - sudo podman save \ - --format oci-archive \ - --output output/install-payload.oci \ - localhost/aerocore-live-payload:latest - - sudo podman build \ - --cap-add sys_admin \ - --security-opt label=disable \ - --build-arg "BASE_IMAGE=${LIVE_BASE_IMAGE}" \ - --build-arg "INSTALL_IMAGE_PAYLOAD=localhost/aerocore-live-payload:latest" \ - --build-arg "INSTALL_IMAGE_PAYLOAD_ARCHIVE=/install-payload.oci" \ - --tag localhost/aerocore-live-payload:latest \ - --file installer/Containerfile \ - . - - - name: Build ISO - id: build - uses: Zeglius/titanoboa@7737f4748458252ac827dca14b3d6dd09298472a # revamp-pr - with: - image-ref: localhost/aerocore-live-payload:latest - iso-dest: ${{ github.workspace }}/output/aerocore-os-${{ env.ISO_FILE_TAG }}-amd64.iso - - - name: Normalize ISO output path - shell: bash - env: - GENERATED_ISO: ${{ steps.build.outputs.iso-dest }} - EXPECTED_ISO: ${{ github.workspace }}/output/aerocore-os-${{ env.ISO_FILE_TAG }}-amd64.iso - run: | - if [[ ! -f "${GENERATED_ISO}" ]]; then - echo "::error::Generated ISO does not exist at ${GENERATED_ISO}" - exit 1 - fi - if [[ "${GENERATED_ISO}" != "${EXPECTED_ISO}" ]]; then - mkdir -p "$(dirname "${EXPECTED_ISO}")" - mv "${GENERATED_ISO}" "${EXPECTED_ISO}" - fi - - - name: Display checksum - shell: bash - run: | - set -o pipefail - iso_path="output/aerocore-os-${ISO_FILE_TAG}-amd64.iso" - checksum_path="${iso_path}-CHECKSUM" - sha256sum "${iso_path}" | tee "${checksum_path}" - { - echo "# ISO Checksum (SHA256)" - echo - echo "ISO: $(basename "${iso_path}")" - echo - echo '```' - cat "${checksum_path}" - echo '```' - } >> "$GITHUB_STEP_SUMMARY" - - - name: Move ISO to upload directory - id: upload-directory - shell: bash - run: | - iso_upload_dir="${{ github.workspace }}/output/upload" - iso_path="${{ github.workspace }}/output/aerocore-os-${ISO_FILE_TAG}-amd64.iso" - iso_name="$(basename "${iso_path}")" - - mkdir -p "${iso_upload_dir}" - mv "${iso_path}" "${iso_upload_dir}/" - ( - cd "${iso_upload_dir}" - sha256sum "${iso_name}" | tee "${iso_name}-CHECKSUM" - ) - echo "iso-upload-dir=${iso_upload_dir}" >> "$GITHUB_OUTPUT" - - - name: Upload ISO checksum to Job Artifacts - if: github.ref_name == 'testing' - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 - with: - name: aerocore-os-live-installer-${{ env.ISO_FILE_TAG }}-checksum - path: ${{ steps.upload-directory.outputs.iso-upload-dir }}/*-CHECKSUM - if-no-files-found: error - retention-days: 1 - compression-level: 0 - - - name: Upload ISO and checksum to R2 - if: github.event_name == 'workflow_dispatch' && github.ref_name == 'main' - shell: bash - env: - RCLONE_CONFIG_R2_TYPE: s3 - RCLONE_CONFIG_R2_PROVIDER: Cloudflare - RCLONE_CONFIG_R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }} - RCLONE_CONFIG_R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }} - RCLONE_CONFIG_R2_REGION: auto - RCLONE_CONFIG_R2_ENDPOINT: ${{ secrets.R2_ENDPOINT }} - SOURCE_DIR: ${{ steps.upload-directory.outputs.iso-upload-dir }} - run: | - sudo apt-get update - sudo apt-get install -y rclone - rclone copy "$SOURCE_DIR" R2:bazzite diff --git a/.github/workflows/validate-installer-iso.yml b/.github/workflows/validate-installer-iso.yml new file mode 100644 index 0000000..37f5496 --- /dev/null +++ b/.github/workflows/validate-installer-iso.yml @@ -0,0 +1,40 @@ +name: Validate installer ISO + +on: + pull_request: + paths: + - "Justfile" + - "installer/**" + - "just_scripts/build-installer-iso.sh" + - ".github/workflows/build-installer-iso.yml" + - ".github/workflows/validate-installer-iso.yml" + +permissions: + contents: read + +jobs: + validate-installer-iso: + name: Validate installer ISO inputs + runs-on: ubuntu-24.04 + + steps: + - name: Checkout + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 + + - name: Install just + uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4 + + - name: Validate workflow YAML + run: | + ruby -e 'require "yaml"; Dir[".github/workflows/*.yml"].each { |file| YAML.load_file(file) }' + + - name: Validate Justfile formatting + run: | + just --unstable --fmt --check -f Justfile + + - name: Validate build scripts + run: | + for script in build_files/*.sh installer/*.sh just_scripts/*.sh; do + bash -n "$script" + done + bash -n system_files/usr/libexec/aerocore-instruments-setup diff --git a/.github/workflows/validate-live-installer.yml b/.github/workflows/validate-live-installer.yml deleted file mode 100644 index 3d35a5d..0000000 --- a/.github/workflows/validate-live-installer.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Validate live installer - -on: - pull_request: - paths: - - "Justfile" - - "installer/**" - - "just_scripts/build-live-installer.sh" - - ".github/workflows/build-live-installer.yml" - - ".github/workflows/validate-live-installer.yml" - -permissions: - contents: read - -jobs: - validate-live-installer: - name: Validate live installer inputs - runs-on: ubuntu-24.04 - - steps: - - name: Checkout - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 - - - name: Install just - uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4 - - - name: Validate workflow YAML - run: | - ruby -e 'require "yaml"; Dir[".github/workflows/*.yml"].each { |file| YAML.load_file(file) }' - - - name: Validate Justfile formatting - run: | - just --unstable --fmt --check -f Justfile - - - name: Validate build scripts - run: | - for script in build_files/*.sh installer/*.sh just_scripts/*.sh; do - bash -n "$script" - done - bash -n system_files/usr/libexec/aerocore-instruments-setup diff --git a/Justfile b/Justfile index b65d2c9..f77828b 100644 --- a/Justfile +++ b/Justfile @@ -22,20 +22,25 @@ export INSTRUMENTS_RELEASE_API_BASE := env_var_or_default("INSTRUMENTS_RELEASE_A alias build-vm := build-qcow2 alias rebuild-vm := rebuild-qcow2 alias run-vm := run-vm-qcow2 -alias build-live-iso := build-live-installer -alias run-live-iso := run-live-installer +alias build-installer := build-installer-iso +alias run-installer := run-installer-iso +# Backward-compatible aliases; these refer to the installer ISO, not a Live OS. +alias build-live-iso := build-installer-iso +alias run-live-iso := run-installer-iso +alias build-live-installer := build-installer-iso +alias run-live-installer := run-installer-iso [private] default: @just --list -# Build a Bazzite-style live installer ISO -build-live-installer $target_image=("localhost/" + image_name) $tag=default_tag: - @IMAGE_NAME="{{ target_image }}" IMAGE_TAG="{{ tag }}" ./just_scripts/build-live-installer.sh +# Build a Bazzite-style installer ISO +build-installer-iso $target_image=("localhost/" + image_name) $tag=default_tag: + @IMAGE_NAME="{{ target_image }}" IMAGE_TAG="{{ tag }}" ./just_scripts/build-installer-iso.sh -# Boot the live installer ISO with QEMU -run-live-installer: - @./just_scripts/run-live-installer.sh +# Boot the installer ISO with QEMU +run-installer-iso: + @./just_scripts/run-installer-iso.sh # Check Just Syntax [group('Just')] diff --git a/README.md b/README.md index 3fc11c5..de33959 100644 --- a/README.md +++ b/README.md @@ -55,15 +55,15 @@ BASE_IMAGE=ghcr.io/ublue-os/bazzite-deck:testing just build ``` -To build the Bazzite-style live installer locally, first build the AeroCore +To build the Bazzite-style installer ISO locally, first build the AeroCore image and then run: ```bash sudo just build -just build-live-installer -just run-live-installer +just build-installer-iso +just run-installer-iso ``` This requires privileged Podman, a rootful Podman API socket, and roughly -70 GiB of free space. The live installer workflow consumes the published +70 GiB of free space. The installer ISO workflow consumes the published `latest` AeroCore image and uploads the ISO as a GitHub Actions artifact. diff --git a/installer/Containerfile b/installer/Containerfile index 50579e6..34c5e28 100644 --- a/installer/Containerfile +++ b/installer/Containerfile @@ -1,4 +1,4 @@ -# Build the live installer payload from a desktop Bazzite runtime. +# Build the installer ISO payload from a desktop Bazzite runtime. # The image installed to disk is supplied separately as INSTALL_IMAGE_PAYLOAD. ARG BASE_IMAGE=ghcr.io/ublue-os/bazzite:stable diff --git a/installer/iso.yaml b/installer/iso.yaml index 8e6bd73..4b9fd2c 100644 --- a/installer/iso.yaml +++ b/installer/iso.yaml @@ -1,10 +1,10 @@ -label: "AeroCore-Live" +label: "AeroCore-Installer" grub2: timeout: 3 entries: - name: "Launch AeroCore Installer" - linux: "/images/pxeboot/vmlinuz quiet rhgb root=live:CDLABEL=AeroCore-Live enforcing=0 rd.live.image" + linux: "/images/pxeboot/vmlinuz quiet rhgb root=live:CDLABEL=AeroCore-Installer enforcing=0 rd.live.image" initrd: "/images/pxeboot/initrd.img" - name: "Launch AeroCore Installer (Basic Graphics Mode)" - linux: "/images/pxeboot/vmlinuz quiet rhgb root=live:CDLABEL=AeroCore-Live enforcing=0 rd.live.image nomodeset" + linux: "/images/pxeboot/vmlinuz quiet rhgb root=live:CDLABEL=AeroCore-Installer enforcing=0 rd.live.image nomodeset" initrd: "/images/pxeboot/initrd.img" diff --git a/just_scripts/build-installer-iso.sh b/just_scripts/build-installer-iso.sh new file mode 100755 index 0000000..22d14a0 --- /dev/null +++ b/just_scripts/build-installer-iso.sh @@ -0,0 +1,122 @@ +#!/usr/bin/env bash + +set -euo pipefail + +project_root="$(git rev-parse --show-toplevel)" +cd "${project_root}" + +image_name="${IMAGE_NAME:-localhost/$(just image_name)}" +image_tag="${IMAGE_TAG:-$(just generate-default-tag)}" +live_base_image="${LIVE_BASE_IMAGE:-quay.io/fedora/fedora-kinoite:43}" +installer_builder_image="${INSTALLER_BUILDER_IMAGE:-ghcr.io/jasonn3/build-container-installer:v1.5.0}" +source_image="${image_name}:${image_tag}" +payload="localhost/aerocore-installer-payload:latest" +output_dir="${project_root}/output" +payload_archive="${output_dir}/install-payload.oci" +iso="${output_dir}/aerocore-os-${image_tag}-amd64.iso" +checksum="${iso}-CHECKSUM" +api_socket="${PODMAN_SOCKET:-/run/podman/podman.sock}" +if [[ "${EUID}" -eq 0 ]]; then + podman_cmd=(podman) + socket_test=(test -S "${api_socket}") +else + podman_cmd=(sudo podman) + socket_test=(sudo test -S "${api_socket}") +fi + +if ! "${socket_test[@]}"; then + echo "Podman API socket not found: ${api_socket}" >&2 + echo "Set PODMAN_SOCKET to the rootful Podman socket and retry." >&2 + exit 1 +fi + +ensure_rootful_image() { + local root_image_id user_image_id user_name user_uid copy_tmp + + root_image_id="$("${podman_cmd[@]}" images \ + --filter "reference=${source_image}" \ + --format "{{.ID}}" | head -n1)" + + if [[ -n "${root_image_id}" ]]; then + return 0 + fi + + if [[ "${EUID}" -ne 0 ]]; then + just _rootful_load_image "${image_name}" "${image_tag}" + return + fi + + if [[ -z "${SUDO_USER:-}" ]]; then + return + fi + + user_name="${SUDO_USER}" + user_uid="$(id -u "${user_name}")" + user_image_id="$(sudo -u "${user_name}" \ + env XDG_RUNTIME_DIR="/run/user/${user_uid}" \ + podman images \ + --filter "reference=${source_image}" \ + --format "{{.ID}}" | head -n1)" + + if [[ -z "${user_image_id}" ]]; then + return + fi + + copy_tmp="$(mktemp -p "${project_root}" -d -t _build_podman_scp.XXXXXXXXXX)" + TMPDIR="${copy_tmp}" podman image scp \ + "${user_uid}@localhost::${source_image}" \ + "root@localhost::${source_image}" + rm -rf "${copy_tmp}" +} + +mkdir -p "${output_dir}" +ensure_rootful_image + +"${podman_cmd[@]}" tag "${source_image}" "${payload}" +"${podman_cmd[@]}" save --format oci-archive --output "${payload_archive}" "${payload}" + +"${podman_cmd[@]}" build \ + --cap-add sys_admin \ + --security-opt label=disable \ + --build-arg "BASE_IMAGE=${live_base_image}" \ + --build-arg "INSTALL_IMAGE_PAYLOAD=${payload}" \ + --build-arg "INSTALL_IMAGE_PAYLOAD_ARCHIVE=/install-payload.oci" \ + --tag "${payload}" \ + --file installer/Containerfile \ + . + +if [[ "${EUID}" -eq 0 ]]; then + rm -f "${iso}" "${checksum}" +else + sudo rm -f "${iso}" "${checksum}" +fi + +"${podman_cmd[@]}" run --rm --privileged \ + --volume "${api_socket}:/var/run/docker.sock" \ + --volume /var/lib/containers/storage:/var/lib/containers/storage \ + --volume "${project_root}/output:/build-container-installer/build" \ + --volume "${project_root}/installer/lorax_templates:/additional_lorax_templates:ro" \ + "${installer_builder_image}" \ + ADDITIONAL_TEMPLATES="/additional_lorax_templates/remove_root_password_prompt.tmpl /additional_lorax_templates/set_default_user.tmpl" \ + ARCH="x86_64" \ + ENABLE_CACHE_DNF="false" \ + ENABLE_CACHE_SKOPEO="false" \ + ENABLE_FLATPAK_DEPENDENCIES="false" \ + IMAGE_NAME="aerocore-installer-payload" \ + IMAGE_REPO="localhost" \ + IMAGE_SRC="containers-storage:${payload}" \ + IMAGE_TAG="latest" \ + ISO_NAME="build/aerocore-os-${image_tag}-amd64.iso" \ + VARIANT="Kinoite" \ + VERSION="${FEDORA_VERSION:-44}" + +if [[ -f "${iso}" ]]; then + if [[ "${EUID}" -ne 0 ]]; then + sudo chown "$(id -u):$(id -g)" "${iso}" + sudo rm -f "${checksum}" + (cd "${output_dir}" && sha256sum "$(basename "${iso}")") | sudo tee "${checksum}" + sudo chown "$(id -u):$(id -g)" "${checksum}" + else + (cd "${output_dir}" && sha256sum "$(basename "${iso}")") | tee "${checksum}" + fi +fi diff --git a/just_scripts/build-live-installer.sh b/just_scripts/build-live-installer.sh deleted file mode 100755 index 45335cb..0000000 --- a/just_scripts/build-live-installer.sh +++ /dev/null @@ -1,122 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -project_root="$(git rev-parse --show-toplevel)" -cd "${project_root}" - -image_name="${IMAGE_NAME:-localhost/$(just image_name)}" -image_tag="${IMAGE_TAG:-$(just generate-default-tag)}" -live_base_image="${LIVE_BASE_IMAGE:-quay.io/fedora/fedora-kinoite:43}" -installer_builder_image="${INSTALLER_BUILDER_IMAGE:-ghcr.io/jasonn3/build-container-installer:v1.5.0}" -source_image="${image_name}:${image_tag}" -payload="localhost/aerocore-live-payload:latest" -output_dir="${project_root}/output" -payload_archive="${output_dir}/install-payload.oci" -iso="${output_dir}/aerocore-os-${image_tag}-amd64.iso" -checksum="${iso}-CHECKSUM" -api_socket="${PODMAN_SOCKET:-/run/podman/podman.sock}" -if [[ "${EUID}" -eq 0 ]]; then - podman_cmd=(podman) - socket_test=(test -S "${api_socket}") -else - podman_cmd=(sudo podman) - socket_test=(sudo test -S "${api_socket}") -fi - -if ! "${socket_test[@]}"; then - echo "Podman API socket not found: ${api_socket}" >&2 - echo "Set PODMAN_SOCKET to the rootful Podman socket and retry." >&2 - exit 1 -fi - -ensure_rootful_image() { - local root_image_id user_image_id user_name user_uid copy_tmp - - root_image_id="$("${podman_cmd[@]}" images \ - --filter "reference=${source_image}" \ - --format "{{.ID}}" | head -n1)" - - if [[ -n "${root_image_id}" ]]; then - return 0 - fi - - if [[ "${EUID}" -ne 0 ]]; then - just _rootful_load_image "${image_name}" "${image_tag}" - return - fi - - if [[ -z "${SUDO_USER:-}" ]]; then - return - fi - - user_name="${SUDO_USER}" - user_uid="$(id -u "${user_name}")" - user_image_id="$(sudo -u "${user_name}" \ - env XDG_RUNTIME_DIR="/run/user/${user_uid}" \ - podman images \ - --filter "reference=${source_image}" \ - --format "{{.ID}}" | head -n1)" - - if [[ -z "${user_image_id}" ]]; then - return - fi - - copy_tmp="$(mktemp -p "${project_root}" -d -t _build_podman_scp.XXXXXXXXXX)" - TMPDIR="${copy_tmp}" podman image scp \ - "${user_uid}@localhost::${source_image}" \ - "root@localhost::${source_image}" - rm -rf "${copy_tmp}" -} - -mkdir -p "${output_dir}" -ensure_rootful_image - -"${podman_cmd[@]}" tag "${source_image}" "${payload}" -"${podman_cmd[@]}" save --format oci-archive --output "${payload_archive}" "${payload}" - -"${podman_cmd[@]}" build \ - --cap-add sys_admin \ - --security-opt label=disable \ - --build-arg "BASE_IMAGE=${live_base_image}" \ - --build-arg "INSTALL_IMAGE_PAYLOAD=${payload}" \ - --build-arg "INSTALL_IMAGE_PAYLOAD_ARCHIVE=/install-payload.oci" \ - --tag "${payload}" \ - --file installer/Containerfile \ - . - -if [[ "${EUID}" -eq 0 ]]; then - rm -f "${iso}" "${checksum}" -else - sudo rm -f "${iso}" "${checksum}" -fi - -"${podman_cmd[@]}" run --rm --privileged \ - --volume "${api_socket}:/var/run/docker.sock" \ - --volume /var/lib/containers/storage:/var/lib/containers/storage \ - --volume "${project_root}/output:/build-container-installer/build" \ - --volume "${project_root}/installer/lorax_templates:/additional_lorax_templates:ro" \ - "${installer_builder_image}" \ - ADDITIONAL_TEMPLATES="/additional_lorax_templates/remove_root_password_prompt.tmpl /additional_lorax_templates/set_default_user.tmpl" \ - ARCH="x86_64" \ - ENABLE_CACHE_DNF="false" \ - ENABLE_CACHE_SKOPEO="false" \ - ENABLE_FLATPAK_DEPENDENCIES="false" \ - IMAGE_NAME="aerocore-live-payload" \ - IMAGE_REPO="localhost" \ - IMAGE_SRC="containers-storage:${payload}" \ - IMAGE_TAG="latest" \ - ISO_NAME="build/aerocore-os-${image_tag}-amd64.iso" \ - VARIANT="Kinoite" \ - VERSION="${FEDORA_VERSION:-44}" - -if [[ -f "${iso}" ]]; then - if [[ "${EUID}" -ne 0 ]]; then - sudo chown "$(id -u):$(id -g)" "${iso}" - sudo rm -f "${checksum}" - (cd "${output_dir}" && sha256sum "$(basename "${iso}")") | sudo tee "${checksum}" - sudo chown "$(id -u):$(id -g)" "${checksum}" - else - (cd "${output_dir}" && sha256sum "$(basename "${iso}")") | tee "${checksum}" - fi -fi diff --git a/just_scripts/run-installer-iso.sh b/just_scripts/run-installer-iso.sh new file mode 100755 index 0000000..2c49164 --- /dev/null +++ b/just_scripts/run-installer-iso.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +set -euo pipefail + +project_root="$(git rev-parse --show-toplevel)" +cd "${project_root}" + +image_tag="${IMAGE_TAG:-$(just generate-default-tag)}" +iso="${project_root}/output/aerocore-os-${image_tag}-amd64.iso" + +if [[ ! -f "${iso}" ]]; then + just build-installer-iso +fi + +podman run --rm --cap-add NET_ADMIN \ + --publish 127.0.0.1:8006:8006 \ + --env CPU_CORES=2 \ + --env RAM_SIZE=4G \ + --env DISK_SIZE=64G \ + --env BOOT_MODE=uefi \ + --device /dev/kvm \ + --volume "${iso}:/boot.iso:ro" \ + docker.io/qemux/qemu-docker diff --git a/just_scripts/run-live-installer.sh b/just_scripts/run-live-installer.sh deleted file mode 100755 index 2723aae..0000000 --- a/just_scripts/run-live-installer.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -project_root="$(git rev-parse --show-toplevel)" -cd "${project_root}" - -image_tag="${IMAGE_TAG:-$(just generate-default-tag)}" -iso="${project_root}/output/aerocore-os-${image_tag}-amd64.iso" - -if [[ ! -f "${iso}" ]]; then - just build-live-installer -fi - -podman run --rm --cap-add NET_ADMIN \ - --publish 127.0.0.1:8006:8006 \ - --env CPU_CORES=2 \ - --env RAM_SIZE=4G \ - --env DISK_SIZE=64G \ - --env BOOT_MODE=uefi \ - --device /dev/kvm \ - --volume "${iso}:/boot.iso:ro" \ - docker.io/qemux/qemu-docker -- cgit v1.2.3 From 73b0f172a531359872739aa708e8794aae2dcd5a Mon Sep 17 00:00:00 2001 From: tranch Date: Fri, 24 Jul 2026 18:58:16 +0800 Subject: Lock installer default account password --- installer/lorax_templates/set_default_user.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/lorax_templates/set_default_user.tmpl b/installer/lorax_templates/set_default_user.tmpl index b4cf2c8..c20736f 100644 --- a/installer/lorax_templates/set_default_user.tmpl +++ b/installer/lorax_templates/set_default_user.tmpl @@ -1 +1 @@ -append usr/share/anaconda/interactive-defaults.ks "\\nuser --name=aerocore --password=aerocore --plaintext --groups=wheel" +append usr/share/anaconda/interactive-defaults.ks "\\nuser --name=aerocore --lock --groups=wheel" -- cgit v1.2.3 From c008e52494fd3e350d4231bb7c229d576a17d800 Mon Sep 17 00:00:00 2001 From: tranch Date: Sat, 25 Jul 2026 04:41:50 +0800 Subject: Use target var tmp during installer deploy Bind the live installer's /var/tmp to the mounted target system in the pre-install phase so ostreecontainer can stage image layers on target disk space instead of the tiny LiveOS rootfs. --- installer/lorax_templates/use_target_var_tmp.tmpl | 1 + just_scripts/build-installer-iso.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 installer/lorax_templates/use_target_var_tmp.tmpl diff --git a/installer/lorax_templates/use_target_var_tmp.tmpl b/installer/lorax_templates/use_target_var_tmp.tmpl new file mode 100644 index 0000000..2d099d1 --- /dev/null +++ b/installer/lorax_templates/use_target_var_tmp.tmpl @@ -0,0 +1 @@ +append usr/share/anaconda/interactive-defaults.ks "\n%pre-install --log=/tmp/aerocore-var-tmp.log\nset -eux\ntarget_tmp=\nfor root in /mnt/sysimage /mnt/sysroot /var/mnt/sysimage; do\n if mountpoint -q ${root}; then\n target_tmp=${root}/var/tmp\n break\n fi\ndone\nif [ x${target_tmp} = x ]; then\n echo No mounted target system found for /var/tmp bind mount >&2\n exit 1\nfi\nmkdir -p ${target_tmp}\nchmod 1777 ${target_tmp}\nmount --bind ${target_tmp} /var/tmp\ndf -h /var/tmp ${target_tmp}\n%end" diff --git a/just_scripts/build-installer-iso.sh b/just_scripts/build-installer-iso.sh index 22d14a0..5c9e9eb 100755 --- a/just_scripts/build-installer-iso.sh +++ b/just_scripts/build-installer-iso.sh @@ -97,7 +97,7 @@ fi --volume "${project_root}/output:/build-container-installer/build" \ --volume "${project_root}/installer/lorax_templates:/additional_lorax_templates:ro" \ "${installer_builder_image}" \ - ADDITIONAL_TEMPLATES="/additional_lorax_templates/remove_root_password_prompt.tmpl /additional_lorax_templates/set_default_user.tmpl" \ + ADDITIONAL_TEMPLATES="/additional_lorax_templates/remove_root_password_prompt.tmpl /additional_lorax_templates/set_default_user.tmpl /additional_lorax_templates/use_target_var_tmp.tmpl" \ ARCH="x86_64" \ ENABLE_CACHE_DNF="false" \ ENABLE_CACHE_SKOPEO="false" \ -- cgit v1.2.3 From 4bf6f276a7c616ebb7797952c5f33e5f282fb2c8 Mon Sep 17 00:00:00 2001 From: tranch Date: Sat, 25 Jul 2026 04:55:42 +0800 Subject: Brand installer live session icons Install AeroCore icon aliases for the live KDE launcher and replace Anaconda's installer icon in the hicolor theme. --- installer/build.sh | 39 ++++++++++++++++++++++ .../apps/org.fedoraproject.AnacondaInstaller.svg | 33 ++++++++++++++++++ .../apps/org.fedoraproject.AnacondaInstaller.svg | 33 ++++++++++++++++++ ...rg.fedoraproject.AnacondaInstaller-symbolic.svg | 13 ++++++++ 4 files changed, 118 insertions(+) create mode 100644 installer/system_files/overrides/usr/share/icons/hicolor/48x48/apps/org.fedoraproject.AnacondaInstaller.svg create mode 100644 installer/system_files/overrides/usr/share/icons/hicolor/scalable/apps/org.fedoraproject.AnacondaInstaller.svg create mode 100644 installer/system_files/overrides/usr/share/icons/hicolor/symbolic/apps/org.fedoraproject.AnacondaInstaller-symbolic.svg diff --git a/installer/build.sh b/installer/build.sh index f9eb210..c8ac830 100755 --- a/installer/build.sh +++ b/installer/build.sh @@ -39,6 +39,45 @@ if [[ -d "${BRANDING_DIR}" ]]; then cp -a "${BRANDING_DIR}/." /usr/share/anaconda/pixmaps/ fi +# Installer-only overrides, kept separate from the installed AeroCore payload. +if [[ -d "${SCRIPT_DIR}/system_files/overrides" ]]; then + cp -a "${SCRIPT_DIR}/system_files/overrides/." / +fi + +# Plasma's live-session launcher defaults to start-here, and Fedora keeps +# LOGO=fedora-logo-icon in the base live environment. +for size in 16x16 22x22 24x24 32x32 36x36 48x48 64x64 96x96 128x128 256x256; do + icon_dir="/usr/share/icons/hicolor/${size}" + if [[ -f "${icon_dir}/bazzite-logo-icon.png" ]]; then + mkdir -p "${icon_dir}/apps" "${icon_dir}/places" + cp -f "${icon_dir}/bazzite-logo-icon.png" "${icon_dir}/apps/fedora-logo-icon.png" + cp -f "${icon_dir}/bazzite-logo-icon.png" "${icon_dir}/places/start-here.png" + fi +done + +if [[ -f /usr/share/icons/hicolor/scalable/places/distributor-logo.svg ]]; then + mkdir -p /usr/share/icons/hicolor/scalable/apps /usr/share/icons/hicolor/scalable/places + cp -f /usr/share/icons/hicolor/scalable/places/distributor-logo.svg \ + /usr/share/icons/hicolor/scalable/apps/start-here.svg + cp -f /usr/share/icons/hicolor/scalable/places/distributor-logo.svg \ + /usr/share/icons/hicolor/scalable/places/start-here.svg +fi + +sed -i 's/^LOGO=.*/LOGO=distributor-logo/' /usr/lib/os-release + +for desktop_file in \ + /usr/share/applications/liveinst.desktop \ + /usr/share/applications/org.fedoraproject.AnacondaInstaller.desktop \ + /usr/share/applications/anaconda.desktop; do + if [[ -f "${desktop_file}" ]]; then + sed -i 's/^Icon=.*/Icon=org.fedoraproject.AnacondaInstaller/' "${desktop_file}" + fi +done + +if command -v gtk-update-icon-cache >/dev/null 2>&1; then + gtk-update-icon-cache -f /usr/share/icons/hicolor || true +fi + # Make the install payload available to Anaconda. if [[ -n "${INSTALL_IMAGE_PAYLOAD_ARCHIVE}" && -f "${INSTALL_IMAGE_PAYLOAD_ARCHIVE}" ]]; then podman load --storage-opt additionalimagestore='' < "${INSTALL_IMAGE_PAYLOAD_ARCHIVE}" diff --git a/installer/system_files/overrides/usr/share/icons/hicolor/48x48/apps/org.fedoraproject.AnacondaInstaller.svg b/installer/system_files/overrides/usr/share/icons/hicolor/48x48/apps/org.fedoraproject.AnacondaInstaller.svg new file mode 100644 index 0000000..04454b7 --- /dev/null +++ b/installer/system_files/overrides/usr/share/icons/hicolor/48x48/apps/org.fedoraproject.AnacondaInstaller.svg @@ -0,0 +1,33 @@ + + + aerocore-installer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/installer/system_files/overrides/usr/share/icons/hicolor/scalable/apps/org.fedoraproject.AnacondaInstaller.svg b/installer/system_files/overrides/usr/share/icons/hicolor/scalable/apps/org.fedoraproject.AnacondaInstaller.svg new file mode 100644 index 0000000..04454b7 --- /dev/null +++ b/installer/system_files/overrides/usr/share/icons/hicolor/scalable/apps/org.fedoraproject.AnacondaInstaller.svg @@ -0,0 +1,33 @@ + + + aerocore-installer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/installer/system_files/overrides/usr/share/icons/hicolor/symbolic/apps/org.fedoraproject.AnacondaInstaller-symbolic.svg b/installer/system_files/overrides/usr/share/icons/hicolor/symbolic/apps/org.fedoraproject.AnacondaInstaller-symbolic.svg new file mode 100644 index 0000000..f8dedad --- /dev/null +++ b/installer/system_files/overrides/usr/share/icons/hicolor/symbolic/apps/org.fedoraproject.AnacondaInstaller-symbolic.svg @@ -0,0 +1,13 @@ + + + aerocore-installer-symbolic + + + + + + + + + + -- cgit v1.2.3 From 981dde9ceed99c6b0a9dde1bce74e6100f0593d2 Mon Sep 17 00:00:00 2001 From: tranch Date: Sat, 25 Jul 2026 07:14:05 +0800 Subject: Apply var tmp fix in installer payload Write the pre-install /var/tmp bind mount hook from installer/build.sh so both Titanoboa CI builds and local ISO builds carry the fix. The previous lorax template path was only wired through the local helper and did not affect GitHub Actions. --- installer/build.sh | 19 +++++++++++++++++++ installer/lorax_templates/use_target_var_tmp.tmpl | 1 - just_scripts/build-installer-iso.sh | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) delete mode 100644 installer/lorax_templates/use_target_var_tmp.tmpl diff --git a/installer/build.sh b/installer/build.sh index c8ac830..aa30f42 100755 --- a/installer/build.sh +++ b/installer/build.sh @@ -91,6 +91,25 @@ fi # Tell Anaconda to install the bootc container that was loaded above. mkdir -p /var/lib/rpm-state cat >> /usr/share/anaconda/interactive-defaults.ks <&2 + exit 1 +fi +mkdir -p \${target_tmp} +chmod 1777 \${target_tmp} +mount --bind \${target_tmp} /var/tmp +df -h /var/tmp \${target_tmp} +%end + ostreecontainer --url=${INSTALL_IMAGE_PAYLOAD} --transport=containers-storage --no-signature-verification EOF diff --git a/installer/lorax_templates/use_target_var_tmp.tmpl b/installer/lorax_templates/use_target_var_tmp.tmpl deleted file mode 100644 index 2d099d1..0000000 --- a/installer/lorax_templates/use_target_var_tmp.tmpl +++ /dev/null @@ -1 +0,0 @@ -append usr/share/anaconda/interactive-defaults.ks "\n%pre-install --log=/tmp/aerocore-var-tmp.log\nset -eux\ntarget_tmp=\nfor root in /mnt/sysimage /mnt/sysroot /var/mnt/sysimage; do\n if mountpoint -q ${root}; then\n target_tmp=${root}/var/tmp\n break\n fi\ndone\nif [ x${target_tmp} = x ]; then\n echo No mounted target system found for /var/tmp bind mount >&2\n exit 1\nfi\nmkdir -p ${target_tmp}\nchmod 1777 ${target_tmp}\nmount --bind ${target_tmp} /var/tmp\ndf -h /var/tmp ${target_tmp}\n%end" diff --git a/just_scripts/build-installer-iso.sh b/just_scripts/build-installer-iso.sh index 5c9e9eb..22d14a0 100755 --- a/just_scripts/build-installer-iso.sh +++ b/just_scripts/build-installer-iso.sh @@ -97,7 +97,7 @@ fi --volume "${project_root}/output:/build-container-installer/build" \ --volume "${project_root}/installer/lorax_templates:/additional_lorax_templates:ro" \ "${installer_builder_image}" \ - ADDITIONAL_TEMPLATES="/additional_lorax_templates/remove_root_password_prompt.tmpl /additional_lorax_templates/set_default_user.tmpl /additional_lorax_templates/use_target_var_tmp.tmpl" \ + ADDITIONAL_TEMPLATES="/additional_lorax_templates/remove_root_password_prompt.tmpl /additional_lorax_templates/set_default_user.tmpl" \ ARCH="x86_64" \ ENABLE_CACHE_DNF="false" \ ENABLE_CACHE_SKOPEO="false" \ -- cgit v1.2.3 From 9cdb3a038c2d29eefd95c4f5a274881a67e061c9 Mon Sep 17 00:00:00 2001 From: tranch Date: Sat, 25 Jul 2026 07:39:18 +0800 Subject: Disable automatic installer ISO builds Remove the workflow_run trigger from the installer ISO workflow while ISO construction is being tested manually. Keep workflow_dispatch and workflow_call available. --- .github/workflows/build-installer-iso.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/build-installer-iso.yml b/.github/workflows/build-installer-iso.yml index cfa7b80..bae0458 100644 --- a/.github/workflows/build-installer-iso.yml +++ b/.github/workflows/build-installer-iso.yml @@ -9,13 +9,6 @@ on: default: latest type: string workflow_call: - workflow_run: - workflows: - - Build container image - types: - - completed - branches: - - main permissions: {} @@ -26,7 +19,6 @@ concurrency: jobs: build-installer-iso: name: Build KDE installer ISO - if: github.event_name != 'workflow_run' || (github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push') runs-on: ubuntu-24.04 permissions: contents: read -- 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(-) 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. --- .github/workflows/build-installer-iso.yml | 6 +++--- build_files/image-info | 2 +- installer/Containerfile | 2 +- installer/build.sh | 18 +++++++++++++++++- just_scripts/build-installer-iso.sh | 4 ++-- 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-installer-iso.yml b/.github/workflows/build-installer-iso.yml index bae0458..7650ebb 100644 --- a/.github/workflows/build-installer-iso.yml +++ b/.github/workflows/build-installer-iso.yml @@ -74,7 +74,7 @@ jobs: mkdir -p output sudo podman tag \ "${IMAGE_REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG}" \ - localhost/aerocore-installer-payload:latest + localhost/aerocore-os-installer:latest sudo podman save \ --format oci-archive \ --output output/install-payload.oci \ @@ -86,7 +86,7 @@ jobs: --build-arg "BASE_IMAGE=${LIVE_BASE_IMAGE}" \ --build-arg "INSTALL_IMAGE_PAYLOAD=localhost/aerocore-installer-payload:latest" \ --build-arg "INSTALL_IMAGE_PAYLOAD_ARCHIVE=/install-payload.oci" \ - --tag localhost/aerocore-installer-payload:latest \ + --tag localhost/aerocore-os-installer:latest \ --file installer/Containerfile \ . @@ -94,7 +94,7 @@ jobs: id: build uses: Zeglius/titanoboa@7737f4748458252ac827dca14b3d6dd09298472a # revamp-pr with: - image-ref: localhost/aerocore-installer-payload:latest + image-ref: localhost/aerocore-os-installer:latest iso-dest: ${{ github.workspace }}/output/aerocore-os-${{ env.ISO_FILE_TAG }}-amd64.iso - name: Normalize ISO output path 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 diff --git a/installer/Containerfile b/installer/Containerfile index 34c5e28..fa5d731 100644 --- a/installer/Containerfile +++ b/installer/Containerfile @@ -2,7 +2,7 @@ # The image installed to disk is supplied separately as INSTALL_IMAGE_PAYLOAD. ARG BASE_IMAGE=ghcr.io/ublue-os/bazzite:stable -ARG INSTALL_IMAGE_PAYLOAD=ghcr.io/AeroCore-IO/aerocore-bazzite-image:stable +ARG INSTALL_IMAGE_PAYLOAD=ghcr.io/AeroCore-IO/aerocore-os:stable ARG INSTALL_IMAGE_PAYLOAD_ARCHIVE=/install-payload.oci FROM ${BASE_IMAGE} diff --git a/installer/build.sh b/installer/build.sh index aa30f42..c119dcc 100755 --- a/installer/build.sh +++ b/installer/build.sh @@ -111,6 +111,22 @@ df -h /var/tmp \${target_tmp} %end ostreecontainer --url=${INSTALL_IMAGE_PAYLOAD} --transport=containers-storage --no-signature-verification + +%post --nochroot --log=/tmp/aerocore-hostname.log +set -eux +target_root= +for root in /mnt/sysroot /mnt/sysimage /var/mnt/sysimage; do + if mountpoint -q \${root}; then + target_root=\${root} + break + fi +done +if [ x\${target_root} = x ]; then + echo No mounted target system found for hostname setup >&2 + exit 1 +fi +systemd-firstboot --root=\${target_root} --hostname=aerocore-os +%end EOF mkdir -p /usr/lib/bootc-image-builder @@ -146,5 +162,5 @@ mkdir -p /boot/efi/EFI/BOOT cp -v "${grubx64}" /boot/efi/EFI/BOOT/BOOTX64.EFI cp -v "${grubx64}" /boot/efi/EFI/BOOT/fbx64.efi -systemd-firstboot --timezone UTC +systemd-firstboot --hostname aerocore-os --timezone UTC dnf clean all diff --git a/just_scripts/build-installer-iso.sh b/just_scripts/build-installer-iso.sh index 22d14a0..38e1718 100755 --- a/just_scripts/build-installer-iso.sh +++ b/just_scripts/build-installer-iso.sh @@ -10,7 +10,7 @@ image_tag="${IMAGE_TAG:-$(just generate-default-tag)}" live_base_image="${LIVE_BASE_IMAGE:-quay.io/fedora/fedora-kinoite:43}" installer_builder_image="${INSTALLER_BUILDER_IMAGE:-ghcr.io/jasonn3/build-container-installer:v1.5.0}" source_image="${image_name}:${image_tag}" -payload="localhost/aerocore-installer-payload:latest" +payload="localhost/aerocore-os-installer:latest" output_dir="${project_root}/output" payload_archive="${output_dir}/install-payload.oci" iso="${output_dir}/aerocore-os-${image_tag}-amd64.iso" @@ -102,7 +102,7 @@ fi ENABLE_CACHE_DNF="false" \ ENABLE_CACHE_SKOPEO="false" \ ENABLE_FLATPAK_DEPENDENCIES="false" \ - IMAGE_NAME="aerocore-installer-payload" \ + IMAGE_NAME="aerocore-os-installer" \ IMAGE_REPO="localhost" \ IMAGE_SRC="containers-storage:${payload}" \ IMAGE_TAG="latest" \ -- cgit v1.2.3 From ce39b6bacb3fa9e7ec2770798649f4f3a1bd6678 Mon Sep 17 00:00:00 2001 From: tranch Date: Sat, 25 Jul 2026 10:13:57 +0800 Subject: Fix stale installer payload references --- .github/workflows/build-installer-iso.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-installer-iso.yml b/.github/workflows/build-installer-iso.yml index 7650ebb..f7897b9 100644 --- a/.github/workflows/build-installer-iso.yml +++ b/.github/workflows/build-installer-iso.yml @@ -78,13 +78,13 @@ jobs: sudo podman save \ --format oci-archive \ --output output/install-payload.oci \ - localhost/aerocore-installer-payload:latest + localhost/aerocore-os-installer:latest sudo podman build \ --cap-add sys_admin \ --security-opt label=disable \ --build-arg "BASE_IMAGE=${LIVE_BASE_IMAGE}" \ - --build-arg "INSTALL_IMAGE_PAYLOAD=localhost/aerocore-installer-payload:latest" \ + --build-arg "INSTALL_IMAGE_PAYLOAD=localhost/aerocore-os-installer:latest" \ --build-arg "INSTALL_IMAGE_PAYLOAD_ARCHIVE=/install-payload.oci" \ --tag localhost/aerocore-os-installer:latest \ --file installer/Containerfile \ -- 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(+) 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