Neuvième système du catalogue, et le seul dont aucune distribution ne publie d'image cloud : celle d'un tiers est épinglée et sa somme vérifiée à chaque téléchargement. Son seed diffère aussi — networkd prend la clé d'un bloc pour un NOM d'interface là où netplan honore un « match: », et sshd refuse un compte dont le shell n'existe pas, d'où /bin/sh. Ses dépendances se DÉCLARENT dans conf/nixos/erplibre.nix : envfs répond à /usr/bin/env, nix-ld donne aux roues manylinux leur chargeur. Vérifié sur une VM : le verrou de 362 paquets s'installe et Odoo répond. --- EN --- Ninth system of the catalogue, and the only one no distribution publishes a cloud image for: a third party's is pinned and its sum verified at every download. Its seed differs too — networkd reads a block's key as an interface NAME where netplan honours a "match:", and sshd refuses an account whose shell does not exist, hence /bin/sh. Its dependencies are DECLARED in conf/nixos/erplibre.nix: envfs answers /usr/bin/env, nix-ld gives manylinux wheels their loader. Checked on a VM: the 362-package lock installs and Odoo answers. Assisted-by: Claude Opus 5
65 lines
2.9 KiB
Bash
Executable file
65 lines
2.9 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
ERPLIBRE_VERSION=$(cat ".erplibre-semver-version" | xargs)
|
|
|
|
#EL_USER="erplibre"
|
|
EL_USER="${USER}"
|
|
#EL_HOME="/${EL_USER}"
|
|
EL_HOME="${HOME}"
|
|
#EL_HOME_ERPLIBRE="${EL_HOME}/erplibre"
|
|
EL_HOME_ERPLIBRE="${PWD}"
|
|
EL_HOME_ODOO="${EL_HOME_ERPLIBRE}"/odoo$(cat ".odoo-version" | xargs)/odoo
|
|
EL_ODOO_VERSION=$(cat ".odoo-version" | xargs)
|
|
EL_POETRY_VERSION=$(cat ".poetry-version" | xargs)
|
|
EL_PYTHON_ODOO_VERSION=$(cat ".python-odoo-version" | xargs)
|
|
EL_PYTHON_ERPLIBRE_VERSION=$(cat "./conf/python-erplibre-version" | xargs)
|
|
EL_ERPLIBRE_VERSION=$(cat ".erplibre-version" | xargs)
|
|
# Fournisseur d'interpreteur Python : auto | mise | pyenv.
|
|
# « auto » prend ce qui est DEJA pose, sinon mise s'il est present (Python
|
|
# precompile, quelques secondes), sinon pyenv (compilation). Voir
|
|
# script/install/lib_python_provider.sh.
|
|
EL_PYTHON_PROVIDER="${EL_PYTHON_PROVIDER:-auto}"
|
|
# Installateur de paquets Python : auto | uv | pip.
|
|
# « auto » prend uv s'il est present et si le venv vise est en Python >= 3.8,
|
|
# sinon pip ; un echec d'uv retombe sur pip. Voir
|
|
# script/install/lib_pip_provider.sh. Note : « poetry install » n'est PAS
|
|
# concerne, uv ne lit pas poetry.lock.
|
|
EL_PIP_PROVIDER="${EL_PIP_PROVIDER:-auto}"
|
|
# The default port where this Odoo instance will run under (provided you use the command -c in the terminal)
|
|
# Set to true if you want to install it, false if you don't need it or have it already installed.
|
|
EL_INSTALL_WKHTMLTOPDF="True"
|
|
# Set the default Odoo port
|
|
EL_PORT="8069"
|
|
EL_LONGPOLLING_PORT="8072"
|
|
# set the superadmin password
|
|
EL_SUPERADMIN="admin"
|
|
# The configuration systemctl service will be erplibre_dirname
|
|
EL_CONFIG="erplibre_${PWD##*/}"
|
|
EL_MINIMAL_ADDONS="False"
|
|
# Set this to True if you want to install Nginx!
|
|
EL_INSTALL_NGINX="False"
|
|
# Set the website name
|
|
EL_WEBSITE_NAME="localhost"
|
|
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}"
|
|
|
|
# NixOS : donner aux roues manylinux les bibliotheques que nix-ld declare.
|
|
#
|
|
# nix-ld fournit l'editeur de liens (/lib64/ld-linux-x86-64.so.2) aux binaires
|
|
# etrangers qu'il LANCE. Mais un « .so » de roue manylinux n'est pas lance :
|
|
# il est charge par dlopen depuis le CPython du systeme, qui est un binaire de
|
|
# Nix et ne lit pas NIX_LD_LIBRARY_PATH. Sans cette ligne, l'installation
|
|
# reussit et « import psycopg2 » echoue APRES, sur « libz.so.1: cannot open
|
|
# shared object file » -- une erreur qui ne parle ni de pip ni de Nix.
|
|
#
|
|
# Rien ailleurs : la variable n'est posee que la ou nix-ld existe, et ne
|
|
# masque donc aucune bibliotheque sur les autres systemes.
|
|
if [ -n "${NIX_LD_LIBRARY_PATH:-}" ]; then
|
|
export LD_LIBRARY_PATH="${NIX_LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
|
|
fi
|