From 455d63f408c929ad59aab589dda20ba77d769047 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. --- Containerfile | 8 +++- build_files/image-info | 78 +++++++++++++++++++++++++++++++++ system_files/etc/xdg/kcm-about-distrorc | 5 +++ 3 files changed, 90 insertions(+), 1 deletion(-) create mode 100755 build_files/image-info create mode 100644 system_files/etc/xdg/kcm-about-distrorc diff --git a/Containerfile b/Containerfile index 976da0c..7e029a4 100644 --- a/Containerfile +++ b/Containerfile @@ -7,6 +7,11 @@ COPY system_files /system_files # Base Image FROM ${BASE_IMAGE} +ARG IMAGE_NAME="aerocore-bazzite-image" +ARG IMAGE_VENDOR="AeroCore-IO" +ARG IMAGE_BRANCH="stable" +ARG VERSION_TAG="latest" +ARG VERSION_PRETTY="latest" ## Other possible base images include: # ghcr.io/ublue-os/bazzite-deck:testing # ghcr.io/ublue-os/bazzite-deck:stable-43.20260420 @@ -35,7 +40,8 @@ RUN --mount=type=bind,from=ctx,source=/,target=/ctx \ --mount=type=cache,dst=/var/cache \ --mount=type=cache,dst=/var/log \ --mount=type=tmpfs,dst=/tmp \ - /ctx/build.sh + /ctx/build.sh && \ + /ctx/image-info ### LINTING ## Verify final image and contents are correct. 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 diff --git a/system_files/etc/xdg/kcm-about-distrorc b/system_files/etc/xdg/kcm-about-distrorc new file mode 100644 index 0000000..ed2c831 --- /dev/null +++ b/system_files/etc/xdg/kcm-about-distrorc @@ -0,0 +1,5 @@ +[General] +LogoPath=/usr/share/pixmaps/system-logo-white.png +Name=AeroCore OS +Website=https://os.aerocore.com.cn +Variant=Handheld & HTPC Edition -- cgit v1.2.3