From 407ea7550d86f0648b1c31296b09a71a97717a4c Mon Sep 17 00:00:00 2001 From: Mark Pitman Date: Fri, 20 Mar 2026 22:20:04 -0700 Subject: [PATCH 1/2] debian: fix non-free repo enable for DEB822 sources format Debian trixie uses the new DEB822 format (debian.sources) instead of the legacy sources.list. Update install-packages to handle both: - /etc/apt/sources.list.d/debian.sources (trixie+) - /etc/apt/sources.list (older installs) Also update Docker test to use trixie instead of bookworm. --- debian/install-packages | 12 ++++++++++-- test/docker/Dockerfile.debian-noninteractive | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/debian/install-packages b/debian/install-packages index d9fc429..2b4c00d 100755 --- a/debian/install-packages +++ b/debian/install-packages @@ -2,8 +2,16 @@ # source <(curl -fsSL https://raw.githubusercontent.com/mapitman/linux-bootstrap/main/debian/install-packages) # Enable non-free and contrib repositories if not already enabled -if ! grep -q "non-free " /etc/apt/sources.list 2>/dev/null; then - sudo sed -i 's/^\(deb .*debian\.org.*\) \(main\)/\1 \2 contrib non-free/' /etc/apt/sources.list +if [ -f /etc/apt/sources.list.d/debian.sources ]; then + # DEB822 format (Debian trixie+) + if ! grep -q "non-free" /etc/apt/sources.list.d/debian.sources 2>/dev/null; then + sudo sed -i 's/^Components: main$/Components: main contrib non-free/' /etc/apt/sources.list.d/debian.sources + fi +elif [ -f /etc/apt/sources.list ]; then + # Legacy one-line format + if ! grep -q "non-free " /etc/apt/sources.list 2>/dev/null; then + sudo sed -i 's/^\(deb .*debian\.org.*\) \(main\)/\1 \2 contrib non-free/' /etc/apt/sources.list + fi fi # Update package repos diff --git a/test/docker/Dockerfile.debian-noninteractive b/test/docker/Dockerfile.debian-noninteractive index 7a78ec7..684fb6b 100644 --- a/test/docker/Dockerfile.debian-noninteractive +++ b/test/docker/Dockerfile.debian-noninteractive @@ -4,7 +4,7 @@ # docker build -f test/docker/Dockerfile.debian-noninteractive -t debian-bootstrap-test-auto . # docker run --rm debian-bootstrap-test-auto -ARG DEBIAN_VERSION=bookworm +ARG DEBIAN_VERSION=trixie FROM debian:${DEBIAN_VERSION} ENV DEBIAN_FRONTEND=noninteractive From 253ceca5f85b632cc75eae7859b5b3686f753821 Mon Sep 17 00:00:00 2001 From: Mark Pitman Date: Fri, 20 Mar 2026 22:22:32 -0700 Subject: [PATCH 2/2] ci: remove bookworm from Debian test matrix --- .github/workflows/test-debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-debian.yml b/.github/workflows/test-debian.yml index 68447df..84a8f97 100644 --- a/.github/workflows/test-debian.yml +++ b/.github/workflows/test-debian.yml @@ -36,7 +36,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - debian-version: ['bookworm', 'trixie'] + debian-version: ['trixie'] fail-fast: false steps: