From 41b999ffeba013faa14fbfb3762281e7219f4a89 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Tue, 22 Sep 2026 23:13:28 +0200 Subject: [PATCH] fix(oci): say where the converter entry point has to run Fetched with wget and piped to bash, $0 is "bash" and the script resolves its own directory to wherever the shell happens to be. It then reports "shasum: /root/requirements.txt: No such file or directory", which names a path the reader never chose and says nothing about the real problem. It now checks for the files it needs and names both places it runs from: the installed engine directory on a Proxmox host, or oci/ in a clone. PACKAGE-CONTENTS.md called it the "installer entry point", which is what invites fetching it over the network in the first place. Co-Authored-By: Claude Opus 5 (1M context) --- oci/PACKAGE-CONTENTS.md | 2 +- oci/proxmenux-oci.sh | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/oci/PACKAGE-CONTENTS.md b/oci/PACKAGE-CONTENTS.md index 9eb884e1..d7d6fc8e 100644 --- a/oci/PACKAGE-CONTENTS.md +++ b/oci/PACKAGE-CONTENTS.md @@ -2,7 +2,7 @@ Runtime distribution only: -- `proxmenux-oci.sh`: installer entry point. +- `proxmenux-oci.sh`: entry point, run from this directory. - `catalog/`: index, application templates, curated definitions and overlays. - `src/`: menu and deployment orchestrator. - `remote/`: native Proxmox OCI/LXC installation and lifecycle helpers. diff --git a/oci/proxmenux-oci.sh b/oci/proxmenux-oci.sh index 6666e923..efd13d63 100755 --- a/oci/proxmenux-oci.sh +++ b/oci/proxmenux-oci.sh @@ -6,6 +6,24 @@ 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 </dev/null 2>&1 || { echo "ERROR: Python 3 is required." >&2 exit 1