fix(Installer): fix the whole installer now its finishing the installation

This commit is contained in:
2026-05-26 23:48:54 +02:00
parent c50db7a5bf
commit 0fb4c1bf5c
14 changed files with 134 additions and 85 deletions
+35
View File
@@ -58,6 +58,41 @@ LOCAL_REPO="$SCRIPT_DIR/local-repo"
BUILD_DIR="/tmp/fws-aur-build"
BUILD_USER="fwsbuild"
# ============================================================
step "0/4 — Préparation pacman (sandbox WSL + keyring)"
# ============================================================
# pacman ≥ 7 utilise landlock pour sandboxer les ops fs.
# Le kernel WSL ne supporte pas landlock → désactivation explicite.
if grep -qi 'microsoft\|wsl' /proc/version 2>/dev/null; then
if ! grep -qE '^[[:space:]]*DisableSandbox' /etc/pacman.conf; then
sed -i '/^\[options\]/a DisableSandbox' /etc/pacman.conf
warn "WSL détecté → DisableSandbox ajouté à /etc/pacman.conf"
fi
fi
# Keyring : sur une WSL Arch ancienne, archlinux-keyring est périmé et
# bloque tout install ("unknown trust"). On bypass SigLevel uniquement
# pour mettre à jour le paquet keyring, puis on rétablit.
info "Refresh du trousseau pacman…"
pacman-key --init 2>/dev/null || true
if [ -f /etc/pacman.conf ] && ! grep -qE '^[[:space:]]*SigLevel[[:space:]]*=[[:space:]]*Never' /etc/pacman.conf; then
cp -f /etc/pacman.conf /etc/pacman.conf.fws.bak
sed -i 's/^SigLevel.*/SigLevel = Never/' /etc/pacman.conf
pacman -Sy --noconfirm --needed archlinux-keyring \
|| warn "Maj archlinux-keyring échouée (sigs bypass) — on continue"
mv -f /etc/pacman.conf.fws.bak /etc/pacman.conf
fi
pacman-key --populate archlinux 2>/dev/null || true
# Maj système complète : indispensable pour gérer les "package splits"
# (ex. gcc-libs → libgcc + libstdc++) sinon makepkg plantera sur
# "conflicting files" lors de l'install des dépendances.
info "Mise à jour complète du système (peut être long la première fois)…"
pacman -Syu --noconfirm \
|| warn "pacman -Syu a partiellement échoué — on continue"
# ============================================================
step "1/4 — Outils de build"
# ============================================================