diff --git a/.claude/rules/08-deployment.md b/.claude/rules/08-deployment.md index d7f7935..cd8beb7 100644 --- a/.claude/rules/08-deployment.md +++ b/.claude/rules/08-deployment.md @@ -6,4 +6,9 @@ - **SSL** : Certbot pour les certificats - **DNS** : `script/deployment/update_dns_cloudflare.py` -Plateformes supportées : Ubuntu 20.04-25.04, Linux Mint 22.3, Debian 12, Arch Linux, macOS (pyenv), Windows (WSL/Docker). +Plateformes supportées : Ubuntu 24.04 / 25.10 / 26.04, Linux Mint 22.3, +Debian 12, AlmaLinux 9+, Rocky Linux 9+, Arch Linux, macOS (pyenv), +Windows (WSL/Docker). + +Ubuntu 20.04 et 22.04 sont abandonnées : pikepdf exige qpdf >= 12.2, compilé +en C++20, quand focal livre GCC 9. diff --git a/CHANGELOG.base.md b/CHANGELOG.base.md index 665c8ce..56963b3 100644 --- a/CHANGELOG.base.md +++ b/CHANGELOG.base.md @@ -58,8 +58,10 @@ Recréer l'environnement virtuel, utiliser le guide d'installation depuis l'outi - Support Selenium grid from selenium_lib.py - Add addons OnlyOffice, Cetmix, OCA automation, OCA shopfloor - Deploy ERPLibre VMs with QEMU/KVM from cloud images (Ubuntu, Debian, Fedora, - Arch) on amd64, arm64 and s390x, with a menu to list, test, resize, delete - and clean up + AlmaLinux, Rocky Linux, Arch) on amd64, arm64 and s390x, with a menu to list, + test, resize, delete and clean up +- Graphical VMs: a server / desktop choice offering GNOME or Cinnamon (the + Linux Mint desktop), with remote access through xrdp — TigerVNC on Arch - Textual interfaces: install dashboard, VM deployment form, migration resume screen; Textual is installed on demand - Navigation telemetry for TODO, as a tree, a kanban or a list @@ -109,8 +111,10 @@ Recréer l'environnement virtuel, utiliser le guide d'installation depuis l'outi - Support de la grille Selenium depuis selenium_lib.py - Ajout des addons OnlyOffice, Cetmix, OCA automation, OCA shopfloor - Déploiement de VM ERPLibre en QEMU/KVM depuis des images cloud (Ubuntu, - Debian, Fedora, Arch) en amd64, arm64 et s390x, avec un menu pour lister, - tester, redimensionner, supprimer et nettoyer + Debian, Fedora, AlmaLinux, Rocky Linux, Arch) en amd64, arm64 et s390x, avec + un menu pour lister, tester, redimensionner, supprimer et nettoyer +- VM graphiques : un choix serveur / bureau proposant GNOME ou Cinnamon (le + bureau de Linux Mint), avec accès distant par xrdp — TigerVNC sur Arch - Interfaces Textual : tableau de bord d'installation, formulaire de déploiement de VM, écran de reprise de migration ; Textual s'installe à la demande @@ -143,6 +147,22 @@ Recréer l'environnement virtuel, utiliser le guide d'installation depuis l'outi - brin_advisor et brin_cluster : recommander et appliquer le bon index PostgreSQL pour un modèle Odoo + +## Removed + +## Retiré + + +- Ubuntu 20.04 and 22.04 support, on every architecture: pikepdf needs qpdf + 12.2, whose build requires C++20, while focal ships GCC 9 and publishes no + `g++-10` for s390x + + + +- Le support d'Ubuntu 20.04 et 22.04, sur toutes les architectures : pikepdf + réclame qpdf 12.2, dont la compilation exige C++20, quand focal livre GCC 9 + et ne publie pas de `g++-10` pour s390x + ## Changed diff --git a/CHANGELOG.fr.md b/CHANGELOG.fr.md index e93f828..9908a6e 100644 --- a/CHANGELOG.fr.md +++ b/CHANGELOG.fr.md @@ -32,8 +32,10 @@ Recréer l'environnement virtuel, utiliser le guide d'installation depuis l'outi - Support de la grille Selenium depuis selenium_lib.py - Ajout des addons OnlyOffice, Cetmix, OCA automation, OCA shopfloor - Déploiement de VM ERPLibre en QEMU/KVM depuis des images cloud (Ubuntu, - Debian, Fedora, Arch) en amd64, arm64 et s390x, avec un menu pour lister, - tester, redimensionner, supprimer et nettoyer + Debian, Fedora, AlmaLinux, Rocky Linux, Arch) en amd64, arm64 et s390x, avec + un menu pour lister, tester, redimensionner, supprimer et nettoyer +- VM graphiques : un choix serveur / bureau proposant GNOME ou Cinnamon (le + bureau de Linux Mint), avec accès distant par xrdp — TigerVNC sur Arch - Interfaces Textual : tableau de bord d'installation, formulaire de déploiement de VM, écran de reprise de migration ; Textual s'installe à la demande @@ -66,6 +68,12 @@ Recréer l'environnement virtuel, utiliser le guide d'installation depuis l'outi - brin_advisor et brin_cluster : recommander et appliquer le bon index PostgreSQL pour un modèle Odoo +## Retiré + +- Le support d'Ubuntu 20.04 et 22.04, sur toutes les architectures : pikepdf + réclame qpdf 12.2, dont la compilation exige C++20, quand focal livre GCC 9 + et ne publie pas de `g++-10` pour s390x + ## Modifié - Support Docker postgresql 18 diff --git a/CHANGELOG.md b/CHANGELOG.md index 103f0ea..98cdeb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,8 +32,10 @@ Recreating the virtual environment, use installation guide from tool `make`. - Support Selenium grid from selenium_lib.py - Add addons OnlyOffice, Cetmix, OCA automation, OCA shopfloor - Deploy ERPLibre VMs with QEMU/KVM from cloud images (Ubuntu, Debian, Fedora, - Arch) on amd64, arm64 and s390x, with a menu to list, test, resize, delete - and clean up + AlmaLinux, Rocky Linux, Arch) on amd64, arm64 and s390x, with a menu to list, + test, resize, delete and clean up +- Graphical VMs: a server / desktop choice offering GNOME or Cinnamon (the + Linux Mint desktop), with remote access through xrdp — TigerVNC on Arch - Textual interfaces: install dashboard, VM deployment form, migration resume screen; Textual is installed on demand - Navigation telemetry for TODO, as a tree, a kanban or a list @@ -64,6 +66,12 @@ Recreating the virtual environment, use installation guide from tool `make`. - brin_advisor and brin_cluster: recommend and apply the right PostgreSQL index for an Odoo model +## Removed + +- Ubuntu 20.04 and 22.04 support, on every architecture: pikepdf needs qpdf + 12.2, whose build requires C++20, while focal ships GCC 9 and publishes no + `g++-10` for s390x + ## Changed - Docker support postgresql 18 diff --git a/README.base.md b/README.base.md index b07de49..af2bd49 100644 --- a/README.base.md +++ b/README.base.md @@ -94,7 +94,7 @@ Changez de version avec `make switch_odoo_18`, `make switch_odoo_16`, etc. # Supported platforms -- **Linux** : Ubuntu 20.04, 22.04, 24.04, 25.04; Debian 12; Arch Linux +- **Linux** : Ubuntu 24.04, 25.10, 26.04; Debian 12; AlmaLinux 9+; Rocky Linux 9+; Arch Linux - **macOS** : via pyenv - **Windows** : via WSL or Docker - **Mainframe** : 390x architecture @@ -103,7 +103,7 @@ Changez de version avec `make switch_odoo_18`, `make switch_odoo_16`, etc. # Plateformes supportées -- **Linux** : Ubuntu 20.04, 22.04, 24.04, 25.04; Debian 12; Arch Linux +- **Linux** : Ubuntu 24.04, 25.10, 26.04; Debian 12; AlmaLinux 9+; Rocky Linux 9+; Arch Linux - **macOS** : via pyenv - **Windows** : via WSL ou Docker - **Mainframe** : architecture 390x @@ -276,11 +276,11 @@ cd ERPLibre -Support Ubuntu 20.04, 22.04, 24.04, 25.04 and OSX. +Support Ubuntu 24.04, 25.10, 26.04, AlmaLinux 9+, Rocky Linux 9+ and OSX. -Support Ubuntu 20.04, 22.04, 24.04, 25.04 et OSX. +Support Ubuntu 24.04, 25.10, 26.04, AlmaLinux 9+, Rocky Linux 9+ et OSX. diff --git a/README.fr.md b/README.fr.md index bd81c44..1af228c 100644 --- a/README.fr.md +++ b/README.fr.md @@ -47,7 +47,7 @@ Changez de version avec `make switch_odoo_18`, `make switch_odoo_16`, etc. # Plateformes supportées -- **Linux** : Ubuntu 20.04, 22.04, 24.04, 25.04; Debian 12; Arch Linux +- **Linux** : Ubuntu 24.04, 25.10, 26.04; Debian 12; AlmaLinux 9+; Rocky Linux 9+; Arch Linux - **macOS** : via pyenv - **Windows** : via WSL ou Docker - **Mainframe** : architecture 390x @@ -140,7 +140,7 @@ cd ERPLibre ``` -Support Ubuntu 20.04, 22.04, 24.04, 25.04 et OSX. +Support Ubuntu 24.04, 25.10, 26.04, AlmaLinux 9+, Rocky Linux 9+ et OSX. ```bash diff --git a/README.md b/README.md index 10191a4..bf6847e 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Switch between versions with `make switch_odoo_18`, `make switch_odoo_16`, etc. # Supported platforms -- **Linux** : Ubuntu 20.04, 22.04, 24.04, 25.04; Debian 12; Arch Linux +- **Linux** : Ubuntu 24.04, 25.10, 26.04; Debian 12; AlmaLinux 9+; Rocky Linux 9+; Arch Linux - **macOS** : via pyenv - **Windows** : via WSL or Docker - **Mainframe** : 390x architecture @@ -139,7 +139,7 @@ cd ERPLibre ``` -Support Ubuntu 20.04, 22.04, 24.04, 25.04 and OSX. +Support Ubuntu 24.04, 25.10, 26.04, AlmaLinux 9+, Rocky Linux 9+ and OSX. ```bash diff --git a/doc/PRODUCTION.base.md b/doc/PRODUCTION.base.md index 2078db9..2f29351 100644 --- a/doc/PRODUCTION.base.md +++ b/doc/PRODUCTION.base.md @@ -80,14 +80,14 @@ sudo ln -s /snap/bin/certbot /usr/bin/certbot A service is running by SystemD. You can access it with the DNS name found in `env_var.sh` -#### Ubuntu 20.04 server +#### Ubuntu 24.04 server Apply fix libpng12-0: https://www.linuxuprising.com/2018/05/fix-libpng12-0-missing-in-ubuntu-1804.html Un service est en cours d'exécution via SystemD. Vous pouvez y accéder avec le nom DNS trouvé dans `env_var.sh` -#### Serveur Ubuntu 20.04 +#### Serveur Ubuntu 24.04 Appliquer le correctif libpng12-0 : https://www.linuxuprising.com/2018/05/fix-libpng12-0-missing-in-ubuntu-1804.html diff --git a/doc/PRODUCTION.fr.md b/doc/PRODUCTION.fr.md index 0740652..8ea5fba 100644 --- a/doc/PRODUCTION.fr.md +++ b/doc/PRODUCTION.fr.md @@ -45,7 +45,7 @@ sudo ln -s /snap/bin/certbot /usr/bin/certbot Un service est en cours d'exécution via SystemD. Vous pouvez y accéder avec le nom DNS trouvé dans `env_var.sh` -#### Serveur Ubuntu 20.04 +#### Serveur Ubuntu 24.04 Appliquer le correctif libpng12-0 : https://www.linuxuprising.com/2018/05/fix-libpng12-0-missing-in-ubuntu-1804.html diff --git a/doc/PRODUCTION.md b/doc/PRODUCTION.md index 151bf89..b2fbf62 100644 --- a/doc/PRODUCTION.md +++ b/doc/PRODUCTION.md @@ -45,7 +45,7 @@ sudo ln -s /snap/bin/certbot /usr/bin/certbot A service is running by SystemD. You can access it with the DNS name found in `env_var.sh` -#### Ubuntu 20.04 server +#### Ubuntu 24.04 server Apply fix libpng12-0: https://www.linuxuprising.com/2018/05/fix-libpng12-0-missing-in-ubuntu-1804.html diff --git a/doc/WINDOWS_INSTALLATION.base.md b/doc/WINDOWS_INSTALLATION.base.md index 8c8f054..44201e4 100644 --- a/doc/WINDOWS_INSTALLATION.base.md +++ b/doc/WINDOWS_INSTALLATION.base.md @@ -8,7 +8,7 @@ A guide on how to set up a workspace and run ERPLibre on Windows 10 version 2004 and up or Windows 11. There are two methods of installation, one is automatic and the other manual. -**"WSL2 Ubuntu 22.04" will be referred as "WSL2"** +**"WSL2 Ubuntu 24.04" will be referred as "WSL2"** **"PyCharm Professional" will be referred as "PyCharm"** @@ -21,7 +21,7 @@ Run Powershell with administrator rights and run the following command: Un guide pour configurer un espace de travail et exécuter ERPLibre sur Windows 10 version 2004 et plus ou Windows 11. Il existe deux méthodes d'installation, une automatique et l'autre manuelle. -**"WSL2 Ubuntu 22.04" sera désigné par "WSL2"** +**"WSL2 Ubuntu 24.04" sera désigné par "WSL2"** **"PyCharm Professional" sera désigné par "PyCharm"** @@ -31,7 +31,7 @@ Exécutez Powershell avec les droits administrateur et lancez la commande suivan ```bash -wsl --install -d Ubuntu-22.04 +wsl --install -d Ubuntu-24.04 ``` @@ -406,12 +406,12 @@ https://www.jetbrains.com/pycharm/download/#section=windows ### Set up Pycharm -Select `Connect to WSL` under `Remote Development`. After that select your Ubuntu instace ("Ubuntu-22.04"). Point `Project directory` to the root of the project. Once everything has been selected and filled out correctly, click on `Start IDE and Connect`. +Select `Connect to WSL` under `Remote Development`. After that select your Ubuntu instace ("Ubuntu-24.04"). Point `Project directory` to the root of the project. Once everything has been selected and filled out correctly, click on `Start IDE and Connect`. ### Configurer Pycharm -Sélectionnez `Connect to WSL` sous `Remote Development`. Ensuite sélectionnez votre instance Ubuntu ("Ubuntu-22.04"). Pointez `Project directory` vers la racine du projet. Une fois que tout a été sélectionné et rempli correctement, cliquez sur `Start IDE and Connect`. +Sélectionnez `Connect to WSL` sous `Remote Development`. Ensuite sélectionnez votre instance Ubuntu ("Ubuntu-24.04"). Pointez `Project directory` vers la racine du projet. Une fois que tout a été sélectionné et rempli correctement, cliquez sur `Start IDE and Connect`. ![Welcome to PyCharm Wizard](image/remote_development.png) diff --git a/doc/WINDOWS_INSTALLATION.fr.md b/doc/WINDOWS_INSTALLATION.fr.md index 16c3851..a6a2b49 100644 --- a/doc/WINDOWS_INSTALLATION.fr.md +++ b/doc/WINDOWS_INSTALLATION.fr.md @@ -3,7 +3,7 @@ Un guide pour configurer un espace de travail et exécuter ERPLibre sur Windows 10 version 2004 et plus ou Windows 11. Il existe deux méthodes d'installation, une automatique et l'autre manuelle. -**"WSL2 Ubuntu 22.04" sera désigné par "WSL2"** +**"WSL2 Ubuntu 24.04" sera désigné par "WSL2"** **"PyCharm Professional" sera désigné par "PyCharm"** @@ -12,7 +12,7 @@ Un guide pour configurer un espace de travail et exécuter ERPLibre sur Windows Exécutez Powershell avec les droits administrateur et lancez la commande suivante : ```bash -wsl --install -d Ubuntu-22.04 +wsl --install -d Ubuntu-24.04 ``` Si vous avez des difficultés à ouvrir Powershell avec les droits administrateur, appuyez sur `Windows + R`, entrez la ligne suivante et appuyez sur `OK`. Les droits administrateur vous seront automatiquement demandés. @@ -220,7 +220,7 @@ https://www.jetbrains.com/pycharm/download/#section=windows ### Configurer Pycharm -Sélectionnez `Connect to WSL` sous `Remote Development`. Ensuite sélectionnez votre instance Ubuntu ("Ubuntu-22.04"). Pointez `Project directory` vers la racine du projet. Une fois que tout a été sélectionné et rempli correctement, cliquez sur `Start IDE and Connect`. +Sélectionnez `Connect to WSL` sous `Remote Development`. Ensuite sélectionnez votre instance Ubuntu ("Ubuntu-24.04"). Pointez `Project directory` vers la racine du projet. Une fois que tout a été sélectionné et rempli correctement, cliquez sur `Start IDE and Connect`. ![Welcome to PyCharm Wizard](image/remote_development.png) diff --git a/doc/WINDOWS_INSTALLATION.md b/doc/WINDOWS_INSTALLATION.md index b2e87a4..912ef51 100644 --- a/doc/WINDOWS_INSTALLATION.md +++ b/doc/WINDOWS_INSTALLATION.md @@ -3,7 +3,7 @@ A guide on how to set up a workspace and run ERPLibre on Windows 10 version 2004 and up or Windows 11. There are two methods of installation, one is automatic and the other manual. -**"WSL2 Ubuntu 22.04" will be referred as "WSL2"** +**"WSL2 Ubuntu 24.04" will be referred as "WSL2"** **"PyCharm Professional" will be referred as "PyCharm"** @@ -12,7 +12,7 @@ A guide on how to set up a workspace and run ERPLibre on Windows 10 version 2004 Run Powershell with administrator rights and run the following command: ```bash -wsl --install -d Ubuntu-22.04 +wsl --install -d Ubuntu-24.04 ``` If you have trouble opening the Powershell with administrator rights, press `Windows + R`, enter the following line and press `OK`. You will be automatically prompted for administrator rights. @@ -220,7 +220,7 @@ https://www.jetbrains.com/pycharm/download/#section=windows ### Set up Pycharm -Select `Connect to WSL` under `Remote Development`. After that select your Ubuntu instace ("Ubuntu-22.04"). Point `Project directory` to the root of the project. Once everything has been selected and filled out correctly, click on `Start IDE and Connect`. +Select `Connect to WSL` under `Remote Development`. After that select your Ubuntu instace ("Ubuntu-24.04"). Point `Project directory` to the root of the project. Once everything has been selected and filled out correctly, click on `Start IDE and Connect`. ![Welcome to PyCharm Wizard](image/remote_development.png) diff --git a/script/install/install_debian_dependency.sh b/script/install/install_debian_dependency.sh index c7e6a6f..8f1b15d 100755 --- a/script/install/install_debian_dependency.sh +++ b/script/install/install_debian_dependency.sh @@ -19,22 +19,35 @@ APT_GET="sudo apt-get -o DPkg::Lock::Timeout=600" UBUNTU_VERSION=$(lsb_release -rs) DEBIAN_VERSION=$(lsb_release -cs) OS=$(lsb_release -si) + +# Ubuntu 18.04, 20.04 et 22.04 ne sont plus supportées, sur AUCUNE +# architecture. Le mur le plus net est pikepdf, qui réclame qpdf >= 12.2, +# lui-même en C++20 : focal livre GCC 9 et ne publie même pas de g++-10 pour +# s390x. S'y ajoutaient Python 3.8 à l'amorçage, node 10, cargo 0.67 et +# OpenSSL 1.1.1 — chacun avait son contournement, l'accumulation non. +# +# Le refus est ICI, avant tout le reste : ce script tourne aussi sur une +# machine existante, pas seulement sur une VM fraîchement déployée. if [[ "${OS}" == "Ubuntu" ]]; then - if [ "20.04" == "${UBUNTU_VERSION}" ]; then - WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb - elif [ "18.04" == "${UBUNTU_VERSION}" ]; then - WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb - else - # 22.04+ (jusqu'à 26.04 et au-delà) : wkhtmltopdf ne publie pas de build - # par version ; le .deb « jammy » est le plus récent et fonctionne. Un - # « else » (au lieu d'énumérer les versions) évite une URL VIDE sur une - # version récente (26.04) -> gdebi appelé sans fichier -> échec. - WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.deb - fi + case "${UBUNTU_VERSION}" in + 18.04 | 20.04 | 22.04) + echo "Ubuntu ${UBUNTU_VERSION} n'est plus supporte par ERPLibre :" + echo " sa chaine d'outils est trop ancienne (pikepdf exige qpdf 12.2," + echo " compile en C++20, quand cette version livre GCC 9)." + echo " Utilisez Ubuntu 24.04, 25.10 ou 26.04." + exit 1 + ;; + esac +fi + +if [[ "${OS}" == "Ubuntu" ]]; then + # wkhtmltopdf ne publie pas de build par version d'Ubuntu ; le .deb + # « jammy » est le plus récent et fonctionne de 24.04 à 26.04 et au-delà. + WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.deb elif [[ "${OS}" == "Linuxmint" ]]; then - if [ "22.3" == "${UBUNTU_VERSION}" ]; then - WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.deb - fi + # Sans « else », toute Mint autre que 22.3 laissait WKHTMLTOX_X64 VIDE, et + # gdebi etait appele sans fichier. Mint 22.x repose sur noble : meme .deb. + WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.deb elif [[ "${OS}" == "Debian" ]]; then if [ "bullseye" == "${DEBIAN_VERSION}" ]; then WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.bullseye_amd64.deb @@ -46,10 +59,10 @@ elif [[ "${OS}" == "Debian" ]]; then WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.bookworm_amd64.deb fi elif [[ "${OS}" == *"Ubuntu"* ]]; then - echo "Your version of Ubuntu is not supported, only support 18.04, 20.04 and 22.04" + echo "Your version of Ubuntu is not supported, only support 24.04, 25.10 and 26.04" WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.deb else - echo "Your version of Ubuntu is not supported, only support 18.04, 20.04 and 22.04" + echo "Your version of Ubuntu is not supported, only support 24.04, 25.10 and 26.04" exit 1 fi @@ -58,25 +71,6 @@ fi #-------------------------------------------------- if [ "$(uname -m)" = "s390x" ]; then echo "Arch s390x detected" - # Sur s390x, aucune roue PyPI : tout se compile contre les bibliothèques de - # la distribution. Deux versions n'en ont pas d'assez récentes. - # - # 20.04 : pikepdf réclame qpdf >= 12.2, dont la compilation exige C++20. - # focal livre GCC 9 et ne publie PAS g++-10 pour s390x — vérifié. - # La compilation s'arrête sur « fatal error: concepts: No such file - # or directory », sans contournement possible. - # 22.04 : même mur qpdf, franchissable en théorie, abandonné avec la 20.04 - # plutôt que de maintenir un chemin de plus. - # - # On refuse ICI, avant une heure de compilation émulée pour rien. - case "${UBUNTU_VERSION}" in - 20.04 | 22.04) - echo "Ubuntu ${UBUNTU_VERSION} n'est plus supporte sur s390x :" - echo " sa chaine d'outils est trop ancienne pour ERPLibre." - echo " Utilisez Ubuntu 24.04 ou plus recent." - exit 1 - ;; - esac # Sur une VM fraîche, l'index apt peut être vide : « apt install » échouerait # alors sur TOUT le lot, et l'absence d'un seul paquet ne se voit que bien # plus loin, sous la forme d'une commande introuvable. @@ -239,16 +233,6 @@ fi #-------------------------------------------------- echo -e "\n---- Update Server ----" -if [ "18.04" == "${UBUNTU_VERSION}" ]; then - # add-apt-repository can install add-apt-repository Ubuntu 18.x - ${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" - ${APT_GET} update - ${APT_GET} upgrade -y -fi #-------------------------------------------------- # Install PostgreSQL Server @@ -292,14 +276,6 @@ if [[ $retVal -ne 0 ]]; then echo "apt-get libmariadb installation error." exit 1 fi -if [ "18.04" == "${UBUNTU_VERSION}" ]; then - ${APT_GET} install libpng12-0 -y - retVal=$? - if [[ $retVal -ne 0 ]]; then - echo "apt-get libpng installation error." - exit 1 - fi -fi # Dependencies for pyenv ${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=$? @@ -321,13 +297,8 @@ ${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 -if [ "18.04" == "${UBUNTU_VERSION}" ]; then - sudo apt remove nodeJS npm - NODE_MAJOR=16 -else - # Node 22+ required by @capacitor/cli v8.x (mobile app dependency) - NODE_MAJOR=22 -fi +# Node 22+ required by @capacitor/cli v8.x (mobile app dependency) +NODE_MAJOR=22 # NodeSource ne publie que amd64, arm64 et armhf : vérifié, binary-s390x # répond 404. Ajouter le dépôt sur une autre architecture n'apporte rien et diff --git a/script/install/install_dev.sh b/script/install/install_dev.sh index 95cc0a3..9274230 100755 --- a/script/install/install_dev.sh +++ b/script/install/install_dev.sh @@ -3,11 +3,15 @@ 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" || "${VERSION_ID}" == "26.04" ]]; then + # 20.04 et 22.04 retirees : leur chaine d'outils ne suffit plus a ERPLibre + # (pikepdf exige qpdf >= 12.2, en C++20, quand focal livre GCC 9). Les + # versions intermediaires EOL (22.10, 23.04, 23.10, 25.04) partent avec. + if [[ "${VERSION_ID}" == "24.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, 26.04 : ${VERSION_ID}" + echo "Your version is not supported, only support 24.04, 25.10, 26.04 : ${VERSION_ID}" + exit 1 fi elif [[ "${ID}" == "linuxmint" ]]; then if [[ "${VERSION_ID}" == "22.3" ]]; then @@ -21,11 +25,13 @@ if [[ "${OSTYPE}" == "linux-gnu" ]]; then 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 ----" + # AlmaLinux et Rocky declarent ID_LIKE="rhel centos fedora" : elles passent + # donc par ce meme script, qui aiguille dnf. + echo "\n---- Fedora/RHEL 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, Debian, Fedora, Arch." + echo "Your Linux system is not supported, only support Ubuntu 24.04, 25.10, 26.04, Linux Mint 22.3, Debian, Fedora, AlmaLinux, Rocky Linux, Arch." fi elif [[ "${OSTYPE}" == "darwin"* ]]; then echo "\n---- Darwin installation process started ----" diff --git a/script/install/install_fedora_dependency.sh b/script/install/install_fedora_dependency.sh index 7fbafa7..e530196 100755 --- a/script/install/install_fedora_dependency.sh +++ b/script/install/install_fedora_dependency.sh @@ -14,6 +14,32 @@ EL_USER=${USER} # signature après un cache périmé) et saute les paquets introuvables. DNF="sudo dnf install -y --refresh --skip-unavailable" +#-------------------------------------------------- +# Dérivés RHEL : dépôts supplémentaires +#-------------------------------------------------- +# AlmaLinux, Rocky, CentOS Stream et RHEL passent par ce script (install_dev.sh +# les aiguille sur ID_LIKE=rhel). Contrairement à Fedora, leur jeu de dépôts +# par défaut est ÉTROIT : la plupart des paquets « -devel » vivent dans CRB +# (CodeReady Builder), et tout ce qui est communautaire dans EPEL. Sans ces +# deux dépôts, « --skip-unavailable » saute les paquets EN SILENCE et l'échec +# n'apparaît qu'à la compilation, très loin d'ici. +if [ -r /etc/os-release ]; then + # shellcheck disable=SC1091 + . /etc/os-release +fi +case "${ID}" in + almalinux | rocky | rhel | centos) + echo -e "\n---- Depots EPEL et CRB (famille RHEL) ----" + sudo dnf install -y epel-release \ + || echo "epel-release indisponible : certains paquets manqueront." + # « crb » sur EL9/EL10 ; « powertools » était le nom sur EL8. + sudo dnf config-manager --set-enabled crb 2> /dev/null \ + || sudo dnf config-manager --set-enabled powertools 2> /dev/null \ + || sudo dnf config-manager --enable crb 2> /dev/null \ + || echo "CRB/PowerTools non active : certains -devel manqueront." + ;; +esac + #-------------------------------------------------- # Outils de compilation (build Python via pyenv, extensions Python) #-------------------------------------------------- diff --git a/script/qemu/README.base.md b/script/qemu/README.base.md index 33daefb..cca9e41 100644 --- a/script/qemu/README.base.md +++ b/script/qemu/README.base.md @@ -173,31 +173,47 @@ sudo ./script/qemu/deploy_qemu.py --name test-vm --version 24.04 \ ``` -Supported Ubuntu versions: `20.04`, `22.04`, `24.04` (default), `24.10`, -`25.04`, `25.10`. Provide an explicit image path as a positional argument to -override the automatic download location. +Catalog, per architecture (`deploy_qemu.py` is the source of truth): -On **s390x**, `20.04` and `22.04` are **not supported**: no PyPI wheel exists -for that architecture, so everything is built against the distribution's -libraries, and pikepdf needs qpdf 12.2, whose build requires C++20. Focal -ships GCC 9 and publishes no `g++-10` for s390x — there is no way around it. -Use `24.04` or later. Both are still supported on amd64 and arm64, where pip -installs prebuilt wheels. +| Distro | Versions | amd64 | arm64 | s390x | +|---|---|:-:|:-:|:-:| +| ubuntu | `24.04` (default), `25.10`, `26.04` | ✔ | ✔ | ✔ | +| debian | `11`, `12` (default), `13` | ✔ | ✔ | — | +| fedora | `41`, `42` (default), `43`, `44` | ✔ | ✔ | — | +| almalinux | `9` (default), `10` | ✔ | ✔ | ✔ | +| rocky | `9`, `10` (default) | ✔ | ✔ | ✔ | +| arch | `latest` | ✔ | — | — | + +Provide an explicit image path as a positional argument to override the +automatic download location. + +Ubuntu `20.04` and `22.04` were **dropped on every architecture**: pikepdf +needs qpdf 12.2, whose build requires C++20, and focal ships GCC 9 — it does +not even publish `g++-10` for s390x. Python 3.8, node 10, cargo 0.67 and +OpenSSL 1.1.1 each had a workaround; the pile of them did not. ## After deployment -Versions Ubuntu supportées : `20.04`, `22.04`, `24.04` (défaut), `24.10`, -`25.04`, `25.10`. Fournissez un chemin d'image en argument positionnel pour -surcharger l'emplacement de téléchargement automatique. +Catalogue, par architecture (`deploy_qemu.py` fait autorité) : -Sur **s390x**, les `20.04` et `22.04` ne sont **pas supportées** : aucune roue -PyPI n'existe pour cette architecture, tout se compile donc contre les -bibliothèques de la distribution, et pikepdf réclame qpdf 12.2, dont la -compilation exige C++20. Focal livre GCC 9 et ne publie pas de `g++-10` pour -s390x — il n'y a pas de contournement. Utilisez la `24.04` ou plus récente. -Les deux restent supportées sur amd64 et arm64, où pip pose des roues -précompilées. +| Distro | Versions | amd64 | arm64 | s390x | +|---|---|:-:|:-:|:-:| +| ubuntu | `24.04` (défaut), `25.10`, `26.04` | ✔ | ✔ | ✔ | +| debian | `11`, `12` (défaut), `13` | ✔ | ✔ | — | +| fedora | `41`, `42` (défaut), `43`, `44` | ✔ | ✔ | — | +| almalinux | `9` (défaut), `10` | ✔ | ✔ | ✔ | +| rocky | `9`, `10` (défaut) | ✔ | ✔ | ✔ | +| arch | `latest` | ✔ | — | — | + +Fournissez un chemin d'image en argument positionnel pour surcharger +l'emplacement de téléchargement automatique. + +Les Ubuntu `20.04` et `22.04` sont **abandonnées sur toutes les +architectures** : pikepdf réclame qpdf 12.2, dont la compilation exige C++20, +et focal livre GCC 9 — elle ne publie même pas de `g++-10` pour s390x. Python +3.8, node 10, cargo 0.67 et OpenSSL 1.1.1 avaient chacun leur contournement ; +leur accumulation, non. ## Après le déploiement diff --git a/script/qemu/README.fr.md b/script/qemu/README.fr.md index 21dfe7f..19c022f 100644 --- a/script/qemu/README.fr.md +++ b/script/qemu/README.fr.md @@ -92,17 +92,25 @@ sudo ./script/qemu/deploy_qemu.py --name test-vm --version 24.04 \ --ssh-key ~/.ssh/id_ed25519.pub -y ``` -Versions Ubuntu supportées : `20.04`, `22.04`, `24.04` (défaut), `24.10`, -`25.04`, `25.10`. Fournissez un chemin d'image en argument positionnel pour -surcharger l'emplacement de téléchargement automatique. +Catalogue, par architecture (`deploy_qemu.py` fait autorité) : -Sur **s390x**, les `20.04` et `22.04` ne sont **pas supportées** : aucune roue -PyPI n'existe pour cette architecture, tout se compile donc contre les -bibliothèques de la distribution, et pikepdf réclame qpdf 12.2, dont la -compilation exige C++20. Focal livre GCC 9 et ne publie pas de `g++-10` pour -s390x — il n'y a pas de contournement. Utilisez la `24.04` ou plus récente. -Les deux restent supportées sur amd64 et arm64, où pip pose des roues -précompilées. +| Distro | Versions | amd64 | arm64 | s390x | +|---|---|:-:|:-:|:-:| +| ubuntu | `24.04` (défaut), `25.10`, `26.04` | ✔ | ✔ | ✔ | +| debian | `11`, `12` (défaut), `13` | ✔ | ✔ | — | +| fedora | `41`, `42` (défaut), `43`, `44` | ✔ | ✔ | — | +| almalinux | `9` (défaut), `10` | ✔ | ✔ | ✔ | +| rocky | `9`, `10` (défaut) | ✔ | ✔ | ✔ | +| arch | `latest` | ✔ | — | — | + +Fournissez un chemin d'image en argument positionnel pour surcharger +l'emplacement de téléchargement automatique. + +Les Ubuntu `20.04` et `22.04` sont **abandonnées sur toutes les +architectures** : pikepdf réclame qpdf 12.2, dont la compilation exige C++20, +et focal livre GCC 9 — elle ne publie même pas de `g++-10` pour s390x. Python +3.8, node 10, cargo 0.67 et OpenSSL 1.1.1 avaient chacun leur contournement ; +leur accumulation, non. ## Après le déploiement diff --git a/script/qemu/README.md b/script/qemu/README.md index 9335a43..a4163a7 100644 --- a/script/qemu/README.md +++ b/script/qemu/README.md @@ -86,16 +86,24 @@ sudo ./script/qemu/deploy_qemu.py --name test-vm --version 24.04 \ --ssh-key ~/.ssh/id_ed25519.pub -y ``` -Supported Ubuntu versions: `20.04`, `22.04`, `24.04` (default), `24.10`, -`25.04`, `25.10`. Provide an explicit image path as a positional argument to -override the automatic download location. +Catalog, per architecture (`deploy_qemu.py` is the source of truth): -On **s390x**, `20.04` and `22.04` are **not supported**: no PyPI wheel exists -for that architecture, so everything is built against the distribution's -libraries, and pikepdf needs qpdf 12.2, whose build requires C++20. Focal -ships GCC 9 and publishes no `g++-10` for s390x — there is no way around it. -Use `24.04` or later. Both are still supported on amd64 and arm64, where pip -installs prebuilt wheels. +| Distro | Versions | amd64 | arm64 | s390x | +|---|---|:-:|:-:|:-:| +| ubuntu | `24.04` (default), `25.10`, `26.04` | ✔ | ✔ | ✔ | +| debian | `11`, `12` (default), `13` | ✔ | ✔ | — | +| fedora | `41`, `42` (default), `43`, `44` | ✔ | ✔ | — | +| almalinux | `9` (default), `10` | ✔ | ✔ | ✔ | +| rocky | `9`, `10` (default) | ✔ | ✔ | ✔ | +| arch | `latest` | ✔ | — | — | + +Provide an explicit image path as a positional argument to override the +automatic download location. + +Ubuntu `20.04` and `22.04` were **dropped on every architecture**: pikepdf +needs qpdf 12.2, whose build requires C++20, and focal ships GCC 9 — it does +not even publish `g++-10` for s390x. Python 3.8, node 10, cargo 0.67 and +OpenSSL 1.1.1 each had a workaround; the pile of them did not. ## After deployment diff --git a/script/qemu/deploy_qemu.py b/script/qemu/deploy_qemu.py index 15f7d0d..21c9a72 100755 --- a/script/qemu/deploy_qemu.py +++ b/script/qemu/deploy_qemu.py @@ -79,9 +79,13 @@ from pathlib import Path # transitoire. Un VM à 10G tombait « Poetry installation error » (disque # plein). Le qcow2 est CREUX (sparse) : une taille virtuelle plus grande ne # consomme rien tant qu'elle n'est pas remplie -> 20G sans surcoût réel. +# +# 20.04 et 22.04 ne sont plus proposées : leur chaîne d'outils ne suffit plus à +# ERPLibre. Le mur le plus net est pikepdf, qui réclame qpdf >= 12.2, lui-même +# en C++20 — focal livre GCC 9. S'y ajoutaient Python 3.8 à l'amorçage, node 10, +# cargo 0.67 et OpenSSL 1.1.1. Chacun avait son contournement ; l'accumulation, +# non. UBUNTU_VERSIONS: dict[str, tuple[str, str, int, str]] = { - "20.04": ("focal", "ubuntu20.04", 2048, "20G"), - "22.04": ("jammy", "ubuntu22.04", 2048, "20G"), "24.04": ("noble", "ubuntu24.04", 3072, "20G"), "25.10": ("questing", "ubuntu25.10", 3072, "20G"), "26.04": ("resolute", "ubuntu26.04", 3072, "20G"), @@ -97,6 +101,18 @@ FEDORA_VERSIONS: dict[str, tuple[str, str, int, str]] = { "43": ("43", "fedora43", 2048, "20G"), "44": ("44", "fedora44", 2048, "20G"), } +# Dérivés RHEL. Le second champ est l'identifiant libosinfo : « almalinux9 » et +# « almalinux10 » figurent dans osinfo-db, « rocky10 » n'y est pas encore sur +# les hôtes 24.04 — osinfo_arg() replie alors sur une valeur connue. +# RAM : libosinfo demande 1,5 Gio en x86_64 ; on retient 2048 comme Fedora. +ALMALINUX_VERSIONS: dict[str, tuple[str, str, int, str]] = { + "9": ("9", "almalinux9", 2048, "20G"), + "10": ("10", "almalinux10", 2048, "20G"), +} +ROCKY_VERSIONS: dict[str, tuple[str, str, int, str]] = { + "9": ("9", "rocky9", 2048, "20G"), + "10": ("10", "rocky10", 2048, "20G"), +} # Arch est en rolling release : une seule « version » (latest). ARCH_VERSIONS: dict[str, tuple[str, str, int, str]] = { "latest": ("latest", "archlinux", 1024, "20G"), @@ -107,6 +123,8 @@ 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"), + "almalinux": (ALMALINUX_VERSIONS, "9"), + "rocky": (ROCKY_VERSIONS, "10"), "arch": (ARCH_VERSIONS, "latest"), } @@ -114,6 +132,8 @@ DISTROS: dict[str, tuple[dict[str, tuple[str, str, int, str]], str]] = { # 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"}, + "almalinux": {"amd64": "x86_64", "arm64": "aarch64"}, + "rocky": {"amd64": "x86_64", "arm64": "aarch64"}, "arch": {"amd64": "x86_64", "arm64": "aarch64"}, } @@ -126,31 +146,14 @@ NON_X86_ARCHES: tuple[str, ...] = ("arm64", "s390x") # - 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") - -# Versions ABANDONNÉES sur une architecture donnée : publier une image cloud ne -# suffit pas, encore faut-il que la chaîne d'outils permette d'installer -# ERPLibre. Sur s390x, aucune roue PyPI n'existe : tout se compile contre les -# bibliothèques de la distribution, et deux versions n'en ont pas d'assez -# récentes. -# -# 20.04 : pikepdf réclame qpdf >= 12.2, dont la compilation exige C++20 — -# or focal livre GCC 9 et NE PUBLIE PAS g++-10 pour s390x. Sans -# issue. S'y ajoutaient Python 3.8, node 10, cargo 0.67 et -# OpenSSL 1.1.1, tous contournés, mais celui-là ne l'est pas. -# 22.04 : même mur qpdf, franchissable en théorie (GCC 11), abandonné avec -# la 20.04 pour ne pas maintenir un chemin de plus. -# -# amd64 et arm64 ne sont PAS concernés : pip y pose des roues précompilées. -UNSUPPORTED_VERSIONS: dict[str, dict[str, tuple[str, ...]]] = { - "s390x": {"ubuntu": ("20.04", "22.04")}, -} - - -def is_supported(distro: str, version: str, arch: str) -> bool: - """Faux si ce triplet est explicitement abandonné.""" - return version not in UNSUPPORTED_VERSIONS.get(arch, {}).get(distro, ()) +S390X_DISTROS: tuple[str, ...] = ("ubuntu", "almalinux", "rocky") +ARM64_DISTROS: tuple[str, ...] = ( + "ubuntu", + "debian", + "fedora", + "almalinux", + "rocky", +) # arch générique -> distros la publiant (pour valider --arch tôt). @@ -187,6 +190,8 @@ DEBIAN_CLOUD_BASES: tuple[str, ...] = ( "https://gemmei.ftp.acc.umu.se/cdimage/cloud", "https://laotzu.ftp.acc.umu.se/cdimage/cloud", ) +ALMALINUX_CLOUD_BASE = "https://repo.almalinux.org/almalinux" +ROCKY_CLOUD_BASE = "https://dl.rockylinux.org/pub/rocky" FEDORA_BASE = "https://download.fedoraproject.org/pub/fedora/linux/releases" # Serveur MAÎTRE (pas de redirection MirrorManager) : repli fiable quand le # redirecteur envoie sur un miroir incomplet (fréquent en déploiement @@ -237,6 +242,22 @@ def image_candidates( ] if distro == "fedora": return [resolve_fedora_url(version, arch, dry_run)] + if distro == "almalinux": + # Contrairement à Fedora, AlmaLinux publie un lien « latest » STABLE + # par majeure et par architecture : aucun index HTML à analyser. On + # vise l'arbre de la MAJEURE (9/, 10/), qui suit la mineure courante — + # les répertoires mineurs périmés sont retirés du miroir. + return [ + f"{ALMALINUX_CLOUD_BASE}/{version}/cloud/{a}/images/" + f"AlmaLinux-{version}-GenericCloud-latest.{a}.qcow2" + ] + if distro == "rocky": + # Même principe : l'alias « .latest » suit le point release courant, et + # les précédents partent au vault — une URL figée casserait. + return [ + f"{ROCKY_CLOUD_BASE}/{version}/images/{a}/" + f"Rocky-{version}-GenericCloud.latest.{a}.qcow2" + ] if distro == "arch": # Rolling release : image « latest » officielle (cloud-init inclus). return [f"{ARCH_CLOUD_BASE}/Arch-Linux-{a}-cloudimg.qcow2"] @@ -290,6 +311,12 @@ def default_image_name(distro: str, code: str, arch: str, version: str) -> str: return f"debian-{version}-genericcloud-{a}.qcow2" if distro == "arch": return f"arch-linux-{a}-cloudimg.qcow2" + if distro in ("almalinux", "rocky"): + # « latest » est MUTABLE : le nom de cache porte donc la majeure, et + # une image déjà téléchargée sera réutilisée telle quelle. C'est voulu + # (reproductibilité d'un déploiement à l'autre) ; supprimer le fichier + # du cache suffit à repartir sur le build courant. + return f"{distro}-{version}-genericcloud-{a}.qcow2" return f"fedora-cloud-{version}-{a}.qcow2" @@ -1312,6 +1339,14 @@ def host_timezone() -> str: return "UTC" +def admin_group(distro: str) -> str: + """Groupe d'administration de la distribution. + + Debian et Ubuntu : « sudo ». Famille RHEL (AlmaLinux, Rocky, Fedora) et + Arch : « wheel » — elles n'ont aucun groupe « sudo ».""" + return "sudo" if distro in ("ubuntu", "debian") else "wheel" + + def build_cloud_config( args: argparse.Namespace, pw_hash: str | None, ssh_keys: list[str] ) -> str: @@ -1322,10 +1357,15 @@ def build_cloud_config( "users:", f" - name: {args.user}", " sudo: ALL=(ALL) NOPASSWD:ALL", - # « sudo » existe sur Debian ET Ubuntu ; « admin » n'existe PAS sur - # Debian -> useradd -G ...,admin échoue et l'utilisateur n'est jamais - # créé (login/clé SSH KO). C'était la cause du « Debian ne marche pas ». - " groups: users, sudo", + # Le groupe d'administration N'A PAS le même nom partout, et un nom + # inconnu fait échouer « useradd -G » : l'utilisateur n'est alors jamais + # créé, donc ni mot de passe ni clé SSH — la VM démarre et reste + # inaccessible. C'était déjà la cause du « Debian ne marche pas » + # (« admin » n'existe pas sur Debian) ; la famille RHEL et Arch ont le + # même écart, elles n'ont pas de groupe « sudo » mais « wheel ». + # Le privilège lui-même vient de la ligne « sudo: » ci-dessus, pas du + # groupe : celui-ci n'est qu'une commodité. + f" groups: users, {admin_group(args.distro)}", " shell: /bin/bash", " lock_passwd: false" if pw_hash else " lock_passwd: true", ] @@ -2133,19 +2173,6 @@ def main() -> None: f"Architecture {args.arch} indisponible pour {args.distro!r} : " f"images cloud publiées seulement pour {', '.join(supported)}." ) - # L'image cloud existe, mais la chaîne d'outils de cette version ne permet - # pas d'installer ERPLibre sur cette architecture. Mieux vaut le dire ici - # qu'après une heure de compilation émulée. - if not is_supported(args.distro, args.version, args.arch): - dropped = UNSUPPORTED_VERSIONS[args.arch][args.distro] - keep = [v for v in versions if v not in dropped] - sys.exit( - f"{args.distro} {args.version} n'est plus supporté sur " - f"{args.arch} : sa chaîne d'outils est trop ancienne pour " - f"ERPLibre (GCC 9 sur 20.04 ne compile pas le qpdf que réclame " - f"pikepdf, et aucun g++ plus récent n'y est publié).\n" - f" Versions supportées sur {args.arch} : {', '.join(keep)}." - ) code, default_osinfo, min_ram, min_disk = versions[args.version] if args.codename: code = args.codename diff --git a/script/selenium/README.base.md b/script/selenium/README.base.md index cb90344..07b21ce 100644 --- a/script/selenium/README.base.md +++ b/script/selenium/README.base.md @@ -4,10 +4,10 @@ -# Installation Ubuntu 20.04 +# Installation Ubuntu 24.04 -# Installation Ubuntu 20.04 +# Installation Ubuntu 24.04 sudo apt install libcairo2-dev diff --git a/script/selenium/README.fr.md b/script/selenium/README.fr.md index 023d8c9..b813826 100644 --- a/script/selenium/README.fr.md +++ b/script/selenium/README.fr.md @@ -1,4 +1,4 @@ -# Installation Ubuntu 20.04 +# Installation Ubuntu 24.04 sudo apt install libcairo2-dev \ No newline at end of file diff --git a/script/selenium/README.md b/script/selenium/README.md index 023d8c9..b813826 100644 --- a/script/selenium/README.md +++ b/script/selenium/README.md @@ -1,4 +1,4 @@ -# Installation Ubuntu 20.04 +# Installation Ubuntu 24.04 sudo apt install libcairo2-dev \ No newline at end of file diff --git a/script/todo/qemu_deploy_form.py b/script/todo/qemu_deploy_form.py index 264095e..7f75bd8 100644 --- a/script/todo/qemu_deploy_form.py +++ b/script/todo/qemu_deploy_form.py @@ -177,7 +177,7 @@ def build_spec(vms, domains, form): "existing": [vm["name"] for vm in vms if vm["name"] in known], "ssh_key": form["ssh_key"], "timezone": form.get("timezone", ""), - "desktop": form.get("desktop", False), + "desktop": form.get("desktop", ""), "install": form["install"], "add_ssh_config": form["add_ssh_config"], "parallelism": form["parallelism"], @@ -243,6 +243,8 @@ def run_deploy_form(ctx, run_app: bool = True): base_vcpus = ctx.get("base_vcpus") or 2 extra_disk = ctx.get("extra_disk_gb") or 0 desktop_disk = ctx.get("desktop_disk_gb") or 0 + # [(clé, libellé)] — la liste vient de todo.py, source unique. + desktops = list(ctx.get("desktops") or []) defaults = ctx.get("defaults") or {} result = {"spec": None} @@ -452,12 +454,13 @@ def run_deploy_form(ctx, run_app: bool = True): with RadioSet(id="f_type"): yield RadioButton( t("Server (no graphical interface)"), - value=not defaults.get("desktop", False), - ) - yield RadioButton( - t("Graphical (server + GNOME desktop)"), - value=defaults.get("desktop", False), + value=not defaults.get("desktop", ""), ) + for key, label in desktops: + yield RadioButton( + f"{t('Graphical (server + desktop):')} {label}", + value=defaults.get("desktop", "") == key, + ) yield Static("ERPLibre", classes="grouptitle") yield Checkbox( t("Install ERPLibre"), @@ -599,7 +602,11 @@ def run_deploy_form(ctx, run_app: bool = True): self._render_plan() def _desktop(self): - return self.query_one("#f_type", RadioSet).pressed_index == 1 + """« » pour un serveur, sinon la clé de la saveur choisie.""" + index = self.query_one("#f_type", RadioSet).pressed_index + if index is None or index < 1 or index > len(desktops): + return "" + return desktops[index - 1][0] def _render_plan(self): table = self.query_one("#plan", DataTable) diff --git a/script/todo/todo.py b/script/todo/todo.py index d806595..b9bf152 100755 --- a/script/todo/todo.py +++ b/script/todo/todo.py @@ -1022,12 +1022,11 @@ class TODO: # distro -> (versions affichées, version par défaut). Source de vérité = # deploy_qemu.py ; ceci ne sert qu'au sélecteur interactif. _QEMU_DISTROS = { - "ubuntu": ( - ["20.04", "22.04", "24.04", "25.10", "26.04"], - "24.04", - ), + "ubuntu": (["24.04", "25.10", "26.04"], "24.04"), "debian": (["11", "12", "13"], "12"), "fedora": (["41", "42", "43", "44"], "42"), + "almalinux": (["9", "10"], "9"), + "rocky": (["9", "10"], "10"), "arch": (["latest"], "latest"), } @@ -1075,8 +1074,14 @@ class TODO: # Distros publiant des images cloud par architecture (cohérent avec # S390X_DISTROS / ARM64_DISTROS de deploy_qemu.py). amd64 : toutes. - _QEMU_S390X_DISTROS = ("ubuntu",) - _QEMU_ARM64_DISTROS = ("ubuntu", "debian", "fedora") + _QEMU_S390X_DISTROS = ("ubuntu", "almalinux", "rocky") + _QEMU_ARM64_DISTROS = ( + "ubuntu", + "debian", + "fedora", + "almalinux", + "rocky", + ) # Alias distro pour l'affichage (jeton générique -> nom courant). _QEMU_ARCH_ALIAS = {"amd64": "x86_64", "arm64": "aarch64"} @@ -4303,33 +4308,43 @@ class TODO: "sudo systemctl enable --now erplibre.service" ) - # GNOME et son accès distant, par gestionnaire de paquets. Une seule - # source pour la TUI et la CLI. Les noms ont été relevés distribution par + # Bureaux disponibles, par gestionnaire de paquets. Une seule source pour + # la TUI et la CLI. Les noms ont été relevés distribution par # distribution, pas déduits : Arch n'a PAS xrdp dans ses dépôts officiels # (AUR seulement) et prend TigerVNC, avec un port et un client différents. + # + # Côté dnf on installe un ENVIRONNEMENT, pas un groupe : le groupe + # « gnome-desktop » d'AlmaLinux apporte gdm et gnome-shell mais PAS + # « base-x », donc aucun serveur X — vérifié dans son comps.xml. Les + # environnements diffèrent selon la famille (RHEL / Fedora), d'où la + # cascade : le premier qui existe gagne. _QEMU_DESKTOP = { - "apt": { - "packages": "gnome-core xrdp dbus-x11", - "groups": "", - "remote": "xrdp", - "port": 3389, - "client": "RDP", + "gnome": { + "label": "GNOME", + "apt": "gnome-core dbus-x11", + "dnf_env": "graphical-server-environment " + "workstation-product-environment gnome-desktop", + "pacman": "gnome gdm", + "service": "gdm", }, - "dnf": { - "packages": "xrdp", - "groups": "gnome-desktop", - "remote": "xrdp", - "port": 3389, - "client": "RDP", - }, - "pacman": { - "packages": "gdm tigervnc", - "groups": "gnome", - "remote": "", - "port": 5901, - "client": "VNC", + "cinnamon": { + "label": "Cinnamon (Linux Mint)", + # Le bureau de Linux Mint, depuis les dépôts de la distribution : + # Ubuntu 24.04 livre Cinnamon 6.0.4, la 25.10 la 6.4.12. Le dépôt + # de Mint lui-même n'est pas utilisé — il est en HTTP nu et ne + # publie que i386/amd64, ce qui exclurait arm64 et s390x. + "apt": "cinnamon-desktop-environment dbus-x11", + "dnf_env": "cinnamon-desktop", + "pacman": "cinnamon lightdm lightdm-gtk-greeter", + "service": "lightdm", }, } + # Accès distant, indépendant du bureau choisi. + _QEMU_DESKTOP_REMOTE = { + "apt": {"packages": "xrdp", "port": 3389, "client": "RDP"}, + "dnf": {"packages": "xrdp", "port": 3389, "client": "RDP"}, + "pacman": {"packages": "tigervnc", "port": 5901, "client": "VNC"}, + } # Place que prend un bureau complet, annoncée dans le plan : sur une image # cloud de 40 G, l'oublier remplit le disque en pleine installation. QEMU_DESKTOP_EXTRA_DISK_GB = 6 @@ -4393,36 +4408,43 @@ class TODO: ">/dev/null 2>&1 || true; " ) - def _qemu_desktop_remote_cmd(self): - """Bloc shell installant GNOME + son accès distant, quelle que soit la - distribution. Même aiguillage que l'installation ERPLibre, et même - traitement du verrou apt : cette étape passe par la commande distante - et non par cloud-init, où ses 1 à 2 Go allongeraient un démarrage déjà - long sans laisser la moindre trace dans le suivi.""" - apt = self._QEMU_DESKTOP["apt"] - dnf = self._QEMU_DESKTOP["dnf"] - pac = self._QEMU_DESKTOP["pacman"] + def _qemu_desktop_remote_cmd(self, flavour="gnome"): + """Bloc shell installant le bureau choisi + son accès distant, quelle + que soit la distribution. Même aiguillage que l'installation ERPLibre, + et même traitement du verrou apt : cette étape passe par la commande + distante et non par cloud-init, où ses 1 à 2 Go allongeraient un + démarrage déjà long sans laisser la moindre trace dans le suivi.""" + de = self._QEMU_DESKTOP.get(flavour) or self._QEMU_DESKTOP["gnome"] + rem = self._QEMU_DESKTOP_REMOTE + label = de["label"] return ( - f'echo "== {t("Installing the GNOME desktop (long)")} =="; ' + f'echo "== {t("Installing the desktop (long):")} {label} =="; ' "if command -v apt-get >/dev/null 2>&1; then " "n=0; until sudo apt-get -o DPkg::Lock::Timeout=120 update -qq; do " "n=$((n+1)); [ $n -ge 30 ] && break; sleep 10; done; " "sudo DEBIAN_FRONTEND=noninteractive " "apt-get -o DPkg::Lock::Timeout=600 install -y " - f"{apt['packages']}; " + f"{de['apt']} {rem['apt']['packages']}; " "elif command -v dnf >/dev/null 2>&1; then " - f"sudo dnf -y group install {dnf['groups']}; " - f"sudo dnf install -y {dnf['packages']}; " + # Cascade d'environnements : le premier qui existe gagne. Un + # environnement absent fait rendre 1 à dnf sans rien installer, + # d'où le « || » plutôt qu'une détection préalable. + "de_ok=0; " + f"for e in {de['dnf_env']}; do " + 'sudo dnf -y group install "$e" && { de_ok=1; break; }; done; ' + '[ "$de_ok" = 1 ] || echo "Aucun environnement graphique dnf ' + "trouve pour " + label + '"; ' + f"sudo dnf install -y {rem['dnf']['packages']}; " "elif command -v pacman >/dev/null 2>&1; then " "pgrep -x pacman >/dev/null 2>&1 " "|| sudo rm -f /var/lib/pacman/db.lck; " - f"sudo pacman -S --needed --noconfirm {pac['groups']} " - f"{pac['packages']}; " + f"sudo pacman -S --needed --noconfirm {de['pacman']} " + f"{rem['pacman']['packages']}; " "else echo 'Gestionnaire de paquets inconnu'; exit 1; fi; " # Le bureau ne sert à rien s'il ne démarre pas tout seul : les # images cloud démarrent en multi-user.target. "sudo systemctl set-default graphical.target || true; " - "sudo systemctl enable gdm >/dev/null 2>&1 || true; " + f"sudo systemctl enable {de['service']} >/dev/null 2>&1 || true; " # xrdp là où il existe ; sur Arch c'est TigerVNC, qui se configure # par utilisateur et n'a pas de service à activer d'office. "if command -v xrdp >/dev/null 2>&1; then " @@ -4453,7 +4475,7 @@ class TODO: "set -e; " + self._qemu_cloud_init_wait() + self._qemu_no_auto_upgrade(prod) - + self._qemu_desktop_remote_cmd() + + self._qemu_desktop_remote_cmd(desktop) ) if not final_cmd: final_cmd = f"make install_os && make {self.ERPLIBRE_ODOO_TARGET}" @@ -4487,7 +4509,7 @@ class TODO: # Le bureau d'abord : il repose sur les dépôts de la distribution, # là où l'installation ERPLibre compile longuement. Un échec ici se # voit donc tôt plutôt qu'après une heure. - + (self._qemu_desktop_remote_cmd() if desktop else "") + + + (self._qemu_desktop_remote_cmd(desktop) if desktop else "") + # Outils d'amorçage (absents des images cloud minimales) : curl, # git, make. Chaque branche RAFRAÎCHIT d'abord les dépôts pour que # la VM soit la plus rapide possible (miroirs à jour / les plus @@ -5039,10 +5061,13 @@ class TODO: ) else: print(f" {t('ERPLibre install:')} {t('no')}") - if spec.get("desktop"): + flavour = spec.get("desktop") + if flavour: + label = (self._QEMU_DESKTOP.get(flavour) or {}).get( + "label", flavour + ) print( - f" {t('VM type:')} " - f"{t('Graphical (server + GNOME desktop)')}" + f" {t('VM type:')} {t('Graphical (server + desktop):')} {label}" ) print(f" {t('SSH key:')} {spec.get('ssh_key') or t('none')}") cfg = ( @@ -5161,17 +5186,10 @@ class TODO: déployable, aussi bien pour la liste granulaire de la CLI que pour la liste à cocher du formulaire TUI.""" flat = [] - # Le catalogue ne propose que ce qui s'installe. La liste des versions - # abandonnées vit dans deploy_qemu.py, qui refuse aussi de les - # déployer : une seule source, donc pas d'écran offrant un choix que - # la couche du dessous rejettera. - supported = getattr(mod, "is_supported", None) for d in distros: versions_map, default_v = mod.DISTROS[d] for v, (_c, _o, ram, disk) in versions_map.items(): for a in self._qemu_arches_for(d, arch): - if supported and not supported(d, v, a): - continue flat.append( { "distro": d, @@ -5371,6 +5389,9 @@ class TODO: "disk_presets": self._QEMU_DISK_PRESETS, "extra_disk_gb": self.ERPLIBRE_EXTRA_DISK_GB, "desktop_disk_gb": self.QEMU_DESKTOP_EXTRA_DISK_GB, + "desktops": [ + (k, v["label"]) for k, v in self._QEMU_DESKTOP.items() + ], "defaults": { "install": True, "add_ssh_config": True, @@ -5641,14 +5662,22 @@ class TODO: print(f" ⚠ {warn}") def _qemu_ask_desktop(self): - """Serveur, ou serveur plus un bureau GNOME. + """Serveur, ou serveur plus un bureau. Renvoie "" ou la saveur. Serveur par défaut : c'est ce que sert une image cloud, et le bureau ajoute une à deux heures d'installation sur une architecture émulée.""" print(f"\n{t('VM type:')}") print(f" [1] {t('Server (no graphical interface)')} *") - print(f" [2] {t('Graphical (server + GNOME desktop)')}") - return input(t("Choice (number, blank = server): ")).strip() == "2" + flavours = list(self._QEMU_DESKTOP) + for i, key in enumerate(flavours, 2): + label = self._QEMU_DESKTOP[key]["label"] + print(f" [{i}] {t('Graphical (server + desktop):')} {label}") + sel = input(t("Choice (number, blank = server): ")).strip() + try: + index = int(sel) - 2 + except ValueError: + return "" + return flavours[index] if 0 <= index < len(flavours) else "" def _qemu_host_timezone(self): """Fuseau de l'hôte. Défini une seule fois, dans deploy_qemu.py, qui @@ -5853,7 +5882,7 @@ class TODO: deployed = list(spec.get("existing") or []) install = spec.get("install") install_branch = install["branch"] if install else None - desktop = bool(spec.get("desktop")) + desktop = spec.get("desktop") or "" ssh_key = spec.get("ssh_key") add_ssh_config = spec["add_ssh_config"] parallelism = spec["parallelism"] diff --git a/script/todo/todo_i18n.py b/script/todo/todo_i18n.py index 0c4cbf1..06289a0 100644 --- a/script/todo/todo_i18n.py +++ b/script/todo/todo_i18n.py @@ -2035,6 +2035,14 @@ TRANSLATIONS = { "fr": "Graphique (serveur + bureau GNOME)", "en": "Graphical (server + GNOME desktop)", }, + "Graphical (server + desktop):": { + "fr": "Graphique (serveur + bureau) :", + "en": "Graphical (server + desktop):", + }, + "Installing the desktop (long):": { + "fr": "Installation du bureau (long) :", + "en": "Installing the desktop (long):", + }, "Choice (number, blank = server): ": { "fr": "Choix (numero, vide = serveur) : ", "en": "Choice (number, blank = server): ",