diff --git a/AGENTS.md b/AGENTS.md index 250e263..92d31a4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -311,15 +311,16 @@ gamescope and the Plasma desktop. Primary target: the Valve Steam Machine `steamify.sh --boot gamescope|desktop` on its own (2.7.0, for scripts) only switches `boot` on an installed conversion: `WANTED` is `CURRENT` plus that, so no updates or removals a normal run would pick. -- OS name for Steam (SteamOS conversion, 2.9.0): Steam's System settings - show `lsb_release -d`, so only `DISTRIB_DESCRIPTION` in `/etc/lsb-release` - becomes "CachyOS with Steamify" (a pacman hook, `zz-steamify-os-release`, - sets it again after cachyos-hooks resets it). In `/etc/os-release` only - `VARIANT`/`VARIANT_ID`/`VERSION_ID` (Steam's OS version, refreshed by - `os_version_refresh` after every run that changes something); never `NAME` - or `PRETTY_NAME`: limine-snapper-sync finds the boot entries by the OS name - ("Target OS name ... not found in /boot/limine.conf"). As a guard, - `/etc/default/limine` gets `TARGET_OS_NAME="CachyOS"` when it has none. +- What Steam's System settings show (SteamOS conversion, 2.9.0): the OS name + stays CachyOS's everywhere (legal clarity; Steam reads `lsb_release -d`, + not touched). `/etc/os-release` gets only `VARIANT="Steamify "`, + `VARIANT_ID`, `VERSION_ID` and `VERSION_CODENAME=steamos-X.Y` (Valve's + newest jupiter repo), refreshed by `os_version_refresh` after every run that + changes something; a pacman hook (`zz-steamify-os-release`) runs after + cachyos-hooks. Never `NAME` or `PRETTY_NAME`: limine-snapper-sync finds the + boot entries by the OS name ("Target OS name ... not found in + /boot/limine.conf"); `/etc/default/limine` gets `TARGET_OS_NAME="CachyOS"` + when it has none, as a guard. - `Relogin=true` means a gamescope that fails to start is relaunched in a tight loop; keep that in mind when changing session handling. diff --git a/CHANGELOG.md b/CHANGELOG.md index b506b97..413c9f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,8 +8,9 @@ one per merged pull request. ## 2.9.0 - 2026-09-28 - `d30d505` **chore: Version 2.9.0** +- **feat: Steam's System settings: the OS name stays CachyOS (no renaming, also not in About this System), Steamify as the variant, the SteamOS release it follows as the codename (steamos-3.9)** - `ce71b34` **feat: Steam's System settings and About this System like on SteamOS: OS name "CachyOS with Steamify" (lsb-release, kept through CachyOS updates by a pacman hook), Steamify as OS variant and version (os-release VARIANT/VERSION_ID; NAME/PRETTY_NAME stay CachyOS's for limine, TARGET_OS_NAME pinned), "CachyOS Linux with Steamify" in About this System; on a Steam Machine the serial number and Steam's Wi-Fi backend setting (existing installs get it as an update)** -- **fix(ui): The progress screen's ✓ and ! stand upright: only a dot on the circle spins while a step runs (they kept the spinner's last angle)** +- `07a94cd` **fix(ui): The progress screen's ✓ and ! stand upright: only a dot on the circle spins while a step runs (they kept the spinner's last angle)** ## 2.8.0 - 2026-09-28 diff --git a/lib/login-manager.sh b/lib/login-manager.sh index 3a44e2a..510da38 100644 --- a/lib/login-manager.sh +++ b/lib/login-manager.sh @@ -18,22 +18,40 @@ gaming_status() { esac } -# What Steam shows in its System settings: the OS name (`lsb_release -d`: -# DISTRIB_DESCRIPTION in /etc/lsb-release) and Steamify as the OS variant and -# version (os-release's VARIANT/VERSION_ID; its NAME and PRETTY_NAME stay -# CachyOS's, which limine-snapper-sync finds the boot entries by). -# cachyos-hooks resets lsb-release on updates, so our hook sets it again. +# What Steam shows in its System settings besides the OS name (which stays +# CachyOS's, for legal clarity and because limine-snapper-sync finds the boot +# entries by it): Steamify as the variant and version, the SteamOS release it +# follows as the codename (os-release VARIANT/VERSION_ID/VERSION_CODENAME). OS_NAME_SCRIPT=/usr/local/libexec/steamify-os-release OS_NAME_HOOK=/etc/pacman.d/hooks/zz-steamify-os-release.hook # limine's tools take the OS name from TARGET_OS_NAME, else os-release's # PRETTY_NAME: pinned to CachyOS, the boot entries never depend on os-release. LIMINE_DEFAULTS=/etc/default/limine +steamos_codename() { + # The SteamOS release Steamify follows: Valve's newest jupiter-X.Y repo + # (where the SteamOS extras come from), as a codename (os-release allows + # no spaces or capitals: steamos-3.9). Offline (e.g. in the installer): + # the one set before, if any. + local v + v="$(curl -fsL --max-time 15 "$VALVE_MIRROR/" 2>/dev/null | grep -oE 'jupiter-[0-9]+\.[0-9]+/' | tr -d / | sort -V | tail -n 1)" + if [[ -n "$v" ]]; then echo "steamos-${v#jupiter-}" + else sed -n 's/^VERSION_CODENAME=//p' /etc/os-release 2>/dev/null; fi +} + os_name_enable() { - patch_file steamify-os-release.sh | fill VERSION="$VERSION" | sudo install -Dm755 /dev/stdin "$OS_NAME_SCRIPT" && + # 2.9.0 pre-releases renamed the OS itself; the name stays CachyOS's. + if grep -q '^DISTRIB_DESCRIPTION=.*with Steamify' /etc/lsb-release 2>/dev/null && + [[ -x /usr/share/libalpm/scripts/cachyos-branding ]]; then + sudo /usr/share/libalpm/scripts/cachyos-branding lsb-release + fi + [[ -n "$(kreadconfig6 --file kcm-about-distrorc --group General --key Name 2>/dev/null)" ]] && + kset gaming kcm-about-distrorc General Name --delete + patch_file steamify-os-release.sh | fill VERSION="$VERSION" CODENAME="$(steamos_codename)" | + sudo install -Dm755 /dev/stdin "$OS_NAME_SCRIPT" && patch_file steamify-os-release.hook | fill SCRIPT="$OS_NAME_SCRIPT" | sudo install -Dm644 /dev/stdin "$OS_NAME_HOOK" && - sudo "$OS_NAME_SCRIPT" || { err "Setting the OS name for Steam failed."; return 1; } + sudo "$OS_NAME_SCRIPT" || { err "Setting Steamify's version for Steam failed."; return 1; } if [[ -f "$LIMINE_DEFAULTS" ]] && ! grep -q '^TARGET_OS_NAME=' "$LIMINE_DEFAULTS"; then backup_file "$LIMINE_DEFAULTS" printf '%s\n' 'TARGET_OS_NAME="CachyOS"' | sudo tee -a "$LIMINE_DEFAULTS" > /dev/null @@ -44,10 +62,11 @@ os_name_enable() { os_name_disable() { sudo rm -f "$OS_NAME_HOOK" "$OS_NAME_SCRIPT" - [[ -f /etc/os-release ]] && sudo sed -i -e '/^VARIANT=/d' -e '/^VARIANT_ID=/d' -e '/^VERSION_ID=/d' /etc/os-release + [[ -f /etc/os-release ]] && sudo sed -i -e '/^VARIANT=/d' -e '/^VARIANT_ID=/d' -e '/^VERSION_ID=/d' -e '/^VERSION_CODENAME=/d' /etc/os-release # CachyOS's own values back, the way its hooks write them. if [[ -x /usr/share/libalpm/scripts/cachyos-branding ]]; then sudo /usr/share/libalpm/scripts/cachyos-branding os-release + # Undoes 2.9.0 pre-releases, which changed lsb-release's name too. sudo /usr/share/libalpm/scripts/cachyos-branding lsb-release fi if [[ -n "$(state_get gaming limine_target)" ]]; then @@ -86,9 +105,6 @@ gaming_enable() { esac create_desktop_shortcut steam_enable - # System Settings' About this System: the name KInfoCenter shows instead - # of os-release's (package-owned, so not edited). - kset gaming kcm-about-distrorc General Name "CachyOS Linux with Steamify" os_name_enable || return 1 } diff --git a/patches/README.md b/patches/README.md index 256f41c..a96e31d 100644 --- a/patches/README.md +++ b/patches/README.md @@ -13,5 +13,5 @@ read and reviewed on their own. `lib/*.sh` reads them with `patch_file | `steamify-fremont-poweroff.dkms.conf`, `steamify-cros-ec-cec.dkms.conf` | `lib/fremont-poweroff.sh`, `lib/cec.sh` | The DKMS modules' `dkms.conf` (`fill NAME=... VERSION=...`) | | `steam-shortcuts.py` | `lib/steam-game.sh` (Add as non-Steam game) | Reads and writes Steam's binary `shortcuts.vdf` (find, add or update, remove) | | `steamify-notifier.py` | `lib/update-notifier.sh` (Update notifications) | The daily check: notification and tray icon when there's a new release | -| `steamify-os-release.sh`, `steamify-os-release.hook` | `lib/login-manager.sh` (SteamOS conversion) | Sets the OS name Steam shows ("CachyOS with Steamify": `DISTRIB_DESCRIPTION` in `/etc/lsb-release`, which `lsb_release -d` gives Steam; never `/etc/os-release`, whose `PRETTY_NAME` limine-snapper-sync needs); the pacman hook runs it again after cachyos-hooks resets it (`fill SCRIPT=...`) | +| `steamify-os-release.sh`, `steamify-os-release.hook` | `lib/login-manager.sh` (SteamOS conversion) | Steamify as the OS variant and version, and the SteamOS release it follows as the codename, for Steam's System settings (`VARIANT`, `VERSION_ID`, `VERSION_CODENAME` in `/etc/os-release`; the OS name stays CachyOS's); the pacman hook runs it again after cachyos-hooks (`fill SCRIPT=... VERSION=... CODENAME=...`) | | `cros-ec-cec-single-port.patch` | `lib/cec.sh` (HDMI-CEC) | Makes Valve's Steam Machine CEC driver find amdgpu's HDMI port | diff --git a/patches/steamify-os-release.hook b/patches/steamify-os-release.hook index c4ce503..3aba938 100644 --- a/patches/steamify-os-release.hook +++ b/patches/steamify-os-release.hook @@ -1,15 +1,14 @@ # Installed by Steamify CachyOS (SteamOS conversion): runs after -# cachyos-hooks' lsb-release/cachyos-branding hooks (hooks run in file name +# cachyos-hooks' os-release/cachyos-branding hooks (hooks run in file name # order). [Trigger] Operation = Install Operation = Upgrade Type = Package Target = filesystem -Target = lsb-release Target = cachyos-hooks [Action] -Description = Steamify: the OS name Steam shows (CachyOS with Steamify) +Description = Steamify: the OS variant and version Steam shows When = PostTransaction Exec = @SCRIPT@ diff --git a/patches/steamify-os-release.sh b/patches/steamify-os-release.sh index 07d4def..5a35ad4 100644 --- a/patches/steamify-os-release.sh +++ b/patches/steamify-os-release.sh @@ -1,11 +1,11 @@ #!/bin/sh # Installed by Steamify CachyOS (SteamOS conversion): what Steam shows in its -# System settings. The OS name is `lsb_release -d` (DISTRIB_DESCRIPTION in -# /etc/lsb-release); the version comes from /etc/os-release's VARIANT and -# VERSION_ID. CachyOS's hooks reset lsb-release on updates of lsb-release and -# cachyos-hooks; the zz-steamify-os-release hook runs this after them. -# os-release's NAME and PRETTY_NAME stay CachyOS's: limine-snapper-sync finds -# the boot entries by the OS name. -sed -i 's|^DISTRIB_DESCRIPTION=.*$|DISTRIB_DESCRIPTION="CachyOS with Steamify"|' /etc/lsb-release -sed -i -e '/^VARIANT=/d' -e '/^VARIANT_ID=/d' -e '/^VERSION_ID=/d' /etc/os-release -printf '%s\n' 'VARIANT="Steamify"' 'VARIANT_ID=steamify' 'VERSION_ID=@VERSION@' >> /etc/os-release +# System settings besides the OS name, which stays CachyOS's: Steamify as the +# variant and version, and the SteamOS release it follows as the codename +# (/etc/os-release's VARIANT, VERSION_ID, VERSION_CODENAME). NAME and +# PRETTY_NAME are never touched: limine-snapper-sync finds the boot entries by +# the OS name. The zz-steamify-os-release hook runs this after cachyos-hooks. +sed -i -e '/^VARIANT=/d' -e '/^VARIANT_ID=/d' -e '/^VERSION_ID=/d' -e '/^VERSION_CODENAME=/d' /etc/os-release +printf '%s\n' 'VARIANT="Steamify @VERSION@"' 'VARIANT_ID=steamify' 'VERSION_ID=@VERSION@' >> /etc/os-release +[ -n "@CODENAME@" ] && echo 'VERSION_CODENAME=@CODENAME@' >> /etc/os-release +exit 0