Skip to content

Fetch Alpine static apk-tools from dl-cdn in CI - #266

Merged
Frauschi merged 2 commits into
wolfSSL:masterfrom
LinuxJedi:ci-alpine-apk-tools-mirror
Nov 3, 2026
Merged

Frauschi merged 2 commits into
wolfSSL:masterfrom
LinuxJedi:ci-alpine-apk-tools-mirror

Conversation

@LinuxJedi

@LinuxJedi LinuxJedi commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

The six Alpine jobs fail in the Setup Alpine Linux step before anything is built. jirutka/setup-alpine@v1 downloads the static apk.static binary from gitlab.alpinelinux.org, and that host times out (curl error 28 after 10 s). This hit master on 2026-10-22 and #265 on 2026-10-28, and it fails every PR while the host is down. dl-cdn.alpinelinux.org, where the action already gets its packages, stays reachable.

A new step downloads the apk-tools-static package from dl-cdn, extracts sbin/apk.static and serves it on 127.0.0.1:8099. The action gets that URL through its apk-tools-url input, which only accepts http:// and https:// URLs (not file://), and checks the file against the pinned SHA-256 before using it. The binary is the only thing the action fetches from gitlab: QEMU and the Alpine packages already come from dl-cdn. The build and test steps are unchanged.

The package is pinned to v3.22/main/x86_64/apk-tools-static-2.14.12-r0.apk. The action deliberately stays on apk-tools 2.14.x (its default is 2.14.10), while latest-stable now ships 3.0.8. x86_64 is the runner's arch; the static apk installs the target arch into the chroot as before. dl-cdn removes an old package file when Alpine updates it, so if the URL starts to 404 the URL and hash need updating, as the comment in the workflow says.

Testing:

  • All six Alpine jobs pass on my fork, run from a test branch that adds itself to the workflow's push trigger: https://github.com/LinuxJedi/wolfPKCS11/actions/runs/40866944349. The x86 (without TPM) log shows Downloading http://127.0.0.1:8099/apk.static and apk: OK, has no gitlab requests, and make test passes (75 pass, 0 fail).
  • actionlint is clean. The pre-commit hook make test passes.

jirutka/setup-alpine downloads apk.static from gitlab.alpinelinux.org
before it installs anything. That host has been timing out, which
fails all six Alpine jobs in the setup step.

Download the apk-tools-static package from dl-cdn.alpinelinux.org,
which the action already uses for packages, and serve sbin/apk.static
to the action from localhost, since its apk-tools-url input only
accepts http(s) URLs. The package URL and the binary's SHA-256 are
pinned, and the action still verifies the hash before using it.

@Frauschi Frauschi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two small suggestions on the apk.static fetch step.

Plain --retry skips refused or reset connections, and curl has no
connect or transfer timeout by default, so a dl-cdn hiccup could fail
the step or stall it until the job timeout.
Copilot AI balanced review requested due to automatic review settings November 3, 2026 13:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the Alpine CI bootstrapping update.

No open issues 🎉

What changed in this PR

Updates Alpine CI bootstrapping to avoid the unavailable GitLab download host, without changing build or test steps.

Changes:

  • Downloads pinned static apk-tools from Alpine’s CDN.
  • Serves the extracted binary over localhost for setup-alpine.
  • Supplies a pinned SHA-256 for verification and documents how to update the package.
File Description
.github/​workflows/​alpine-architecture-tests.yml Adds CDN download, local HTTP serving, and checksum configuration for Alpine setup.

Review effort: Balanced

@LinuxJedi LinuxJedi removed their assignment Nov 3, 2026
@LinuxJedi
LinuxJedi requested a review from Frauschi November 3, 2026 14:05
@Frauschi
Frauschi merged commit 5ab4f16 into wolfSSL:master Nov 3, 2026
100 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants