fix(Installer): fix the whole installer now its finishing the installation
This commit is contained in:
@@ -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"
|
||||
# ============================================================
|
||||
|
||||
Reference in New Issue
Block a user