🚀 Simplify APT configuration - Fix hanging issues

-  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
This commit is contained in:
joe 2025-08-13 20:11:01 -07:00
parent 0cd7ca2703
commit 83fc96153a

View file

@ -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