From def72a2b19e53b9ea24a70f363f06a1ad55c0fd1 Mon Sep 17 00:00:00 2001 From: yellowcooln <12516003+yellowcooln@users.noreply.github.com> Date: Sat, 29 Aug 2026 23:04:59 -0400 Subject: [PATCH] feat: fully update Debian before Repeater install --- README.md | 12 +++++++----- scripts/proxmox-install.sh | 10 +++++++++- tests/test_proxmox_installer.py | 9 +++++++++ 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 27392e2..ebb4c62 100644 --- a/README.md +++ b/README.md @@ -310,15 +310,17 @@ whether to download the optional openHop Console WebUI. It will then: 2. Create a privileged container with USB passthrough. 3. Install the host-side CH341 udev rule only when selected. This is not needed for openHop Modem TCP or USB connections and defaults to No. -4. Clone the repository and pre-seed CH341 GPIO pin mappings. -5. Install an `update` command for Debian and openHop Repeater updates. -6. Run `manage.sh install` inside the container. -7. Optionally install openHop Console WebUI assets after Repeater installation. +4. Start the container, wait for network access, then run a full Debian package + update and upgrade. +5. Clone the repository and pre-seed CH341 GPIO pin mappings. +6. Install an `update` command for Debian and openHop Repeater updates. +7. Run `manage.sh install` inside the container. +8. Optionally install openHop Console WebUI assets after Repeater installation. The public Console distribution repository is cloned to `/root/pymc_console` so it can be inspected and upgraded in the same way as Repeater. Console is not selected as the default frontend, allowing the Repeater setup wizard to be completed first. -8. Display the dashboard URL. +9. Display the dashboard URL. ### Default Container Settings diff --git a/scripts/proxmox-install.sh b/scripts/proxmox-install.sh index d6f4bba..f3b1c3b 100644 --- a/scripts/proxmox-install.sh +++ b/scripts/proxmox-install.sh @@ -249,13 +249,21 @@ if [[ "$NETWORK_READY" != "true" ]]; then fi msg_ok "Container running with network" +# ── Update Debian before installing Repeater ─────────────────────────────── +msg_info "Updating Debian packages inside container..." +pct exec "$CTID" -- bash -c " + export DEBIAN_FRONTEND=noninteractive + apt-get update + apt-get full-upgrade -y +" +msg_ok "Debian packages fully updated" + # ── Bootstrap: install git, clone repo ──────────────────────────────────── msg_info "Installing git inside container..." pct exec "$CTID" -- bash -c " export DEBIAN_FRONTEND=noninteractive # Fix locale warnings - apt-get update -qq apt-get install -y locales >/dev/null 2>&1 sed -i 's/# en_US.UTF-8/en_US.UTF-8/' /etc/locale.gen locale-gen >/dev/null 2>&1 diff --git a/tests/test_proxmox_installer.py b/tests/test_proxmox_installer.py index 0a4f161..f8429f3 100644 --- a/tests/test_proxmox_installer.py +++ b/tests/test_proxmox_installer.py @@ -70,6 +70,15 @@ def test_optional_vlan_is_validated_and_added_to_net0() -> None: assert "VLAN: ${VLAN_SUMMARY}" in script +def test_installer_fully_updates_debian_before_cloning_repeater() -> None: + script = INSTALLER.read_text() + + assert "apt-get update" in script + assert "apt-get full-upgrade -y" in script + assert script.index("apt-get update") < script.index("Cloning openhop-repeater") + assert script.index("apt-get full-upgrade -y") < script.index("Cloning openhop-repeater") + + def test_installer_fails_when_container_network_never_becomes_ready() -> None: script = INSTALLER.read_text()