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

Merged
leonida/mandy
PierreEbele merged 2 commits from linux-deps-installer into main 2026-12-01 15:14:22 +00:00

Pull request successfully merged and closed

PierreEbele commented 2026-11-24 19:10:33 +00:00

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

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 approved these changes 2026-11-24 19:25:06 +00:00
abnalstlll-byte left a comment

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.

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

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

**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 reviewed 2026-11-24 20:39:03 +00:00
xel1uz left a comment
No description provided.
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.
PierreEbele commented 2026-11-24 20:45:11 +00:00

@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.

@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

#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.

#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

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).

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

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).

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

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

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 approved these changes 2026-12-01 10:46:50 +00:00
aslan2142 left a comment

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.)

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 description provided.