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/image-info') 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 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/image-info') 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 f66aa82b4c3890c8f6b2741bfedd31405dcbd39f Mon Sep 17 00:00:00 2001 From: tranch 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/image-info | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build_files/image-info') 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" < 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 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build_files/image-info') 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" -- 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/image-info') 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 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/image-info | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'build_files/image-info') 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/image-info') 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: 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/image-info') 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/image-info') 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