From 4473f0eee7a9122f14879218f1d39a9bb04ec7a2 Mon Sep 17 00:00:00 2001 From: nocode Date: Wed, 17 Jun 2026 11:24:10 +0200 Subject: [PATCH] feat(pkgbuild): add anaconda and anaconda-widgets packages with dependency ordering Add PKGBUILD files for anaconda (45.8) and anaconda-widgets (45.8) to support Fedora's Anaconda installer ported to Arch for FWS with liveimg payload. anaconda-widgets: - GTK3 UI widgets with GObject introspection - Extracted from anaconda source as autonomous autotools project - Versioned on anaconda release anaconda: - Main installer with comprehensive dependency set - Includes note that further iteration needed on real Arch for buildtime deps and Fedora-specific paths - Removes widgets files (provided by anaconda-widgets package) Update setup-aur.sh to build local packages in proper dependency order: - Define LOCAL_BUILD_ORDER array to ensure leaf packages build first - anaconda builds last (depends on all other local packages) - Extract build logic into build_local_pkg function - Fallback to alphabetical scan for future unlisted packages - This prevents makepkg -s failures when deps are not yet installed --- pkgbuilds/anaconda-widgets/PKGBUILD | 38 +++++++++++++ pkgbuilds/anaconda/PKGBUILD | 86 +++++++++++++++++++++++++++++ setup-aur.sh | 43 +++++++++++---- 3 files changed, 157 insertions(+), 10 deletions(-) create mode 100644 pkgbuilds/anaconda-widgets/PKGBUILD create mode 100644 pkgbuilds/anaconda/PKGBUILD diff --git a/pkgbuilds/anaconda-widgets/PKGBUILD b/pkgbuilds/anaconda-widgets/PKGBUILD new file mode 100644 index 0000000..6d3cb24 --- /dev/null +++ b/pkgbuilds/anaconda-widgets/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer: FWS +# Widgets GTK3 de l'installateur Anaconda (rhinstaller). Lib C + introspection +# GObject (AnacondaWidgets-1.0.typelib) + overrides gi. Le sous-dossier widgets/ +# du source anaconda est un projet autotools AUTONOME (son propre configure.ac, +# AC_INIT([AnacondaWidgets],[3.4])) → on le construit seul depuis le tarball +# anaconda-45.8. Paquet versionné sur la release anaconda (comme le sous-paquet +# Fedora anaconda-widgets). +pkgname=anaconda-widgets +pkgver=45.8 +pkgrel=1 +pkgdesc="GTK3 UI widgets for the Anaconda installer (introspection inclus)" +arch=('x86_64') +url="https://github.com/rhinstaller/anaconda" +license=('GPL-2.0-or-later') +depends=('gtk3' 'glib2' 'pango' 'gdk-pixbuf2' 'python-gobject') +makedepends=('autoconf' 'automake' 'libtool' 'gettext' 'intltool' + 'gobject-introspection' 'gtk-doc' 'gladeui' 'python') +source=("anaconda-$pkgver.tar.gz::https://github.com/rhinstaller/anaconda/archive/refs/tags/anaconda-$pkgver.tar.gz") +sha256sums=('5ef1464bff7f28a4a09a821cbb0121f09ef504ec169288d742373f86807ec4ed') +_srcdir="anaconda-anaconda-$pkgver" + +build() { + cd "$srcdir/$_srcdir/widgets" + # autogen.sh : autoreconf -vfi + copie /usr/share/gettext/gettext.h dans src/. + ./autogen.sh + ./configure --prefix=/usr --libdir=/usr/lib \ + --disable-static --disable-gtk-doc --enable-introspection + make +} + +package() { + cd "$srcdir/$_srcdir/widgets" + make DESTDIR="$pkgdir" install + find "$pkgdir" -name '*.la' -delete + # NB : on inclut aussi les fichiers -devel (.so/.h/.pc + catalogue glade) ; + # inoffensif sur l'ISO et évite de manquer un fichier runtime. Le paquet + # « anaconda » retirera ces mêmes fichiers de son propre pkgdir. +} diff --git a/pkgbuilds/anaconda/PKGBUILD b/pkgbuilds/anaconda/PKGBUILD new file mode 100644 index 0000000..22d7b62 --- /dev/null +++ b/pkgbuilds/anaconda/PKGBUILD @@ -0,0 +1,86 @@ +# Maintainer: FWS +# ============================================================================ +# anaconda — l'installateur Fedora (rhinstaller) PORTÉ sur Arch pour FWS. +# Build autotools : ./autogen.sh && ./configure && make && make install +# (le source compile aussi widgets/ via AC_CONFIG_SUBDIRS → on retire ces +# fichiers en package(), ils sont fournis par le paquet anaconda-widgets). +# +# ⚠️ SCAFFOLD À ITÉRER : ce PKGBUILD est un point de départ fidèle au spec +# amont, mais Anaconda est profondément couplé à Fedora. Il faudra très +# probablement itérer sur Arch RÉEL (via ./setup-aur.sh) pour : +# - des BuildRequires manquants au configure, +# - des chemins/macros Fedora (systemd-rpm-macros, find_lang…), +# - la compat Python 3.14 d'Arch (Anaconda vise le Python de Fedora). +# +# DÉVIATIONS FWS vs Requires du spec (justifiées) : +# - RETIRÉS car payload liveimg (jamais le payload DNF) : python3-libdnf5, +# python3-rpm. → cf. verdict « drop DNF » (libdnf5 importé seulement dans +# dnf_manager.py, chemin non pris avec liveimg). +# - RETIRÉ libselinux : Arch n'est pas SELinux (blivet/anaconda gèrent son +# absence). - RETIRÉS Fedora-only / N/A archiso : subscription-manager, +# s390utils-*, crypto-policies(-scripts), glibc-langpack-*, dracut-network, +# teamd/NetworkManager-team, flatpak(-libs). - grub2-common → grub (Arch). +# - RISQUE connu : python3-crypt-r (module `crypt` retiré de Python ≥ 3.13) +# n'a peut-être pas d'équivalent Arch → à packager si l'import casse. +# ============================================================================ +pkgname=anaconda +pkgver=45.8 +pkgrel=1 +pkgdesc="The Anaconda installer (porté sur Arch pour FWS, payload liveimg)" +arch=('x86_64') +url="https://github.com/rhinstaller/anaconda" +license=('GPL-2.0-or-later') +depends=( + # — interface & widgets — + 'anaconda-widgets' 'gtk3' 'python-gobject' 'gsettings-desktop-schemas' + 'adwaita-icon-theme' 'librsvg' 'nm-connection-editor' + # — cœur Python Anaconda — + 'python' 'python-meh' 'python-simpleline' 'pykickstart' 'python-dasbus' + 'python-productmd' 'python-pid' 'python-langtable' 'python-iso639' + 'python-requests' 'python-requests-file' 'python-requests-ftp' + # — stockage — + 'python-blivet' 'libblockdev' 'python-pyparted' 'parted' 'util-linux' + 'lvm2' 'cryptsetup' 'mdadm' 'dosfstools' 'e2fsprogs' 'xfsprogs' 'btrfs-progs' + # — rapport de crash (python-meh importe `report` en dur) — + 'libreport' + # — système / réseau / boot — + 'networkmanager' 'kbd' 'chrony' 'systemd' 'dbus' 'openssh' 'grub' + 'libpwquality' 'python-systemd' 'python-xkbregistry' 'cracklib' +) +makedepends=( + 'autoconf' 'automake' 'libtool' 'gettext' 'intltool' 'gtk-doc' + 'gobject-introspection' 'gladeui' 'python' 'gdk-pixbuf2' 'libxml2' + 'desktop-file-utils' 'glib2' 'libarchive' 'rpm-tools' +) +source=("anaconda-$pkgver.tar.gz::https://github.com/rhinstaller/anaconda/archive/refs/tags/anaconda-$pkgver.tar.gz") +sha256sums=('5ef1464bff7f28a4a09a821cbb0121f09ef504ec169288d742373f86807ec4ed') +_srcdir="anaconda-anaconda-$pkgver" + +build() { + cd "$srcdir/$_srcdir" + # autogen.sh : autoreconf -vfi racine + (cd widgets && ./autogen.sh). + ./autogen.sh + # --disable-glade : pas de catalogue Glade (outil de design, inutile au run). + # ANACONDA_RELEASE=1 : release réelle, pas la date de création du tarball. + ANACONDA_DISABLE_GLADE=yes ./configure \ + --prefix=/usr --libdir=/usr/lib --sysconfdir=/etc \ + --disable-glade --disable-gtk-doc ANACONDA_RELEASE=1 + make +} + +package() { + cd "$srcdir/$_srcdir" + make DESTDIR="$pkgdir" install + find "$pkgdir" -name '*.la' -delete + + # Répertoires attendus par Anaconda (créés vides par le spec). + install -d "$pkgdir/usr/share/anaconda/addons" \ + "$pkgdir/usr/share/anaconda/post-scripts" + + # Fichiers widgets : fournis par le paquet anaconda-widgets → on les retire + # ici (le build principal recompile widgets/ via AC_CONFIG_SUBDIRS). + rm -f "$pkgdir"/usr/lib/libAnacondaWidgets.so* + rm -f "$pkgdir"/usr/lib/girepository-*/AnacondaWidgets*.typelib + rm -f "$pkgdir"/usr/lib/pkgconfig/AnacondaWidgets.pc + rm -f "$pkgdir"/usr/lib/python*/site-packages/gi/overrides/AnacondaWidgets* +} diff --git a/setup-aur.sh b/setup-aur.sh index 30017dc..6b98b6d 100755 --- a/setup-aur.sh +++ b/setup-aur.sh @@ -224,20 +224,43 @@ done # cf. portage de l'installateur Anaconda sur Arch. # ------------------------------------------------------------ LOCAL_PKGBUILDS_DIR="$SCRIPT_DIR/pkgbuilds" + +# Ordre de build des PKGBUILD locaux : les FEUILLES d'abord, « anaconda » EN +# DERNIER (il dépend de tous les autres locaux + des AUR déjà construits). +# La boucle alpha naïve mettrait « anaconda » en premier → makepkg -s échouerait +# (ses deps locales pas encore construites/installées). +LOCAL_BUILD_ORDER=( + pykickstart python-productmd python-requests-file python-simpleline + python-meh python-blivet anaconda-widgets anaconda +) +BUILT_LOCAL=() + +build_local_pkg() { + local name="$1" dir="$LOCAL_PKGBUILDS_DIR/$1" + [ -f "$dir/PKGBUILD" ] || return 0 + info "Build local $name…" + rm -rf "$BUILD_DIR/$name" + cp -a "$dir" "$BUILD_DIR/$name" + chown -R "$BUILD_USER:$BUILD_USER" "$BUILD_DIR/$name" + su - "$BUILD_USER" -c "cd $BUILD_DIR/$name && makepkg -sf --noconfirm" \ + || error "Build local $name échoué" + # Install (même logique que la boucle AUR) pour que les paquets locaux + # dépendants se résolvent (ex. anaconda → anaconda-widgets/blivet/meh/…). + pacman -U --noconfirm "$BUILD_DIR/$name/"*.pkg.tar.zst \ + || error "Install du paquet local $name échouée" + success "$name build + install OK" + BUILT_LOCAL+=("$name") +} + if [ -d "$LOCAL_PKGBUILDS_DIR" ]; then + # 1) Ordre explicite (deps avant dépendants). + for name in "${LOCAL_BUILD_ORDER[@]}"; do build_local_pkg "$name"; done + # 2) Repli : tout PKGBUILD présent mais non listé (futur ajout oublié). for dir in "$LOCAL_PKGBUILDS_DIR"/*/; do [ -f "$dir/PKGBUILD" ] || continue name="$(basename "$dir")" - info "Build local $name…" - cp -a "$dir" "$BUILD_DIR/$name" - chown -R "$BUILD_USER:$BUILD_USER" "$BUILD_DIR/$name" - su - "$BUILD_USER" -c "cd $BUILD_DIR/$name && makepkg -sf --noconfirm" \ - || error "Build local $name échoué" - # Install (même logique que la boucle AUR) pour que les futurs paquets - # locaux dépendants se résolvent (ex. anaconda → pykickstart/blivet/…). - pacman -U --noconfirm "$BUILD_DIR/$name/"*.pkg.tar.zst \ - || error "Install du paquet local $name échouée" - success "$name build + install OK" + printf '%s\n' "${BUILT_LOCAL[@]}" | grep -qx "$name" && continue + build_local_pkg "$name" done fi