scripts: install the Linux prerequisites in one command (BUILD-LINUX-DEPS-INSTALLER) #1140

Merged
PierreEbele merged 2 commits from upstream-pr/1140 into main 2026-12-01 15:14:22 +00:00
PierreEbele commented 2026-11-24 19:10:33 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-24T19:10:33Z.


Claimed in the coordination issue as: BUILD-LINUX-DEPS-INSTALLER (#14)

scripts/install_deps_linux.sh installs what docs/linux.md lists, in one command:

  • apt (Debian, Ubuntu and derivatives), dnf (Fedora) or pacman (Arch);
  • on apt, the newest llvm-21 or later the system's own sources have (llvm-22 on Debian 12 and 13, llvm-21 on Ubuntu 22.04 and 24.04, llvm-22 on 26.04), so no extra repository is needed;
  • optional packages (.NET SDK, ffmpeg, zenity, Tk) only where the distribution has them, with one warning line otherwise;
  • shows the commands and asks first; --dry-run only shows them, --yes doesn't ask, --minimal leaves the optional ones out;
  • afterwards it checks what the build needs: Python 3.12+, llvm-mc 21+ with AMDGPU, spirv-as/spirv-val, CMake 3.24+, Ninja, a C++ compiler, the Vulkan headers.

It touches nothing of the game and downloads only distribution packages. docs/linux.md gets one paragraph pointing at it, above the manual list (left as it was).

Tested (containers, as root):

  • debian:trixie, full install with --yes --minimal: every check ok (llvm-mc-22).
  • debian:bookworm, full install: everything installs; the check reports Python 3.11 as too old, as it should.
  • ubuntu:22.04, ubuntu:24.04, ubuntu:26.04, fedora:latest (45), archlinux:latest: --dry-run picks the expected packages.
  • A Debian 13 based desktop, --dry-run with sudo.

AI-assisted (Claude Code).

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5478619134 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1140). Originally posted by [PierreEbele](https://github.com/PierreEbele) on 2026-11-24T19:10:33Z. --- Claimed in the coordination issue as: BUILD-LINUX-DEPS-INSTALLER (#14) `scripts/install_deps_linux.sh` installs what `docs/linux.md` lists, in one command: - apt (Debian, Ubuntu and derivatives), dnf (Fedora) or pacman (Arch); - on apt, the newest `llvm-21` or later the system's own sources have (`llvm-22` on Debian 12 and 13, `llvm-21` on Ubuntu 22.04 and 24.04, `llvm-22` on 26.04), so no extra repository is needed; - optional packages (.NET SDK, ffmpeg, zenity, Tk) only where the distribution has them, with one warning line otherwise; - shows the commands and asks first; `--dry-run` only shows them, `--yes` doesn't ask, `--minimal` leaves the optional ones out; - afterwards it checks what the build needs: Python 3.12+, llvm-mc 21+ with AMDGPU, `spirv-as`/`spirv-val`, CMake 3.24+, Ninja, a C++ compiler, the Vulkan headers. It touches nothing of the game and downloads only distribution packages. `docs/linux.md` gets one paragraph pointing at it, above the manual list (left as it was). **Tested** (containers, as root): - `debian:trixie`, full install with `--yes --minimal`: every check ok (llvm-mc-22). - `debian:bookworm`, full install: everything installs; the check reports Python 3.11 as too old, as it should. - `ubuntu:22.04`, `ubuntu:24.04`, `ubuntu:26.04`, `fedora:latest` (45), `archlinux:latest`: `--dry-run` picks the expected packages. - A Debian 13 based desktop, `--dry-run` with sudo. AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
abnalstlll-byte commented 2026-11-24 19:25:06 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T19:25:06Z.

Review: APPROVED


Reviewed and verified. Adds scripts/install_deps_linux.sh supporting apt, dnf, and pacman with --dry-run, --minimal, and post-install tool verification for Python, LLVM/AMDGPU, SPIRV-Tools, and CMake. Clean-room compliant.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6045877563 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1140#pullrequestreview-6045877563). Originally posted by [abnalstlll-byte](https://github.com/abnalstlll-byte) on 2026-11-24T19:25:06Z. **Review:** APPROVED --- Reviewed and verified. Adds `scripts/install_deps_linux.sh` supporting apt, dnf, and pacman with `--dry-run`, `--minimal`, and post-install tool verification for Python, LLVM/AMDGPU, SPIRV-Tools, and CMake. Clean-room compliant.
Deedlyy commented 2026-11-24 20:13:58 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Deedlyy on 2026-11-24T20:13:58Z.


Recommendation: [WAIT]

Reasoning: Adds scripts/install_deps_linux.sh, a one-command prerequisite installer for apt/dnf/pacman with --dry-run, --yes and --minimal that asks before installing. Useful, but it runs privileged package installs and has no tests and no independent run. Before merging, someone should post --dry-run output (and ideally a real run) from at least one distro per package manager to confirm the package names and LLVM selection logic. CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict with main.

Impact level: 3/10

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7143226569 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1140#issuecomment-7143226569). Originally posted by [Deedlyy](https://github.com/Deedlyy) on 2026-11-24T20:13:58Z. --- **Recommendation:** [WAIT] **Reasoning:** Adds `scripts/install_deps_linux.sh`, a one-command prerequisite installer for apt/dnf/pacman with `--dry-run`, `--yes` and `--minimal` that asks before installing. Useful, but it runs privileged package installs and has no tests and no independent run. Before merging, someone should post `--dry-run` output (and ideally a real run) from at least one distro per package manager to confirm the package names and LLVM selection logic. CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict with `main`. **Impact level:** 3/10
xel1uz commented 2026-11-24 20:39:03 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by xel1uz on 2026-11-24T20:39:03Z.

Review: COMMENTED


With empty apt lists, the installer runs apt-get update before the first prompt. I reproduced this on Ubuntu 26.04.1 (apt 3.2.1) using a temporary apt index and a local file: package source. Answering n on this revision still changed the index.

These four suggestions go together. They ask before refreshing an empty index, then show the resolved packages and ask before installing. With the fix, n, Enter, and EOF each produced zero apt-get calls and left the index contents and modification times unchanged. Answering yes then no refreshed once and skipped installation. I also checked --dry-run and --yes. The refresh used real apt; installs were simulated.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6047030165 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1140#pullrequestreview-6047030165). Originally posted by [xel1uz](https://github.com/xel1uz) on 2026-11-24T20:39:03Z. **Review:** COMMENTED --- With empty apt lists, the installer runs `apt-get update` before the first prompt. I reproduced this on Ubuntu 26.04.1 (apt 3.2.1) using a temporary apt index and a local `file:` package source. Answering `n` on this revision still changed the index. These four suggestions go together. They ask before refreshing an empty index, then show the resolved packages and ask before installing. With the fix, `n`, Enter, and EOF each produced zero `apt-get` calls and left the index contents and modification times unchanged. Answering yes then no refreshed once and skipped installation. I also checked `--dry-run` and `--yes`. The refresh used real apt; installs were simulated.
xel1uz commented 2026-11-24 20:39:03 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by xel1uz on 2026-11-24T20:39:03Z.

Code review location: scripts/install_deps_linux.sh; line 60

@@ -0,0 +1,165 @@
+#!/usr/bin/env bash
+# Installs the Linux prerequisites of docs/linux.md ("Build the port") with the distribution's package manager:
+# Python 3.12+, llvm-mc 21+ with the AMDGPU target, SPIRV-Tools, CMake, Ninja, a C++ compiler and the Vulkan
+# headers and loader, plus the optional ones (.NET SDK, ffmpeg, zenity, Tk) where the distribution packages them.
+#
+#   scripts/install_deps_linux.sh             show what it will do, ask, then install
+#   scripts/install_deps_linux.sh --dry-run   only show the commands
+#   scripts/install_deps_linux.sh --yes       don't ask
+#   scripts/install_deps_linux.sh --minimal   leave out .NET, ffmpeg, zenity and Tk
+#
+# Supported: apt (Debian, Ubuntu and derivatives such as Parrot or Kali), dnf (Fedora), pacman (Arch). On apt it takes
+# the newest llvm-21 or later the system's own sources have (in November 2026: llvm-22 on Debian 12 and 13, llvm-21 on
+# Ubuntu 22.04 and 24.04, llvm-22 on Ubuntu 26.04), so no extra repository is needed. When the install is done it
+# checks what the build needs, Python 3.12+ included (Debian 12 and Ubuntu 22.04 ship 3.11 and 3.10).
+#
+# Nothing of the game is downloaded or touched; packages come from the distribution only.
+set -euo pipefail
+
+LLVM_MIN=21
+LLVM_TRY=(23 22 21)
+
+dry_run=0
+assume_yes=0
+minimal=0
+for arg in "$@"; do
+    case "$arg" in
+        --dry-run) dry_run=1 ;;
+        --yes|-y) assume_yes=1 ;;
+        --minimal) minimal=1 ;;
+        -h|--help) sed -n '2,16p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;;
+        *) echo "Unknown option: $arg (see --help)" >&2; exit 2 ;;
+    esac
+done
+
+say() { printf '%s\n' "$*"; }
+warn() { printf 'warning: %s\n' "$*" >&2; }
+die() { printf 'error: %s\n' "$*" >&2; exit 1; }
+
+if [ "$(id -u)" -eq 0 ]; then
+    SUDO=()
+elif command -v sudo >/dev/null 2>&1; then
+    SUDO=(sudo)
+else
+    die "run this as root or install sudo"
+fi
+
+SU=${SUDO[*]:+${SUDO[*]} }
+
+# Commands are collected first, shown, and run only after the user agrees.
+PLAN=()
+plan() { PLAN+=("$*"); }
+
+[ -r /etc/os-release ] || die "/etc/os-release is missing; see docs/linux.md for the package list"
+# shellcheck disable=SC1091
+. /etc/os-release
+ID=${ID:-unknown}
+ID_LIKE=${ID_LIKE:-}
+is_like() { case " $ID $ID_LIKE " in *" $1 "*) return 0 ;; esac; return 1; }
+
+apt_has() { apt-cache show "$1" >/dev/null 2>&1; }

confirm() {
    local answer
    [ "$assume_yes" -eq 1 ] && return 0
    read -r -p "$1 [y/N] " answer || return 1
    case "$answer" in y|Y|yes|o|O|oui) return 0 ;; *) return 1 ;; esac
}

apt_has() { apt-cache show "$1" >/dev/null 2>&1; }
<!-- greyfinch-sync:ubiquitarianism/leonida:review-comment:4686236882 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1140#discussion_r4686236882). Originally posted by [xel1uz](https://github.com/xel1uz) on 2026-11-24T20:39:03Z. **Code review location:** `scripts/install_deps_linux.sh`; line 60 ~~~~diff @@ -0,0 +1,165 @@ +#!/usr/bin/env bash +# Installs the Linux prerequisites of docs/linux.md ("Build the port") with the distribution's package manager: +# Python 3.12+, llvm-mc 21+ with the AMDGPU target, SPIRV-Tools, CMake, Ninja, a C++ compiler and the Vulkan +# headers and loader, plus the optional ones (.NET SDK, ffmpeg, zenity, Tk) where the distribution packages them. +# +# scripts/install_deps_linux.sh show what it will do, ask, then install +# scripts/install_deps_linux.sh --dry-run only show the commands +# scripts/install_deps_linux.sh --yes don't ask +# scripts/install_deps_linux.sh --minimal leave out .NET, ffmpeg, zenity and Tk +# +# Supported: apt (Debian, Ubuntu and derivatives such as Parrot or Kali), dnf (Fedora), pacman (Arch). On apt it takes +# the newest llvm-21 or later the system's own sources have (in November 2026: llvm-22 on Debian 12 and 13, llvm-21 on +# Ubuntu 22.04 and 24.04, llvm-22 on Ubuntu 26.04), so no extra repository is needed. When the install is done it +# checks what the build needs, Python 3.12+ included (Debian 12 and Ubuntu 22.04 ship 3.11 and 3.10). +# +# Nothing of the game is downloaded or touched; packages come from the distribution only. +set -euo pipefail + +LLVM_MIN=21 +LLVM_TRY=(23 22 21) + +dry_run=0 +assume_yes=0 +minimal=0 +for arg in "$@"; do + case "$arg" in + --dry-run) dry_run=1 ;; + --yes|-y) assume_yes=1 ;; + --minimal) minimal=1 ;; + -h|--help) sed -n '2,16p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;; + *) echo "Unknown option: $arg (see --help)" >&2; exit 2 ;; + esac +done + +say() { printf '%s\n' "$*"; } +warn() { printf 'warning: %s\n' "$*" >&2; } +die() { printf 'error: %s\n' "$*" >&2; exit 1; } + +if [ "$(id -u)" -eq 0 ]; then + SUDO=() +elif command -v sudo >/dev/null 2>&1; then + SUDO=(sudo) +else + die "run this as root or install sudo" +fi + +SU=${SUDO[*]:+${SUDO[*]} } + +# Commands are collected first, shown, and run only after the user agrees. +PLAN=() +plan() { PLAN+=("$*"); } + +[ -r /etc/os-release ] || die "/etc/os-release is missing; see docs/linux.md for the package list" +# shellcheck disable=SC1091 +. /etc/os-release +ID=${ID:-unknown} +ID_LIKE=${ID_LIKE:-} +is_like() { case " $ID $ID_LIKE " in *" $1 "*) return 0 ;; esac; return 1; } + +apt_has() { apt-cache show "$1" >/dev/null 2>&1; } ~~~~ --- ```suggestion confirm() { local answer [ "$assume_yes" -eq 1 ] && return 0 read -r -p "$1 [y/N] " answer || return 1 case "$answer" in y|Y|yes|o|O|oui) return 0 ;; *) return 1 ;; esac } apt_has() { apt-cache show "$1" >/dev/null 2>&1; } ```
xel1uz commented 2026-11-24 20:39:03 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by xel1uz on 2026-11-24T20:39:03Z.

Code review location: scripts/install_deps_linux.sh; line 71

@@ -0,0 +1,165 @@
+#!/usr/bin/env bash
+# Installs the Linux prerequisites of docs/linux.md ("Build the port") with the distribution's package manager:
+# Python 3.12+, llvm-mc 21+ with the AMDGPU target, SPIRV-Tools, CMake, Ninja, a C++ compiler and the Vulkan
+# headers and loader, plus the optional ones (.NET SDK, ffmpeg, zenity, Tk) where the distribution packages them.
+#
+#   scripts/install_deps_linux.sh             show what it will do, ask, then install
+#   scripts/install_deps_linux.sh --dry-run   only show the commands
+#   scripts/install_deps_linux.sh --yes       don't ask
+#   scripts/install_deps_linux.sh --minimal   leave out .NET, ffmpeg, zenity and Tk
+#
+# Supported: apt (Debian, Ubuntu and derivatives such as Parrot or Kali), dnf (Fedora), pacman (Arch). On apt it takes
+# the newest llvm-21 or later the system's own sources have (in November 2026: llvm-22 on Debian 12 and 13, llvm-21 on
+# Ubuntu 22.04 and 24.04, llvm-22 on Ubuntu 26.04), so no extra repository is needed. When the install is done it
+# checks what the build needs, Python 3.12+ included (Debian 12 and Ubuntu 22.04 ship 3.11 and 3.10).
+#
+# Nothing of the game is downloaded or touched; packages come from the distribution only.
+set -euo pipefail
+
+LLVM_MIN=21
+LLVM_TRY=(23 22 21)
+
+dry_run=0
+assume_yes=0
+minimal=0
+for arg in "$@"; do
+    case "$arg" in
+        --dry-run) dry_run=1 ;;
+        --yes|-y) assume_yes=1 ;;
+        --minimal) minimal=1 ;;
+        -h|--help) sed -n '2,16p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;;
+        *) echo "Unknown option: $arg (see --help)" >&2; exit 2 ;;
+    esac
+done
+
+say() { printf '%s\n' "$*"; }
+warn() { printf 'warning: %s\n' "$*" >&2; }
+die() { printf 'error: %s\n' "$*" >&2; exit 1; }
+
+if [ "$(id -u)" -eq 0 ]; then
+    SUDO=()
+elif command -v sudo >/dev/null 2>&1; then
+    SUDO=(sudo)
+else
+    die "run this as root or install sudo"
+fi
+
+SU=${SUDO[*]:+${SUDO[*]} }
+
+# Commands are collected first, shown, and run only after the user agrees.
+PLAN=()
+plan() { PLAN+=("$*"); }
+
+[ -r /etc/os-release ] || die "/etc/os-release is missing; see docs/linux.md for the package list"
+# shellcheck disable=SC1091
+. /etc/os-release
+ID=${ID:-unknown}
+ID_LIKE=${ID_LIKE:-}
+is_like() { case " $ID $ID_LIKE " in *" $1 "*) return 0 ;; esac; return 1; }
+
+apt_has() { apt-cache show "$1" >/dev/null 2>&1; }
+
+setup_apt() {
+    local llvm="" v
+    # Package lists that were never fetched (a fresh container) would make every package look missing.
+    if ! apt_has git; then
+        if [ "$dry_run" -eq 1 ]; then
+            die "apt has no package lists yet; run '${SU}apt-get update' first"
+        fi
+        say "+ ${SU}apt-get update"
+        "${SUDO[@]}" apt-get update
+    fi

        say "Package lists are needed to choose an LLVM version: ${SU}apt-get update"
        confirm "Refresh the package lists now?" || { say "Nothing installed."; exit 1; }
        say "+ ${SU}apt-get update"
        "${SUDO[@]}" apt-get update
    else
        plan "${SU}apt-get update"
    fi
<!-- greyfinch-sync:ubiquitarianism/leonida:review-comment:4686236902 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1140#discussion_r4686236902). Originally posted by [xel1uz](https://github.com/xel1uz) on 2026-11-24T20:39:03Z. **Code review location:** `scripts/install_deps_linux.sh`; line 71 ~~~~diff @@ -0,0 +1,165 @@ +#!/usr/bin/env bash +# Installs the Linux prerequisites of docs/linux.md ("Build the port") with the distribution's package manager: +# Python 3.12+, llvm-mc 21+ with the AMDGPU target, SPIRV-Tools, CMake, Ninja, a C++ compiler and the Vulkan +# headers and loader, plus the optional ones (.NET SDK, ffmpeg, zenity, Tk) where the distribution packages them. +# +# scripts/install_deps_linux.sh show what it will do, ask, then install +# scripts/install_deps_linux.sh --dry-run only show the commands +# scripts/install_deps_linux.sh --yes don't ask +# scripts/install_deps_linux.sh --minimal leave out .NET, ffmpeg, zenity and Tk +# +# Supported: apt (Debian, Ubuntu and derivatives such as Parrot or Kali), dnf (Fedora), pacman (Arch). On apt it takes +# the newest llvm-21 or later the system's own sources have (in November 2026: llvm-22 on Debian 12 and 13, llvm-21 on +# Ubuntu 22.04 and 24.04, llvm-22 on Ubuntu 26.04), so no extra repository is needed. When the install is done it +# checks what the build needs, Python 3.12+ included (Debian 12 and Ubuntu 22.04 ship 3.11 and 3.10). +# +# Nothing of the game is downloaded or touched; packages come from the distribution only. +set -euo pipefail + +LLVM_MIN=21 +LLVM_TRY=(23 22 21) + +dry_run=0 +assume_yes=0 +minimal=0 +for arg in "$@"; do + case "$arg" in + --dry-run) dry_run=1 ;; + --yes|-y) assume_yes=1 ;; + --minimal) minimal=1 ;; + -h|--help) sed -n '2,16p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;; + *) echo "Unknown option: $arg (see --help)" >&2; exit 2 ;; + esac +done + +say() { printf '%s\n' "$*"; } +warn() { printf 'warning: %s\n' "$*" >&2; } +die() { printf 'error: %s\n' "$*" >&2; exit 1; } + +if [ "$(id -u)" -eq 0 ]; then + SUDO=() +elif command -v sudo >/dev/null 2>&1; then + SUDO=(sudo) +else + die "run this as root or install sudo" +fi + +SU=${SUDO[*]:+${SUDO[*]} } + +# Commands are collected first, shown, and run only after the user agrees. +PLAN=() +plan() { PLAN+=("$*"); } + +[ -r /etc/os-release ] || die "/etc/os-release is missing; see docs/linux.md for the package list" +# shellcheck disable=SC1091 +. /etc/os-release +ID=${ID:-unknown} +ID_LIKE=${ID_LIKE:-} +is_like() { case " $ID $ID_LIKE " in *" $1 "*) return 0 ;; esac; return 1; } + +apt_has() { apt-cache show "$1" >/dev/null 2>&1; } + +setup_apt() { + local llvm="" v + # Package lists that were never fetched (a fresh container) would make every package look missing. + if ! apt_has git; then + if [ "$dry_run" -eq 1 ]; then + die "apt has no package lists yet; run '${SU}apt-get update' first" + fi + say "+ ${SU}apt-get update" + "${SUDO[@]}" apt-get update + fi ~~~~ --- ```suggestion say "Package lists are needed to choose an LLVM version: ${SU}apt-get update" confirm "Refresh the package lists now?" || { say "Nothing installed."; exit 1; } say "+ ${SU}apt-get update" "${SUDO[@]}" apt-get update else plan "${SU}apt-get update" fi ```
xel1uz commented 2026-11-24 20:39:03 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by xel1uz on 2026-11-24T20:39:03Z.

Code review location: scripts/install_deps_linux.sh; line 88

@@ -0,0 +1,165 @@
+#!/usr/bin/env bash
+# Installs the Linux prerequisites of docs/linux.md ("Build the port") with the distribution's package manager:
+# Python 3.12+, llvm-mc 21+ with the AMDGPU target, SPIRV-Tools, CMake, Ninja, a C++ compiler and the Vulkan
+# headers and loader, plus the optional ones (.NET SDK, ffmpeg, zenity, Tk) where the distribution packages them.
+#
+#   scripts/install_deps_linux.sh             show what it will do, ask, then install
+#   scripts/install_deps_linux.sh --dry-run   only show the commands
+#   scripts/install_deps_linux.sh --yes       don't ask
+#   scripts/install_deps_linux.sh --minimal   leave out .NET, ffmpeg, zenity and Tk
+#
+# Supported: apt (Debian, Ubuntu and derivatives such as Parrot or Kali), dnf (Fedora), pacman (Arch). On apt it takes
+# the newest llvm-21 or later the system's own sources have (in November 2026: llvm-22 on Debian 12 and 13, llvm-21 on
+# Ubuntu 22.04 and 24.04, llvm-22 on Ubuntu 26.04), so no extra repository is needed. When the install is done it
+# checks what the build needs, Python 3.12+ included (Debian 12 and Ubuntu 22.04 ship 3.11 and 3.10).
+#
+# Nothing of the game is downloaded or touched; packages come from the distribution only.
+set -euo pipefail
+
+LLVM_MIN=21
+LLVM_TRY=(23 22 21)
+
+dry_run=0
+assume_yes=0
+minimal=0
+for arg in "$@"; do
+    case "$arg" in
+        --dry-run) dry_run=1 ;;
+        --yes|-y) assume_yes=1 ;;
+        --minimal) minimal=1 ;;
+        -h|--help) sed -n '2,16p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;;
+        *) echo "Unknown option: $arg (see --help)" >&2; exit 2 ;;
+    esac
+done
+
+say() { printf '%s\n' "$*"; }
+warn() { printf 'warning: %s\n' "$*" >&2; }
+die() { printf 'error: %s\n' "$*" >&2; exit 1; }
+
+if [ "$(id -u)" -eq 0 ]; then
+    SUDO=()
+elif command -v sudo >/dev/null 2>&1; then
+    SUDO=(sudo)
+else
+    die "run this as root or install sudo"
+fi
+
+SU=${SUDO[*]:+${SUDO[*]} }
+
+# Commands are collected first, shown, and run only after the user agrees.
+PLAN=()
+plan() { PLAN+=("$*"); }
+
+[ -r /etc/os-release ] || die "/etc/os-release is missing; see docs/linux.md for the package list"
+# shellcheck disable=SC1091
+. /etc/os-release
+ID=${ID:-unknown}
+ID_LIKE=${ID_LIKE:-}
+is_like() { case " $ID $ID_LIKE " in *" $1 "*) return 0 ;; esac; return 1; }
+
+apt_has() { apt-cache show "$1" >/dev/null 2>&1; }
+
+setup_apt() {
+    local llvm="" v
+    # Package lists that were never fetched (a fresh container) would make every package look missing.
+    if ! apt_has git; then
+        if [ "$dry_run" -eq 1 ]; then
+            die "apt has no package lists yet; run '${SU}apt-get update' first"
+        fi
+        say "+ ${SU}apt-get update"
+        "${SUDO[@]}" apt-get update
+    fi
+    for v in "${LLVM_TRY[@]}"; do
+        if apt_has "llvm-$v"; then llvm=$v; break; fi
+    done
+    [ -n "$llvm" ] || die "no llvm-$LLVM_MIN or newer in your apt sources; add LLVM's own repository (https://apt.llvm.org) and run this again"
+    local pkgs=(git python3 "llvm-$llvm" spirv-tools cmake ninja-build g++ libvulkan-dev)
+    local optional=()
+    if [ "$minimal" -eq 0 ]; then
+        for p in ffmpeg zenity python3-tk; do
+            if apt_has "$p"; then optional+=("$p"); else warn "$p isn't packaged here; skipped (optional)"; fi
+        done
+        if apt_has dotnet-sdk-10.0; then optional+=(dotnet-sdk-10.0)
+        elif apt_has dotnet-sdk-8.0; then optional+=(dotnet-sdk-8.0)
+        else warn ".NET SDK isn't packaged here; the assets stage needs it: https://learn.microsoft.com/dotnet/core/install/linux"
+        fi
+    fi
+    plan "${SU}apt-get update"
+    plan "${SU}apt-get install -y ${pkgs[*]} ${optional[*]}"

    plan "${SU}apt-get install -y ${pkgs[*]} ${optional[*]}"
<!-- greyfinch-sync:ubiquitarianism/leonida:review-comment:4686236920 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1140#discussion_r4686236920). Originally posted by [xel1uz](https://github.com/xel1uz) on 2026-11-24T20:39:03Z. **Code review location:** `scripts/install_deps_linux.sh`; line 88 ~~~~diff @@ -0,0 +1,165 @@ +#!/usr/bin/env bash +# Installs the Linux prerequisites of docs/linux.md ("Build the port") with the distribution's package manager: +# Python 3.12+, llvm-mc 21+ with the AMDGPU target, SPIRV-Tools, CMake, Ninja, a C++ compiler and the Vulkan +# headers and loader, plus the optional ones (.NET SDK, ffmpeg, zenity, Tk) where the distribution packages them. +# +# scripts/install_deps_linux.sh show what it will do, ask, then install +# scripts/install_deps_linux.sh --dry-run only show the commands +# scripts/install_deps_linux.sh --yes don't ask +# scripts/install_deps_linux.sh --minimal leave out .NET, ffmpeg, zenity and Tk +# +# Supported: apt (Debian, Ubuntu and derivatives such as Parrot or Kali), dnf (Fedora), pacman (Arch). On apt it takes +# the newest llvm-21 or later the system's own sources have (in November 2026: llvm-22 on Debian 12 and 13, llvm-21 on +# Ubuntu 22.04 and 24.04, llvm-22 on Ubuntu 26.04), so no extra repository is needed. When the install is done it +# checks what the build needs, Python 3.12+ included (Debian 12 and Ubuntu 22.04 ship 3.11 and 3.10). +# +# Nothing of the game is downloaded or touched; packages come from the distribution only. +set -euo pipefail + +LLVM_MIN=21 +LLVM_TRY=(23 22 21) + +dry_run=0 +assume_yes=0 +minimal=0 +for arg in "$@"; do + case "$arg" in + --dry-run) dry_run=1 ;; + --yes|-y) assume_yes=1 ;; + --minimal) minimal=1 ;; + -h|--help) sed -n '2,16p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;; + *) echo "Unknown option: $arg (see --help)" >&2; exit 2 ;; + esac +done + +say() { printf '%s\n' "$*"; } +warn() { printf 'warning: %s\n' "$*" >&2; } +die() { printf 'error: %s\n' "$*" >&2; exit 1; } + +if [ "$(id -u)" -eq 0 ]; then + SUDO=() +elif command -v sudo >/dev/null 2>&1; then + SUDO=(sudo) +else + die "run this as root or install sudo" +fi + +SU=${SUDO[*]:+${SUDO[*]} } + +# Commands are collected first, shown, and run only after the user agrees. +PLAN=() +plan() { PLAN+=("$*"); } + +[ -r /etc/os-release ] || die "/etc/os-release is missing; see docs/linux.md for the package list" +# shellcheck disable=SC1091 +. /etc/os-release +ID=${ID:-unknown} +ID_LIKE=${ID_LIKE:-} +is_like() { case " $ID $ID_LIKE " in *" $1 "*) return 0 ;; esac; return 1; } + +apt_has() { apt-cache show "$1" >/dev/null 2>&1; } + +setup_apt() { + local llvm="" v + # Package lists that were never fetched (a fresh container) would make every package look missing. + if ! apt_has git; then + if [ "$dry_run" -eq 1 ]; then + die "apt has no package lists yet; run '${SU}apt-get update' first" + fi + say "+ ${SU}apt-get update" + "${SUDO[@]}" apt-get update + fi + for v in "${LLVM_TRY[@]}"; do + if apt_has "llvm-$v"; then llvm=$v; break; fi + done + [ -n "$llvm" ] || die "no llvm-$LLVM_MIN or newer in your apt sources; add LLVM's own repository (https://apt.llvm.org) and run this again" + local pkgs=(git python3 "llvm-$llvm" spirv-tools cmake ninja-build g++ libvulkan-dev) + local optional=() + if [ "$minimal" -eq 0 ]; then + for p in ffmpeg zenity python3-tk; do + if apt_has "$p"; then optional+=("$p"); else warn "$p isn't packaged here; skipped (optional)"; fi + done + if apt_has dotnet-sdk-10.0; then optional+=(dotnet-sdk-10.0) + elif apt_has dotnet-sdk-8.0; then optional+=(dotnet-sdk-8.0) + else warn ".NET SDK isn't packaged here; the assets stage needs it: https://learn.microsoft.com/dotnet/core/install/linux" + fi + fi + plan "${SU}apt-get update" + plan "${SU}apt-get install -y ${pkgs[*]} ${optional[*]}" ~~~~ --- ```suggestion plan "${SU}apt-get install -y ${pkgs[*]} ${optional[*]}" ```
xel1uz commented 2026-11-24 20:39:03 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by xel1uz on 2026-11-24T20:39:03Z.

Code review location: scripts/install_deps_linux.sh; line 132

@@ -0,0 +1,165 @@
+#!/usr/bin/env bash
+# Installs the Linux prerequisites of docs/linux.md ("Build the port") with the distribution's package manager:
+# Python 3.12+, llvm-mc 21+ with the AMDGPU target, SPIRV-Tools, CMake, Ninja, a C++ compiler and the Vulkan
+# headers and loader, plus the optional ones (.NET SDK, ffmpeg, zenity, Tk) where the distribution packages them.
+#
+#   scripts/install_deps_linux.sh             show what it will do, ask, then install
+#   scripts/install_deps_linux.sh --dry-run   only show the commands
+#   scripts/install_deps_linux.sh --yes       don't ask
+#   scripts/install_deps_linux.sh --minimal   leave out .NET, ffmpeg, zenity and Tk
+#
+# Supported: apt (Debian, Ubuntu and derivatives such as Parrot or Kali), dnf (Fedora), pacman (Arch). On apt it takes
+# the newest llvm-21 or later the system's own sources have (in November 2026: llvm-22 on Debian 12 and 13, llvm-21 on
+# Ubuntu 22.04 and 24.04, llvm-22 on Ubuntu 26.04), so no extra repository is needed. When the install is done it
+# checks what the build needs, Python 3.12+ included (Debian 12 and Ubuntu 22.04 ship 3.11 and 3.10).
+#
+# Nothing of the game is downloaded or touched; packages come from the distribution only.
+set -euo pipefail
+
+LLVM_MIN=21
+LLVM_TRY=(23 22 21)
+
+dry_run=0
+assume_yes=0
+minimal=0
+for arg in "$@"; do
+    case "$arg" in
+        --dry-run) dry_run=1 ;;
+        --yes|-y) assume_yes=1 ;;
+        --minimal) minimal=1 ;;
+        -h|--help) sed -n '2,16p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;;
+        *) echo "Unknown option: $arg (see --help)" >&2; exit 2 ;;
+    esac
+done
+
+say() { printf '%s\n' "$*"; }
+warn() { printf 'warning: %s\n' "$*" >&2; }
+die() { printf 'error: %s\n' "$*" >&2; exit 1; }
+
+if [ "$(id -u)" -eq 0 ]; then
+    SUDO=()
+elif command -v sudo >/dev/null 2>&1; then
+    SUDO=(sudo)
+else
+    die "run this as root or install sudo"
+fi
+
+SU=${SUDO[*]:+${SUDO[*]} }
+
+# Commands are collected first, shown, and run only after the user agrees.
+PLAN=()
+plan() { PLAN+=("$*"); }
+
+[ -r /etc/os-release ] || die "/etc/os-release is missing; see docs/linux.md for the package list"
+# shellcheck disable=SC1091
+. /etc/os-release
+ID=${ID:-unknown}
+ID_LIKE=${ID_LIKE:-}
+is_like() { case " $ID $ID_LIKE " in *" $1 "*) return 0 ;; esac; return 1; }
+
+apt_has() { apt-cache show "$1" >/dev/null 2>&1; }
+
+setup_apt() {
+    local llvm="" v
+    # Package lists that were never fetched (a fresh container) would make every package look missing.
+    if ! apt_has git; then
+        if [ "$dry_run" -eq 1 ]; then
+            die "apt has no package lists yet; run '${SU}apt-get update' first"
+        fi
+        say "+ ${SU}apt-get update"
+        "${SUDO[@]}" apt-get update
+    fi
+    for v in "${LLVM_TRY[@]}"; do
+        if apt_has "llvm-$v"; then llvm=$v; break; fi
+    done
+    [ -n "$llvm" ] || die "no llvm-$LLVM_MIN or newer in your apt sources; add LLVM's own repository (https://apt.llvm.org) and run this again"
+    local pkgs=(git python3 "llvm-$llvm" spirv-tools cmake ninja-build g++ libvulkan-dev)
+    local optional=()
+    if [ "$minimal" -eq 0 ]; then
+        for p in ffmpeg zenity python3-tk; do
+            if apt_has "$p"; then optional+=("$p"); else warn "$p isn't packaged here; skipped (optional)"; fi
+        done
+        if apt_has dotnet-sdk-10.0; then optional+=(dotnet-sdk-10.0)
+        elif apt_has dotnet-sdk-8.0; then optional+=(dotnet-sdk-8.0)
+        else warn ".NET SDK isn't packaged here; the assets stage needs it: https://learn.microsoft.com/dotnet/core/install/linux"
+        fi
+    fi
+    plan "${SU}apt-get update"
+    plan "${SU}apt-get install -y ${pkgs[*]} ${optional[*]}"
+}
+
+setup_dnf() {
+    local pkgs=(git python3 llvm spirv-tools cmake ninja-build gcc-c++ vulkan-headers vulkan-loader-devel)
+    local optional=()
+    if [ "$minimal" -eq 0 ]; then
+        for p in ffmpeg-free zenity python3-tkinter; do
+            if dnf -q info "$p" >/dev/null 2>&1; then optional+=("$p"); else warn "$p isn't available; skipped (optional)"; fi
+        done
+        if dnf -q info dotnet-sdk-10.0 >/dev/null 2>&1; then optional+=(dotnet-sdk-10.0)
+        elif dnf -q info dotnet-sdk-8.0 >/dev/null 2>&1; then optional+=(dotnet-sdk-8.0)
+        else warn ".NET SDK isn't available; the assets stage needs it"
+        fi
+    fi
+    plan "${SU}dnf install -y ${pkgs[*]} ${optional[*]}"
+}
+
+setup_pacman() {
+    local pkgs=(git python llvm spirv-tools cmake ninja gcc vulkan-headers vulkan-icd-loader)
+    [ "$minimal" -eq 0 ] && pkgs+=(dotnet-sdk ffmpeg zenity tk)
+    plan "${SU}pacman -S --needed --noconfirm ${pkgs[*]}"
+}
+
+if command -v apt-get >/dev/null 2>&1 && { is_like debian || is_like ubuntu; }; then
+    setup_apt
+elif command -v dnf >/dev/null 2>&1; then
+    setup_dnf
+elif command -v pacman >/dev/null 2>&1; then
+    setup_pacman
+else
+    die "no supported package manager (apt, dnf, pacman) on '$ID'; docs/linux.md lists what to install"
+fi
+
+say ""
+say "Detected: ${PRETTY_NAME:-$ID}"
+say "Commands:"
+for c in "${PLAN[@]}"; do say "  $c"; done
+say ""
+[ "$dry_run" -eq 1 ] && exit 0
+
+if [ "$assume_yes" -eq 0 ]; then
+    read -r -p "Run them? [y/N] " answer
+    case "$answer" in y|Y|yes|o|O|oui) ;; *) say "Nothing installed."; exit 1 ;; esac
+fi

confirm "Run them?" || { say "Nothing installed."; exit 1; }
<!-- greyfinch-sync:ubiquitarianism/leonida:review-comment:4686236937 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1140#discussion_r4686236937). Originally posted by [xel1uz](https://github.com/xel1uz) on 2026-11-24T20:39:03Z. **Code review location:** `scripts/install_deps_linux.sh`; line 132 ~~~~diff @@ -0,0 +1,165 @@ +#!/usr/bin/env bash +# Installs the Linux prerequisites of docs/linux.md ("Build the port") with the distribution's package manager: +# Python 3.12+, llvm-mc 21+ with the AMDGPU target, SPIRV-Tools, CMake, Ninja, a C++ compiler and the Vulkan +# headers and loader, plus the optional ones (.NET SDK, ffmpeg, zenity, Tk) where the distribution packages them. +# +# scripts/install_deps_linux.sh show what it will do, ask, then install +# scripts/install_deps_linux.sh --dry-run only show the commands +# scripts/install_deps_linux.sh --yes don't ask +# scripts/install_deps_linux.sh --minimal leave out .NET, ffmpeg, zenity and Tk +# +# Supported: apt (Debian, Ubuntu and derivatives such as Parrot or Kali), dnf (Fedora), pacman (Arch). On apt it takes +# the newest llvm-21 or later the system's own sources have (in November 2026: llvm-22 on Debian 12 and 13, llvm-21 on +# Ubuntu 22.04 and 24.04, llvm-22 on Ubuntu 26.04), so no extra repository is needed. When the install is done it +# checks what the build needs, Python 3.12+ included (Debian 12 and Ubuntu 22.04 ship 3.11 and 3.10). +# +# Nothing of the game is downloaded or touched; packages come from the distribution only. +set -euo pipefail + +LLVM_MIN=21 +LLVM_TRY=(23 22 21) + +dry_run=0 +assume_yes=0 +minimal=0 +for arg in "$@"; do + case "$arg" in + --dry-run) dry_run=1 ;; + --yes|-y) assume_yes=1 ;; + --minimal) minimal=1 ;; + -h|--help) sed -n '2,16p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;; + *) echo "Unknown option: $arg (see --help)" >&2; exit 2 ;; + esac +done + +say() { printf '%s\n' "$*"; } +warn() { printf 'warning: %s\n' "$*" >&2; } +die() { printf 'error: %s\n' "$*" >&2; exit 1; } + +if [ "$(id -u)" -eq 0 ]; then + SUDO=() +elif command -v sudo >/dev/null 2>&1; then + SUDO=(sudo) +else + die "run this as root or install sudo" +fi + +SU=${SUDO[*]:+${SUDO[*]} } + +# Commands are collected first, shown, and run only after the user agrees. +PLAN=() +plan() { PLAN+=("$*"); } + +[ -r /etc/os-release ] || die "/etc/os-release is missing; see docs/linux.md for the package list" +# shellcheck disable=SC1091 +. /etc/os-release +ID=${ID:-unknown} +ID_LIKE=${ID_LIKE:-} +is_like() { case " $ID $ID_LIKE " in *" $1 "*) return 0 ;; esac; return 1; } + +apt_has() { apt-cache show "$1" >/dev/null 2>&1; } + +setup_apt() { + local llvm="" v + # Package lists that were never fetched (a fresh container) would make every package look missing. + if ! apt_has git; then + if [ "$dry_run" -eq 1 ]; then + die "apt has no package lists yet; run '${SU}apt-get update' first" + fi + say "+ ${SU}apt-get update" + "${SUDO[@]}" apt-get update + fi + for v in "${LLVM_TRY[@]}"; do + if apt_has "llvm-$v"; then llvm=$v; break; fi + done + [ -n "$llvm" ] || die "no llvm-$LLVM_MIN or newer in your apt sources; add LLVM's own repository (https://apt.llvm.org) and run this again" + local pkgs=(git python3 "llvm-$llvm" spirv-tools cmake ninja-build g++ libvulkan-dev) + local optional=() + if [ "$minimal" -eq 0 ]; then + for p in ffmpeg zenity python3-tk; do + if apt_has "$p"; then optional+=("$p"); else warn "$p isn't packaged here; skipped (optional)"; fi + done + if apt_has dotnet-sdk-10.0; then optional+=(dotnet-sdk-10.0) + elif apt_has dotnet-sdk-8.0; then optional+=(dotnet-sdk-8.0) + else warn ".NET SDK isn't packaged here; the assets stage needs it: https://learn.microsoft.com/dotnet/core/install/linux" + fi + fi + plan "${SU}apt-get update" + plan "${SU}apt-get install -y ${pkgs[*]} ${optional[*]}" +} + +setup_dnf() { + local pkgs=(git python3 llvm spirv-tools cmake ninja-build gcc-c++ vulkan-headers vulkan-loader-devel) + local optional=() + if [ "$minimal" -eq 0 ]; then + for p in ffmpeg-free zenity python3-tkinter; do + if dnf -q info "$p" >/dev/null 2>&1; then optional+=("$p"); else warn "$p isn't available; skipped (optional)"; fi + done + if dnf -q info dotnet-sdk-10.0 >/dev/null 2>&1; then optional+=(dotnet-sdk-10.0) + elif dnf -q info dotnet-sdk-8.0 >/dev/null 2>&1; then optional+=(dotnet-sdk-8.0) + else warn ".NET SDK isn't available; the assets stage needs it" + fi + fi + plan "${SU}dnf install -y ${pkgs[*]} ${optional[*]}" +} + +setup_pacman() { + local pkgs=(git python llvm spirv-tools cmake ninja gcc vulkan-headers vulkan-icd-loader) + [ "$minimal" -eq 0 ] && pkgs+=(dotnet-sdk ffmpeg zenity tk) + plan "${SU}pacman -S --needed --noconfirm ${pkgs[*]}" +} + +if command -v apt-get >/dev/null 2>&1 && { is_like debian || is_like ubuntu; }; then + setup_apt +elif command -v dnf >/dev/null 2>&1; then + setup_dnf +elif command -v pacman >/dev/null 2>&1; then + setup_pacman +else + die "no supported package manager (apt, dnf, pacman) on '$ID'; docs/linux.md lists what to install" +fi + +say "" +say "Detected: ${PRETTY_NAME:-$ID}" +say "Commands:" +for c in "${PLAN[@]}"; do say " $c"; done +say "" +[ "$dry_run" -eq 1 ] && exit 0 + +if [ "$assume_yes" -eq 0 ]; then + read -r -p "Run them? [y/N] " answer + case "$answer" in y|Y|yes|o|O|oui) ;; *) say "Nothing installed."; exit 1 ;; esac +fi ~~~~ --- ```suggestion confirm "Run them?" || { say "Nothing installed."; exit 1; } ```
PierreEbele commented 2026-11-24 20:45:11 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-24T20:45:11Z.


@xel1uz thanks, you're right: the empty-index refresh ran before any prompt. Applied your four suggestions in 7eb78cf9. Checked in a debian:trixie container with empty apt lists: n and EOF exit 1 with no apt-get call and the lists directory still empty (0 files); y then n refreshes once and installs nothing; --dry-run with lists present shows apt-get update in the plan.

@Deedlyy the --dry-run outputs per package manager are in the description (Ubuntu 22.04/24.04/26.04, Fedora 45, Arch), plus full installs on Debian 12 and 13 with the post-install check.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7144009206 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1140#issuecomment-7144009206). Originally posted by [PierreEbele](https://github.com/PierreEbele) on 2026-11-24T20:45:11Z. --- @xel1uz thanks, you're right: the empty-index refresh ran before any prompt. Applied your four suggestions in 7eb78cf9. Checked in a `debian:trixie` container with empty apt lists: `n` and EOF exit 1 with no `apt-get` call and the lists directory still empty (0 files); `y` then `n` refreshes once and installs nothing; `--dry-run` with lists present shows `apt-get update` in the plan. @Deedlyy the `--dry-run` outputs per package manager are in the description (Ubuntu 22.04/24.04/26.04, Fedora 45, Arch), plus full installs on Debian 12 and 13 with the post-install check. AI-assisted.
zmasi commented 2026-11-28 23:19:11 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T23:19:11Z.


#1140 | head b72251bf2c (merged cleanly with main adfb3821a2) | bash -n scripts/install_deps_linux.sh + bash scripts/install_deps_linux.sh --help + mocked apt/dnf/pacman --dry-run & --minimal probes + python -I tests/test_docs_cli_flags.py | red on main: scripts/install_deps_linux.sh absent on main and docs/linux.md had only the manual Ubuntu apt install block | green on PR+main: bash -n exited 0, --help exited 0, invalid option exited 2, missing /etc/os-release exited 1, mocked Ubuntu apt (llvm-22 + dotnet-sdk-8.0, --minimal, and empty-apt-lists refusal rc=1), Fedora dnf, and Arch pacman --dry-run plans all matched docs/linux.md, plus 4 ran, OK (test_docs_cli_flags.py), 17 ran, OK (test_docs_links.py), 5 ran, OK (test_docs_repo_paths.py), 2 ran, OK (test_docs_table_rows.py), and 3 ran, OK (test_text_write_line_endings.py) | Windows 11 (10.0.26200.9974), Python 3.12.10, Git for Windows Bash | AI-assisted: yes

Audited b72251bf2c (scripts/install_deps_linux.sh and docs/linux.md) merged cleanly onto main (adfb3821a2) on Windows 11. Confirmed set -euo pipefail shell syntax, flag parsing (--dry-run, --yes/-y, --minimal, --help), empty-apt-index refusal under --dry-run before prompting, LLVM_TRY=(23 22 21) selection, .NET 10.0/8.0 fallback across apt and dnf, pure LF line endings, tests/test_docs_encoding.py, and scripts/check_no_game_data.py.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7247350296 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1140#issuecomment-7247350296). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T23:19:11Z. --- #1140 | head b72251bf2c4d86fac315942add9fea9a45e51ad9 (merged cleanly with main adfb3821a2) | `bash -n scripts/install_deps_linux.sh` + `bash scripts/install_deps_linux.sh --help` + mocked `apt`/`dnf`/`pacman` `--dry-run` & `--minimal` probes + `python -I tests/test_docs_cli_flags.py` | red on main: `scripts/install_deps_linux.sh` absent on `main` and `docs/linux.md` had only the manual Ubuntu `apt install` block | green on PR+main: `bash -n` exited `0`, `--help` exited `0`, invalid option exited `2`, missing `/etc/os-release` exited `1`, mocked Ubuntu `apt` (`llvm-22` + `dotnet-sdk-8.0`, `--minimal`, and empty-apt-lists refusal `rc=1`), Fedora `dnf`, and Arch `pacman` `--dry-run` plans all matched `docs/linux.md`, plus `4 ran, OK` (`test_docs_cli_flags.py`), `17 ran, OK` (`test_docs_links.py`), `5 ran, OK` (`test_docs_repo_paths.py`), `2 ran, OK` (`test_docs_table_rows.py`), and `3 ran, OK` (`test_text_write_line_endings.py`) | Windows 11 (`10.0.26200.9974`), Python 3.12.10, Git for Windows Bash | AI-assisted: yes Audited `b72251bf2c` (`scripts/install_deps_linux.sh` and `docs/linux.md`) merged cleanly onto `main` (`adfb3821a2`) on Windows 11. Confirmed `set -euo pipefail` shell syntax, flag parsing (`--dry-run`, `--yes`/`-y`, `--minimal`, `--help`), empty-apt-index refusal under `--dry-run` before prompting, `LLVM_TRY=(23 22 21)` selection, `.NET 10.0`/`8.0` fallback across `apt` and `dnf`, pure LF line endings, `tests/test_docs_encoding.py`, and `scripts/check_no_game_data.py`.
TheGeogeo commented 2026-11-29 01:13:11 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-29T01:13:11Z.


Checked b72251bf2 merged (no commit) with main 87a39df94: Python 3.12.4, Windows 11 10.0.26300, CPU only.

  • Not testable here: scripts/install_deps_linux.sh is a Linux shell script, and I did not run it. This is diff reading only.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7248639515 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1140#issuecomment-7248639515). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-29T01:13:11Z. --- Checked `b72251bf2` merged (no commit) with `main` `87a39df94`: Python 3.12.4, Windows 11 10.0.26300, CPU only. - Not testable here: `scripts/install_deps_linux.sh` is a Linux shell script, and I did not run it. This is diff reading only. AI-assisted (Claude Code).
TheGeogeo commented 2026-11-29 14:44:44 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-29T14:44:44Z.


Read at b72251bf2 against main bd643e46e (diff reading only). This answers the "no test" question.

  • A docs and installer-script change: no failing test fits the CTest or Python suites. The script installs system packages, so a red/green would mean running it with mocked package managers in a Linux shell, which is what the mocked --dry-run / --minimal run above does.
  • The script is new, so main has nothing to compare against.
  • Merges cleanly with current main.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7257542686 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1140#issuecomment-7257542686). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-29T14:44:44Z. --- Read at b72251bf2 against main bd643e46e (diff reading only). This answers the "no test" question. - A docs and installer-script change: no failing test fits the CTest or Python suites. The script installs system packages, so a red/green would mean running it with mocked package managers in a Linux shell, which is what the mocked `--dry-run` / `--minimal` run above does. - The script is new, so main has nothing to compare against. - Merges cleanly with current main. AI-assisted (Claude Code).
OreoFR commented 2026-11-29 19:17:57 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T19:17:57Z.


Read-only check by OreoFR on macOS 27.2.1 (26B131), Apple M5, main 7c330c76d, PR head b72251bf2 — not executed (apt installer, not runnable on macOS)

  • Merge: clean; does not force a rebase of #2566. bash -n scripts/install_deps_linux.sh: OK.
  • Script (READ IN CODE): set -euo pipefail; prints the command plan, asks before the apt refresh (when package lists are empty) and again before installing; --dry-run, --yes, --minimal; no curl/wget downloads; post-install check.
  • xel1uz's 4 suggestions (apt refresh before any question) are applied in 7eb78cf9; the only APPROVED review is on an older commit (5f9c1b07f).
  • Nit: pacman -S without -y does not refresh the package database.

Verdict: read-only OK (needs a run on a Linux box for a real red/green).

AI-assisted: Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7261168453 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1140#issuecomment-7261168453). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-29T19:17:57Z. --- Read-only check by OreoFR on macOS 27.2.1 (26B131), Apple M5, main 7c330c76d, PR head b72251bf2 — not executed (apt installer, not runnable on macOS) - Merge: clean; does not force a rebase of #2566. `bash -n scripts/install_deps_linux.sh`: OK. - Script (READ IN CODE): `set -euo pipefail`; prints the command plan, asks before the apt refresh (when package lists are empty) and again before installing; `--dry-run`, `--yes`, `--minimal`; no curl/wget downloads; post-install check. - xel1uz's 4 suggestions (apt refresh before any question) are applied in 7eb78cf9; the only APPROVED review is on an older commit (5f9c1b07f). - Nit: `pacman -S` without `-y` does not refresh the package database. **Verdict: read-only OK** (needs a run on a Linux box for a real red/green). AI-assisted: Claude Code
aslan2142 commented 2026-12-01 10:46:50 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T10:46:50Z.

Review: APPROVED


Reviewed scripts/install_deps_linux.sh and docs/linux.md: clean-room compliant, supports apt/dnf/pacman with --dry-run, --yes, --minimal, prompts before both empty-index refresh (addressing @xel1uz's review) and package installation, and validates the installed toolchain afterward. Merges cleanly onto main.

Not merging immediately because the Nov 24 CI run is stale/red (windows, linux-gpu-tools, translator-tests, check cancelled). Ready to merge once CI is re-run green on current main (note: LLVM_TRY=(23 22 21) already prefers llvm-23 when available; you may optionally update the LLVM 21+ note for the shaders stage to align with #1923).

(AI-assisted review.)

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6129715497 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1140#pullrequestreview-6129715497). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T10:46:50Z. **Review:** APPROVED --- Reviewed `scripts/install_deps_linux.sh` and `docs/linux.md`: clean-room compliant, supports apt/dnf/pacman with `--dry-run`, `--yes`, `--minimal`, prompts before both empty-index refresh (addressing @xel1uz's review) and package installation, and validates the installed toolchain afterward. Merges cleanly onto `main`. Not merging immediately because the Nov 24 CI run is stale/red (`windows`, `linux-gpu-tools`, `translator-tests`, `check` cancelled). Ready to merge once CI is re-run green on current `main` *(note: `LLVM_TRY=(23 22 21)` already prefers `llvm-23` when available; you may optionally update the `LLVM 21+` note for the `shaders` stage to align with #1923)*. *(AI-assisted review.)*
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!1140
No description provided.