feat(build): add preflight package resolution and fws-dnd package
Add preflight package resolution step in build-offi.sh to validate all profile packages against pacman repositories before mkarchiso execution. This prevents 'target not found' errors during ISO creation by catching missing packages early with helpful error messages and recovery instructions. Introduce fws-dnd package (D&D 5e manager for FWS with GTK4 interface) to the local package build process in setup-aur.sh. Include PKGBUILD definition and source tarball. When package resolution fails, the build now exits with clear feedback pointing users to run setup-aur.sh to build missing dependencies like fws-dnd.
This commit is contained in:
@@ -353,6 +353,31 @@ echo "==> Correction des retours à la ligne Windows (dos2unix)..."
|
||||
pacman -S --needed --noconfirm dos2unix
|
||||
find /tmp/fws-build/releng -type f -exec dos2unix {} + 2>/dev/null
|
||||
|
||||
# ── Pré-vol : résolution de TOUS les paquets du profil ──
|
||||
# « error: target not found » ne doit plus surgir en plein mkarchiso : on
|
||||
# résout la liste complète (packages.x86_64 fusionné) contre le pacman.conf
|
||||
# du profil (fws-local injecté inclus) dans une base temporaire. S'il manque
|
||||
# un paquet, on échoue ICI avec la liste + le geste correctif.
|
||||
echo "==> Pré-vol : résolution des paquets du profil..."
|
||||
PREFLIGHT_DB="$(mktemp -d)"
|
||||
pacman -Sy --config /tmp/fws-build/releng/pacman.conf --dbpath "$PREFLIGHT_DB" >/dev/null
|
||||
mapfile -t PROFILE_PKGS < <(sed -e 's/#.*//' -e 's/[[:space:]]//g' -e '/^$/d' \
|
||||
/tmp/fws-build/releng/packages.x86_64)
|
||||
# -Sp n'installe rien (affiche les URLs) ; LC_ALL=C fige le motif d'erreur.
|
||||
# stderr → capture, stdout → poubelle ; le pipeline sed sort toujours 0.
|
||||
MISSING="$(LC_ALL=C pacman -Sp --config /tmp/fws-build/releng/pacman.conf \
|
||||
--dbpath "$PREFLIGHT_DB" "${PROFILE_PKGS[@]}" 2>&1 >/dev/null \
|
||||
| sed -n 's/^error: target not found:[[:space:]]*//p')"
|
||||
rm -rf "$PREFLIGHT_DB"
|
||||
if [ -n "$MISSING" ]; then
|
||||
echo -e "\e[31mPaquets introuvables dans les dépôts du profil :\e[0m" >&2
|
||||
printf ' \e[31m%s\e[0m\n' $MISSING >&2
|
||||
echo -e "\e[33mDépôt fws-local absent/incomplet ? Lance ./setup-aur.sh (construit" >&2
|
||||
echo -e "anaconda, winboat-bin, fws-dnd, …) puis relance ce script.\e[0m" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "==> Pré-vol OK : ${#PROFILE_PKGS[@]} paquets résolus."
|
||||
|
||||
echo "==> Lancement de mkarchiso..."
|
||||
mkdir -p "$OUT_DIR"
|
||||
# mkarchiso fait un « rm » interne de l'ISO cible avant de la (ré)écrire ; si
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# Maintainer: FWS
|
||||
pkgname=fws-dnd
|
||||
pkgver=2.0.0
|
||||
pkgrel=1
|
||||
pkgdesc="Gestionnaire D&D 5e pour FWS (GTK4) : dés, créateur de personnage (règles officielles), grimoire, sessions, tracker de combat"
|
||||
arch=('any')
|
||||
url="https://fws.local/fws-dnd"
|
||||
license=('MIT')
|
||||
depends=('python' 'python-gobject' 'gtk4')
|
||||
source=("${pkgname}-${pkgver}.tar.gz")
|
||||
sha256sums=('SKIP')
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
|
||||
# Module Python (application GTK4)
|
||||
install -d "${pkgdir}/usr/share/${pkgname}"
|
||||
cp -r gui/fwsdnd "${pkgdir}/usr/share/${pkgname}/"
|
||||
# pas de bytecode pré-généré dans le paquet
|
||||
find "${pkgdir}/usr/share/${pkgname}" -name '__pycache__' -type d -exec rm -rf {} +
|
||||
|
||||
# Exécutable
|
||||
install -Dm755 bin/fws-dnd "${pkgdir}/usr/bin/fws-dnd"
|
||||
|
||||
# Intégration bureau
|
||||
install -Dm644 fws-dnd.desktop "${pkgdir}/usr/share/applications/fws-dnd.desktop"
|
||||
install -Dm644 fws-dnd.svg "${pkgdir}/usr/share/icons/hicolor/scalable/apps/fws-dnd.svg"
|
||||
|
||||
# Documentation
|
||||
install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
|
||||
}
|
||||
Binary file not shown.
+3
-2
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# ============================================================
|
||||
# FWS — Build des paquets AUR (winboat-bin) + PKGBUILD locaux (deps Anaconda)
|
||||
# et création du repo pacman local fws-local/.
|
||||
# FWS — Build des paquets AUR (winboat-bin) + PKGBUILD locaux (deps Anaconda,
|
||||
# fws-dnd) et création du repo pacman local fws-local/.
|
||||
#
|
||||
# Rejoue-le si tu changes la liste AUR_PACKAGES ou pour
|
||||
# rafraîchir le repo local.
|
||||
@@ -297,6 +297,7 @@ done
|
||||
# --- PKGBUILD locaux FWS (ordre explicite, feuilles d'abord, anaconda dernier) ---
|
||||
LOCAL_PKGBUILDS_DIR="$SCRIPT_DIR/pkgbuilds"
|
||||
LOCAL_BUILD_ORDER=(
|
||||
fws-dnd
|
||||
pykickstart python-productmd python-requests-file python-simpleline
|
||||
python-crypt_r python-iso639 python-langtable python-meh python-blivet
|
||||
anaconda-widgets anaconda
|
||||
|
||||
Reference in New Issue
Block a user