refactor(oci): remove the shell entry point nothing runs

`oci/proxmenux-oci.sh` was installed on every Proxmox host and used on
none of them. The menu entry goes straight to the orchestrator:
scripts/oci/oci_manager_apps.sh runs `python3 -m proxmenux_oci` with
PYTHONPATH pointing at the engine.

Its only remaining caller was a message telling the reader to open it on
the Proxmox host — which is not how anyone gets in, and is what sent one
there to run it. That message now names the menu entry.

It could not be fetched and run either: it needs requirements.txt and
src/ beside it, so `wget | bash` resolved its own directory to the
working directory and failed on a path nobody chose. Making that work
would mean writing a second installer next to the one that already
ships the engine.

What it did offer was a virtualenv for a contributor generating the
catalog. The README now gives the direct invocation and names the two
distribution packages it needs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
MacRimi
2026-09-22 23:22:51 +02:00
co-authored by Claude Opus 5
parent 3bda7851a1
commit f3bda28338
11 changed files with 12 additions and 79 deletions
-1
View File
@@ -6209,7 +6209,6 @@
"This installation will:": "Diese Installation wird:", "This installation will:": "Diese Installation wird:",
"This installer will:": "Dieses Installationsprogramm wird:", "This installer will:": "Dieses Installationsprogramm wird:",
"This interface is configured but doesn't exist physically": "Diese Schnittstelle ist konfiguriert, aber physisch nicht vorhanden", "This interface is configured but doesn't exist physically": "Diese Schnittstelle ist konfiguriert, aber physisch nicht vorhanden",
"This interface runs on the Proxmox node as root. Open proxmenux-oci.sh on the Proxmox host.": "Diese Schnittstelle läuft auf dem Proxmox-Knoten als root. Öffnen Sie proxmenux-oci.sh auf dem Proxmox-Host.",
"This is IRREVERSIBLE.": "Das ist irreversibel.", "This is IRREVERSIBLE.": "Das ist irreversibel.",
"This is a destructive action": "Dies ist eine destruktive Aktion", "This is a destructive action": "Dies ist eine destruktive Aktion",
"This is a simple configuration change": "Dies ist eine einfache Konfigurationsänderung", "This is a simple configuration change": "Dies ist eine einfache Konfigurationsänderung",
+1 -1
View File
@@ -6209,7 +6209,7 @@
"This installation will:": "Esta instalación:", "This installation will:": "Esta instalación:",
"This installer will:": "Este instalador:", "This installer will:": "Este instalador:",
"This interface is configured but doesn't exist physically": "Esta interfaz está configurada pero no existe físicamente.", "This interface is configured but doesn't exist physically": "Esta interfaz está configurada pero no existe físicamente.",
"This interface runs on the Proxmox node as root. Open proxmenux-oci.sh on the Proxmox host.": "Esta interfaz se ejecuta en el nodo Proxmox como root. Abre proxmenux-oci.sh en el host Proxmox.", "This interface runs on the Proxmox node as root. Open OCI manager Apps from the ProxMenux menu on the Proxmox host.": "Esta interfaz se ejecuta en el nodo Proxmox como root. Abre OCI manager Apps desde el menú de ProxMenux en el host Proxmox.",
"This is IRREVERSIBLE.": "Esto es IRREVERSIBLE.", "This is IRREVERSIBLE.": "Esto es IRREVERSIBLE.",
"This is a destructive action": "Esta es una acción destructiva.", "This is a destructive action": "Esta es una acción destructiva.",
"This is a simple configuration change": "Este es un cambio de configuración simple.", "This is a simple configuration change": "Este es un cambio de configuración simple.",
-1
View File
@@ -6209,7 +6209,6 @@
"This installation will:": "Cette installation va :", "This installation will:": "Cette installation va :",
"This installer will:": "Ce programme d'installation va :", "This installer will:": "Ce programme d'installation va :",
"This interface is configured but doesn't exist physically": "Cette interface est configurée mais n'existe pas physiquement", "This interface is configured but doesn't exist physically": "Cette interface est configurée mais n'existe pas physiquement",
"This interface runs on the Proxmox node as root. Open proxmenux-oci.sh on the Proxmox host.": "Cette interface fonctionne sur le nœud Proxmox comme racine. Ouvrez proxmenux-oci.sh sur l'hôte Proxmox.",
"This is IRREVERSIBLE.": "C’est IRRÉVERSIBLE.", "This is IRREVERSIBLE.": "C’est IRRÉVERSIBLE.",
"This is a destructive action": "Il s’agit d’une action destructrice", "This is a destructive action": "Il s’agit d’une action destructrice",
"This is a simple configuration change": "Il s'agit d'un simple changement de configuration", "This is a simple configuration change": "Il s'agit d'un simple changement de configuration",
-1
View File
@@ -6209,7 +6209,6 @@
"This installation will:": "Questa installazione:", "This installation will:": "Questa installazione:",
"This installer will:": "Questo programma di installazione:", "This installer will:": "Questo programma di installazione:",
"This interface is configured but doesn't exist physically": "Questa interfaccia è configurata ma non esiste fisicamente", "This interface is configured but doesn't exist physically": "Questa interfaccia è configurata ma non esiste fisicamente",
"This interface runs on the Proxmox node as root. Open proxmenux-oci.sh on the Proxmox host.": "Questa interfaccia funziona sul nodo Proxmox come root. Aprire proxmenux-oci.sh sull'host Proxmox.",
"This is IRREVERSIBLE.": "questo è IRREVERSIBILE.", "This is IRREVERSIBLE.": "questo è IRREVERSIBILE.",
"This is a destructive action": "Questa è un'azione distruttiva", "This is a destructive action": "Questa è un'azione distruttiva",
"This is a simple configuration change": "Si tratta di una semplice modifica della configurazione", "This is a simple configuration change": "Si tratta di una semplice modifica della configurazione",
-1
View File
@@ -6209,7 +6209,6 @@
"This installation will:": "Esta instalação irá:", "This installation will:": "Esta instalação irá:",
"This installer will:": "Este instalador irá:", "This installer will:": "Este instalador irá:",
"This interface is configured but doesn't exist physically": "Esta interface está configurada, mas não existe fisicamente", "This interface is configured but doesn't exist physically": "Esta interface está configurada, mas não existe fisicamente",
"This interface runs on the Proxmox node as root. Open proxmenux-oci.sh on the Proxmox host.": "Esta interface é executada no nó Proxmox como root. Abra proxmenux-oci.sh no host Proxmox.",
"This is IRREVERSIBLE.": "Isso é IRREVERSÍVEL.", "This is IRREVERSIBLE.": "Isso é IRREVERSÍVEL.",
"This is a destructive action": "Esta é uma ação destrutiva", "This is a destructive action": "Esta é uma ação destrutiva",
"This is a simple configuration change": "Esta é uma simples mudança de configuração", "This is a simple configuration change": "Esta é uma simples mudança de configuração",
-1
View File
@@ -6209,7 +6209,6 @@
"This installation will:": "Táto inštalácia urobí toto:", "This installation will:": "Táto inštalácia urobí toto:",
"This installer will:": "Tento inštalátor urobí toto:", "This installer will:": "Tento inštalátor urobí toto:",
"This interface is configured but doesn't exist physically": "Toto rozhranie je nastavené, ale fyzicky neexistuje", "This interface is configured but doesn't exist physically": "Toto rozhranie je nastavené, ale fyzicky neexistuje",
"This interface runs on the Proxmox node as root. Open proxmenux-oci.sh on the Proxmox host.": "Toto rozhranie beží na uzle Proxmox ako koreň. Otvorte proxmenux-oci.sh na hostiteľovi Proxmox.",
"This is IRREVERSIBLE.": "Toto je NEVRATNÉ.", "This is IRREVERSIBLE.": "Toto je NEVRATNÉ.",
"This is a destructive action": "Toto je deštruktívna akcia", "This is a destructive action": "Toto je deštruktívna akcia",
"This is a simple configuration change": "Ide o jednoduchú zmenu nastavenia", "This is a simple configuration change": "Ide o jednoduchú zmenu nastavenia",
-1
View File
@@ -6209,7 +6209,6 @@
"This installation will:": "Denna installation kommer att:", "This installation will:": "Denna installation kommer att:",
"This installer will:": "Detta installationsprogram kommer att:", "This installer will:": "Detta installationsprogram kommer att:",
"This interface is configured but doesn't exist physically": "Detta gränssnitt är konfigurerat men existerar inte fysiskt", "This interface is configured but doesn't exist physically": "Detta gränssnitt är konfigurerat men existerar inte fysiskt",
"This interface runs on the Proxmox node as root. Open proxmenux-oci.sh on the Proxmox host.": "Detta gränssnitt körs på Proxmox-noden som rot. Öppna proxmenux-oci.sh på Proxmox-värden.",
"This is IRREVERSIBLE.": "Detta är IRREVERSIBELT.", "This is IRREVERSIBLE.": "Detta är IRREVERSIBELT.",
"This is a destructive action": "Detta är en destruktiv handling", "This is a destructive action": "Detta är en destruktiv handling",
"This is a simple configuration change": "Detta är en enkel konfigurationsändring", "This is a simple configuration change": "Detta är en enkel konfigurationsändring",
-1
View File
@@ -2,7 +2,6 @@
Runtime distribution only: Runtime distribution only:
- `proxmenux-oci.sh`: entry point, run from this directory.
- `catalog/`: index, application templates, curated definitions and overlays. - `catalog/`: index, application templates, curated definitions and overlays.
- `src/`: menu and deployment orchestrator. - `src/`: menu and deployment orchestrator.
- `remote/`: native Proxmox OCI/LXC installation and lifecycle helpers. - `remote/`: native Proxmox OCI/LXC installation and lifecycle helpers.
+10 -12
View File
@@ -58,26 +58,24 @@ compatible merely because conversion succeeded.
## Catalog maintenance ## Catalog maintenance
The catalog is generated rather than written by hand. `proxmenux-oci.sh` is the The catalog is generated rather than written by hand. A contributor adding an
tool that produces and inspects it, and it is what a contributor adding an application runs the orchestrator directly from this directory:
application runs:
```bash ```bash
./proxmenux-oci.sh sync export PYTHONPATH=src
./proxmenux-oci.sh list --filter sonarr python3 -m proxmenux_oci sync
./proxmenux-oci.sh generate sonarr python3 -m proxmenux_oci list --filter sonarr
./proxmenux-oci.sh show sonarr python3 -m proxmenux_oci generate sonarr
GITHUB_TOKEN=github_pat_xxx ./proxmenux-oci.sh generate-all python3 -m proxmenux_oci show sonarr
GITHUB_TOKEN=github_pat_xxx python3 -m proxmenux_oci generate-all
``` ```
`generate` writes one application's template from its published recipe; `show` `generate` writes one application's template from its published recipe; `show`
prints what the installation would create, which is the fastest way to see prints what the installation would create, which is the fastest way to see
whether a translation came out right before installing anything. whether a translation came out right before installing anything.
On Debian and Proxmox the launcher reuses the distribution packages It needs `python3-yaml` and `python3-jsonschema`. On Debian and Proxmox both
`python3-yaml` and `python3-jsonschema` when they are present, so nothing is are distribution packages; install them with APT before generating the catalog.
installed into the system Python. Where they are absent, install them with APT
before generating the catalog.
`GITHUB_TOKEN` is optional and only raises the public API rate limit, which the `GITHUB_TOKEN` is optional and only raises the public API rate limit, which the
full `generate-all` pass reaches. Never commit a token; `.env` files are full `generate-all` pass reaches. Never commit a token; `.env` files are
-58
View File
@@ -1,58 +0,0 @@
#!/usr/bin/env bash
set -Eeuo pipefail
ROOT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
VENV_DIR="$ROOT_DIR/.venv"
REQUIREMENTS="$ROOT_DIR/requirements.txt"
STAMP="$VENV_DIR/.requirements.sha256"
# The orchestrator lives beside this script, so it has to run from where it
# was installed. Piped from a URL there is no directory to read: $0 is "bash",
# ROOT_DIR becomes the working directory, and the first missing file reports a
# path nobody asked for.
if [ ! -r "$REQUIREMENTS" ] || [ ! -d "$ROOT_DIR/src/proxmenux_oci" ]; then
cat >&2 <<EOF
ERROR: this script runs from the directory it was installed in, next to
requirements.txt and src/. It cannot be piped from a URL.
On a Proxmox host with ProxMenux installed:
/usr/local/share/proxmenux/oci/engine/proxmenux-oci.sh "\$@"
From a clone of the repository:
cd oci && ./proxmenux-oci.sh "\$@"
EOF
exit 1
fi
command -v python3 >/dev/null 2>&1 || {
echo "ERROR: Python 3 is required." >&2
exit 1
}
if python3 -c 'import yaml, jsonschema' >/dev/null 2>&1; then
PYTHON=python3
else
if [[ ! -x "$VENV_DIR/bin/python" ]] || ! "$VENV_DIR/bin/python" -m pip --version >/dev/null 2>&1; then
echo "Preparing the local Python environment..."
rm -rf "$VENV_DIR"
python3 -m venv "$VENV_DIR" || {
echo "ERROR: could not create the virtual environment. On Debian, install python3-venv, python3-yaml and python3-jsonschema." >&2
exit 1
}
fi
if command -v shasum >/dev/null 2>&1; then
CURRENT_HASH=$(shasum -a 256 "$REQUIREMENTS" | awk '{print $1}')
else
CURRENT_HASH=$(sha256sum "$REQUIREMENTS" | awk '{print $1}')
fi
INSTALLED_HASH=$(cat "$STAMP" 2>/dev/null || true)
if [[ "$CURRENT_HASH" != "$INSTALLED_HASH" ]]; then
echo "Installing the converter dependencies..."
"$VENV_DIR/bin/python" -m pip install --disable-pip-version-check -r "$REQUIREMENTS"
printf '%s\n' "$CURRENT_HASH" >"$STAMP"
fi
PYTHON="$VENV_DIR/bin/python"
fi
export PYTHONPATH="$ROOT_DIR/src${PYTHONPATH:+:$PYTHONPATH}"
exec "$PYTHON" -m proxmenux_oci "$@"
+1 -1
View File
@@ -141,7 +141,7 @@ def interactive_management(project, ui):
def _interactive_management(project, ui): def _interactive_management(project, ui):
if os.geteuid() != 0 or not shutil.which('pct'): if os.geteuid() != 0 or not shutil.which('pct'):
ui.message(translate('This interface runs on the Proxmox node as root. Open proxmenux-oci.sh on the Proxmox host.'), translate('OCI management')) ui.message(translate('This interface runs on the Proxmox node as root. Open OCI manager Apps from the ProxMenux menu on the Proxmox host.'), translate('OCI management'))
return return
rows = saved_inventory(project) rows = saved_inventory(project)
if not rows: if not rows: