From 83fc96153a32636a8ba8509513218ad72b0752ba Mon Sep 17 00:00:00 2001 From: joe Date: Wed, 13 Aug 2025 20:11:01 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20Simplify=20APT=20configuration?= =?UTF-8?q?=20-=20Fix=20hanging=20issues?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ❌ Remove complex apt-cacher-ng logic (was causing timeouts) - ✅ Use Debian's automatic mirror selection (httpredir.debian.org) - 🔧 Fix git installation order (install git first, then clone) - 📦 Simplify APT sources (single sources.list, no conflicts) - 🎯 Target: Eliminate hanging issues and use proven Debian approach --- .forgejo/workflows/ci.yml | 67 ++++++++++++++------------------------- 1 file changed, 24 insertions(+), 43 deletions(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index e1aa1cc5..3397bd71 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -23,6 +23,10 @@ jobs: steps: - name: Setup environment run: | + # Use Debian's automatic mirror selection (much simpler and faster) + echo "deb http://httpredir.debian.org/debian trixie main contrib non-free" > /etc/apt/sources.list + echo "deb-src http://httpredir.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list + # APT Performance Optimizations (2-3x faster) echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/99translations echo 'Acquire::GzipIndexes "true";' >> /etc/apt/apt.conf.d/99translations @@ -32,25 +36,11 @@ jobs: # Update package lists apt update -y - # Check if apt-cacher-ng is available - echo "Checking for apt-cacher-ng availability..." - if curl -s --connect-timeout 5 http://192.168.1.101:3142/acng-report.html > /dev/null 2>&1; then - echo "✅ apt-cacher-ng is available, configuring proxy sources..." - echo "deb http://192.168.1.101:3142/ftp.debian.org/debian trixie main contrib non-free" > /etc/apt/sources.list.d/apt-cacher-ng.list - echo "deb-src http://192.168.1.101:3142/ftp.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list.d/apt-cacher-ng.list - apt update -y - else - echo "⚠️ apt-cacher-ng not available, using standard Debian sources..." - echo "deb http://deb.debian.org/debian trixie main contrib non-free" > /etc/apt/sources.list.d/standard.list - echo "deb-src http://deb.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list.d/standard.list - apt update -y - fi - - name: Install dependencies run: | apt update -y apt install -y --no-install-recommends \ - pkg-config build-essential gnupg wget \ + git curl pkg-config build-essential gnupg wget \ libapt-pkg-dev libapt-pkg7.0 libostree-dev \ libssl-dev libdbus-1-dev libglib2.0-dev \ libzstd-dev devscripts debhelper dh-cargo \ @@ -214,24 +204,15 @@ jobs: steps: - name: Setup environment run: | - apt update -y + # Use Debian's automatic mirror selection (much simpler and faster) + echo "deb http://httpredir.debian.org/debian trixie main contrib non-free" > /etc/apt/sources.list + echo "deb-src http://httpredir.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list - # Check if apt-cacher-ng is available - if curl -s --connect-timeout 5 http://192.168.1.101:3142/acng-report.html > /dev/null 2>&1; then - echo "✅ apt-cacher-ng is available, configuring proxy sources..." - echo "deb http://192.168.1.101:3142/ftp.debian.org/debian trixie main contrib non-free" > /etc/apt/sources.list.d/apt-cacher-ng.list - echo "deb-src http://192.168.1.101:3142/ftp.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list.d/apt-cacher-ng.list - apt update -y - else - echo "⚠️ apt-cacher-ng not available, using standard Debian sources..." - echo "deb http://deb.debian.org/debian trixie main contrib non-free" > /etc/apt/sources.list.d/standard.list - echo "deb-src http://deb.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list.d/standard.list - apt update -y - fi + apt update -y - name: Install security tools run: | - apt install -y --no-install-recommends cargo-audit + apt install -y --no-install-recommends git cargo-audit - name: Checkout code run: | @@ -258,25 +239,16 @@ jobs: steps: - name: Setup environment run: | - apt update -y + # Use Debian's automatic mirror selection (much simpler and faster) + echo "deb http://httpredir.debian.org/debian trixie main contrib non-free" > /etc/apt/sources.list + echo "deb-src http://httpredir.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list - # Check if apt-cacher-ng is available - if curl -s --connect-timeout 5 http://192.168.1.101:3142/acng-report.html > /dev/null 2>&1; then - echo "✅ apt-cacher-ng is available, configuring proxy sources..." - echo "deb http://192.168.1.101:3142/ftp.debian.org/debian trixie main contrib non-free" > /etc/apt/sources.list.d/apt-cacher-ng.list - echo "deb-src http://192.168.1.101:3142/ftp.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list.d/apt-cacher-ng.list - apt update -y - else - echo "⚠️ apt-cacher-ng not available, using standard Debian sources..." - echo "deb http://deb.debian.org/debian trixie main contrib non-free" > /etc/apt/sources.list.d/standard.list - echo "deb-src http://deb.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list.d/standard.list - apt update -y - fi + apt update -y - name: Install package tools run: | apt install -y --no-install-recommends \ - devscripts debhelper dh-cargo + git devscripts debhelper dh-cargo - name: Checkout code run: | @@ -316,6 +288,15 @@ jobs: needs: [build-and-test, security, package] steps: + - name: Setup environment + run: | + # Use Debian's automatic mirror selection (much simpler and faster) + echo "deb http://httpredir.debian.org/debian trixie main contrib non-free" > /etc/apt/sources.list + echo "deb-src http://httpredir.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list + + apt update -y + apt install -y --no-install-recommends git + - name: Checkout code run: | git clone https://git.raines.xyz/robojerk/apt-ostree.git /tmp/apt-ostree