Skip to content

Automate libkrun and libkrunfw update tracking#106

Merged
JAORMX merged 1 commit into
mainfrom
chore/automate-libkrun-updates
Jul 9, 2026
Merged

Automate libkrun and libkrunfw update tracking#106
JAORMX merged 1 commit into
mainfrom
chore/automate-libkrun-updates

Conversation

@JAORMX

@JAORMX JAORMX commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

What

libkrun and libkrunfw versions were stuck at v1.18.0 / v5.4.0 while upstream shipped v1.19.4 / v5.5.0 — the pins in versions.env and images/builder/Containerfile were manual, and Renovate (via config:recommended) only tracked go.mod and GitHub Actions versions, not these custom pins.

This PR closes that gap with two pieces of automation.

Changes

1. Renovate custom managers (renovate.json)

Two regex custom managers map LIBKRUN_VERSION and LIBKRUNFW_VERSION (in both versions.env and images/builder/Containerfile) to the github-releases datasource for libkrun/libkrun and libkrun/libkrunfw. Renovate will now open PRs like "Update libkrun to v1.19.4" that bump both files atomically — same workflow as the existing golang.org/x/sys updates.

2. task update-libkrun-header (Taskfile.yaml)

Fetches include/libkrun.h from libkrun/libkrun@<LIBKRUN_VERSION> and refreshes the vendored krun/libkrun.h, keeping the CGO compile-time contract in sync after a version bump. Usage:

task update-libkrun-header                      # uses LIBKRUN_VERSION from versions.env
task update-libkrun-header HEADER_VERSION=v1.19.4  # target a specific tag

Run after a Renovate bump merge (or before, to validate). The task prepends the SPDX/vendored comment with a sync marker line.

3. Org migration: containers/libkrun/

Both repos moved under the libkrun org. Normalized references across:

  • images/builder/Containerfile — the two git clone lines (functional, not just docs)
  • README.md — links + clone instructions
  • Taskfile.yaml — LICENSE-GPL blurbs
  • docs/TROUBLESHOOTING.md, docs/plans/WINDOWS_HYPERV_PLAN.md, libkrun-linux-override-stat.md

Verification

  • task update-libkrun-header runs successfully against the pinned v1.18.0
  • Updated header compiles standalone (gcc -fsyntax-only) and contains all 25 CGO-bound symbols referenced in krun/context.go
  • CGO_ENABLED=0 go vet passes clean
  • task test-nocgo — all tests pass
  • The krun/libkrun.h vendored copy grew from 201→1264 lines because the previous copy was hand-trimmed (docstrings stripped); the task now fetches the full upstream header. Extra declarations are harmless — only symbols referenced in context.go are bound.

What this does NOT automate

The workflow is now: Renovate bumps versions → reviewer runs task update-libkrun-header → merge. The header refresh is a manual step by design (it touches a vendored C header that may need review). If you want the header refresh to fire automatically on a Renovate merge, that is a follow-up GitHub Action.

Note

The krun/libkrun.h diff is large (+1131 lines) because of the trim→full header reconciliation. The meaningful changes are in renovate.json, Taskfile.yaml, and images/builder/Containerfile.

Add Renovate custom regex managers that track LIBKRUN_VERSION and
LIBKRUNFW_VERSION in versions.env and the builder Containerfile against
the libkrun/libkrun and libkrun/libkrunfw GitHub release datasources.
This closes the gap that left the versions pinned at v1.18.0/v5.4.0
while upstream shipped v1.19.4/v5.5.0.

Add 'task update-libkrun-header' which fetches include/libkrun.h from
the pinned LIBKRUN_VERSION and refreshes the vendored krun/libkrun.h,
keeping the CGO compile-time contract in sync after a bump.

Normalize all references from the moved containers/ org to the new
libkrun/ org across the builder Containerfile git clones, README,
Taskfile, TROUBLESHOOTING, the Windows HyperV plan, and the override_stat
design note.
@JAORMX JAORMX force-pushed the chore/automate-libkrun-updates branch from 9d782c7 to 45b520d Compare July 9, 2026 07:11
@JAORMX JAORMX merged commit 4a57346 into main Jul 9, 2026
7 checks passed
@JAORMX JAORMX deleted the chore/automate-libkrun-updates branch July 9, 2026 07:15
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.

1 participant