From a4e46a4309e7aa8d6068ece8943734934dde9b35 Mon Sep 17 00:00:00 2001 From: nocode Date: Wed, 17 Jun 2026 18:35:12 +0200 Subject: [PATCH] feat(anaconda): add python-crypt_r and ostree dependencies for python 3.13+ compatibility Add python-crypt_r PKGBUILD to provide the crypt module removed in Python 3.13 (PEP 594), required by pyanaconda/core/users.py for password hashing. Add python-legacy-cgi for the cgi module also removed in Python 3.13, required by python-requests-ftp imported by pyanaconda/core/util.py. Add ostree to provide the OSTree-1.0 GI namespace required by pyanaconda/rescue.py for the rpm_ostree payload. Add libblockdev LVM CLI mode configuration to avoid DBus dependency issues with lvmdbusd unavailable in Arch. Update setup-aur.sh to include python-crypt_r in the local build order before python-meh. --- .../libblockdev/3/conf.d/99-fws-lvm-cli.cfg | 16 ++++++++ configs/baseline/packages.x86_64 | 9 +++++ configs/releng/packages.x86_64 | 9 +++++ pkgbuilds/python-crypt_r/PKGBUILD | 38 +++++++++++++++++++ setup-aur.sh | 2 +- 5 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 configs/baseline/airootfs/etc/libblockdev/3/conf.d/99-fws-lvm-cli.cfg create mode 100644 pkgbuilds/python-crypt_r/PKGBUILD diff --git a/configs/baseline/airootfs/etc/libblockdev/3/conf.d/99-fws-lvm-cli.cfg b/configs/baseline/airootfs/etc/libblockdev/3/conf.d/99-fws-lvm-cli.cfg new file mode 100644 index 0000000..b339aca --- /dev/null +++ b/configs/baseline/airootfs/etc/libblockdev/3/conf.d/99-fws-lvm-cli.cfg @@ -0,0 +1,16 @@ +# FWS — force le plugin LVM de libblockdev en mode CLI (libbd_lvm.so) au lieu +# du mode DBus (libbd_lvm-dbus.so). +# +# POURQUOI : libblockdev 3.x sur Arch charge par défaut la variante LVM qui +# pilote le démon « lvmdbusd » (service DBus com.redhat.lvmdbus1). Or Arch ne +# package PAS lvmdbusd (lvm2 ne livre ni le binaire ni le .service DBus). Quand +# Anaconda/blivet peuple l'arbre des périphériques, blivet appelle +# blockdev.lvm.lvs() → la variante DBus tente d'activer com.redhat.lvmdbus1 → +# GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: name is not activatable +# ce qui FAIT PLANTER Anaconda au démarrage. +# +# La variante CLI (libbd_lvm.so) parle directement aux binaires LVM (lvs, vgs…) +# sans démon → fonctionne sans lvmdbusd. Ce fichier conf.d (numéro élevé → lu +# après 00-default.cfg) force ce choix de façon fiable. +[lvm] +sonames=libbd_lvm.so.3 diff --git a/configs/baseline/packages.x86_64 b/configs/baseline/packages.x86_64 index bcf670f..86cd99c 100644 --- a/configs/baseline/packages.x86_64 +++ b/configs/baseline/packages.x86_64 @@ -108,3 +108,12 @@ winboat-bin # 'anaconda' tire automatiquement anaconda-widgets + toutes ses dépendances # (python-blivet, pykickstart, libreport, gtk3, NetworkManager…). anaconda +# Module 'cgi' (retiré de Python 3.13, PEP 594) requis par python-requests-ftp +# que pyanaconda/core/util.py importe en dur. python-legacy-cgi le réintroduit. +python-legacy-cgi +# Module 'crypt'/'crypt_r' (retiré de Python 3.13, PEP 594) requis par +# pyanaconda/core/users.py (hash des mots de passe). Paquet maison (fws-local). +python-crypt_r +# Namespace GI 'OSTree-1.0' : pyanaconda/rescue.py importe le payload rpm_ostree +# (inconditionnellement, même si FWS utilise liveimg) → fourni par 'ostree'. +ostree diff --git a/configs/releng/packages.x86_64 b/configs/releng/packages.x86_64 index 5334d22..6584427 100644 --- a/configs/releng/packages.x86_64 +++ b/configs/releng/packages.x86_64 @@ -105,3 +105,12 @@ winboat-bin # 'anaconda' tire automatiquement anaconda-widgets + toutes ses dépendances # (python-blivet, pykickstart, libreport, gtk3, NetworkManager…). anaconda +# Module 'cgi' (retiré de Python 3.13, PEP 594) requis par python-requests-ftp +# que pyanaconda/core/util.py importe en dur. python-legacy-cgi le réintroduit. +python-legacy-cgi +# Module 'crypt'/'crypt_r' (retiré de Python 3.13, PEP 594) requis par +# pyanaconda/core/users.py (hash des mots de passe). Paquet maison (fws-local). +python-crypt_r +# Namespace GI 'OSTree-1.0' : pyanaconda/rescue.py importe le payload rpm_ostree +# (inconditionnellement, même si FWS utilise liveimg) → fourni par 'ostree'. +ostree diff --git a/pkgbuilds/python-crypt_r/PKGBUILD b/pkgbuilds/python-crypt_r/PKGBUILD new file mode 100644 index 0000000..1133ae2 --- /dev/null +++ b/pkgbuilds/python-crypt_r/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer: FWS +# ============================================================================ +# python-crypt_r — réintroduit le module `crypt` (et son alias moderne +# `crypt_r`) retiré de Python 3.13 (PEP 594). Arch est en Python 3.14. +# +# POURQUOI (dépendance Anaconda) : pyanaconda/core/users.py fait +# import crypt_r (ligne 41) → sinon fallback : +# import crypt as crypt_r (ligne 44) +# Les DEUX échouent sur Python ≥ 3.13 → « ModuleNotFoundError: crypt_r » +# puis « crypt » → Anaconda plante au chargement (hash des mots de passe +# root/utilisateur à l'install). Ce paquet PyPI (maintenu par fedora-python, +# les mêmes que legacy-cgi) fournit les modules `crypt_r` ET `crypt` via une +# extension C qui enrobe crypt_r(3) de libxcrypt. +# +# Paquet absent d'Arch officiel ET de l'AUR → packagé maison pour FWS. +# ============================================================================ +pkgname=python-crypt_r +_pyname=crypt_r +pkgver=3.13.1 +pkgrel=1 +pkgdesc="The crypt module removed from Python 3.13 (PEP 594), as crypt_r + crypt (dépendance Anaconda)" +arch=('x86_64') +url="https://github.com/fedora-python/crypt_r" +license=('PSF-2.0') +depends=('python' 'libxcrypt') +makedepends=('python-setuptools' 'python-build' 'python-installer' 'python-wheel') +source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/c/${_pyname}/${_pyname}-${pkgver}.tar.gz") +sha256sums=('5bd46ad51f5b7fe5f0ecf49d8ba2cafd6fbd43aa3bb5efbcaa6b44df6340c1a6') + +build() { + cd "$srcdir/${_pyname}-${pkgver}" + python -m build --wheel --no-isolation +} + +package() { + cd "$srcdir/${_pyname}-${pkgver}" + python -m installer --destdir="$pkgdir" dist/*.whl +} diff --git a/setup-aur.sh b/setup-aur.sh index 024ed2a..85d7bd3 100755 --- a/setup-aur.sh +++ b/setup-aur.sh @@ -273,7 +273,7 @@ done LOCAL_PKGBUILDS_DIR="$SCRIPT_DIR/pkgbuilds" LOCAL_BUILD_ORDER=( pykickstart python-productmd python-requests-file python-simpleline - python-meh python-blivet anaconda-widgets anaconda + python-crypt_r python-meh python-blivet anaconda-widgets anaconda ) BUILT_LOCAL=()