ci: enable Debian non-free in deb822 sources for snmp-mibs-downloader

Bookworm runner images use /etc/apt/sources.list.d/*.sources (deb822),
which the legacy sed didn't touch — non-free stayed off and
snmp-mibs-downloader was unavailable. Patch the Components: line in
deb822 sources too.
This commit is contained in:
Graham McIntire 2026-05-01 13:16:50 -05:00
parent 28dd7a6953
commit 6a98787cfa
3 changed files with 24 additions and 6 deletions

View file

@ -90,8 +90,14 @@ jobs:
- name: Install system dependencies
run: |
. /etc/os-release
if [ "$ID" = "debian" ] && [ -f /etc/apt/sources.list ]; then
sed -i 's/ main$/ main contrib non-free non-free-firmware/' /etc/apt/sources.list
if [ "$ID" = "debian" ]; then
if [ -f /etc/apt/sources.list ] && grep -q "^deb " /etc/apt/sources.list; then
sed -i 's/ main$/ main contrib non-free non-free-firmware/' /etc/apt/sources.list
fi
for f in /etc/apt/sources.list.d/*.sources; do
[ -f "$f" ] || continue
sed -i 's/^Components: main$/Components: main contrib non-free non-free-firmware/' "$f"
done
fi
apt-get update
apt-get install -y libssl-dev libsnmp-dev snmp-mibs-downloader postgresql-client

View file

@ -71,8 +71,14 @@ jobs:
- name: Install system dependencies
run: |
. /etc/os-release
if [ "$ID" = "debian" ] && [ -f /etc/apt/sources.list ]; then
sed -i 's/ main$/ main contrib non-free non-free-firmware/' /etc/apt/sources.list
if [ "$ID" = "debian" ]; then
if [ -f /etc/apt/sources.list ] && grep -q "^deb " /etc/apt/sources.list; then
sed -i 's/ main$/ main contrib non-free non-free-firmware/' /etc/apt/sources.list
fi
for f in /etc/apt/sources.list.d/*.sources; do
[ -f "$f" ] || continue
sed -i 's/^Components: main$/Components: main contrib non-free non-free-firmware/' "$f"
done
fi
apt-get update
apt-get install -y libssl-dev libsnmp-dev snmp-mibs-downloader postgresql-client

View file

@ -65,8 +65,14 @@ jobs:
- name: Install system dependencies
run: |
. /etc/os-release
if [ "$ID" = "debian" ] && [ -f /etc/apt/sources.list ]; then
sed -i 's/ main$/ main contrib non-free non-free-firmware/' /etc/apt/sources.list
if [ "$ID" = "debian" ]; then
if [ -f /etc/apt/sources.list ] && grep -q "^deb " /etc/apt/sources.list; then
sed -i 's/ main$/ main contrib non-free non-free-firmware/' /etc/apt/sources.list
fi
for f in /etc/apt/sources.list.d/*.sources; do
[ -f "$f" ] || continue
sed -i 's/^Components: main$/Components: main contrib non-free non-free-firmware/' "$f"
done
fi
apt-get update
apt-get install -y libssl-dev libsnmp-dev snmp-mibs-downloader postgresql-client