scripts: install the Linux prerequisites in one command (BUILD-LINUX-DEPS-INSTALLER) #1140
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1140"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.shinstalls whatdocs/linux.mdlists, in one command:llvm-21or later the system's own sources have (llvm-22on Debian 12 and 13,llvm-21on Ubuntu 22.04 and 24.04,llvm-22on 26.04), so no extra repository is needed;--dry-runonly shows them,--yesdoesn't ask,--minimalleaves the optional ones out;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.mdgets 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-runpicks the expected packages.--dry-runwith sudo.AI-assisted (Claude Code).
🤖 Generated with Claude Code
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.shsupporting apt, dnf, and pacman with--dry-run,--minimal, and post-install tool verification for Python, LLVM/AMDGPU, SPIRV-Tools, and CMake. Clean-room compliant.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,--yesand--minimalthat asks before installing. Useful, but it runs privileged package installs and has no tests and no independent run. Before merging, someone should post--dry-runoutput (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 withmain.Impact level: 3/10
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 updatebefore the first prompt. I reproduced this on Ubuntu 26.04.1 (apt 3.2.1) using a temporary apt index and a localfile:package source. Answeringnon 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 zeroapt-getcalls and left the index contents and modification times unchanged. Answering yes then no refreshed once and skipped installation. I also checked--dry-runand--yes. The refresh used real apt; installs were simulated.Imported from ubiquitarianism/leonida. Originally posted by xel1uz on 2026-11-24T20:39:03Z.
Code review location:
scripts/install_deps_linux.sh; line 60Imported from ubiquitarianism/leonida. Originally posted by xel1uz on 2026-11-24T20:39:03Z.
Code review location:
scripts/install_deps_linux.sh; line 71Imported from ubiquitarianism/leonida. Originally posted by xel1uz on 2026-11-24T20:39:03Z.
Code review location:
scripts/install_deps_linux.sh; line 88Imported from ubiquitarianism/leonida. Originally posted by xel1uz on 2026-11-24T20:39:03Z.
Code review location:
scripts/install_deps_linux.sh; line 132Imported 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:trixiecontainer with empty apt lists:nand EOF exit 1 with noapt-getcall and the lists directory still empty (0 files);ythennrefreshes once and installs nothing;--dry-runwith lists present showsapt-get updatein the plan.@Deedlyy the
--dry-runoutputs 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.
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T23:19:11Z.
#1140 | head
b72251bf2c(merged cleanly with mainadfb3821a2) |bash -n scripts/install_deps_linux.sh+bash scripts/install_deps_linux.sh --help+ mockedapt/dnf/pacman--dry-run&--minimalprobes +python -I tests/test_docs_cli_flags.py| red on main:scripts/install_deps_linux.shabsent onmainanddocs/linux.mdhad only the manual Ubuntuapt installblock | green on PR+main:bash -nexited0,--helpexited0, invalid option exited2, missing/etc/os-releaseexited1, mocked Ubuntuapt(llvm-22+dotnet-sdk-8.0,--minimal, and empty-apt-lists refusalrc=1), Fedoradnf, and Archpacman--dry-runplans all matcheddocs/linux.md, plus4 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), and3 ran, OK(test_text_write_line_endings.py) | Windows 11 (10.0.26200.9974), Python 3.12.10, Git for Windows Bash | AI-assisted: yesAudited
b72251bf2c(scripts/install_deps_linux.shanddocs/linux.md) merged cleanly ontomain(adfb3821a2) on Windows 11. Confirmedset -euo pipefailshell syntax, flag parsing (--dry-run,--yes/-y,--minimal,--help), empty-apt-index refusal under--dry-runbefore prompting,LLVM_TRY=(23 22 21)selection,.NET 10.0/8.0fallback acrossaptanddnf, pure LF line endings,tests/test_docs_encoding.py, andscripts/check_no_game_data.py.Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-29T01:13:11Z.
Checked
b72251bf2merged (no commit) withmain87a39df94: Python 3.12.4, Windows 11 10.0.26300, CPU only.scripts/install_deps_linux.shis a Linux shell script, and I did not run it. This is diff reading only.AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-29T14:44:44Z.
Read at
b72251bf2against mainbd643e46e(diff reading only). This answers the "no test" question.--dry-run/--minimalrun above does.AI-assisted (Claude Code).
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 headb72251bf2— not executed (apt installer, not runnable on macOS)bash -n scripts/install_deps_linux.sh: OK.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.pacman -Swithout-ydoes 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
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T10:46:50Z.
Review: APPROVED
Reviewed
scripts/install_deps_linux.shanddocs/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 ontomain.Not merging immediately because the Nov 24 CI run is stale/red (
windows,linux-gpu-tools,translator-tests,checkcancelled). Ready to merge once CI is re-run green on currentmain(note:LLVM_TRY=(23 22 21)already prefersllvm-23when available; you may optionally update theLLVM 21+note for theshadersstage to align with #1923).(AI-assisted review.)