Build containers / fedora-cosmic (44) (pull_request) Canceled after 0s
Build containers / fedora-cosmic (rawhide) (pull_request) Canceled after 0s
Build containers / fedora-remote (44) (pull_request) Canceled after 0s
Build containers / fedora-intune (44) (pull_request) Canceled after 0s
Build containers / Compute changes (pull_request) Canceled after 13s
Build containers / Prune old releases and tags (pull_request) Skipped
libhimmelblau reports "PRETTY_NAME VERSION_ID" as the OS version, and Fedora's PRETTY_NAME already contains the version, so Entra showed "Fedora Linux 44.20261020.0 (Forty Four) 44.20261020.0". In the os-release the Himmelblau daemons see, set PRETTY_NAME to NAME, giving "Fedora Linux 44.20261020.0". Nothing else in Himmelblau reads PRETTY_NAME. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
31 lines
1.3 KiB
Bash
31 lines
1.3 KiB
Bash
#!/usr/bin/env bash
|
|
# Write the os-release that the Himmelblau daemons see (10-os-release.conf):
|
|
# the image's /usr/lib/os-release with VERSION_ID set to the full image version
|
|
# (OSTREE_VERSION, e.g. 44.20261019.0), so Intune shows the build and not just
|
|
# "44". Himmelblau reports VERSION_ID as the device's OS version and has no
|
|
# setting for it. The rest of the system keeps the stock VERSION_ID, which
|
|
# toolbox, flatpak and dnf expect to be the plain release.
|
|
#
|
|
# PRETTY_NAME becomes just NAME: libhimmelblau reports "PRETTY_NAME VERSION_ID"
|
|
# as the OS version string, and Fedora's PRETTY_NAME already contains the
|
|
# version ("Fedora Linux 44.20261020.0 (Forty Four) 44.20261020.0"). Nothing
|
|
# else in Himmelblau reads PRETTY_NAME.
|
|
set -euo pipefail
|
|
|
|
SRC=/usr/lib/os-release
|
|
DEST=/run/himmelblau-os-release
|
|
|
|
version="$(. "${SRC}" && echo "${OSTREE_VERSION:-${IMAGE_VERSION:-}}")"
|
|
name="$(. "${SRC}" && echo "${NAME:-Linux}")"
|
|
|
|
tmp="$(mktemp "${DEST}.XXXXXX")"
|
|
if [[ -n "${version}" ]]; then
|
|
sed -e "s/^VERSION_ID=.*/VERSION_ID=${version}/" \
|
|
-e "s/^PRETTY_NAME=.*/PRETTY_NAME=\"${name}\"/" "${SRC}" > "${tmp}"
|
|
else
|
|
# No image version (not an ostree/bootc deployment): pass it through as-is.
|
|
cat "${SRC}" > "${tmp}"
|
|
fi
|
|
chmod 0644 "${tmp}"
|
|
mv -f "${tmp}" "${DEST}"
|