Feature: Bootstrap script for new installs

bootstrap.sh installs everything listed in system/packages.txt (pacman,
AUR via yay, flatpak, official install scripts), auto-detects CPU
microcode and GPU drivers, enables services, links dotfiles with stow
and runs system/install.sh. Optional --svt-av1 installs
svt-av1-essential-git and rebuilds ffmpeg against it via
system/rebuild-ffmpeg.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-11 18:10:27 +01:00
parent 1201e6a4cc
commit 4a57e9902f
4 changed files with 399 additions and 1 deletions

27
system/rebuild-ffmpeg.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/usr/bin/env bash
# Rebuilds Arch's ffmpeg package from source so it links against the installed
# svt-av1-essential-git instead of the repo svt-av1 it was built with.
#
# Re-run this after a `pacman -Syu` that updates ffmpeg, otherwise the repo
# build replaces this one.
set -euo pipefail
if ! pacman -Qq svt-av1-essential-git >/dev/null 2>&1; then
echo "svt-av1-essential-git is not installed; nothing to rebuild against." >&2
exit 1
fi
build="$(mktemp -d)"
trap 'rm -rf "$build"' EXIT
git clone --depth 1 https://gitlab.archlinux.org/archlinux/packaging/packages/ffmpeg.git "$build/ffmpeg"
cd "$build/ffmpeg"
# The PKGBUILD verifies a signed ffmpeg tag; makepkg won't fetch the keys itself
mapfile -t keys < <(source ./PKGBUILD && printf '%s\n' "${validpgpkeys[@]}")
if (( ${#keys[@]} )); then
gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys "${keys[@]}"
fi
# No --needed: the version matches what's installed, we want it replaced anyway
makepkg --syncdeps --install --cleanbuild --noconfirm