feat(baseline): add locale generation and rootfs mounting infrastructure
Add locale configuration, systemd service for rootfs mounting, and customization script: - Add locale.gen to generate en_US.UTF-8 locale required by Anaconda - Add fws-rootfsbase.service to expose squashfs as /run/rootfsbase for Anaconda LiveOS payload detection - Add customize_airootfs.sh to run locale-gen during image build - Add python-iso639 0.1.4 PKGBUILD (local package with correct find() API) - Add python-langtable 0.0.71 PKGBUILD (local package with list_common_languages()) - Remove python-iso639 and python-langtable from AUR packages due to version/API incompatibilities - Update LOCAL_BUILD_ORDER to include new local packages
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
# FWS — locales à générer dans l'ISO (par locale-gen, via le hook pacman
|
||||
# etc/pacman.d/hooks/zzz-fws-locale-gen.hook au moment du pacstrap).
|
||||
#
|
||||
# en_US.UTF-8 est REQUIS par Anaconda : ses modules DBus font
|
||||
# locale.setlocale(LC_ALL, "en_US.UTF-8") (DEFAULT_LANG)
|
||||
# au démarrage → sans cette locale générée : « locale.Error: unsupported
|
||||
# locale setting » et le module Boss sort en status 1 (installateur planté).
|
||||
# C.UTF-8 (la locale par défaut du live, cf. locale.conf) est intégrée à la
|
||||
# glibc et n'a pas besoin d'être générée.
|
||||
en_US.UTF-8 UTF-8
|
||||
@@ -0,0 +1,28 @@
|
||||
# FWS — expose la base squashfs du live à /run/rootfsbase.
|
||||
#
|
||||
# POURQUOI : avec --liveinst, Anaconda utilise le payload « LiveOS » qui RECOPIE
|
||||
# le système live en cours sur le disque. Sa tâche DetectLiveOSImageTask cherche
|
||||
# l'image de base à /dev/mapper/live-base, /dev/mapper/live-osimg-min ou
|
||||
# /run/rootfsbase (conventions dracut-live de Fedora). archiso n'en crée AUCUNE
|
||||
# → « SourceSetupError: No Live OS image found! » et l'installateur plante.
|
||||
#
|
||||
# archiso a pourtant la squashfs (montée en lecture seule sur /run/archiso/
|
||||
# airootfs). On la remonte ici en loop sur /run/rootfsbase pour qu'Anaconda la
|
||||
# détecte : findmnt -o SOURCE /run/rootfsbase → /dev/loopN, qu'Anaconda monte
|
||||
# puis recopie sur la cible (= installe FWS). Le %post du kickstart fait ensuite
|
||||
# mkinitcpio + grub-install (bootloader --disabled côté Anaconda).
|
||||
[Unit]
|
||||
Description=FWS — base squashfs sur /run/rootfsbase (payload LiveOS Anaconda)
|
||||
DefaultDependencies=no
|
||||
After=local-fs.target
|
||||
ConditionPathExists=/run/archiso/bootmnt/fws/x86_64/airootfs.sfs
|
||||
ConditionPathIsMountPoint=!/run/rootfsbase
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/mkdir -p /run/rootfsbase
|
||||
ExecStart=/usr/bin/mount -o loop,ro /run/archiso/bootmnt/fws/x86_64/airootfs.sfs /run/rootfsbase
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
# ============================================================================
|
||||
# FWS — script de customisation de l'airootfs.
|
||||
# Exécuté par mkarchiso DANS le chroot airootfs, APRÈS le pacstrap
|
||||
# (cf. fws/mkarchiso _make_customize_airootfs), puis supprimé : il n'apparaît
|
||||
# donc PAS dans l'ISO finale. C'est le seul endroit fiable pour lancer des
|
||||
# commandes dans l'image (les hooks pacman ne tournent pas sous pacstrap).
|
||||
# ============================================================================
|
||||
set -euo pipefail
|
||||
|
||||
# Génère les locales déclarées dans /etc/locale.gen. en_US.UTF-8 est REQUIS par
|
||||
# Anaconda (ses modules DBus font setlocale(LC_ALL, "en_US.UTF-8") au démarrage,
|
||||
# sinon « locale.Error: unsupported locale setting » → le module Boss plante).
|
||||
# ~3 Mo générés, vs 222 Mo pour le paquet glibc-locales complet.
|
||||
locale-gen
|
||||
@@ -0,0 +1,39 @@
|
||||
# Maintainer: FWS
|
||||
# ============================================================================
|
||||
# python-iso639 — bibliothèque ISO 639 (langues) pour Anaconda.
|
||||
#
|
||||
# ⚠️ IL Y A PLUSIEURS PROJETS PyPI HOMONYMES « iso639 » avec des API
|
||||
# INCOMPATIBLES. Anaconda (pyanaconda/localization.py) utilise les
|
||||
# FONCTIONS DE MODULE :
|
||||
# iso639.find(iso639_2=...) et iso639.to_name(...)
|
||||
# → c'est le projet PyPI « iso639 » (SANS tiret), version 0.1.4, MIT.
|
||||
#
|
||||
# Le paquet AUR « python-iso639 » fournit un AUTRE projet (API
|
||||
# Iso639/languages, PAS de find()) → « AttributeError: module 'iso639'
|
||||
# has no attribute 'find' » et le module DBus Localization d'Anaconda
|
||||
# sort en status 1. On le RETIRE donc de setup-aur.sh AUR_PACKAGES et on
|
||||
# le remplace par CE paquet local (même nom → satisfait la dép anaconda).
|
||||
# Idem « iso-639 » (avec tiret, noumar) : API languages.get(), pas find().
|
||||
# ============================================================================
|
||||
pkgname=python-iso639
|
||||
pkgver=0.1.4
|
||||
pkgrel=1
|
||||
pkgdesc="ISO 639 library with find()/to_name() module API (dépendance Anaconda Localization)"
|
||||
arch=('any')
|
||||
url="https://pypi.org/project/iso639/"
|
||||
license=('MIT')
|
||||
depends=('python')
|
||||
makedepends=('python-build' 'python-installer' 'python-wheel' 'python-setuptools')
|
||||
source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/i/iso639/iso639-$pkgver.tar.gz")
|
||||
sha256sums=('88b70cf6c64ee9c2c2972292818c8beb32db9ea6f4de1f8471a9b081a3d92e98')
|
||||
|
||||
build() {
|
||||
cd "$srcdir/iso639-$pkgver"
|
||||
python -m build --wheel --no-isolation
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/iso639-$pkgver"
|
||||
python -m installer --destdir="$pkgdir" dist/*.whl
|
||||
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
# Maintainer: FWS
|
||||
# ============================================================================
|
||||
# python-langtable — tables de langues/locales/claviers (dépendance Anaconda).
|
||||
#
|
||||
# ⚠️ L'AUR python-langtable est figé à 0.0.51, TROP VIEUX pour Anaconda 45.8 :
|
||||
# le spoke d'accueil GUI fait localization.get_common_languages() →
|
||||
# langtable.list_common_languages(), fonction ajoutée seulement en
|
||||
# langtable 0.0.71 (« derived from gnome-control-center »). Avec 0.0.51 :
|
||||
# « AttributeError: module 'langtable' has no attribute
|
||||
# 'list_common_languages' » → le GUI plante au démarrage.
|
||||
#
|
||||
# On package donc 0.0.71 en LOCAL (même nom → satisfait la dép anaconda) et
|
||||
# on RETIRE python-langtable de setup-aur.sh AUR_PACKAGES.
|
||||
# ============================================================================
|
||||
pkgname=python-langtable
|
||||
_pyname=langtable
|
||||
pkgver=0.0.71
|
||||
pkgrel=1
|
||||
pkgdesc="Guessing reasonable defaults for locale/keyboard/territory/language (dépendance Anaconda)"
|
||||
arch=('any')
|
||||
url="https://github.com/mike-fabian/langtable"
|
||||
license=('GPL-3.0-or-later' 'MIT')
|
||||
depends=('python' 'python-setuptools' 'gzip')
|
||||
makedepends=('python-build' 'python-installer' 'python-wheel' 'python-setuptools')
|
||||
source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/l/langtable/langtable-$pkgver.tar.gz")
|
||||
sha256sums=('f9d39c06d5182ea14eb4576bf1da8875af1d44efb166e55d6865b3b59b8ac617')
|
||||
|
||||
build() {
|
||||
cd "$srcdir/langtable-$pkgver"
|
||||
python -m build --wheel --no-isolation
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/langtable-$pkgver"
|
||||
python -m installer --destdir="$pkgdir" dist/*.whl
|
||||
}
|
||||
+7
-2
@@ -17,7 +17,11 @@ trap 'rc=$?; echo -e "\033[0;31m[ERR] Échec (setup-aur.sh) ligne $LINENO, code
|
||||
# - python-* : deps Anaconda présentes dans l'AUR (deps officielles only)
|
||||
# python-blivet est packagé en LOCAL (pkgbuilds/, patché sans libselinux).
|
||||
# gnome-kiosk (WM de la session GUI) est différé au chantier C.
|
||||
AUR_PACKAGES=(libxmlrpc satyr libreport winboat-bin python-langtable python-pid python-iso639 python-xkbregistry python-requests-ftp)
|
||||
# NB : python-iso639 RETIRÉ de l'AUR (mauvais projet homonyme, API sans find()) →
|
||||
# packagé en LOCAL (pkgbuilds/python-iso639, projet PyPI « iso639 » 0.1.4).
|
||||
# NB : python-langtable RETIRÉ de l'AUR (figé 0.0.51, sans list_common_languages) →
|
||||
# packagé en LOCAL (pkgbuilds/python-langtable, 0.0.71).
|
||||
AUR_PACKAGES=(libxmlrpc satyr libreport winboat-bin python-pid python-xkbregistry python-requests-ftp)
|
||||
DISTRO_NAME="${ARCH_WSL_DISTRO:-Arch}"
|
||||
|
||||
RED='\033[0;31m'; GREEN='\033[0;32m'; YELLOW='\033[1;33m'
|
||||
@@ -273,7 +277,8 @@ done
|
||||
LOCAL_PKGBUILDS_DIR="$SCRIPT_DIR/pkgbuilds"
|
||||
LOCAL_BUILD_ORDER=(
|
||||
pykickstart python-productmd python-requests-file python-simpleline
|
||||
python-crypt_r python-meh python-blivet anaconda-widgets anaconda
|
||||
python-crypt_r python-iso639 python-langtable python-meh python-blivet
|
||||
anaconda-widgets anaconda
|
||||
)
|
||||
BUILT_LOCAL=()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user