summaryrefslogtreecommitdiff
path: root/build_files
diff options
context:
space:
mode:
authortranch <tranch.xiao@gmail.com>2026-08-28 12:16:30 +0800
committertranch <tranch.xiao@gmail.com>2026-08-28 12:16:36 +0800
commit90c5e5ad9754825b7fbfb419f80a6816ec416e85 (patch)
tree7c1ba21867a866d4bf9b04c3e1bf47d8646759c5 /build_files
parent7889a92c2eea98189330ad1fbfbef4c33a7e3071 (diff)
downloadAeroCore-OS-90c5e5ad9754825b7fbfb419f80a6816ec416e85.tar.gz
AeroCore-OS-90c5e5ad9754825b7fbfb419f80a6816ec416e85.zip
fix: avoid corrupted system-release in ISO
Diffstat (limited to 'build_files')
-rwxr-xr-xbuild_files/image-info10
1 files changed, 6 insertions, 4 deletions
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