diff --git a/CHANGELOG.md b/CHANGELOG.md index f78e78a..b753402 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,26 @@ for 1.0.0 have something to be assembled from. ## Unreleased +## 1.0.3 + +Two Arch-isms in the installer, both of which only a Debian machine could find. +`deploy/lxc-install.sh` had never been executed — it was reviewed and +syntax-checked, which is not the same claim — and running it is what found them. + +- Fixed: **`deploy/install.sh` could not create its virtualenv on Debian**, and + so `deploy/lxc-install.sh` could not finish. It called bare `python`, which is + Python 3 on Arch — the machine this was written and only ever run on — and + does not exist on Debian at all unless `python-is-python3` is installed. The + LXC bootstrap installs `python3`, so the install aborted at the virtualenv + step with the service user, the bind mount and the clone already made. It now + calls `python3`, which is right on both. +- Fixed: the service account was created with `--shell /usr/bin/nologin`, which + is where Arch keeps it and where Debian does not. Nothing invoked it — `sudo -u` + execs directly and systemd's `User=` never reads a shell — so the account + worked either way, but it was created pointing at a file that was not there. + Now `/usr/sbin/nologin`, which is correct on Debian and resolves on Arch too, + since Arch's `/usr/sbin` is a symlink to `bin`. + ## 1.0.2 - **The documentation moved to the [wiki](https://git.houmeres.sk/Houmeres/LLeMbas/wiki).** diff --git a/deploy/install.sh b/deploy/install.sh index bb62287..ce116bb 100755 --- a/deploy/install.sh +++ b/deploy/install.sh @@ -95,9 +95,13 @@ fi echo "== service user ==" # --system: no ageing, no mail spool. Home under /home, not /var/lib, so the # venv and database sit on the larger volume. +# +# `/usr/sbin/nologin` is Debian's path and works on both: Arch keeps `nologin` +# in /usr/bin, but its /usr/sbin is a symlink to bin, so the Debian spelling +# resolves there while the Arch one does not resolve on Debian at all. if ! getent passwd "$SERVICE_USER" >/dev/null; then sudo useradd --system --create-home --home-dir "$HOME_DIR" \ - --shell /usr/bin/nologin --comment "LLeMbas" "$SERVICE_USER" + --shell /usr/sbin/nologin --comment "LLeMbas" "$SERVICE_USER" else echo " user $SERVICE_USER already exists" fi @@ -120,8 +124,13 @@ else fi echo "== virtualenv ==" +# `python3`, not `python`. On Arch -- the machine this was written on and the +# only one it had ever run on -- `python` is Python 3 and the bare name worked. +# On Debian it does not exist unless somebody installed `python-is-python3`, so +# the LXC bootstrap aborted here, after the service user, the bind mount and the +# clone were already in place. `python3` is correct on both. if [[ ! -x "$VENV/bin/python" ]]; then - sudo -u "$SERVICE_USER" python -m venv "$VENV" + sudo -u "$SERVICE_USER" python3 -m venv "$VENV" fi sudo -u "$SERVICE_USER" "$VENV/bin/pip" install --quiet --upgrade pip # The extras a deployment gets. `search` because DuckDuckGo is the default web diff --git a/src/lembas/__init__.py b/src/lembas/__init__.py index 9fa4e24..cb530f2 100644 --- a/src/lembas/__init__.py +++ b/src/lembas/__init__.py @@ -1,3 +1,3 @@ """LLeMbas - a Middle-earth themed web UI for OpenAI-compatible LLM endpoints.""" -__version__ = "1.0.2" +__version__ = "1.0.3"