Skip to content

Commit c6ae182

Browse files
redhat-chai-botcgwalters
authored andcommitted
bootc-ubuntu-setup: Add support for ubuntu-26.04 runners
Ubuntu 26.04 ships a sufficiently modern podman (with heredoc support and no manifest handling bugs), so unlike 24.04 we can skip the plucky PPA and package upgrade path entirely. This simplifies the setup on 26.04 to just installing `just`. The version gate is refactored from a hard `test` assertion into a `case` statement that dispatches per-version setup logic and rejects unsupported runners with a clear error. CI test jobs are added for ubuntu-26.04 in both PR and published-action workflows. The PR test includes a heredoc Containerfile build to verify the native podman meets the minimum capability bar per the acceptance criteria. Closes: #49 Assisted-by: Claude Code (Claude Opus 4) Signed-off-by: Colin Walters <walters@verbum.org>
1 parent 705bb1d commit c6ae182

3 files changed

Lines changed: 75 additions & 17 deletions

File tree

.github/workflows/test-actions-pr.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,37 @@ jobs:
2424
just --version
2525
test -n "$ARCH"
2626
27+
test-bootc-ubuntu-setup-2604:
28+
name: Test bootc-ubuntu-setup (26.04)
29+
runs-on: ubuntu-26.04
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v6
33+
34+
- name: Run bootc-ubuntu-setup
35+
uses: ./bootc-ubuntu-setup
36+
37+
- name: Verify setup
38+
run: |
39+
podman --version
40+
just --version
41+
test -n "$ARCH"
42+
43+
- name: Verify podman heredoc support
44+
shell: bash
45+
run: |
46+
set -euo pipefail
47+
dir=$(mktemp -d)
48+
cat > "${dir}/Containerfile" <<'CEOF'
49+
FROM docker.io/library/alpine:latest
50+
RUN <<EOF
51+
echo "heredoc works" > /heredoc-test.txt
52+
EOF
53+
CEOF
54+
podman build -t localhost/heredoc-test:latest -f "${dir}/Containerfile" "${dir}"
55+
result="$(podman run --rm localhost/heredoc-test:latest cat /heredoc-test.txt)"
56+
test "${result}" = "heredoc works"
57+
2758
test-setup-rust:
2859
name: Test setup-rust
2960
runs-on: ubuntu-latest

.github/workflows/test-actions-published.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@ jobs:
2121
just --version
2222
test -n "$ARCH"
2323
24+
test-bootc-ubuntu-setup-2604:
25+
name: Test bootc-ubuntu-setup@main (26.04)
26+
runs-on: ubuntu-26.04
27+
steps:
28+
- name: Run bootc-ubuntu-setup
29+
uses: bootc-dev/actions/bootc-ubuntu-setup@main
30+
31+
- name: Verify setup
32+
run: |
33+
podman --version
34+
just --version
35+
test -n "$ARCH"
36+
2437
test-setup-rust:
2538
name: Test setup-rust@main
2639
runs-on: ubuntu-latest

bootc-ubuntu-setup/action.yml

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,27 +39,41 @@ runs:
3939
fi
4040
done
4141
# We really want support for heredocs
42-
- name: Update podman and install just
42+
- name: Install required packages
4343
shell: bash
4444
run: |
4545
set -eux
46-
# Require the runner is ubuntu-24.04
4746
IDV=$(. /usr/lib/os-release && echo ${ID}-${VERSION_ID})
48-
test "${IDV}" = "ubuntu-24.04"
49-
# plucky is the next release. The azure.archive.ubuntu.com mirror only carries amd64.
50-
# Other architectures like arm64 use ports.ubuntu.com/ubuntu-ports.
51-
if [ "$(dpkg --print-architecture)" = "amd64" ]; then
52-
mirror="http://azure.archive.ubuntu.com/ubuntu"
53-
else
54-
mirror="http://ports.ubuntu.com/ubuntu-ports"
55-
fi
56-
echo "deb ${mirror} plucky universe main" | sudo tee /etc/apt/sources.list.d/plucky.list
57-
# apt has a compiled-in default of 3 retries with exponential backoff (1s, 2s, 4s),
58-
# capped at 30s per attempt. 34 retries covers ~15 min of cumulative delay; use 35.
59-
echo 'Acquire::Retries "35";' | sudo tee /etc/apt/apt.conf.d/80-retries
60-
/bin/time -f '%E %C' sudo apt update
61-
# skopeo is currently older in plucky for some reason hence --allow-downgrades
62-
/bin/time -f '%E %C' sudo apt install -y --allow-downgrades crun/plucky buildah/plucky podman/plucky skopeo/plucky just
47+
case "${IDV}" in
48+
ubuntu-24.04)
49+
# 24.04's podman is too old (no heredoc support, manifest bugs);
50+
# pull newer packages from plucky (25.04).
51+
# The azure.archive.ubuntu.com mirror only carries amd64.
52+
# Other architectures like arm64 use ports.ubuntu.com/ubuntu-ports.
53+
if [ "$(dpkg --print-architecture)" = "amd64" ]; then
54+
mirror="http://azure.archive.ubuntu.com/ubuntu"
55+
else
56+
mirror="http://ports.ubuntu.com/ubuntu-ports"
57+
fi
58+
echo "deb ${mirror} plucky universe main" | sudo tee /etc/apt/sources.list.d/plucky.list
59+
# apt has a compiled-in default of 3 retries with exponential backoff (1s, 2s, 4s),
60+
# capped at 30s per attempt. 34 retries covers ~15 min of cumulative delay; use 35.
61+
echo 'Acquire::Retries "35";' | sudo tee /etc/apt/apt.conf.d/80-retries
62+
/bin/time -f '%E %C' sudo apt update
63+
# skopeo is currently older in plucky for some reason hence --allow-downgrades
64+
/bin/time -f '%E %C' sudo apt install -y --allow-downgrades crun/plucky buildah/plucky podman/plucky skopeo/plucky just
65+
;;
66+
ubuntu-26.04)
67+
# 26.04 ships a sufficiently modern podman with heredoc support;
68+
# no PPA or package upgrades needed — just install extras.
69+
/bin/time -f '%E %C' sudo apt update
70+
/bin/time -f '%E %C' sudo apt install -y just
71+
;;
72+
*)
73+
echo "Unsupported runner: ${IDV}" >&2
74+
exit 1
75+
;;
76+
esac
6377
# This is the default on e.g. Fedora derivatives, but not Debian.
6478
# Only needed when libvirt/virtualization is requested.
6579
- name: Enable unprivileged /dev/kvm access

0 commit comments

Comments
 (0)