feat(installer): install PacManager on the target system only

PacManager (FWS-PacManage 1.2.1) is packaged like fws-dnd: a local PKGBUILD
with the sources vendored in the repository, because the upstream Gitea is
private and makepkg cannot fetch from it during the build.

It is deliberately absent from packages.x86_64. On a live system one is about
to replace, a package manager serves no purpose, and it would drag qt6-base
into the squashfs for nothing. build.sh drops the built package into the image
instead, and the kickstart %post installs it into the target, then deletes the
file. Two conditions there: only when a desktop was chosen (it is a GUI
application, nothing could launch it on a command-line install), and never
blocking -- "pacman -U" resolves qt6-base over the network, and no PacManager
is not a failed installation.

The binary goes to /usr/lib/fws-pacmanage rather than /usr/bin: PluginManager
looks for its plugins in applicationDirPath()/plugins, so /usr/bin would mean a
/usr/bin/plugins directory polluting a PATH entry. Binary and plugins stay
together in a private directory and /usr/bin/fws-pacmanage is a symlink -- Qt
resolves /proc/self/exe, so the plugins are still found. Upstream ships no
.desktop file, so one is provided here.

build.sh also gains a guard: it now checks, before any lengthy step, that every
package only local-repo can provide is actually built. Until now a missing one
surfaced as a bare "target not found" from pacman, after the mirror refresh,
the full upgrade and the whole mkarchiso setup -- several minutes for an error
detectable in one second.

Signed-off-by: nocode <suzuku295@gmail.com>
This commit is contained in:
nocode committed 2026-09-09 16:06:15 +02:00
1 parent af6f1b4d8b
commit b4c4ad7049
6 files changed
+183 -1

No files matched your search

@@ -697,6 +697,29 @@ MOTD
fi
fi
# --- 4ter bis) PacManager : le gestionnaire de paquets graphique de FWS ------
# Il n'est PAS dans packages.x86_64, donc absent du live : sur un système qu'on
# s'apprête à remplacer, un gestionnaire de paquets ne sert à rien. build.sh
# dépose son .pkg dans l'image et il est installé ICI, dans la cible seulement.
# Conditionné à un bureau : c'est une application graphique, elle n'a aucun
# moyen d'être lancée sur une install « ligne de commande ».
if [ "$DESK" != "cli" ]; then
_PM_PKG="$(ls /usr/local/share/fws/packages/fws-pacmanage-*.pkg.tar.* 2>/dev/null | head -1)"
if [ -n "$_PM_PKG" ]; then
# « -U » va chercher qt6-base sur le réseau ; avec un bureau KDE il est
# déjà là. Non bloquant : pas de PacManager n'est pas une install ratée.
if pacman -U --noconfirm "$_PM_PKG"; then
echo "[FWS] PacManager installé"
else
echo "[FWS] PacManager NON installé (réseau, ou dépendance qt6-base absente)"
fi
else
echo "[FWS] paquet PacManager absent de l'image (build.sh ne l'a pas embarqué)"
fi
fi
# Le .pkg ne doit pas rester sur le disque de l'utilisateur.
rm -rf /usr/local/share/fws/packages
# --- 4quater) ADN FWS : détection matériel + drivers + stack « Windows » ------
# Script dédié (NON bloquant ; réseau requis) : drivers GPU détectés via lspci +
# outils invité VM, son/micro/casque (PipeWire), Bluetooth, Podman, et — si un