Compare commits

...

37 commits

Author SHA1 Message Date
5a408f1061 [IMP] script todo: infra — multiplicateur de ressources par VM (x1..x4)
Avant le déploiement infra, on demande un multiplicateur de ressources :
x1 (minimum catalogue) .. x4. Il multiplie la RAM (base = minimum de la
version) et les vCPU (base 2), en bornant les vCPU au nombre de cœurs de
l'hôte et en signalant si la RAM totale dépasse la RAM libre.

- Le prompt affiche les ressources de l'hôte (vCPU, RAM libre) et, pour
  chaque multiplicateur, le total RAM + vCPU/VM avec un ⚠ si ça dépasse.
- Le plan reflète les ressources effectives (vCPU + RAM×mult par VM).
- Les jobs passent --memory et --vcpus effectifs à deploy_qemu (avant,
  l'infra laissait le minimum catalogue + 2 vCPU par défaut).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 09:39:59 +00:00
b49e107b83 [FIX] script todo: résolution d'IP en parallèle (dashboard ne s'ouvrait jamais)
Après un déploiement infra, la résolution d'IP tournait EN SÉRIE (boucle
ssh_config puis install), jusqu'à 10 min par VM émulée, SANS aucune sortie :
le dashboard « n'ouvrait jamais » (impression de blocage), d'autant qu'une
VM qui ne boote pas (IP jamais attribuée) bloquait tout le reste.

Fix : _qemu_resolve_ips résout les IP de toutes les VM EN PARALLÈLE, avec
progression affichée par VM, une seule fois, réutilisée pour ~/.ssh/config
ET l'installation (plus de double résolution). _qemu_install_erplibre_*
acceptent une IP/ip_map déjà résolue.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 09:22:46 +00:00
7bd44d21a9 [FIX] script qemu: téléchargement complet vérifié + arm64 sans Secure Boot
Une VM arm64 (Fedora aarch64 émulée) restait FIGÉE au firmware (CPU ~2 %,
aucune IP, seed non appliqué). Deux causes :

1) Téléchargement tronqué non détecté. _download_one ne vérifiait pas que le
   nombre d'octets reçus == Content-Length. Une connexion coupée en cours
   laissait un .part TRONQUÉ, validé comme « complet » (tmp.replace) : un
   qcow2 valide mais VIDE (128 Kio, juste l'en-tête, 5 Gio virtuels) ->
   disque sans OS -> pas de boot. Pire, ce cache corrompu était réutilisé.
   Fix : contrôle de complétude (done < total -> exception -> miroir suivant
   ou échec net, jamais de commit d'un fichier tronqué).

2) arm64 : « --boot uefi » simple laissait libvirt choisir l'AAVMF « secure »
   (clés Microsoft enrôlées) -> pas de boot. On désactive Secure Boot comme
   pour x86 (secure-boot=no -> AAVMF_CODE.no-secboot.fd).

Validé : redéploiement Fedora 42 aarch64 avec image complète + firmware
non-SB -> CPU 111 % (boot actif), IP en ~80 s, SSH OK (erplibre, aarch64,
Fedora 42 Cloud, sudo OK).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 09:22:46 +00:00
939e26ba83 [IMP] script todo: en-tête d'install (date, distro, version, archi) dans le log
Le log d'installation commence désormais par un en-tête identifiant
l'installation : date, VM, distribution + version, architecture, branche, IP.
Écrit dès la création du log (plus jamais vide au démarrage).

_qemu_install_erplibre_monitored déduit distro/version/arch de chaque VM
(nom via _qemu_infra_name + arch via virsh dumpxml) et les passe à
launch_installs, qui écrit l'en-tête et les stocke dans le manifeste.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 08:57:36 +00:00
b395e7c3ed [FIX] install: supporter Ubuntu 26.04 (sinon deps système sautées -> pas de gcc)
L'install ERPLibre échouait sur une VM Ubuntu 26.04 :
« configure: error: no acceptable C compiler found in $PATH » -> pyenv ne
compile pas Python -> pas de venv -> pip/poetry/repo absents.

Cause : install_dev.sh ne listait Ubuntu que jusqu'à 25.10. Sur 26.04 il
tombait dans le « else » (« Your version is not supported… : 26.04 ») et
n'exécutait donc PAS install_debian_dependency.sh -> ni build-essential ni
gcc installés. Le catalogue de déploiement propose pourtant 26.04.

Fix : ajout de 26.04 à la liste des versions Ubuntu supportées.

Note : Ubuntu 26.04 utilise uutils (rust-coreutils), bogué en big-endian ;
sur s390x un « sort » peut paniquer (non bloquant ici) — problème amont.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 08:57:36 +00:00
50617e3909 [IMP] script todo: infra — architecture [all] (matrice distro×version×arch)
Menu « Déployer l'infra ERPLibre » : la sélection d'architecture propose
désormais [all] = toutes les architectures supportées. L'architecture
devient une dimension à part entière de la matrice de déploiement.

- [all] archis + [all] catalogue : une VM par (distro, version, archi
  publiée par cette distro). Ex. ubuntu -> amd64/arm64/s390x, debian/fedora
  -> amd64/arm64, arch -> amd64 (30 VM au total avec le catalogue courant).
- [all] archis + [granulaire] : la liste à plat inclut l'archi ([amd64]/
  [arm64]/[s390x]) ; on choisit des combinaisons précises par virgules.
- [all] archis + [principal] : version par défaut de chaque distro × chaque
  archi supportée.
- Une archi précise (arm64/s390x) restreint le catalogue aux distros qui la
  publient (inchangé).

selected porte l'archi par élément ; les noms sont suffixés par archi pour
les non-natives (erplibre-ubuntu-2604-s390x) -> pas de collision. --arch
transmis par VM. Chaque distro ne reçoit que les archis QU'ELLE publie.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 08:51:45 +00:00
bd94c277d3 [FIX] script qemu/todo: bonne IP quand la VM a plusieurs baux DHCP
Symptôme : ~/.ssh/config (et l'install) pointaient sur .31 alors que la VM
était joignable sur .32 -> SSH KO (« No route to host »), console OK.

Cause : au boot, une image cloud demande d'abord une IP DHCP avec son
hostname par défaut (« ubuntu ») -> 1er bail ; puis cloud-init fixe le vrai
hostname et le client redemande -> 2e bail (IP différente). La MÊME MAC a
donc DEUX baux ; le 1er (« ubuntu ») devient périmé. Le code retenait
aveuglément le PREMIER IPv4 de « virsh domifaddr » = le bail périmé. Plus
visible sur s390x/arm64 émulé (boot lent -> les deux baux coexistent).

Fix :
- todo._qemu_vm_ip : renvoie en priorité l'IP dont le bail dnsmasq porte le
  hostname == nom de la VM (bail définitif), sinon une IP JOIGNABLE (sshd up,
  test TCP:22), sinon le dernier bail — jamais le 1er au hasard. Attente
  portée à 10 min (boot émulé lent). Helpers _qemu_lease_candidates /
  _qemu_ip_reachable / _qemu_lease_ip_for_host.
- deploy_qemu.wait_for_ip : même logique (IP joignable, sinon la plus
  récente) pour l'IP affichée en fin de déploiement standalone.

Validé sur la VM s390x réelle : candidats [.31, .32] -> choisit .32
(hostname-match + seule joignable) ; ssh via alias OK.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 08:33:50 +00:00
0930f30cd3 [IMP] script todo: suffixe d'arch dans le nom + log d'install non vide
1) Nommage : _qemu_infra_name ajoute un suffixe d'architecture quand elle
   diffère de la native de l'hôte -> déployer un s390x sur un hôte amd64
   donne « erplibre-ubuntu-2604-s390x » (au lieu de « erplibre-ubuntu-2604 »).
   Évite les collisions de noms entre archis et rend l'archi visible. Passé
   dans les 3 appelants (VM unique + plan + jobs de l'infra).

2) Log d'installation vide : sur une archi ÉMULÉE (s390x/arm64 sur x86) le
   boot prend plusieurs minutes ; pendant ce temps l'attente n'écrivait rien
   -> le log restait VIDE et paraissait « bloqué ». _launch_one écrit
   désormais un en-tête d'attente immédiat + un battement toutes les ~30 s,
   et l'attente sshd/cloud-init passe de ~12 à ~20 min (boot émulé lent).
   _qemu_wait_ssh (chemin streamé) : timeout porté à 20 min également.

Validé : nommage (amd64/natif sans suffixe, s390x/arm64 suffixés) ; le log
se remplit dès le départ (en-tête + « ... 30s »).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 08:15:46 +00:00
88dc1d5409 [IMP] script qemu: support arm64/aarch64 (+ archi native marquée d'un *)
Ajoute l'architecture arm64 (aarch64) au déploiement, en plus d'amd64
(x86_64) et s390x. Disponibilité réelle vérifiée (juillet 2026) :
- arm64 : Ubuntu, Debian, Fedora (Arch : pas d'image cloud aarch64 -> rejet).
- s390x : Ubuntu seulement (inchangé).

deploy_qemu.py :
- host_arch() : arch native de l'hôte ; toute arch différente est ÉMULÉE
  (TCG, --virt-type qemu) — plus de liste FOREIGN_ARCHES figée.
- virt_install : arm64 -> --arch aarch64 --machine virt --boot uefi (firmware
  AAVMF résolu par libvirt) ; s390x inchangé ; x86 UEFI/OVMF inchangé.
- ensure_emulator(arch) généralisé : installe qemu-system-aarch64 + firmware
  UEFI AAVMF (arm64) ou qemu-system-s390x (s390x), selon le gestionnaire de
  paquets, avec vérif de présence (binaire + firmware pour arm64).
- Validation --arch tôt via ARCH_DISTRO_SUPPORT (message clair si la distro
  ne publie pas l'arch). Les URLs d'images arm64 marchent déjà via les alias
  (fedora/arch aarch64 ; ubuntu/debian arm64).

todo.py : menus d'architecture (VM unique + infra) proposent amd64/arm64/
s390x selon la distro ; l'architecture NATIVE de l'hôte est marquée d'un *
(défaut) ; les autres sont signalées « émulé, lent ». Le catalogue infra est
restreint aux distros publiant l'arch choisie (arm64 -> ubuntu/debian/fedora,
s390x -> ubuntu).

install_debian_dependency.sh : wkhtmltopdf (deb amd64 en dur) ignoré
best-effort sur toute arch non-x86_64 (au lieu d'avorter l'install).

Validé : dry-runs Ubuntu/Debian/Fedora arm64 (bonnes URLs + virt-install
aarch64/virt/uefi/qemu), rejet Arch arm64, non-régression s390x, menus et
filtrage simulés (natif *, arm64 par distro).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 07:56:20 +00:00
8652c30507 [FIX] install Fedora: git-daemon (repo sync via git daemon local échouait)
repo sync échouait sur Fedora :
  git: 'daemon' is not a git command.
  fatal: cannot obtain manifest git://127.0.0.1:9418/  -> Connection refused
  Unable to sync manifest ./manifest/git_manifest_erplibre.xml

Cause : sur Fedora la sous-commande « git daemon » N'EST PAS fournie par le
paquet « git » de base (contrairement à Debian/Ubuntu/Arch) mais par le
paquet séparé « git-daemon ». ERPLibre sert son manifeste via un « git
daemon » local (git://127.0.0.1:9418/) pendant repo sync ; sans le binaire,
le daemon ne démarre pas -> connexion refusée -> synchro du manifeste KO.

Fix : ajout de git-daemon aux dépendances Fedora.

Validé sur VM Fedora 42 réelle : avant, « git daemon » rc=1 ; après
« dnf install git-daemon », rc=0, et un git daemon local sert bien
git://127.0.0.1:9418/ (git ls-remote renvoie les refs).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 07:47:02 +00:00
3bf8fc2972 [IMP] script todo: infra deploy — option granulaire + choix d'architecture
Menu « Déployer l'infra ERPLibre » :

- Nouveau choix [granulaire] dans la sélection des distributions : affiche
  la liste À PLAT de TOUTES les versions du catalogue (distro + version,
  défauts marqués d'un *) et permet d'en choisir plusieurs par leurs numéros
  séparés par des virgules (ex. « 1,3,12 »). Complète [all] et [principal].

- Demande l'ARCHITECTURE du parc en début de flux, par défaut l'architecture
  NATIVE de l'hôte (amd64/arm64/s390x via uname -m). s390x est proposé mais
  émulé (lent) et n'a d'images cloud que pour Ubuntu -> le catalogue est
  alors restreint à Ubuntu (les autres distros sont ignorées avec un
  avertissement). --arch est transmis à deploy_qemu.py quand ≠ amd64.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 07:35:25 +00:00
374373cc7c [FIX] install Arch: mise à jour complète (pacman -Syu) contre glibc mismatch
Après le passage à pacman, l'init PostgreSQL échouait :
« /usr/bin/postgres: /usr/lib/libm.so.6: version GLIBC_2.44 not found ».
Cause : Arch est en rolling release et NE SUPPORTE PAS les mises à jour
partielles. Sur une image cloud dont la glibc date du build de l'image, un
« pacman -S <paquet récent> » (postgresql 18.4) installe un binaire lié à
une glibc plus récente que celle du système -> symbole introuvable.

Fix : mise à jour COMPLÈTE (pacman -Syu) avant d'installer, dans les deux
endroits : install_arch_linux.sh (deps OS) et le bootstrap Arch de
_qemu_erplibre_remote_cmd (todo.py, remplace -Syy par -Syu).

Validé sur VM Arch réelle : après -Syu, « postgres (PostgreSQL) 18.4 » OK,
initdb OK, service postgresql actif, superuser erplibre créé, psql connecte.
Chaîne complète confirmée : gcc 16.1.1, make, node, psql tous présents.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 07:27:44 +00:00
63e7b6af8c [FIX] install Arch (pacman/base-devel) + attente fin cloud-init (Fedora)
Deux échecs d'install ERPLibre sur VM constatés dans les logs :

Arch — install_arch_linux.sh utilisait « yay » (helper AUR ABSENT d'une
image cloud et qui refuse de tourner en root) et n'installait JAMAIS
base-devel : sur une image cloud fraîche rien ne s'installait, donc pas de
compilateur C -> pyenv : « no acceptable C compiler found » -> build de
Python 3.12 échoué -> pas de venv -> pip/poetry/repo absents. Réécrit avec
pacman (dépôts officiels) : base-devel (gcc/make), deps de build pyenv
(openssl/zlib/xz/tk/…), PostgreSQL (+ initdb, Arch ne l'initialise pas),
Node/npm, deps Odoo en best-effort paquet par paquet (pacman refuse toute
la transaction sur un seul nom inconnu). wkhtmltopdf (AUR) : ignoré
proprement.

Fedora — « Connection closed by remote host » (exit 255) dès le début :
« cloud-init status --wait » tournait dans une session SSH UNIQUE tuée
quand cloud-init régénère les clés d'hôte et REDÉMARRE sshd au 1er boot.
On attend désormais la FIN de cloud-init via des connexions COURTES
successives (chaque tentative survit à un redémarrage de sshd), AVANT de
lancer l'install — dans les deux chemins : _qemu_wait_ssh (streamé) et
_launch_one (détaché/monitoré). On matche sur le TEXTE de « cloud-init
status » (done/disabled/error/degraded) car son code de sortie n'est pas
fiable selon la version.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 07:19:17 +00:00
482a914ab8 [FIX] script qemu: bon paquet émulateur s390x sur apt (qemu-system-s390x)
Sur apt, qemu-system-misc NE contient PAS l'émulateur s390x (il fournit
alpha/avr/hppa/… mais pas s390x) : ensure_s390x_emulator installait donc
un paquet inutile puis échouait (« qemu-system-s390x toujours absent »).
Le binaire est fourni par le paquet dédié qemu-system-s390x.

Validé de bout en bout : déploiement réel Ubuntu 24.04 s390x émulé (TCG) ->
domaine type=qemu, machine s390-ccw-virtio, emulator qemu-system-s390x ->
boot OK, IP DHCP, SSH par clé (erplibre), sudo OK, uname -m = s390x
(IBM z15, /proc/sysinfo Type: 8561).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 07:09:21 +00:00
37a999b911 [ADD] script qemu: support architecture s390x (IBM Z, Ubuntu)
Ajoute --arch s390x au déploiement QEMU. Réalité constatée (juillet 2026) :
seul Ubuntu publie des images cloud s390x (cloud-images.ubuntu.com : OK) ;
Debian et Fedora n'en publient pas (404), Arch ne cible que x86_64/aarch64.
s390x est donc scopé à Ubuntu et rejeté proprement pour les autres distros.

deploy_qemu.py :
- FOREIGN_ARCHES / S390X_DISTROS : s390x n'est valide que pour Ubuntu.
- virt_install : sur s390x -> --arch s390x, --machine s390-ccw-virtio,
  --virt-type qemu (émulation TCG, pas de KVM sur hôte x86), console SCLP
  (pas de série ISA), amorçage IPL/zipl (aucun --boot UEFI/BIOS). Les
  disques/réseau bus=virtio sont mappés en virtio-ccw par libvirt.
- ensure_s390x_emulator : installe qemu-system-s390x au besoin
  (apt: qemu-system-misc, dnf: qemu-system-s390x, pacman:
  qemu-emulators-full, zypper: qemu-s390).
- Avertit que s390x est ÉMULÉ (lent) sur un hôte x86.

todo.py : le menu « Déployer une VM » demande l'architecture (s390x proposé
uniquement pour Ubuntu, avec avertissement lenteur) et passe --arch.

install_debian_dependency.sh : wkhtmltopdf n'a pas de build s390x -> skip
best-effort au lieu d'avorter l'install (la branche s390x rust-all existait
déjà pour compiler les wheels).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 07:03:19 +00:00
deddaeb6a9 [FIX] script qemu: no cloud-init package install (Fedora hang) + bigger disk
Fedora install stalled: the log stopped right after boot with no exit
marker. Cause: cloud-init was running "dnf -y install qemu-guest-agent
openssh-server" at first boot; on this host's slow VM network that dnf
took many minutes (metadata refresh + download), so cloud-init stayed
"running" and the install (which waits for cloud-init) never proceeded.

Fix: do NOT install any package via cloud-init. sshd is already present
in every cloud image (verified Ubuntu/Debian/Fedora/Arch) and is just
enabled via runcmd; the tools (curl/git/make…) are installed by the
ERPLibre bootstrap with optimised mirrors. cloud-init now finishes in
seconds (Fedora: "status: done" at 10s instead of blocking 5+ min).
--package still adds a cloud-init packages block on demand.

Also: when ERPLibre is installed via the infra menu, add
ERPLIBRE_EXTRA_DISK_GB (5G) to each VM's disk, because the image minimum
left only ~97 MB free after installation. Drop the now-useless
"--package git" (the bootstrap installs git).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 06:48:48 +00:00
137f4245ec [FIX] script todo: wait for cloud-init before install (Arch pacman lock)
The Arch install failed at once: "error: failed to synchronize all
databases (unable to lock database)" then "reflector: command not
found". Cause: cloud-init was still running its own pacman (installing
qemu-guest-agent/openssh) and held /var/lib/pacman/db.lck when our
bootstrap started, so every pacman call failed and reflector never got
installed.

Fix: the remote install now waits for cloud-init to finish first
("cloud-init status --wait", 15 min timeout) before touching any package
manager — this releases the apt/dnf/pacman lock cloud-init holds during
its package stage (helps all distros). For Arch, also drop a stale
db.lck when no pacman is actually running. Verified live: cloud-init
done, no lock, reflector + refresh + curl/git/make all succeed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 06:27:15 +00:00
7a001a9b84 [IMP] script todo: show log path in dashboard + fast repo refresh (incl. Arch)
Dashboard: the info bar under the log now shows the selected VM's log
file path (in addition to its ssh command), so it can be opened/shared.

Install bootstrap: each package-manager branch first refreshes the repos
so the VM is as fast as possible, and Arch (pacman) is now supported:
- apt: apt-get update
- dnf: dnf makecache (dnf5 picks the fastest mirrors)
- pacman (Arch): reflector selects the 20 fastest HTTPS mirrors ->
  pacman -Syy -> install curl/git/make (Arch was previously unsupported
  by the bootstrap and would abort with "no package manager").
Validated live on the Arch VM: reflector + refresh + install all OK.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 06:10:58 +00:00
69d87f93c3 [FIX] script qemu: Arch SSH package name (openssh, not openssh-server)
cloud-init reported "status: error" on Arch because the seed's packages
list requested "openssh-server", which does not exist on Arch (the
package is "openssh"). Pick the SSH server package per distro: "openssh"
on Arch, "openssh-server" elsewhere. Verified on Arch: cloud-init now
finishes with "status: done", openssh installed, sshd active.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 05:59:08 +00:00
ea3f9c00cf [FIX] script qemu: Arch networking (network-config key = eth0)
Arch VMs booted (after the Secure Boot fix) but eth0 stayed DOWN and
cloud-init never finished -> no IP, no SSH. Cause found in the guest:
cloud-init's Arch renderer writes the systemd-networkd [Match] Name from
the ethernet KEY of the v2 config (ignoring "match:"), so our key
"primary" produced "Name=primary" which matches no interface (Arch's NIC
is eth0). Rename the key to "eth0": Arch now renders "Name=eth0" and
DHCPs; Debian/Fedora/Ubuntu still use "match: name: e*" (verified Debian
redeploy: enp1s0 UP with an IP), so no regression.

Arch is now fully working end to end: boot, DHCP IP, SSH by key, user
erplibre in sudo, passwordless sudo, console login erplibre/erplibre.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 05:56:11 +00:00
18d3f4461c [FIX] script qemu: disable UEFI Secure Boot (Arch boot)
OVMF Secure Boot rejected Arch's unsigned GRUB with "Access Denied" ->
"No bootable option" -> dropped to the firmware menu, never booted.
Disable Secure Boot in the UEFI boot (firmware.feature secure-boot=no):
Arch now boots and cloud-init applies user/password/hostname/ssh-key
(console login erplibre/erplibre works). Ubuntu/Debian/Fedora also boot
without Secure Boot (their signed shim is not required), no regression.

Note: Arch networking (eth0 stays down, cloud-init does not finish) is
still under investigation and tracked separately.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 05:49:28 +00:00
44d64fe87a [IMP] script qemu: add Arch Linux to the deploy catalog
Arch (rolling release, single "latest" version) joins ubuntu/debian/
fedora: official cloud image geo.mirror.pkgbuild.com/images/latest/
Arch-Linux-x86_64-cloudimg.qcow2 (cloud-init included), osinfo=archlinux
(known locally), UEFI boot + virtio seed like the others. ERPLibre
already has install_arch_linux.sh. Exposed in the infra/deploy menus.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 05:28:41 +00:00
3cb6f45269 [FIX] script install: Fedora wkhtmltopdf via AlmaLinux 9 RPM
wkhtmltopdf 0.12.6.1-3 no longer ships a fedora-* RPM (my URL 404'd).
The AlmaLinux 9 (EL9) RPM is compatible with Fedora — tested on the
Fedora 42 VM: "dnf install <almalinux9 rpm>" resolves the deps and
"wkhtmltopdf --version" reports 0.12.6.1 (with patched qt). Use it, with
an AlmaLinux 8 fallback.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 05:23:24 +00:00
7def76eb62 [FIX] script install: Fedora postgres initdb (locale) + dev group id
Tested make install_os on a real Fedora 42 VM (exit 0: gcc 15, psql,
node 22 installed). Two fixes from the run:

- postgresql-setup --initdb failed with "invalid locale settings"
  because Fedora cloud images ship no LANG; force a valid locale via
  PGSETUP_INITDB_OPTIONS=--locale=C.UTF-8 and wipe a partial data dir
  first (a failed init leaves /var/lib/pgsql/data/log behind and blocks
  the retry). Verified: cluster PG 16 initialised, service active,
  erplibre superuser created.
- the dev-tools group was referenced by display name ("C Development
  Tools and Libraries", "No match"); use the group id c-development.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 05:17:40 +00:00
84e383a3b1 [FIX] script install: Fedora support + Ubuntu apt-lock/postgis fixes
From the QEMU install logs: Debian 12 succeeded, Ubuntu 24.04 and
Fedora 42 failed.

Ubuntu (install_debian_dependency.sh):
- apt failed with "Could not get lock" (cloud-init/unattended-upgrades
  hold it on first boot) -> all apt-get calls now use
  DPkg::Lock::Timeout=600 so apt waits for the lock.
- "postgis" is not a package on Ubuntu 24.04, so the postgresql line
  exited 1 before installing build-essential -> no C compiler -> pyenv
  could not build Python 3.12.10. PostGIS is now best-effort (tries
  postgis, then postgresql-postgis) and never aborts; postgresql-contrib
  is added.

Fedora (new install_fedora_dependency.sh, wired into install_dev.sh):
- install_dev.sh dispatched Fedora to the apt script; it now has a
  fedora / ID_LIKE branch calling a dnf-based dependency installer
  (dev tools, postgresql-server + initdb, pyenv build deps, node, etc.),
  using --refresh --skip-unavailable to tolerate mirror/name issues.

Bootstrap (todo.py): the dnf "curl git make" install hit a GPG/checksum
failure on a fresh image; it now uses --refresh and retries after
"dnf clean all".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 05:07:10 +00:00
4a821226fb [IMP] script todo: print all log paths when opening the install monitor
After "Opening the interactive monitor..." the install now lists every
VM's log file path, so they can be read or shared even when leaving the
dashboard before the installs finish.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 04:41:41 +00:00
0830c895eb [FIX] script todo: reliable curl/git/make install + copyable logs
Root cause of "git/make: command not found": the bootstrap ran
"apt-get update -qq && apt-get install -y $PKGS". Inside an && list,
set -e does NOT abort on failure, so when apt-get update failed (flaky
VM network) the install was silently skipped and the script marched on
without git/make. Now: "apt-get update || true; apt-get install -y
$PKGS" (update best-effort, install mandatory), followed by an explicit
"command -v curl git make" check that exits with a clear message
("Outil manquant ... (reseau de la VM ?)") instead of a cryptic failure
later. Shared by the streamed and the monitored install paths.

Dashboard: add "c" to copy the selected VM's full log to the clipboard
(OSC 52, works over SSH) with a notification; the ssh bar documents
Shift+drag for native terminal selection; on close, print a ready-to-
copy "tail -n +1 <logdir>/*.log" to share the logs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 04:40:18 +00:00
d4d3d801c3 [ADD] script todo: interactive Textual dashboard for ERPLibre installs
Deploying ERPLibre (single VM [1] and infra [4]) now asks "Interactive
monitoring dashboard?". When yes, the installs run DETACHED (setsid, one
log file + exit marker per VM) and a Textual dashboard opens:

- left: a table of VMs with live status (⏳ running / ✅ done / ❌ failed
  with exit code) and elapsed time;
- right: the selected VM's log, tailed live (f toggles follow);
- footer: the VM's ssh command; s suspends the dashboard and SSHes in;
- q quits back to the menu — the installs keep running detached, so you
  can leave before they finish and reopen later on the same log dir.

New module qemu_install_monitor.py holds the detached launcher and the
Textual app. The remote install script is factored into
_qemu_erplibre_remote_cmd. Falls back gracefully if textual is missing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 04:27:25 +00:00
62bf80d9b1 [ADD] requirement: textual (TUI for the QEMU install monitor)
Adds textual to the ERPLibre tooling requirements (installed into
.venv.erplibre by install_locally.sh) for the upcoming interactive
dashboard that monitors parallel ERPLibre installs across VMs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 04:21:52 +00:00
8d8d0750b0 [FIX] script todo: wait for SSH before the ERPLibre install
Right after boot the VM's sshd may not be up yet (notably on Fedora),
so the install failed with "Connection refused". _qemu_install_erplibre_vm
now polls SSH (ssh ... true, BatchMode) for up to 3 minutes and skips
with a clear message if it never answers, instead of failing instantly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 04:10:33 +00:00
83a28ed9e8 [IMP] script todo: add "principal" choice to infra (one main VM per distro)
The infra distribution prompt now accepts "principal" (alongside
numbers and "all"): it deploys the default version of each distro —
ubuntu 24.04, debian 12, fedora 42 — one VM each. The default version is
also marked with a * in the distro listing so it is visible.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 04:08:38 +00:00
83f71561f8 [FIX] script todo: install curl/git/make before ERPLibre make targets
Minimal cloud images ship without make (and often without curl), so the
ERPLibre install cloned the repo then died on "make: command not found".
The remote bootstrap now installs curl, git and make via apt (Debian/
Ubuntu) or dnf/yum (Fedora) — running apt-get update first since
cloud-init did not refresh the lists — before cloning and running
make install_os / make install_odoo_18.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 04:03:03 +00:00
0aa84ed1e3 [IMP] script install: quiet poetry/repo by default, EL_VERBOSE to opt in
Installation was very noisy: poetry ran "install -vvv" and repo sync /
git daemon ran with -v/--verbose. They are now quiet by default
(poetry -q, repo sync -q, no git daemon --verbose) and the detailed
logs come back only when EL_VERBOSE=1.

Applied to install_locally.sh (poetry) and every manifest script (repo
sync + git daemon). env_var.sh documents EL_VERBOSE and respects a value
already set in the environment, so "EL_VERBOSE=1 make install_odoo_18"
works.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 03:57:04 +00:00
65a0d6f907 [IMP] script todo: offer ERPLibre install on single VM + run make targets
"Deploy a new VM" now asks, after a successful deploy, whether to
install ERPLibre into ~/git/erplibre (pick a branch), just like the
infra command.

Installing ERPLibre no longer only clones the repo: after the clone it
runs "make install_os" then "make install_odoo_18" over SSH (the
erplibre user has passwordless sudo from cloud-init). The Odoo target is
a constant (ERPLIBRE_ODOO_TARGET) and both the single-VM and infra flows
use the same install path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 03:48:56 +00:00
6ac7624950 [IMP] script todo: extend "Clean up QEMU" with 4 more sweeps
The cleanup command now runs, each listed and confirmed independently:

1. orphan files (disks/seeds/.part/nvram) — as before;
2. ghost domains: libvirt domains whose disk no longer exists ->
   offer destroy + undefine --nvram;
3. stale codename-named Ubuntu images (noble/resolute/... left by the
   move to /releases/ version-named images) -> targeted delete;
4. orphan ~/.ssh/config entries: "Host erplibre-*" blocks with no
   matching VM (personal SSH hosts are never touched);
5. stale libvirt DHCP leases whose MAC belongs to no VM (best-effort
   rewrite of the dnsmasq status file + SIGHUP; they also self-expire);
6. the full base-image cache remains an explicit opt-out at the end.

Detections verified read-only on the host.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 03:12:43 +00:00
c0ceb6bea7 [IMP] script todo: add "Clean up QEMU" (orphan files) command
New Manage entry that finds and lists QEMU leftovers with no matching
libvirt domain, then asks before deleting:

- working disks /var/lib/libvirt/images/<name>.qcow2
- cloud-init seeds .../iso/<name>-seed.iso
- interrupted downloads (*.part)
- orphan UEFI nvram files

Sizes are shown human-readable with a total. Cached base cloud images
(reusable) are listed and offered separately, since removing them forces
a re-download; this also cleans the stale codename-named duplicates left
by the switch to /releases/ version-named images.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 02:31:56 +00:00
d83d244805 [FIX] script todo/qemu: safer VM deploy prompt (size unit, name, errors)
Three papercuts hit when creating a VM from the menu:

1. Disk size "30" was passed verbatim to qemu-img resize, which read it
   as 30 BYTES and failed ("use --shrink"). The prompt now shows units
   (e.g. 30G, 1T) and a bare number is normalised to GB ("30" -> "30G"),
   in the menu and in deploy_qemu.py itself.
2. The VM name is no longer required: leaving it blank uses the default
   erplibre-<distro>-<version> (e.g. erplibre-ubuntu-2604). Distro and
   version are now asked first so the default can be offered.
3. The menu ignored the deploy exit code and carried on to "wait for the
   VM IP" even after a failure, hanging forever with the error scrolled
   off. It now checks the return code and stops with a clear message.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 02:26:07 +00:00
17 changed files with 2225 additions and 198 deletions

View file

@ -33,3 +33,7 @@ EL_GITHUB_TOKEN=""
EL_MANIFEST_PROD="./default.xml"
EL_MANIFEST_DEV="./manifest/git_manifest_erplibre.xml"
EL_LANG="fr"
# Verbosité de l'installation (poetry install, repo sync, git daemon).
# 0 = silencieux (défaut), 1 = logs détaillés. On respecte une valeur déjà
# passée en environnement : EL_VERBOSE=1 make install_odoo_18
EL_VERBOSE="${EL_VERBOSE:-0}"

View file

@ -24,6 +24,7 @@ openai
humanize
requests
urwid
textual
python-dotenv
python-dateutil
unidecode

View file

@ -1,68 +1,126 @@
#!/usr/bin/env bash
# © 2021-2026 TechnoLibre (http://www.technolibre.ca)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
#
# Dépendances système ERPLibre pour Arch Linux (pacman). Réécrit pour les
# images cloud Arch : l'ancien script utilisait « yay » (helper AUR ABSENT
# d'une image cloud et qui refuse de tourner en root) et n'installait jamais
# « base-devel » -> pas de compilateur C -> échec de la compilation de Python
# par pyenv. On passe tout par pacman (dépôts officiels) ; l'AUR (wkhtmltopdf)
# est best-effort et ne bloque pas.
install_package() {
local package_name=$1
. ./env_var.sh
# Check package is already installed
if pacman -Qs "$package_name" >/dev/null; then
echo "$package_name is already installed."
else
echo "Installation of package $package_name..."
yes | yay -S "$package_name"
fi
}
EL_USER=${USER}
# Odoo installation
install_package postgis
install_package postgresql
install_package mariadb
install_package libev
install_package wkhtmltopdf
install_package freetds
# pacman résilient : --needed saute ce qui est déjà là, --noconfirm en non
# interactif.
PAC="sudo pacman -S --needed --noconfirm"
# Mise à jour COMPLÈTE obligatoire : Arch est en rolling release et NE SUPPORTE
# PAS les mises à jour partielles. Sur une image cloud dont la glibc est
# ancienne, un « pacman -S <paquet récent> » lie le binaire à une glibc plus
# récente que celle installée -> « /usr/bin/postgres: GLIBC_2.44 not found ».
# « -Syu » met à jour glibc (et tout le système) pour rester cohérent.
sudo pacman -Syu --noconfirm || true
echo "Need password to create symbolic link, create postgres user and install npm :"
sudo ln -fs /usr/lib/libldap.so /usr/lib/libldap_r.so
#--------------------------------------------------
# Outils de compilation — CRITIQUE (build Python via pyenv, extensions Python)
# base-devel fournit gcc, make, patch, pkgconf, fakeroot, etc.
#--------------------------------------------------
echo -e "\n---- Groupe base-devel (compilateur C, make…) ----"
${PAC} base-devel
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "pacman base-devel installation error."
exit 1
fi
#--------------------------------------------------
# Dépendances de build pyenv (compilation de CPython) + outils de base
#--------------------------------------------------
echo -e "\n---- Dépendances pyenv (compilation Python) + outils ----"
${PAC} git wget curl openssl zlib xz tk bzip2 readline sqlite libffi
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "pacman pyenv dependencies installation error."
exit 1
fi
#--------------------------------------------------
# PostgreSQL (+ PostGIS) — Arch n'initialise pas le cluster automatiquement
#--------------------------------------------------
echo -e "\n---- Install PostgreSQL Server ----"
${PAC} postgresql
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "pacman postgresql installation error."
exit 1
fi
# Initialisation du cluster (chemin Arch : /var/lib/postgres/data).
if [ ! -f /var/lib/postgres/data/PG_VERSION ]; then
echo -e "\n---- Initialisation du cluster PostgreSQL ----"
sudo -u postgres initdb --locale=C.UTF-8 --encoding=UTF8 \
-D /var/lib/postgres/data || true
fi
sudo systemctl enable --now postgresql 2>/dev/null || true
# PostGIS : optionnel (géospatial), ne bloque pas.
${PAC} postgis || echo "PostGIS non installé (optionnel)."
echo -e "\n---- Creating the ERPLibre PostgreSQL User ----"
sudo su - postgres -c "createuser -s ${EL_USER}" 2>/dev/null || true
echo -e "\n---- Update NPM ----"
install_package npm
#--------------------------------------------------
# Dépendances Odoo / ERPLibre (extensions Python, bindings)
#--------------------------------------------------
echo -e "\n---- Installing arch dependency ----"
# best-effort paquet par paquet : pacman refuse TOUTE la transaction si UN
# seul nom est inconnu (pas de --skip-unavailable). Ces deps ne sont pas
# critiques pour le build Python -> on ne bloque pas sur un nom absent.
for _pkg in libxslt libzip libldap libsasl cmake parallel swig portaudio \
cups xmlsec freetds libev mariadb-libs shfmt; do
${PAC} "${_pkg}" || echo " ${_pkg} : non installé (optionnel), on continue."
done
# libldap_r : Odoo/python-ldap cherche parfois libldap_r.so (supprimé des
# versions récentes d'OpenLDAP) -> lien vers libldap.so.
sudo ln -fs /usr/lib/libldap.so /usr/lib/libldap_r.so 2>/dev/null || true
sudo npm install npm@latest -g
#--------------------------------------------------
# Node.js + npm (rtlcss, less)
#--------------------------------------------------
echo -e "\n---- Installing nodeJS NPM and rtlcss ----"
${PAC} nodejs npm
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "npm install npm lastest installation error."
exit 1
fi
sudo npm install -g rtlcss
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "npm install rtlcss installation error."
exit 1
fi
sudo npm install -g less
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "npm install less installation error."
echo "pacman nodejs installation error."
exit 1
fi
sudo npm install -g rtlcss less || echo "npm rtlcss/less: erreur (optionnel)."
echo -e "\n---- Test tool ----"
npm install
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "npm install prettier + plugin-xml installation error."
exit 1
npm install || echo "npm install (prettier/plugin-xml): erreur (optionnel)."
# Pour erplibre_devops.
${PAC} sshpass || echo "sshpass non installé (optionnel)."
#--------------------------------------------------
# nginx (optionnel)
#--------------------------------------------------
if [ "${EL_INSTALL_NGINX}" = "True" ]; then
echo -e "\n---- Installing nginx ----"
${PAC} nginx || echo "nginx: erreur (optionnel)."
fi
# TODO install nginx
# ERPLibre installation
install_package cmake
install_package parallel
install_package tk
install_package shfmt
# For erplibre_devops
install_package sshpass
#--------------------------------------------------
# wkhtmltopdf (optionnel) — uniquement dans l'AUR sur Arch (pas de paquet
# officiel). Sur une image cloud sans helper AUR, on saute proprement.
#--------------------------------------------------
if [ "${EL_INSTALL_WKHTMLTOPDF}" = "True" ]; then
if ! command -v wkhtmltopdf >/dev/null 2>&1; then
echo "wkhtmltopdf : disponible seulement via l'AUR sur Arch, ignoré"
echo " (installez-le manuellement avec un helper AUR si nécessaire)."
else
echo -e "\n---- Already installed wkhtml ----"
fi
fi
echo -e "\n---- Arch Linux dependency installation done ----"

View file

@ -5,6 +5,11 @@
EL_USER=${USER}
#EL_INSTALL_WKHTMLTOPDF="True"
# apt-get qui ATTEND le verrou (jusqu'à 10 min) : sur une image cloud fraîche,
# cloud-init / unattended-upgrades tiennent souvent le verrou apt au 1er boot
# (« Could not get lock » -> échec de l'install). DPkg::Lock::Timeout patiente.
APT_GET="sudo apt-get -o DPkg::Lock::Timeout=600"
##
### WKHTMLTOPDF download links
## === Ubuntu Focal x64 === (for other distributions please replace these two links,
@ -55,25 +60,30 @@ echo -e "\n---- Update Server ----"
if [ "18.04" == "${UBUNTU_VERSION}" ]; then
# add-apt-repository can install add-apt-repository Ubuntu 18.x
sudo apt-get install software-properties-common curl -y
${APT_GET} install software-properties-common curl -y
# universe package is for Ubuntu 18.x
sudo add-apt-repository universe
# libpng12-0 dependency for wkhtmltopdf
sudo add-apt-repository "deb http://mirrors.kernel.org/ubuntu/ xenial main"
sudo apt-get update
sudo apt-get upgrade -y
${APT_GET} update
${APT_GET} upgrade -y
fi
#--------------------------------------------------
# Install PostgreSQL Server
#--------------------------------------------------
echo -e "\n---- Install PostgreSQL Server ----"
sudo apt-get install postgresql libpq-dev postgis -y
${APT_GET} install postgresql postgresql-contrib libpq-dev -y
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "apt-get install postgresql installation error."
exit 1
fi
# PostGIS : optionnel (géospatial). Le nom du paquet « postgis » n'existe pas
# sur toutes les versions (Ubuntu 24.04) -> best-effort, ne bloque pas.
${APT_GET} install postgis -y \
|| ${APT_GET} install postgresql-postgis -y \
|| echo "PostGIS non installé (optionnel)."
echo -e "\n---- Creating the ERPLibre PostgreSQL User ----"
sudo su - postgres -c "createuser -s ${EL_USER}" 2>/dev/null || true
@ -82,20 +92,20 @@ sudo su - postgres -c "createuser -s ${EL_USER}" 2>/dev/null || true
# Install Dependencies
#--------------------------------------------------
echo -e "\n--- Installing debian dependency --"
sudo apt-get install git build-essential wget libxslt-dev libzip-dev libldap2-dev libsasl2-dev gdebi-core libffi-dev libbz2-dev parallel pysassc swig cmake portaudio19-dev libcups2-dev shfmt xmlsec1 -y
${APT_GET} install git build-essential wget libxslt-dev libzip-dev libldap2-dev libsasl2-dev gdebi-core libffi-dev libbz2-dev parallel pysassc swig cmake portaudio19-dev libcups2-dev shfmt xmlsec1 -y
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "apt-get debian tool installation error."
exit 1
fi
sudo apt-get install libmariadbd-dev freetds-dev -y
${APT_GET} install libmariadbd-dev freetds-dev -y
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "apt-get libmariadb installation error."
exit 1
fi
if [ "18.04" == "${UBUNTU_VERSION}" ]; then
sudo apt-get install libpng12-0 -y
${APT_GET} install libpng12-0 -y
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "apt-get libpng installation error."
@ -103,14 +113,14 @@ if [ "18.04" == "${UBUNTU_VERSION}" ]; then
fi
fi
# Dependencies for pyenv
sudo apt-get install make libssl-dev zlib1g-dev libreadline-dev libsqlite3-dev curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev liblzma-dev -y
${APT_GET} install make libssl-dev zlib1g-dev libreadline-dev libsqlite3-dev curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev liblzma-dev -y
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "apt-get pyenv dependencies installation error."
exit 1
fi
# Dependencies for selenium
sudo apt-get install libcairo2-dev python3-dev pkg-config libxt-dev libgirepository1.0-dev -y
${APT_GET} install libcairo2-dev python3-dev pkg-config libxt-dev libgirepository1.0-dev -y
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "apt-get selenium dependencies installation error."
@ -118,8 +128,8 @@ if [[ $retVal -ne 0 ]]; then
fi
echo -e "\n---- Installing nodeJS NPM and rtlcss for LTR support ----"
sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg
${APT_GET} update
${APT_GET} install -y ca-certificates curl gnupg
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
@ -132,8 +142,8 @@ else
fi
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
sudo apt-get update
sudo apt-get install nodejs -y
${APT_GET} update
${APT_GET} install nodejs -y
sudo npm install npm@latest -g
retVal=$?
@ -177,7 +187,12 @@ fi
#--------------------------------------------------
# Install Wkhtmltopdf if needed
#--------------------------------------------------
if [ ${EL_INSTALL_WKHTMLTOPDF} = "True" ]; then
if [ "$(uname -m)" != "x86_64" ]; then
# WKHTMLTOX_X64 pointe vers un .deb amd64 : sur toute autre architecture
# (s390x, arm64/aarch64…) gdebi échouerait. On saute proprement plutôt que
# d'avorter tout l'install (wkhtmltopdf est optionnel).
echo "wkhtmltopdf : pas de build pour $(uname -m), ignoré (optionnel)."
elif [ ${EL_INSTALL_WKHTMLTOPDF} = "True" ]; then
echo -e "\n---- Installing wkhtml ----"
INSTALLED=$(dpkg -s wkhtmltox | grep installed)
if [ "" == "${INSTALLED}" ]; then

View file

@ -3,11 +3,11 @@
if [[ "${OSTYPE}" == "linux-gnu" ]]; then
source /etc/os-release
if [[ "${ID}" == "ubuntu" ]]; then
if [[ "${VERSION_ID}" == "18.04" || "${VERSION_ID}" == "20.04" || "${VERSION_ID}" == "22.04" || "${VERSION_ID}" == "22.10" || "${VERSION_ID}" == "23.04" || "${VERSION_ID}" == "23.10" || "${VERSION_ID}" == "24.04" || "${VERSION_ID}" == "25.04" || "${VERSION_ID}" == "25.10" ]]; then
if [[ "${VERSION_ID}" == "18.04" || "${VERSION_ID}" == "20.04" || "${VERSION_ID}" == "22.04" || "${VERSION_ID}" == "22.10" || "${VERSION_ID}" == "23.04" || "${VERSION_ID}" == "23.10" || "${VERSION_ID}" == "24.04" || "${VERSION_ID}" == "25.04" || "${VERSION_ID}" == "25.10" || "${VERSION_ID}" == "26.04" ]]; then
echo "\n---- linux-gnu installation process started ----"
./script/install/install_debian_dependency.sh
else
echo "Your version is not supported, only support 18.04, 20.04 and 22.04 - 24.04, 25.04, 25.10 : ${VERSION_ID}"
echo "Your version is not supported, only support 18.04, 20.04 and 22.04 - 24.04, 25.04, 25.10, 26.04 : ${VERSION_ID}"
fi
elif [[ "${ID}" == "linuxmint" ]]; then
if [[ "${VERSION_ID}" == "22.3" ]]; then
@ -20,9 +20,12 @@ if [[ "${OSTYPE}" == "linux-gnu" ]]; then
./script/install/install_debian_dependency.sh
elif [[ "${ID}" == "arch" ]]; then
./script/install/install_arch_linux.sh
elif [[ "${ID}" == "fedora" || "${ID_LIKE}" == *"fedora"* || "${ID_LIKE}" == *"rhel"* ]]; then
echo "\n---- Fedora installation process started ----"
./script/install/install_fedora_dependency.sh
else
./script/install/install_debian_dependency.sh
echo "Your Linux system is not supported, only support Ubuntu 18.04 or Ubuntu 20.04 or Ubuntu 22.04 - Ubuntu 23.10 - Ubuntu 24.04, Ubuntu 25.04, Ubuntu 25.10 ."
echo "Your Linux system is not supported, only support Ubuntu 18.04 or Ubuntu 20.04 or Ubuntu 22.04 - Ubuntu 23.10 - Ubuntu 24.04, Ubuntu 25.04, Ubuntu 25.10, Debian, Fedora, Arch."
fi
elif [[ "${OSTYPE}" == "darwin"* ]]; then
echo "\n---- Darwin installation process started ----"

View file

@ -0,0 +1,129 @@
#!/usr/bin/env bash
# © 2021-2026 TechnoLibre (http://www.technolibre.ca)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
#
# Dépendances système ERPLibre pour Fedora (dnf). Équivalent Fedora de
# install_debian_dependency.sh. « --skip-unavailable » tolère un nom de paquet
# absent (dnf5) au lieu d'échouer sur tout le lot.
. ./env_var.sh
EL_USER=${USER}
# dnf résilient : rafraîchit le cache (évite « checksum doesn't match » /
# signature après un cache périmé) et saute les paquets introuvables.
DNF="sudo dnf install -y --refresh --skip-unavailable"
#--------------------------------------------------
# Outils de compilation (build Python via pyenv, extensions Python)
#--------------------------------------------------
echo -e "\n---- Groupe outils de développement ----"
# Groupes par ID (le nom affiché « C Development Tools... » n'est pas matché).
sudo dnf group install -y --skip-unavailable development-tools c-development \
|| sudo dnf install -y gcc gcc-c++ make automake patch
#--------------------------------------------------
# PostgreSQL
#--------------------------------------------------
echo -e "\n---- Install PostgreSQL Server ----"
${DNF} postgresql-server postgresql-contrib libpq-devel
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "dnf install postgresql installation error."
exit 1
fi
# Initialisation du cluster (Fedora ne le fait pas automatiquement).
if [ ! -f /var/lib/pgsql/data/PG_VERSION ]; then
echo -e "\n---- Initialisation du cluster PostgreSQL ----"
# Nettoie un init partiel et FORCE une locale valide : les images cloud
# Fedora n'ont pas de LANG défini -> « initdb: invalid locale settings ».
sudo rm -rf /var/lib/pgsql/data
sudo PGSETUP_INITDB_OPTIONS="--locale=C.UTF-8 --encoding=UTF8" \
postgresql-setup --initdb || true
fi
sudo systemctl enable --now postgresql 2>/dev/null || true
# PostGIS : optionnel (géospatial), ne bloque pas.
${DNF} postgis || echo "PostGIS non installé (optionnel)."
echo -e "\n---- Creating the ERPLibre PostgreSQL User ----"
sudo su - postgres -c "createuser -s ${EL_USER}" 2>/dev/null || true
#--------------------------------------------------
# Dépendances de build (extensions Python, Odoo)
#--------------------------------------------------
echo -e "\n--- Installing fedora dependency --"
# git-daemon : sur Fedora la sous-commande « git daemon » N'EST PAS dans le
# paquet « git » de base (contrairement à Debian/Ubuntu/Arch). ERPLibre sert
# son manifeste via un « git daemon » local (git://127.0.0.1:9418/) pendant
# « repo sync » -> sans ce paquet : « git: 'daemon' is not a git command »
# puis « Connection refused » et l'échec de la synchro du manifeste.
${DNF} \
git git-daemon wget libxslt-devel libzip-devel openldap-devel \
cyrus-sasl-devel \
libffi-devel bzip2-devel parallel swig cmake portaudio-devel \
cups-devel xmlsec1 xmlsec1-openssl mariadb-connector-c-devel freetds-devel
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "dnf fedora tool installation error."
exit 1
fi
# Dépendances de build pour pyenv (compilation de CPython) — CRITIQUE.
echo -e "\n---- Dépendances pyenv (compilation Python) ----"
${DNF} \
make gcc zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel \
openssl-devel tk-devel libffi-devel xz-devel patch findutils
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "dnf pyenv dependencies installation error."
exit 1
fi
# Dépendances selenium / bindings.
${DNF} \
cairo-devel python3-devel pkgconf-pkg-config gobject-introspection-devel \
libXt-devel || echo "Dépendances selenium partielles (optionnel)."
#--------------------------------------------------
# Node.js + npm (rtlcss, less)
#--------------------------------------------------
echo -e "\n---- Installing nodeJS NPM and rtlcss ----"
${DNF} nodejs npm
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "dnf nodejs installation error."
exit 1
fi
sudo npm install -g rtlcss less || echo "npm rtlcss/less: erreur (optionnel)."
echo -e "\n---- Test tool ----"
npm install || echo "npm install (prettier/plugin-xml): erreur (optionnel)."
sudo ln -fs /usr/local/bin/lessc /usr/bin/lessc 2>/dev/null || true
#--------------------------------------------------
# nginx (optionnel)
#--------------------------------------------------
if [ "${EL_INSTALL_NGINX}" = "True" ]; then
echo -e "\n---- Installing nginx ----"
${DNF} nginx || echo "nginx: erreur (optionnel)."
fi
#--------------------------------------------------
# wkhtmltopdf (optionnel) — paquet RPM officiel wkhtmltopdf
#--------------------------------------------------
if [ "${EL_INSTALL_WKHTMLTOPDF}" = "True" ]; then
if ! command -v wkhtmltopdf >/dev/null 2>&1; then
echo -e "\n---- Installing wkhtml (best-effort) ----"
# wkhtmltopdf ne publie plus de build « fedora-* » ; le RPM AlmaLinux 9
# (EL9) est compatible Fedora (testé sur F42 : dnf résout les deps).
# Repli AlmaLinux 8 au besoin.
_base="https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3"
sudo dnf install -y "${_base}/wkhtmltox-0.12.6.1-3.almalinux9.x86_64.rpm" \
|| sudo dnf install -y "${_base}/wkhtmltox-0.12.6.1-3.almalinux8.x86_64.rpm" \
|| echo "wkhtmltopdf non installé (optionnel)."
else
echo -e "\n---- Already installed wkhtml ----"
fi
fi
echo -e "\n---- Fedora dependency installation done ----"

View file

@ -22,6 +22,14 @@ VENV_ODOO_PATH=".venv.${EL_ERPLIBRE_VERSION}"
POETRY_ODOO_PATH=${VENV_ERPLIBRE_PATH}/bin/poetry
export WITH_POETRY_INSTALLATION=1
# Verbosité de l'installation Poetry : silencieuse (-q) par défaut, les logs
# détaillés (-vvv) reviennent avec la variable d'environnement EL_VERBOSE=1.
if [[ "${EL_VERBOSE:-0}" == "1" ]]; then
POETRY_VERBOSE="-vvv"
else
POETRY_VERBOSE="-q"
fi
# EL_PHASE controls which steps to execute. Used by install_locally_dev.sh
# for parallel installation — do not set manually unless you know what you do.
# all (default) – full install: setup + poetry phases
@ -83,7 +91,7 @@ if [[ "${EL_PHASE}" != "setup" ]]; then
# To fix keyring problem when installation is blocked, use
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
if [[ ${WITH_POETRY_INSTALLATION} -ne 0 ]]; then
poetry install --no-root -vvv
poetry install --no-root ${POETRY_VERBOSE}
fi
retVal=$?
if [[ $retVal -ne 0 ]]; then

View file

@ -2,6 +2,14 @@
. ./env_var.sh
# Verbosité de l'installation (git-repo). Silencieuse par défaut ;
# EL_VERBOSE=1 rétablit les logs détaillés (repo sync, git daemon).
if [ "${EL_VERBOSE:-0}" = "1" ]; then
REPO_VERBOSE="-v"; DAEMON_VERBOSE="--verbose"
else
REPO_VERBOSE="-q"; DAEMON_VERBOSE=""
fi
#EL_MANIFEST_PROD="./default.xml"
#EL_MANIFEST_DEV="./manifest/default.dev.xml"
@ -10,4 +18,4 @@
# Update git-repo
.venv.erplibre/bin/repo init -u https://github.com/ERPLibre/ERPLibre -b $(git rev-parse --verify HEAD) -m ${EL_MANIFEST_DEV}
.venv.erplibre/bin/repo sync -v
.venv.erplibre/bin/repo sync ${REPO_VERBOSE}

View file

@ -1,11 +1,19 @@
#!/usr/bin/env bash
. ./env_var.sh
# Verbosité de l'installation (git-repo). Silencieuse par défaut ;
# EL_VERBOSE=1 rétablit les logs détaillés (repo sync, git daemon).
if [ "${EL_VERBOSE:-0}" = "1" ]; then
REPO_VERBOSE="-v"; DAEMON_VERBOSE="--verbose"
else
REPO_VERBOSE="-q"; DAEMON_VERBOSE=""
fi
#EL_MANIFEST_PROD="./default.xml"
#EL_MANIFEST_DEV="./manifest/default.dev.xml"
# Update git-repo
git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose &
git daemon --base-path=. --export-all --reuseaddr --informative-errors ${DAEMON_VERBOSE} &
DAEMON_PID=$!
if [ -L "$EL_MANIFEST_DEV" ]; then
@ -24,6 +32,6 @@ fi
.venv.erplibre/bin/python ./script/git/git_merge_repo_manifest.py --output .repo/local_manifests/erplibre_manifest.xml --with_OCA
.venv.erplibre/bin/repo init -u git://127.0.0.1:9418/ -b $(git rev-parse --verify HEAD) -m ${MANIFEST_TARGET} "$@"
.venv.erplibre/bin/repo sync -c -j "$JOBS" -v -m ${MANIFEST_TARGET}
.venv.erplibre/bin/repo sync -c -j "$JOBS" ${REPO_VERBOSE} -m ${MANIFEST_TARGET}
kill ${DAEMON_PID}

View file

@ -2,11 +2,19 @@
. ./env_var.sh
# Verbosité de l'installation (git-repo). Silencieuse par défaut ;
# EL_VERBOSE=1 rétablit les logs détaillés (repo sync, git daemon).
if [ "${EL_VERBOSE:-0}" = "1" ]; then
REPO_VERBOSE="-v"; DAEMON_VERBOSE="--verbose"
else
REPO_VERBOSE="-q"; DAEMON_VERBOSE=""
fi
#EL_MANIFEST_PROD="./default.xml"
#EL_MANIFEST_DEV="./manifest/default.dev.xml"
# Update git-repo
git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose &
git daemon --base-path=. --export-all --reuseaddr --informative-errors ${DAEMON_VERBOSE} &
DAEMON_PID=$!
if [ -L "$EL_MANIFEST_DEV" ]; then
@ -25,6 +33,6 @@ fi
.venv.erplibre/bin/python ./script/git/git_merge_repo_manifest.py --output .repo/local_manifests/erplibre_manifest.xml --with_OCA
.venv.erplibre/bin/repo init -u git://127.0.0.1:9418/ -b $(git rev-parse --verify HEAD) -m ${MANIFEST_TARGET} -g base,code_generator
.venv.erplibre/bin/repo sync -c -j "$JOBS" -v -m ${MANIFEST_TARGET}
.venv.erplibre/bin/repo sync -c -j "$JOBS" ${REPO_VERBOSE} -m ${MANIFEST_TARGET}
kill ${DAEMON_PID}

View file

@ -1,11 +1,19 @@
#!/usr/bin/env bash
. ./env_var.sh
# Verbosité de l'installation (git-repo). Silencieuse par défaut ;
# EL_VERBOSE=1 rétablit les logs détaillés (repo sync, git daemon).
if [ "${EL_VERBOSE:-0}" = "1" ]; then
REPO_VERBOSE="-v"; DAEMON_VERBOSE="--verbose"
else
REPO_VERBOSE="-q"; DAEMON_VERBOSE=""
fi
#EL_MANIFEST_PROD="./default.xml"
#EL_MANIFEST_DEV="./manifest/default.dev.xml"
# Update git-repo
git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose &
git daemon --base-path=. --export-all --reuseaddr --informative-errors ${DAEMON_VERBOSE} &
DAEMON_PID=$!
if [ -L "$EL_MANIFEST_DEV" ]; then
@ -24,6 +32,6 @@ fi
.venv.erplibre/bin/python ./script/git/git_merge_repo_manifest.py --output .repo/local_manifests/erplibre_manifest.xml --with_mobile
.venv.erplibre/bin/repo init -u git://127.0.0.1:9418/ -b $(git rev-parse --verify HEAD) -m ${MANIFEST_TARGET} "$@"
.venv.erplibre/bin/repo sync -c -j "$JOBS" -v -m ${MANIFEST_TARGET}
.venv.erplibre/bin/repo sync -c -j "$JOBS" ${REPO_VERBOSE} -m ${MANIFEST_TARGET}
kill ${DAEMON_PID}

View file

@ -2,11 +2,19 @@
. ./env_var.sh
# Verbosité de l'installation (git-repo). Silencieuse par défaut ;
# EL_VERBOSE=1 rétablit les logs détaillés (repo sync, git daemon).
if [ "${EL_VERBOSE:-0}" = "1" ]; then
REPO_VERBOSE="-v"; DAEMON_VERBOSE="--verbose"
else
REPO_VERBOSE="-q"; DAEMON_VERBOSE=""
fi
#EL_MANIFEST_PROD="./default.xml"
#EL_MANIFEST_DEV="./manifest/default.dev.xml"
# Update git-repo
git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose &
git daemon --base-path=. --export-all --reuseaddr --informative-errors ${DAEMON_VERBOSE} &
DAEMON_PID=$!
if [ -L "$EL_MANIFEST_DEV" ]; then
@ -25,6 +33,6 @@ fi
.venv.erplibre/bin/python ./script/git/git_merge_repo_manifest.py --output .repo/local_manifests/erplibre_manifest.xml --with_OCA
.venv.erplibre/bin/repo init -u git://127.0.0.1:9418/ -b $(git rev-parse --verify HEAD) -m ${MANIFEST_TARGET}
.venv.erplibre/bin/repo sync -c -j "$JOBS" -v -m ${MANIFEST_TARGET}
.venv.erplibre/bin/repo sync -c -j "$JOBS" ${REPO_VERBOSE} -m ${MANIFEST_TARGET}
kill ${DAEMON_PID}

View file

@ -2,6 +2,14 @@
. ./env_var.sh
# Verbosité de l'installation (git-repo). Silencieuse par défaut ;
# EL_VERBOSE=1 rétablit les logs détaillés (repo sync, git daemon).
if [ "${EL_VERBOSE:-0}" = "1" ]; then
REPO_VERBOSE="-v"; DAEMON_VERBOSE="--verbose"
else
REPO_VERBOSE="-q"; DAEMON_VERBOSE=""
fi
#EL_MANIFEST_PROD="./default.xml"
#EL_MANIFEST_DEV="./manifest/default.dev.xml"
@ -16,4 +24,4 @@ fi
# Update git-repo
.venv.erplibre/bin/repo init -u https://github.com/ERPLibre/ERPLibre -b $(git rev-parse --verify HEAD)
.venv.erplibre/bin/repo sync -v -j "$JOBS"
.venv.erplibre/bin/repo sync ${REPO_VERBOSE} -j "$JOBS"

View file

@ -51,6 +51,7 @@ import hashlib
import os
import re
import shutil
import socket
import subprocess
import sys
import tempfile
@ -90,19 +91,60 @@ FEDORA_VERSIONS: dict[str, tuple[str, str, int, str]] = {
"43": ("43", "fedora43", 2048, "15G"),
"44": ("44", "fedora44", 2048, "15G"),
}
# Arch est en rolling release : une seule « version » (latest).
ARCH_VERSIONS: dict[str, tuple[str, str, int, str]] = {
"latest": ("latest", "archlinux", 1024, "10G"),
}
# distro -> (table des versions, version par défaut).
DISTROS: dict[str, tuple[dict[str, tuple[str, str, int, str]], str]] = {
"ubuntu": (UBUNTU_VERSIONS, "24.04"),
"debian": (DEBIAN_VERSIONS, "12"),
"fedora": (FEDORA_VERSIONS, "42"),
"arch": (ARCH_VERSIONS, "latest"),
}
# Traduction de l'arch générique (amd64/arm64) vers le nom propre à la distro.
# s390x s'écrit « s390x » partout (identité), donc aucune entrée n'est requise.
ARCH_ALIASES: dict[str, dict[str, str]] = {
"fedora": {"amd64": "x86_64", "arm64": "aarch64"},
"arch": {"amd64": "x86_64", "arm64": "aarch64"},
}
# Architectures non-x86 nécessitant une machine/un amorçage spécifiques (voir
# virt_install). Émulées en TCG (pas de KVM), donc LENTES, quand elles
# diffèrent de l'architecture de l'hôte.
NON_X86_ARCHES: tuple[str, ...] = ("arm64", "s390x")
# Distros publiant des images cloud par architecture (vérifié juillet 2026) :
# - s390x (IBM Z) : Ubuntu seulement (Debian/Fedora : 404 ; Arch : x86/arm).
# - arm64/aarch64 : Ubuntu, Debian, Fedora (Arch : pas d'image cloud officielle
# aarch64 sur geo.mirror.pkgbuild.com).
S390X_DISTROS: tuple[str, ...] = ("ubuntu",)
ARM64_DISTROS: tuple[str, ...] = ("ubuntu", "debian", "fedora")
# arch générique -> distros la publiant (pour valider --arch tôt).
ARCH_DISTRO_SUPPORT: dict[str, tuple[str, ...]] = {
"s390x": S390X_DISTROS,
"arm64": ARM64_DISTROS,
}
def host_arch() -> str:
"""Architecture de l'hôte en jeton générique (amd64/arm64/s390x)."""
try:
machine = os.uname().machine
except (AttributeError, OSError):
machine = ""
return {
"x86_64": "amd64",
"amd64": "amd64",
"aarch64": "arm64",
"arm64": "arm64",
"s390x": "s390x",
}.get(machine, "amd64")
ARCH_CLOUD_BASE = "https://geo.mirror.pkgbuild.com/images/latest"
CLOUD_IMG_BASE = "https://cloud-images.ubuntu.com"
# Debian : cloud.debian.org est un redirecteur qui, selon le réseau, peut
# renvoyer vers un miroir injoignable. On essaie donc plusieurs bases dans
@ -159,6 +201,9 @@ def image_candidates(
]
if distro == "fedora":
return [resolve_fedora_url(version, arch, dry_run)]
if distro == "arch":
# Rolling release : image « latest » officielle (cloud-init inclus).
return [f"{ARCH_CLOUD_BASE}/Arch-Linux-{a}-cloudimg.qcow2"]
raise ValueError(f"URL indisponible pour la distro {distro!r}")
@ -193,6 +238,8 @@ def default_image_name(distro: str, code: str, arch: str, version: str) -> str:
return f"ubuntu-{version}-server-cloudimg-{a}.img"
if distro == "debian":
return f"debian-{version}-genericcloud-{a}.qcow2"
if distro == "arch":
return f"arch-linux-{a}-cloudimg.qcow2"
return f"fedora-cloud-{version}-{a}.qcow2"
@ -375,6 +422,44 @@ DAEMON_PACKAGES: dict[str, list[str]] = {
"brew": [],
}
# Émulateurs QEMU système pour architectures non-x86, requis pour --arch
# <arch> sur un hôte d'architecture différente (émulation TCG). Par arch puis
# par gestionnaire de paquets. NB apt : qemu-system-misc ne contient PAS s390x
# (alpha/avr/… seulement) -> paquet dédié qemu-system-s390x ; qemu-system-arm
# fournit qemu-system-aarch64 ; l'arm64 exige aussi le firmware UEFI AAVMF.
EMULATOR_PACKAGES: dict[str, dict[str, list[str]]] = {
"s390x": {
"apt": ["qemu-system-s390x"],
"dnf": ["qemu-system-s390x"],
"pacman": ["qemu-emulators-full"],
"zypper": ["qemu-s390"],
"brew": [],
},
"arm64": {
"apt": ["qemu-system-arm", "qemu-efi-aarch64"],
"dnf": ["qemu-system-aarch64", "edk2-aarch64"],
"pacman": ["qemu-emulators-full", "edk2-aarch64"],
"zypper": ["qemu-arm", "qemu-uefi-aarch64"],
"brew": [],
},
}
# Binaire émulateur par arch (détection de présence).
EMULATOR_BINARY: dict[str, str] = {
"s390x": "qemu-system-s390x",
"arm64": "qemu-system-aarch64",
}
# Firmwares UEFI AAVMF possibles (arm64) : au moins un doit exister.
AARCH64_FIRMWARE_PATHS: tuple[str, ...] = (
"/usr/share/AAVMF/AAVMF_CODE.fd",
"/usr/share/AAVMF/AAVMF_CODE.no-secboot.fd",
"/usr/share/edk2/aarch64/QEMU_EFI.fd",
"/usr/share/edk2/aarch64/QEMU_EFI-silent.fd",
"/usr/share/qemu-efi-aarch64/QEMU_EFI.fd",
"/usr/share/edk2-armvirt/aarch64/QEMU_EFI.fd",
)
# Gestionnaires de paquets, dans l'ordre de préférence :
# (clé TOOL_PACKAGES, binaire à détecter, commande d'installation, sudo, refresh)
PKG_MANAGERS: tuple[
@ -583,6 +668,64 @@ def ensure_tools(runner: Runner, assume_yes: bool, no_install: bool) -> None:
ensure_libvirt_service(runner)
def emulator_ready(arch: str) -> bool:
"""Vrai si l'émulateur (et, pour arm64, un firmware UEFI AAVMF) est là."""
if shutil.which(EMULATOR_BINARY[arch]) is None:
return False
if arch == "arm64":
return any(os.path.exists(p) for p in AARCH64_FIRMWARE_PATHS)
return True
def ensure_emulator(
arch: str, runner: Runner, assume_yes: bool, no_install: bool
) -> None:
"""Vérifie l'émulateur QEMU système pour `arch` (et le firmware UEFI pour
arm64), requis quand on émule une architecture différente de l'hôte ;
l'installe au besoin via le gestionnaire de paquets."""
binary = EMULATOR_BINARY[arch]
if emulator_ready(arch):
return
pm = detect_pkg_manager()
if pm is None:
sys.exit(
f" Émulateur {arch} introuvable ({binary}) et gestionnaire de "
"paquets non reconnu.\n Installez-le manuellement."
)
pm_key, install_cmd, use_sudo, refresh = pm
packages = EMULATOR_PACKAGES.get(arch, {}).get(pm_key, [])
if not packages:
sys.exit(
f" Émulateur {arch} introuvable ({binary}) : installez le paquet "
"QEMU système correspondant de votre distribution "
"(+ firmware UEFI pour arm64)."
)
full_cmd = install_cmd + packages
printable = ("sudo " if use_sudo and runner.use_sudo else "") + " ".join(
full_cmd
)
print(f" Émulateur {arch} manquant ({binary}).")
print(f" Commande d'installation : {printable}")
if no_install:
sys.exit(
" Installation automatique désactivée (--no-install-deps).\n"
" Installez manuellement : " + printable
)
if not assume_yes and not prompt_yes_no(
f" Installer l'émulateur {arch} maintenant ?"
):
sys.exit(" Installation refusée.\n Commande manuelle : " + printable)
if refresh:
runner.run(refresh, privileged=use_sudo, check=False)
runner.run(full_cmd, privileged=use_sudo)
if not emulator_ready(arch):
sys.exit(
f" Émulateur {arch} ({binary}) ou firmware toujours absent après "
f"installation.\n Essayez manuellement : {printable}"
)
print(f" Émulateur {arch} installé avec succès.")
# --------------------------------------------------------------------------- #
# Étapes
# --------------------------------------------------------------------------- #
@ -623,6 +766,15 @@ def _download_one(url: str, tmp: Path, timeout: int) -> None:
print(f" {pct:3d}%", flush=True)
if is_tty:
print()
# Vérifie la COMPLÉTUDE : si le serveur a annoncé une taille et qu'on a
# reçu moins (connexion coupée), le .part est TRONQUÉ. Sans ce contrôle,
# il était validé comme « complet » -> qcow2 valide mais VIDE (juste
# l'en-tête) -> VM qui ne boote pas, et cache empoisonné réutilisé ensuite.
if total > 0 and done < total:
raise OSError(
f"téléchargement incomplet : {done}/{total} octets reçus "
"(connexion interrompue)"
)
def download_image(
@ -790,15 +942,19 @@ def build_cloud_config(
lines.append(f"package_update: {'true' if do_update else 'false'}")
lines.append(f"package_upgrade: {'true' if do_upgrade else 'false'}")
# openssh-server : garantit un serveur SSH sur toutes les distros (les
# images Debian genericcloud notamment ne l'ont pas toujours activé).
packages = ["qemu-guest-agent", "openssh-server", *args.package]
lines.append("packages:")
lines += [
f" - {p}" for p in dict.fromkeys(packages)
] # dédoublonne, ordre gardé
# On n'installe AUCUN paquet via cloud-init : cela exige le réseau au 1er
# boot et peut bloquer longtemps (dnf/apt/pacman lents sur réseau lent) —
# cloud-init reste alors « running » et tout ce qui suit attend. sshd est
# DÉJÀ présent dans toutes les images cloud (Ubuntu/Debian/Fedora/Arch) ;
# on l'active seulement (runcmd). Les outils nécessaires (curl/git/make…)
# sont installés — avec dépôts optimisés — par le bootstrap d'installation.
packages = list(dict.fromkeys(args.package)) # seulement --package
if packages:
lines.append("packages:")
lines += [f" - {p}" for p in packages]
# Active et démarre SSH quel que soit le nom du service (ssh sur
# Debian/Ubuntu, sshd sur Fedora) — sans quoi la VM peut booter sans SSH.
# Debian/Ubuntu, sshd sur Fedora/Arch) — sans quoi la VM peut booter
# sans SSH accessible.
lines += [
"runcmd:",
" - systemctl enable --now ssh 2>/dev/null"
@ -810,10 +966,13 @@ def build_cloud_config(
# network-config (cloud-init v2) : DHCP sur toute interface « e* ». Les images
# Debian genericcloud ne configurent pas toujours le réseau sans ça (le NIC
# reste down -> pas d'IP), contrairement à Ubuntu. Inoffensif pour Ubuntu.
# La clé est « eth0 » car le renderer cloud-init d'Arch utilise la CLÉ comme
# nom d'interface (en ignorant « match ») et l'image Arch nomme son NIC eth0 ;
# Debian/Fedora/Ubuntu utilisent bien « match: name: e* » (leur en*).
NETWORK_CONFIG = (
"version: 2\n"
"ethernets:\n"
" primary:\n"
" eth0:\n"
" match:\n"
' name: "e*"\n'
" dhcp4: true\n"
@ -957,6 +1116,11 @@ def virt_install(
osinfo: str,
runner: Runner,
) -> None:
# Émulée (TCG, pas de KVM) si l'arch demandée diffère de celle de l'hôte.
emulated = args.arch != host_arch()
# s390x n'a pas de port série ISA : la console est SCLP (ttysclp0), et non
# ttyS0. Ailleurs (x86/arm64), console série classique.
console_target = "sclp" if args.arch == "s390x" else "serial"
cmd = [
"virt-install",
"--name",
@ -973,6 +1137,7 @@ def virt_install(
# volume « cidata » est visible dès init-local et cloud-init le lit.
# En CD-ROM, l'initramfs Debian ne charge pas sr_mod à temps -> le
# seed n'est pas vu et rien ne s'applique (Ubuntu, lui, tolère le CD).
# Sur s390x, bus=virtio est mappé en virtio-ccw par libvirt.
"--disk",
f"path={seed},readonly=on,bus=virtio",
"--osinfo",
@ -982,21 +1147,64 @@ def virt_install(
"--graphics",
args.graphics,
"--console",
"pty,target_type=serial",
f"pty,target_type={console_target}",
]
# Boot UEFI par défaut : Debian 13 (trixie) et les images cloud récentes
# n'embarquent plus le chargeur BIOS/GRUB-pc et partent en boucle
# « Booting... » en SeaBIOS. UEFI (OVMF) fonctionne pour Ubuntu/Debian/
# Fedora. --bios force l'ancien BIOS si OVMF est indisponible.
if not args.bios:
cmd += ["--boot", "uefi"]
if args.arch == "s390x":
# s390x (IBM Z) : machine s390-ccw-virtio, amorçage IPL/zipl depuis le
# disque (ni BIOS ni UEFI/OVMF -> aucun --boot).
cmd += ["--arch", "s390x", "--machine", "s390-ccw-virtio"]
elif args.arch == "arm64":
# arm64/aarch64 : machine « virt » + UEFI (firmware AAVMF). Les images
# cloud arm64 n'ont pas de BIOS -> UEFI obligatoire. Secure Boot
# DÉSACTIVÉ (comme x86) : sinon libvirt sélectionne l'AAVMF « secure »
# à clés Microsoft enrôlées et la VM RESTE FIGÉE au firmware (aucun
# boot, aucune IP). secure-boot=no -> AAVMF non-SB, boot OK.
cmd += [
"--arch",
"aarch64",
"--machine",
"virt",
"--boot",
"uefi,firmware.feature0.name=secure-boot,"
"firmware.feature0.enabled=no",
]
elif not args.bios:
# Boot UEFI par défaut (x86) : Debian 13 (trixie) et les images cloud
# récentes n'embarquent plus le chargeur BIOS/GRUB-pc et partent en
# boucle « Booting... » en SeaBIOS. UEFI (OVMF) fonctionne pour
# Ubuntu/Debian/Fedora. --bios force l'ancien BIOS si OVMF est absent.
# Secure Boot DÉSACTIVÉ : le chargeur d'Arch (GRUB) n'est pas signé et
# OVMF Secure Boot le refuse (« Access Denied » -> pas de boot).
# Ubuntu/Debian/Fedora bootent aussi sans Secure Boot.
cmd += [
"--boot",
"uefi,firmware.feature0.name=secure-boot,"
"firmware.feature0.enabled=no",
]
if emulated:
# Architecture différente de l'hôte -> émulation logicielle TCG
# (pas de KVM). LENT.
cmd += ["--virt-type", "qemu"]
if not args.attach_console:
cmd.append("--noautoconsole")
runner.run(cmd, privileged=True)
def _ip_reachable(ip: str, port: int = 22, timeout: float = 3) -> bool:
"""Vrai si le port SSH répond (distingue le bail actif du bail périmé)."""
try:
with socket.create_connection((ip, port), timeout=timeout):
return True
except OSError:
return False
def wait_for_ip(name: str, use_sudo: bool, timeout: int) -> str | None:
"""Interroge les baux DHCP libvirt jusqu'à obtenir l'IPv4 de la VM."""
"""Interroge les baux DHCP libvirt jusqu'à obtenir l'IPv4 de la VM. Une VM
peut avoir PLUSIEURS baux (l'image demande d'abord une IP avec le hostname
par défaut « ubuntu », puis cloud-init fixe le vrai hostname -> 2e bail) :
on renvoie une IP JOIGNABLE (sshd up), sinon la plus récente, jamais
aveuglément la 1re (souvent le bail précoce périmé, « No route to host »)."""
base = (["sudo"] if use_sudo else []) + [
"virsh",
"domifaddr",
@ -1005,13 +1213,15 @@ def wait_for_ip(name: str, use_sudo: bool, timeout: int) -> str | None:
"lease",
]
deadline = time.time() + timeout
ips: list[str] = []
while time.time() < deadline:
res = subprocess.run(base, capture_output=True, text=True)
m = re.search(r"(\d+\.\d+\.\d+\.\d+)", res.stdout)
if m:
return m.group(1)
ips = re.findall(r"(\d+\.\d+\.\d+\.\d+)", res.stdout)
for ip in ips:
if _ip_reachable(ip):
return ip
time.sleep(3)
return None
return ips[-1] if ips else None
def ssh_command(user: str, ip: str, has_key: bool) -> str:
@ -1070,7 +1280,9 @@ def build_parser() -> argparse.ArgumentParser:
g_img.add_argument(
"--arch",
default="amd64",
help="Architecture de l'image (défaut : amd64).",
help="Architecture de l'image (défaut : amd64). amd64/x86_64, "
"arm64/aarch64 (Ubuntu/Debian/Fedora) ou s390x (Ubuntu). Toute arch "
"différente de l'hôte est ÉMULÉE (TCG, lente).",
)
g_img.add_argument(
"--image-dir",
@ -1306,6 +1518,14 @@ def main() -> None:
f"Version {args.version!r} inconnue pour {args.distro}. "
f"Choix : {', '.join(versions)} (voir --list-images)."
)
# Certaines architectures ne sont publiées que par une partie des distros
# (voir ARCH_DISTRO_SUPPORT) : on valide tôt plutôt qu'échouer au download.
supported = ARCH_DISTRO_SUPPORT.get(args.arch)
if supported is not None and args.distro not in supported:
sys.exit(
f"Architecture {args.arch} indisponible pour {args.distro!r} : "
f"images cloud publiées seulement pour {', '.join(supported)}."
)
code, default_osinfo, min_ram, min_disk = versions[args.version]
if args.codename:
code = args.codename
@ -1315,6 +1535,10 @@ def main() -> None:
args.memory = min_ram
if args.disk_size is None:
args.disk_size = min_disk
# Un nombre nu (« 30 ») serait pris pour des OCTETS par qemu-img et ferait
# échouer le resize : on suppose des Go par défaut (« 30 » -> « 30G »).
if re.fullmatch(r"\d+", str(args.disk_size)):
args.disk_size = f"{args.disk_size}G"
urls = image_candidates(
args.distro, code, args.arch, args.version, args.dry_run
)
@ -1373,6 +1597,18 @@ def main() -> None:
if not args.dry_run:
ensure_tools(runner, args.assume_yes, args.no_install_deps)
# Émulation requise si l'arch diffère de l'hôte : installe l'émulateur
# QEMU système adéquat (+ firmware UEFI pour arm64) et prévient de la
# lenteur.
if args.arch in EMULATOR_BINARY and args.arch != host_arch():
ensure_emulator(
args.arch, runner, args.assume_yes, args.no_install_deps
)
print(
f" Note : {args.arch} est ÉMULÉ (TCG) sur cet hôte "
f"({host_arch()}) — le boot et l'installation seront "
"nettement plus lents que l'architecture native."
)
print(f"\n== 1/5 Image cloud ({args.distro} {args.version} / {code}) ==")
download_image(urls, args.image_path, args.dry_run)

View file

@ -0,0 +1,315 @@
#!/usr/bin/env python3
# © 2021-2026 TechnoLibre (http://www.technolibre.ca)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
"""Dashboard Textual : suivi des installations ERPLibre parallèles sur VM.
Principe « détachable » : chaque installation tourne dans un processus
DÉTACHÉ (setsid) qui écrit un fichier log et, à la fin, un marqueur
« __ERPLIBRE_EXIT__ <code> ». Ce module ne fait que VISUALISER ces fichiers :
quitter le dashboard n'arrête rien, on peut le rouvrir pour ré-attacher.
- launch_installs(...) : lance les process détachés + écrit un manifeste JSON.
- run_monitor(manifest_path) : ouvre le dashboard Textual sur un manifeste.
"""
from __future__ import annotations
import json
import os
import shlex
import subprocess
import time
from pathlib import Path
try:
from script.todo.todo_i18n import t
except Exception: # pragma: no cover - repli si i18n indisponible
def t(key: str) -> str:
return key
EXIT_MARKER = "__ERPLIBRE_EXIT__"
SSH_OPTS = (
"-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "
"-o ConnectTimeout=8"
)
def session_dir() -> Path:
"""Répertoire des logs/manifestes d'installation (créé au besoin)."""
base = Path(os.path.expanduser("~/.erplibre/qemu-install"))
base.mkdir(parents=True, exist_ok=True)
return base
def _launch_one(ip: str, remote_cmd: str, log_path: str) -> None:
"""Lance une install SSH DÉTACHÉE : attend le sshd, exécute, journalise
la sortie puis écrit le marqueur de fin avec le code de sortie."""
# Sonde de disponibilité : on attend que sshd réponde ET que cloud-init
# soit TERMINÉ, via des connexions COURTES successives (jusqu'à ~20 min :
# une architecture ÉMULÉE, s390x/arm64 sur hôte x86, boote lentement).
# Au 1er boot, cloud-init régénère les clés d'hôte et REDÉMARRE sshd : une
# session SSH longue (ex. « cloud-init status --wait ») serait alors tuée
# (« Connection closed by remote host », exit 255 — cas Fedora). Chaque
# itération étant une connexion neuve, un redémarrage de sshd ne casse que
# la tentative en cours. On imprime toujours l'état (|| true) pour matcher
# sur le TEXTE, « status: running » n'ayant pas de code de sortie fiable.
ci_probe = (
"if command -v cloud-init >/dev/null 2>&1; then "
"cloud-init status 2>/dev/null || true; else echo nocloudinit; fi"
)
log_q = shlex.quote(log_path)
# On écrit un message d'attente + un battement toutes les ~30 s : sinon le
# log reste VIDE pendant tout le boot émulé et paraît « bloqué ».
msg_wait = t("Waiting for the VM to start (boot + cloud-init)")
msg_slow = t("(an emulated architecture can be slow; this is normal)")
msg_ready = t("VM ready - starting the ERPLibre install")
wrapper = (
f"echo {shlex.quote('== ' + msg_wait + ' ==')} >> {log_q}; "
f"echo {shlex.quote(' ' + msg_slow)} >> {log_q}; "
f"for i in $(seq 1 240); do "
f"st=$(ssh {SSH_OPTS} -o BatchMode=yes erplibre@{ip} "
f"{shlex.quote(ci_probe)} 2>/dev/null); "
f'case "$st" in '
f"*done*|*disabled*|*error*|*degraded*|*nocloudinit*) break;; "
f"esac; "
f'if [ $((i % 6)) -eq 0 ]; then echo " ... $((i*5))s" >> {log_q}; fi; '
f"sleep 5; done; "
f"echo {shlex.quote('== ' + msg_ready + ' ==')} >> {log_q}; "
f"ssh {SSH_OPTS} erplibre@{ip} {shlex.quote(remote_cmd)} "
f">> {log_q} 2>&1; "
f'echo "{EXIT_MARKER} $?" >> {log_q}'
)
# setsid -f : le process survit à la fermeture du menu / du dashboard.
subprocess.Popen(
["setsid", "-f", "bash", "-c", wrapper],
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
start_new_session=True,
)
def _log_header(vm: dict, branch: str, when: str) -> str:
"""En-tête du log : date, VM, distribution, version, architecture, branche.
Permet d'identifier l'installation d'un coup d'œil (et de ne jamais laisser
le log vide pendant l'attente du boot)."""
distro = vm.get("distro") or "?"
version = vm.get("version") or ""
arch = vm.get("arch") or "?"
bar = "=" * 64
return (
f"{bar}\n"
f" ERPLibre — {t('installation')}\n"
f" Date : {when}\n"
f" VM : {vm['name']}\n"
f" Distribution : {distro} {version}\n"
f" Architecture : {arch}\n"
f" Branche : {branch}\n"
f" IP : {vm['ip']}\n"
f"{bar}\n\n"
)
def launch_installs(vms: list[dict], branch: str, remote_cmd: str) -> str:
"""vms : [{name, ip, distro?, version?, arch?}]. Lance chaque install
détachée, écrit un manifeste et retourne son chemin. remote_cmd : script
exécuté dans chaque VM."""
sdir = session_dir()
stamp = time.strftime("%Y%m%d-%H%M%S")
when = time.strftime("%Y-%m-%d %H:%M:%S")
logdir = sdir / stamp
logdir.mkdir(parents=True, exist_ok=True)
entries = []
for vm in vms:
log_path = str(logdir / f"{vm['name']}.log")
# En-tête d'emblée (date/distro/version/arch) : le log n'est jamais
# vide, l'utilisateur voit tout de suite QUOI s'installe.
Path(log_path).write_text(_log_header(vm, branch, when))
_launch_one(vm["ip"], remote_cmd, log_path)
entries.append(
{
"name": vm["name"],
"ip": vm["ip"],
"distro": vm.get("distro"),
"version": vm.get("version"),
"arch": vm.get("arch"),
"log": log_path,
"ssh": f"ssh erplibre@{vm['ip']}",
}
)
manifest = {
"branch": branch,
"started": time.time(),
"vms": entries,
}
manifest_path = str(logdir / "session.json")
Path(manifest_path).write_text(json.dumps(manifest, indent=2))
return manifest_path
def read_status(log_path: str) -> tuple[str, int | None]:
"""(état, code) d'un log : pending / running / done / failed."""
try:
data = Path(log_path).read_text(errors="replace")
except OSError:
return "pending", None
if not data.strip():
return "pending", None
for line in reversed(data.splitlines()):
if EXIT_MARKER in line:
try:
code = int(line.split()[-1])
except ValueError:
code = 1
return ("done" if code == 0 else "failed"), code
return "running", None
# --------------------------------------------------------------------------- #
# Dashboard Textual
# --------------------------------------------------------------------------- #
def run_monitor(manifest_path: str) -> None:
"""Ouvre le dashboard Textual sur un manifeste d'installation."""
from textual.app import App, ComposeResult
from textual.containers import Horizontal
from textual.widgets import DataTable, Footer, Header, RichLog, Static
manifest = json.loads(Path(manifest_path).read_text())
started = manifest.get("started", time.time())
vms = manifest["vms"]
ICON = {
"pending": "⏳",
"running": "⏳",
"done": "✅",
"failed": "❌",
}
class Monitor(App):
CSS = """
DataTable { width: 40; border: solid $accent; }
RichLog { border: solid $accent; }
#sshbar { height: 2; color: $text-muted; }
"""
BINDINGS = [
("q", "quit", "Quitter (détaché)"),
("s", "ssh", "SSH"),
("f", "follow", "Suivre"),
("c", "copy_log", "Copier log"),
]
def __init__(self):
super().__init__()
self._offsets = {vm["name"]: 0 for vm in vms}
self._selected = vms[0]["name"] if vms else None
self._follow = True
def compose(self) -> ComposeResult:
yield Header(show_clock=True)
table = DataTable(id="vms", cursor_type="row")
# Clés de colonnes explicites : update_cell() les référence.
table.add_column("VM", key="vm")
table.add_column("État", key="state")
table.add_column("Durée", key="elapsed")
for vm in vms:
table.add_row(vm["name"], "⏳", "00:00", key=vm["name"])
self._log = RichLog(id="log", highlight=False, markup=False)
with Horizontal():
yield table
yield self._log
yield Static("", id="sshbar")
yield Footer()
def on_mount(self) -> None:
self.title = "ERPLibre — suivi d'installation"
self._refresh_ssh()
self._load_selected_log(reset=True)
self.set_interval(1.0, self._tick)
# -- helpers -------------------------------------------------------- #
def _vm_by_name(self, name):
return next((v for v in vms if v["name"] == name), None)
def _refresh_ssh(self):
vm = self._vm_by_name(self._selected)
bar = self.query_one("#sshbar", Static)
if vm:
bar.update(
f" {vm['ssh']} (s = SSH · c = copier le log · "
"Maj+glisser = sélectionner)\n"
f" Log : {vm['log']}"
)
def _load_selected_log(self, reset=False):
vm = self._vm_by_name(self._selected)
if not vm:
return
if reset:
self._log.clear()
self._offsets[vm["name"]] = 0
try:
data = Path(vm["log"]).read_text(errors="replace")
except OSError:
return
off = self._offsets[vm["name"]]
new = data[off:]
if new:
for line in new.splitlines():
if EXIT_MARKER not in line:
self._log.write(line)
self._offsets[vm["name"]] = len(data)
def _tick(self):
table = self.query_one("#vms", DataTable)
for vm in vms:
state, code = read_status(vm["log"])
elapsed = time.time() - started
mm, ss = divmod(int(elapsed), 60)
label = ICON[state]
if state == "failed":
label = f"❌ ({code})"
elif state == "done":
label = "✅"
table.update_cell(vm["name"], "state", label)
if state in ("running", "pending"):
table.update_cell(
vm["name"], "elapsed", f"{mm:02d}:{ss:02d}"
)
if self._follow:
self._load_selected_log()
# -- events --------------------------------------------------------- #
def on_data_table_row_highlighted(self, event) -> None:
name = event.row_key.value
if name and name != self._selected:
self._selected = name
self._refresh_ssh()
self._load_selected_log(reset=True)
def action_follow(self) -> None:
self._follow = not self._follow
def action_ssh(self) -> None:
vm = self._vm_by_name(self._selected)
if not vm:
return
with self.suspend():
os.system(f"ssh {SSH_OPTS} erplibre@{vm['ip']} || true")
def action_copy_log(self) -> None:
"""Copie le log complet de la VM sélectionnée dans le
presse-papiers (OSC 52 ; marche aussi à travers SSH)."""
vm = self._vm_by_name(self._selected)
if not vm:
return
try:
text = Path(vm["log"]).read_text(errors="replace")
except OSError:
return
self.copy_to_clipboard(text)
self.notify(
f"Log de {vm['name']} copié ({len(text)} car.)",
title="Presse-papiers",
)
Monitor().run()

File diff suppressed because it is too large Load diff

View file

@ -1162,6 +1162,139 @@ TRANSLATIONS = {
"fr": "Version pour",
"en": "Version for",
},
"Architecture:": {
"fr": "Architecture :",
"en": "Architecture:",
},
"native": {
"fr": "native",
"en": "native",
},
"IBM Z — emulated, slow on x86; Ubuntu only": {
"fr": "IBM Z — émulé, lent sur x86 ; Ubuntu uniquement",
"en": "IBM Z — emulated, slow on x86; Ubuntu only",
},
"IBM Z — emulated, slow; Ubuntu only": {
"fr": "IBM Z — émulé, lent ; Ubuntu uniquement",
"en": "IBM Z — emulated, slow; Ubuntu only",
},
"ARM 64-bit — emulated, slow": {
"fr": "ARM 64 bits — émulé, lent",
"en": "ARM 64-bit — emulated, slow",
},
"emulated, slow": {
"fr": "émulé, lent",
"en": "emulated, slow",
},
"This architecture is emulated (TCG): boot and install are"
" much slower than the native one.": {
"fr": "Cette architecture est émulée (TCG) : le boot et l'installation"
" sont bien plus lents que l'architecture native.",
"en": "This architecture is emulated (TCG): boot and install are"
" much slower than the native one.",
},
"images for this arch only exist for:": {
"fr": "images pour cette architecture disponibles seulement pour :",
"en": "images for this arch only exist for:",
},
"All supported architectures": {
"fr": "Toutes les architectures supportées",
"en": "All supported architectures",
},
"installation": {
"fr": "installation",
"en": "installation",
},
"Resources per VM (x1 = catalog minimum):": {
"fr": "Ressources par VM (x1 = minimum catalogue) :",
"en": "Resources per VM (x1 = catalog minimum):",
},
"Host:": {
"fr": "Hôte :",
"en": "Host:",
},
"free": {
"fr": "libres",
"en": "free",
},
"free RAM unknown": {
"fr": "RAM libre inconnue",
"en": "free RAM unknown",
},
"> host free RAM": {
"fr": "> RAM libre de l'hôte",
"en": "> host free RAM",
},
"total RAM": {
"fr": "RAM totale",
"en": "total RAM",
},
"Choice (1-4, default 1):": {
"fr": "Choix (1-4, défaut 1) :",
"en": "Choice (1-4, default 1):",
},
"(includes emulated architectures — some VMs are slow)": {
"fr": "(inclut des architectures émulées — certaines VM sont lentes)",
"en": "(includes emulated architectures — some VMs are slow)",
},
"Waiting for the VM to start (boot + cloud-init)": {
"fr": "En attente du démarrage de la VM (boot + cloud-init)",
"en": "Waiting for the VM to start (boot + cloud-init)",
},
"(an emulated architecture can be slow; this is normal)": {
"fr": "(une architecture émulée peut être lente ; c'est normal)",
"en": "(an emulated architecture can be slow; this is normal)",
},
"VM ready - starting the ERPLibre install": {
"fr": "VM prête — installation ERPLibre en cours",
"en": "VM ready - starting the ERPLibre install",
},
"Choice (number or name, blank = native):": {
"fr": "Choix (numéro ou nom, vide = native) :",
"en": "Choice (number or name, blank = native):",
},
"Pick exact versions (comma-separated list)": {
"fr": "Choisir des versions précises (liste séparée par des virgules)",
"en": "Pick exact versions (comma-separated list)",
},
"Selection (numbers, 'all', 'principal' or 'granulaire',"
" default: all): ": {
"fr": "Sélection (numéros, « all », « principal » ou « granulaire »,"
" défaut : all) : ",
"en": "Selection (numbers, 'all', 'principal' or 'granulaire',"
" default: all): ",
},
"All versions:": {
"fr": "Toutes les versions :",
"en": "All versions:",
},
"Selection (comma-separated numbers): ": {
"fr": "Sélection (numéros séparés par des virgules) : ",
"en": "Selection (comma-separated numbers): ",
},
"s390x images only exist for:": {
"fr": "images s390x disponibles seulement pour :",
"en": "s390x images only exist for:",
},
"ignored:": {
"fr": "ignoré :",
"en": "ignored:",
},
"IBM Z — emulated, slow on x86": {
"fr": "IBM Z — émulé, lent sur x86",
"en": "IBM Z — emulated, slow on x86",
},
"Choice (number or name, blank = amd64):": {
"fr": "Choix (numéro ou nom, vide = amd64) :",
"en": "Choice (number or name, blank = amd64):",
},
"s390x is emulated (TCG): boot and install are much "
"slower than x86.": {
"fr": "s390x est émulé (TCG) : le boot et l'installation sont bien "
"plus lents que x86.",
"en": "s390x is emulated (TCG): boot and install are much "
"slower than x86.",
},
"Choice (number or version, blank = default):": {
"fr": "Choix (numéro ou version, vide = défaut) :",
"en": "Choice (number or version, blank = default):",
@ -1214,6 +1347,102 @@ TRANSLATIONS = {
"fr": "Effacement terminé.",
"en": "Deletion done.",
},
"Clean up QEMU (orphan files)": {
"fr": "Nettoyer QEMU (fichiers orphelins)",
"en": "Clean up QEMU (orphan files)",
},
"Scanning for orphan QEMU files...": {
"fr": "Recherche des fichiers QEMU orphelins...",
"en": "Scanning for orphan QEMU files...",
},
"orphan disk": {
"fr": "disque orphelin",
"en": "orphan disk",
},
"orphan seed": {
"fr": "seed orphelin",
"en": "orphan seed",
},
"partial download": {
"fr": "téléchargement interrompu",
"en": "partial download",
},
"orphan UEFI nvram": {
"fr": "nvram UEFI orpheline",
"en": "orphan UEFI nvram",
},
"No orphan files found.": {
"fr": "Aucun fichier orphelin trouvé.",
"en": "No orphan files found.",
},
"Orphan files:": {
"fr": "Fichiers orphelins :",
"en": "Orphan files:",
},
"Total:": {
"fr": "Total :",
"en": "Total:",
},
"files": {
"fr": "fichiers",
"en": "files",
},
"Delete these orphan files? (y/N): ": {
"fr": "Effacer ces fichiers orphelins ? (o/N) : ",
"en": "Delete these orphan files? (y/N): ",
},
"Cleanup done.": {
"fr": "Nettoyage terminé.",
"en": "Cleanup done.",
},
"Cached base images (reusable):": {
"fr": "Images de base en cache (réutilisables) :",
"en": "Cached base images (reusable):",
},
"Also delete the cached base images? (y/N): ": {
"fr": "Effacer aussi les images de base en cache ? (o/N) : ",
"en": "Also delete the cached base images? (y/N): ",
},
"All cached base images (reusable):": {
"fr": "Toutes les images de base en cache (réutilisables) :",
"en": "All cached base images (reusable):",
},
"Delete ALL cached base images? (y/N): ": {
"fr": "Effacer TOUTES les images de base en cache ? (o/N) : ",
"en": "Delete ALL cached base images? (y/N): ",
},
"Ghost domains (defined but disk missing):": {
"fr": "Domaines fantômes (définis, disque manquant) :",
"en": "Ghost domains (defined but disk missing):",
},
"Undefine these ghost domains? (y/N): ": {
"fr": "Supprimer la définition de ces domaines ? (o/N) : ",
"en": "Undefine these ghost domains? (y/N): ",
},
"Stale codename-named Ubuntu images (duplicates):": {
"fr": "Images Ubuntu nommées par codename (doublons) :",
"en": "Stale codename-named Ubuntu images (duplicates):",
},
"Delete these duplicate images? (y/N): ": {
"fr": "Effacer ces images en double ? (o/N) : ",
"en": "Delete these duplicate images? (y/N): ",
},
"Orphan ~/.ssh/config entries:": {
"fr": "Entrées ~/.ssh/config orphelines :",
"en": "Orphan ~/.ssh/config entries:",
},
"Remove these ~/.ssh/config entries? (y/N): ": {
"fr": "Retirer ces entrées de ~/.ssh/config ? (o/N) : ",
"en": "Remove these ~/.ssh/config entries? (y/N): ",
},
"Stale DHCP leases (no matching VM):": {
"fr": "Baux DHCP périmés (aucune VM correspondante) :",
"en": "Stale DHCP leases (no matching VM):",
},
"Clear these stale leases? (y/N): ": {
"fr": "Effacer ces baux périmés ? (o/N) : ",
"en": "Clear these stale leases? (y/N): ",
},
"Deploy ERPLibre infra (one minimal VM per image)": {
"fr": "Déployer l'infra ERPLibre (une VM minimale par image)",
"en": "Deploy ERPLibre infra (one minimal VM per image)",
@ -1234,6 +1463,14 @@ TRANSLATIONS = {
"fr": "Tout le catalogue (chaque version)",
"en": "Whole catalog (every version)",
},
"The main version of each distro (marked *)": {
"fr": "La version principale de chaque distro (marquée *)",
"en": "The main version of each distro (marked *)",
},
"Selection (numbers, 'all' or 'principal', default: all): ": {
"fr": "Sélection (numéros, « all » ou « principal », défaut : all) : ",
"en": "Selection (numbers, 'all' or 'principal', default: all): ",
},
"Selection (numbers, or 'all', default: all): ": {
"fr": "Sélection (numéros, ou « all », défaut : all) : ",
"en": "Selection (numbers, or 'all', default: all): ",
@ -1287,6 +1524,70 @@ TRANSLATIONS = {
"fr": "Clonage d'ERPLibre sur chaque VM",
"en": "Cloning ERPLibre on each VM",
},
"Installing ERPLibre on each VM": {
"fr": "Installation d'ERPLibre sur chaque VM",
"en": "Installing ERPLibre on each VM",
},
"Install ERPLibre into ~/git/erplibre on this VM? (y/N): ": {
"fr": "Installer ERPLibre dans ~/git/erplibre sur cette VM ? (o/N) : ",
"en": "Install ERPLibre into ~/git/erplibre on this VM? (y/N): ",
},
"installing ERPLibre": {
"fr": "installation d'ERPLibre",
"en": "installing ERPLibre",
},
"no IP obtained, ERPLibre install skipped.": {
"fr": "aucune IP obtenue, installation ERPLibre ignorée.",
"en": "no IP obtained, ERPLibre install skipped.",
},
"waiting for SSH...": {
"fr": "attente du SSH...",
"en": "waiting for SSH...",
},
"SSH not reachable, ERPLibre install skipped.": {
"fr": "SSH injoignable, installation ERPLibre ignorée.",
"en": "SSH not reachable, ERPLibre install skipped.",
},
"Interactive monitoring dashboard? (y/N): ": {
"fr": "Suivi interactif (dashboard) ? (o/N) : ",
"en": "Interactive monitoring dashboard? (y/N): ",
},
"resolving IP...": {
"fr": "résolution de l'IP...",
"en": "resolving IP...",
},
"no IP, skipped.": {
"fr": "pas d'IP, ignorée.",
"en": "no IP, skipped.",
},
"No VM to install.": {
"fr": "Aucune VM à installer.",
"en": "No VM to install.",
},
"Opening the interactive monitor...": {
"fr": "Ouverture du suivi interactif...",
"en": "Opening the interactive monitor...",
},
"Monitor closed. Installs keep running in the background.": {
"fr": "Suivi fermé. Les installations continuent en arrière-plan.",
"en": "Monitor closed. Installs keep running in the background.",
},
"Logs:": {
"fr": "Logs :",
"en": "Logs:",
},
"Read the logs:": {
"fr": "Lire les logs :",
"en": "Read the logs:",
},
"Log files:": {
"fr": "Fichiers de log :",
"en": "Log files:",
},
"Install textual for the dashboard (pip).": {
"fr": "Installez textual pour le dashboard (pip).",
"en": "Install textual for the dashboard (pip).",
},
"Parallel deployments (default:": {
"fr": "Déploiements en parallèle (défaut :",
"en": "Parallel deployments (default:",
@ -1359,9 +1660,17 @@ TRANSLATIONS = {
"fr": "vCPU (défaut : 2) : ",
"en": "vCPUs (default: 2): ",
},
"Disk size (blank = version minimum): ": {
"fr": "Taille du disque (vide = minimum de la version) : ",
"en": "Disk size (blank = version minimum): ",
"Disk size (blank = version min; e.g. 30G, 1T): ": {
"fr": "Taille du disque (vide = min. version ; ex. 30G, 1T) : ",
"en": "Disk size (blank = version min; e.g. 30G, 1T): ",
},
"VM name (default: ": {
"fr": "Nom de la VM (défaut : ",
"en": "VM name (default: ",
},
"Deployment failed (see the error above).": {
"fr": "Échec du déploiement (voir l'erreur ci-dessus).",
"en": "Deployment failed (see the error above).",
},
"SSH public key path": {
"fr": "Chemin de la clé publique SSH",