From c629e0f19687fb1ee1f9e3369d52d434d2242d65 Mon Sep 17 00:00:00 2001 From: fkDeath Date: Wed, 27 May 2026 23:21:53 +0200 Subject: [PATCH] fix(Installer-MultiDesktop): Fix the Multi Desktop Env you can now choose and use a desktop environnement --- .../etc/calamares/modules/packages.conf | 2 -- .../etc/calamares/modules/shellprocess.conf | 27 ++++++++++++------- .../airootfs/etc/calamares/settings.conf | 1 + 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/configs/baseline/airootfs/etc/calamares/modules/packages.conf b/configs/baseline/airootfs/etc/calamares/modules/packages.conf index 4f4e179..2496666 100644 --- a/configs/baseline/airootfs/etc/calamares/modules/packages.conf +++ b/configs/baseline/airootfs/etc/calamares/modules/packages.conf @@ -4,8 +4,6 @@ update_db: true update_system: false operations: - - install: - - packagechooser_desktop - remove: - calamares - kpmcore diff --git a/configs/baseline/airootfs/etc/calamares/modules/shellprocess.conf b/configs/baseline/airootfs/etc/calamares/modules/shellprocess.conf index ca99ecf..5baffba 100644 --- a/configs/baseline/airootfs/etc/calamares/modules/shellprocess.conf +++ b/configs/baseline/airootfs/etc/calamares/modules/shellprocess.conf @@ -1,21 +1,30 @@ --- -# Exécuté HORS chroot (live system) pour accéder à l'ISO montée. -# But : restaurer le kernel, détecter le bureau installé, lancer son init. +# dontChroot: true = exécuté dans le live system. +# ${ROOT} → substitué par Calamares (GlobalStorage "rootMountPoint"). +# $(cat ...) → substitution bash pure, Calamares ne la touche PAS. dontChroot: true +timeout: 7200 script: # Copie le kernel depuis l'ISO vers /boot du système cible - 'cp "$(find /run/archiso/bootmnt -name vmlinuz-linux 2>/dev/null | head -1)" "${ROOT}/boot/vmlinuz-linux"' - # Détecte le bureau installé en vérifiant les binaires présents dans la cible. - # (packagechooser a déjà installé les paquets via le module packages) - # Xfce est toujours présent (squashfs) donc on le garde en fallback. - - 'if [ -f "${ROOT}/usr/bin/plasmashell" ]; then DESKTOP=kde; elif [ -f "${ROOT}/usr/bin/gnome-shell" ]; then DESKTOP=gnome; elif [ -f "${ROOT}/usr/bin/hyprland" ]; then DESKTOP=hyprland; else DESKTOP=xfce; fi' + # DNS : copie le vrai fichier resolv.conf (résout le symlink cassé dans le chroot) + - 'cp --remove-destination "$(readlink -f /etc/resolv.conf)" "${ROOT}/etc/resolv.conf"' - # Lance le script d'initialisation du bureau choisi - - 'if [ ! -f "${ROOT}/usr/local/bin/fws-desktop-init-${DESKTOP}" ]; then echo "Script introuvable pour le bureau: ${DESKTOP}" >&2; exit 1; fi' - - 'chroot "${ROOT}" /bin/bash "/usr/local/bin/fws-desktop-init-${DESKTOP}"' + # Bypass temporaire du keyring pacman (vide dans le chroot fraîchement installé) + # Empêche "error: keyring is not writable" lors du pacman -Sy dans le chroot. + - 'sed -i "s/^SigLevel[[:space:]]*=.*/SigLevel = Never/" "${ROOT}/etc/pacman.conf" || true' + + # Lance le script d'init du bureau choisi + - 'chroot "${ROOT}" /bin/bash "/usr/local/bin/fws-desktop-init-$(cat /run/fws-desktop 2>/dev/null || echo xfce)"' + + # Restaure SigLevel correct pour l'utilisateur final + - 'sed -i "s/^SigLevel[[:space:]]*=.*/SigLevel = Required DatabaseOptional/" "${ROOT}/etc/pacman.conf" || true' + + # Copie le keyring du live system → le système installé aura un keyring fonctionnel + - 'mkdir -p "${ROOT}/etc/pacman.d/gnupg" && chmod 700 "${ROOT}/etc/pacman.d/gnupg" && cp -a /etc/pacman.d/gnupg/. "${ROOT}/etc/pacman.d/gnupg/"' # Supprime le drop-in archiso (surcharge HOOKS inexistants post-install) - 'rm -f "${ROOT}/etc/mkinitcpio.conf.d/archiso.conf"' diff --git a/configs/baseline/airootfs/etc/calamares/settings.conf b/configs/baseline/airootfs/etc/calamares/settings.conf index f0b697f..7a2bc19 100644 --- a/configs/baseline/airootfs/etc/calamares/settings.conf +++ b/configs/baseline/airootfs/etc/calamares/settings.conf @@ -27,6 +27,7 @@ sequence: - hwclock - networkcfg - packages + - fws-desktop-choice - shellprocess - initcpiocfg - initcpio