From 6a7e83c1b615ee1298480d52acb64bdf83ce01fb Mon Sep 17 00:00:00 2001 From: Daniel Gradman-Svendsen Date: Wed, 29 Jul 2026 13:07:39 +0200 Subject: [PATCH] Install Importarr from packaged repo build --- Makefile | 8 ++++---- README.md | 6 +++--- deploy/repo-upgrade.sh | 2 +- deploy/systemd-install.sh | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 4eda6ed..c543a05 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ PIP ?= .venv/bin/pip SERVICE ?= importarr.service LIVE_URL ?= http://127.0.0.1:8095 -.PHONY: test install-systemd install-editable upgrade-local repo-upgrade verify-live +.PHONY: test install-systemd install-from-repo upgrade-local repo-upgrade verify-live test: $(PYTHON) -m pytest @@ -11,11 +11,11 @@ test: install-systemd: sudo -n sh deploy/systemd-install.sh -install-editable: - sudo -n /opt/importarr/venv/bin/pip install --upgrade --editable /srv/opencode-workspace/importarr +install-from-repo: + sudo -n /opt/importarr/venv/bin/pip install --upgrade /srv/opencode-workspace/importarr upgrade-local: - sudo -n /opt/importarr/venv/bin/pip install --upgrade --editable /srv/opencode-workspace/importarr + sudo -n /opt/importarr/venv/bin/pip install --upgrade /srv/opencode-workspace/importarr sudo -n systemctl restart $(SERVICE) repo-upgrade: diff --git a/README.md b/README.md index f0eb27d..038862e 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ sudo ${EDITOR:-vi} /etc/importarr/importarr.env sudo systemctl start importarr.service ``` -The installer creates the `importarr` system user when needed, installs a virtualenv at `/opt/importarr/venv`, and installs the package in editable mode from the checked-out repository. The repository is therefore the source of truth: pull or edit the repo, reinstall/restart from the repo, and the service runs that code. +The installer creates the `importarr` system user when needed, installs a virtualenv at `/opt/importarr/venv`, and installs the package from the checked-out repository. The repository is therefore the source of truth: pull or edit the repo, reinstall/restart from the repo, and the service runs the package built from that code. For local upgrades from a checked-out repo on dgsserver1, use the repo workflow instead of editing live scripts: @@ -41,7 +41,7 @@ For local upgrades from a checked-out repo on dgsserver1, use the repo workflow cd /srv/opencode-workspace/importarr .venv/bin/python -m pytest git status --short --branch -sudo -n /opt/importarr/venv/bin/pip install --upgrade --editable /srv/opencode-workspace/importarr +sudo -n /opt/importarr/venv/bin/pip install --upgrade /srv/opencode-workspace/importarr sudo -n systemctl restart importarr.service make verify-live ``` @@ -52,7 +52,7 @@ For a machine that should stay current with the repository, use the installed re sudo -n sh /opt/importarr/repo-upgrade.sh ``` -The helper refuses to run when the checkout has uncommitted changes, then performs `git pull --ff-only`, refreshes the editable install, restarts `importarr.service`, and prints service status. Use it after changes have been committed and pushed to `main`. +The helper refuses to run when the checkout has uncommitted changes, then performs `git pull --ff-only`, reinstalls the package from the repo, restarts `importarr.service`, and prints service status. Use it after changes have been committed and pushed to `main`. Release-worthy changes should be committed, tagged with SemVer (`v0.1.1`, `v0.2.0`, ...), pushed with tags, then reinstalled from the tagged checkout or artifact. Do not hand-edit `/usr/local/sbin/importarr-status.py` or `/usr/local/sbin/manual-media-import.py` except for a documented emergency hotfix that is immediately backported here. diff --git a/deploy/repo-upgrade.sh b/deploy/repo-upgrade.sh index 46146d7..7330c5c 100644 --- a/deploy/repo-upgrade.sh +++ b/deploy/repo-upgrade.sh @@ -30,6 +30,6 @@ fi git fetch --prune origin git pull --ff-only -"$VENV/bin/pip" install --upgrade --editable "$REPO_DIR" +"$VENV/bin/pip" install --upgrade "$REPO_DIR" systemctl restart "$SERVICE" systemctl --no-pager --full status "$SERVICE" diff --git a/deploy/systemd-install.sh b/deploy/systemd-install.sh index 7904820..e8166ee 100644 --- a/deploy/systemd-install.sh +++ b/deploy/systemd-install.sh @@ -15,7 +15,7 @@ fi chown importarr:importarr /var/lib/importarr python3 -m venv /opt/importarr/venv /opt/importarr/venv/bin/pip install --upgrade pip -/opt/importarr/venv/bin/pip install --upgrade --editable "$REPO_DIR" +/opt/importarr/venv/bin/pip install --upgrade "$REPO_DIR" if [ ! -f /etc/importarr/importarr.env ]; then install -m 0600 "$REPO_DIR/deploy/importarr.env.example" /etc/importarr/importarr.env echo "Created /etc/importarr/importarr.env; edit it before starting the service."