From c3c8bdd81c03a10e75c4ee2e5ced3cb04c781964 Mon Sep 17 00:00:00 2001 From: torlando-tech Date: Tue, 28 Oct 2025 20:05:59 -0400 Subject: [PATCH] fix: configure non-interactive mode for CI apt-get installs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ubuntu 24.04 CI was hanging on tzdata interactive timezone prompt. Changes: - tests/test_installer.sh: Set DEBIAN_FRONTEND=noninteractive, pre-configure timezone - tests/test_installer.sh: Add apt-get options to suppress prompts - .github/workflows/test.yml: Set environment variables in installer-test container - install.sh: Auto-detect CI environment and enable non-interactive mode This follows Debian/Ubuntu best practices for containerized environments and prevents interactive prompts from blocking CI runs. Fixes Ubuntu 24.04 installer-test CI failure. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/test.yml | 4 ++++ install.sh | 6 ++++++ tests/test_installer.sh | 13 ++++++++++++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b4bf01d..efdec22 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -131,6 +131,10 @@ jobs: container: image: ${{ matrix.os-image }} + env: + DEBIAN_FRONTEND: noninteractive + DEBCONF_NONINTERACTIVE_SEEN: "true" + TZ: UTC steps: - name: Checkout code diff --git a/install.sh b/install.sh index c06f3af..736b0f6 100755 --- a/install.sh +++ b/install.sh @@ -65,6 +65,12 @@ if [[ "$OSTYPE" != "linux-gnu"* ]]; then exit 1 fi +# Detect CI environment and configure non-interactive mode +if [[ -n "$CI" ]] || [[ -n "$GITHUB_ACTIONS" ]] || [[ -n "$DEBIAN_FRONTEND" ]]; then + export DEBIAN_FRONTEND=noninteractive + export DEBCONF_NONINTERACTIVE_SEEN=true +fi + print_header "Reticulum BLE Interface Installer" echo diff --git a/tests/test_installer.sh b/tests/test_installer.sh index fff8d3b..c78eba2 100755 --- a/tests/test_installer.sh +++ b/tests/test_installer.sh @@ -4,6 +4,14 @@ set -e +# Configure non-interactive mode for CI/container environments +export DEBIAN_FRONTEND=noninteractive +export DEBCONF_NONINTERACTIVE_SEEN=true +export TZ=UTC + +# Pre-configure timezone to prevent interactive prompts +ln -fs /usr/share/zoneinfo/UTC /etc/localtime + echo "=== Testing install.sh on fresh system ===" echo "OS: $(cat /etc/os-release | grep PRETTY_NAME | cut -d= -f2 | tr -d '"')" echo "" @@ -11,7 +19,10 @@ echo "" # Step 1: Install prerequisites (what a user would have) echo "Step 1: Installing base prerequisites..." apt-get update -qq -apt-get install -y sudo python3 python3-pip git +apt-get install -y -q \ + -o DPkg::Pre-Install-Pkgs::=/bin/true \ + -o DPkg::Post-Install-Pkgs::=/bin/true \ + sudo python3 python3-pip git # Install Reticulum (prerequisite for BLE interface) echo "Installing Reticulum..."