fix(renovate): cover every kernel pin — both 6.18 defconfigs, and 7.2-rc separately - #46
Conversation
…-rc separately The 6.18 manager matched only configs/mister_de10nano_defconfig, so the 6.18.38 -> 6.18.39 bump landed in one of the two files that carry the pin and left configs/mister_kernel_defconfig behind. check-kernel-defconfig-sync.sh caught it, loudly and correctly — but Renovate should not have created the drift in the first place. (Renovate had not literally "missed" it: mister_kernel_defconfig does not exist on master, and Renovate only reads the default branch. The gap is forward-looking — once this branch merges, every future bump drifts.) 6.18: both defconfigs now listed in ONE manager. They share a depName, so Renovate emits a single PR touching both. Verified against a real `renovate --platform=local --dry-run=full` with both files held back at 6.18.38: two extracted upgrades, exactly one branch (renovate/kernel-longterm-6.18-6.x), both defconfigs among the packageFiles. 7.2-rc: configs/mister_rt.fragment carries the IDENTICAL Kconfig symbol but pins mainline -rc, so it gets its own manager, its own kernelMainline datasource (moniker=mainline), and its own depName. Sharing one manager would hand the longterm datasource a -rc currentValue and vice versa. Both file patterns name their files explicitly rather than globbing configs/, which would silently re-couple them. Verified in the same run: with the fragment held back at 7.2-rc1 it produced a separate renovate/kernel-mainline-rt-7.x branch proposing 7.2-rc3, and never proposed a 6.18 value for it. The new datasource wraps its $map in [ ] for the reason already documented on kernelLongterm618: releases.json carries exactly one mainline entry, and JSONata collapses a single-element sequence to a bare object, which Renovate rejects as `no-result` silently. The RT pin is labeled needs-manual-hash because its companion hash genuinely cannot be automated: kernel.org signs no -rc manifest, and Buildroot fetches -rc as a cgit .tar.gz snapshot, so the hash-sync kernel step deliberately leaves that line alone (its own comment says so). An RT bump PR is EXPECTED to be red at the kernel download until a human TOFU-pins the hash — the same intended failure shape as BUILDROOT_SHA256. Also added configs/mister_kernel_defconfig to the hash-sync paths: filter. mister_rt.fragment is deliberately left out: nothing there can be auto-synced, so triggering the workflow for it would only burn a runner. renovate.json validates clean; 19 customManagers, 2 custom datasources. No datasource lookup failures in the dry run. Note: actionlint still flags head.ref as an untrusted expression in the commit-and-push step on this branch. That is fixed in PR #45 against master, not re-fixed here to keep this diff to the Renovate coverage question. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UFdgJXQKvrucXeKDami499
There was a problem hiding this comment.
Pull request overview
Updates Renovate configuration and documentation so kernel version pins are consistently managed across both 6.18 defconfigs, while keeping the RT/beta mainline -rc pin isolated with its own datasource/labels; also adjusts the hash-sync workflow trigger list to include the copied defconfig.
Changes:
- Add a
kernelMainlinecustom datasource and a dedicated regex manager/packageRule for the RT/beta kernel pin. - Expand the existing 6.18 longterm kernel manager to cover both
configs/mister_de10nano_defconfigandconfigs/mister_kernel_defconfigunder one depName (one PR). - Update
renovate-hash-sync.ymlpaths:filter and refresh docs to match the new managers/datasources.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| renovate.json | Adds mainline kernel datasource + RT manager/rules; extends 6.18 kernel manager to both defconfigs |
| docs/renovate.md | Documents the split longterm vs RT managers and updates managed-items counts/table |
| .github/workflows/renovate-hash-sync.yml | Triggers hash sync workflow when configs/mister_kernel_defconfig changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "matchStrings": [ | ||
| "BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE=\"(?<currentValue>\\d+\\.\\d+(?:-rc\\d+)?)\"" | ||
| ], |
… clobbering the RT hash From Copilot's review on #46. The finding: the RT manager's description claimed the matchString "requires the -rc shape specifically", but `(?:-rc\d+)?` makes the suffix optional, so a stable mainline 7.2 also matches. Code and comment disagreed. The regex is the correct half. docs/rt-beta-kernel.md picks 7.2 precisely because PREEMPT_RT landed for ARM in 7.1, so this pin follows the 7.2 line through its -rc series and out the other side — 7.2 final is the intended destination, not an accident. Corrected the description, and reworded the hash/label rationale, which also assumed -rc forever. That correction surfaced a latent bug worth fixing here, because this PR is what makes the stable case reachable through automation. The kernel step matched its target line as `linux-[0-9][0-9.]*\.tar\.xz`, which is sufficient ONLY while the RT pin is an -rc (Buildroot fetches -rc as a cgit .tar.gz). Once that pin reaches a stable release it becomes linux-7.2.tar.xz — which the old pattern also matched. Reproduced with the RT line first: before: linux-7.2.tar.xz / linux-6.18.39.tar.xz after: linux-6.18.40.tar.xz / linux-6.18.39.tar.xz The RT entry was destroyed and the stale 6.18 line survived — two 6.18 entries, no RT entry, RT build failing closed at download. Fixed by scoping the match to this pin's own major series, derived from $kver rather than hardcoded, plus a guard that fails loudly if more than one line matches instead of guessing which one the pin owns. The rewrite now replaces by EXACT string match on the line already found, rather than re-deriving a regex inside awk — `awk -v` eats backslash escapes, which would have silently turned `\.` into "any character". Verified: the collision case now leaves the RT line intact; the ambiguity guard fires on two same-series lines; today's real linux.hash behaves exactly as before (RT .tar.gz untouched, 6.18 line updated); and an end-to-end run of the real step against the real tree is a correct no-op (PATCH_HASH_CHANGED=0). renovate.json validates clean, 20 files / 21 deps extracted, no lookup failures. shellcheck clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UFdgJXQKvrucXeKDami499
|
Copilot's finding was valid and is fixed in The findingCorrect: the description claimed the matchString "requires the The regex is the correct half. What that surfacedTaking "stable mainline is reachable" seriously exposes a real bug. The kernel step matched its target line as Reproduced, with the RT line first: The RT entry was destroyed and the stale 6.18 line survived — two 6.18 entries, no RT entry, RT build failing closed at download. Masked today only by the Fix: scope the match to this pin's own major series (derived from Verification
|
What went wrong
The 6.18 manager matched only
configs/mister_de10nano_defconfig, so the 6.18.38 → 6.18.39 bump landed in one of the two files carrying the pin and leftconfigs/mister_kernel_defconfigbehind.check-kernel-defconfig-sync.shcaught it loudly and correctly — but Renovate shouldn't have created the drift.One clarification: Renovate didn't literally miss it.
mister_kernel_defconfigdoesn't exist onmaster, and Renovate only reads the default branch, so it couldn't have seen the file. The gap is forward-looking — once #39 merges, every future kernel bump drifts the same way. That's what this fixes.The drift itself is already resolved on this branch by your
a7472ef; this PR contains no defconfig change.6.18 — one manager, both files, one PR
Both defconfigs are now listed in a single manager. They share a
depName, so Renovate emits one PR touching both.Verified against a real
renovate --platform=local --dry-run=fullwith both files held back at 6.18.38:Two upgrades, one branch. That's the grouping property, tested rather than assumed — my first attempt only held one file back, which couldn't have proven it.
7.2-rc — a deliberately separate manager
configs/mister_rt.fragmentcarries the identical Kconfig symbol but pins mainline-rc. It gets its own manager, its ownkernelMainlinedatasource (moniker=mainline), and its owndepName.Sharing one manager would hand the longterm datasource a
-rccurrentValueand the mainline datasource a6.18.xone. Both file patterns name their files explicitly rather than globbingconfigs/, which would silently re-couple them.Verified in the same run: with the fragment held back at
7.2-rc1, it produced a separaterenovate/kernel-mainline-rt-7.xbranch proposing7.2-rc3, and never proposed a 6.18 value for it.The new datasource wraps its
$mapin[ ]for the reason already documented onkernelLongterm618:releases.jsoncarries exactly one mainline entry, JSONata collapses a single-element sequence to a bare object, and Renovate rejects that asno-resultsilently.The RT hash genuinely cannot be automated
Labeled
needs-manual-hash, and that isn't decorative. kernel.org signs no-rcmanifest, and Buildroot fetches-rcas a cgit.tar.gzsnapshot fromgit.kernel.org— sorenovate-hash-sync.yml's kernel step deliberately leaves that line alone (its own comment says exactly this, and matches the release tarball by filename rather than "first sha256 line" precisely so it can't clobber the-rcentry).An RT bump PR is therefore expected to be red at the kernel download (
No hash found for linux-<ver>.tar.gz, becauseBR2_DOWNLOAD_FORCE_CHECK_HASHESempties Buildroot'sBR_NO_CHECK_HASH_FORexemption) until a human TOFU-pins the hash perlinux.hash's own-rcblock. Same intended failure shape asBUILDROOT_SHA256.Also carries
needs-manual-version-check, for the same reasonbcm20702-firmwaredoes:looseversioning's ordering of an-rcNsuffix isn't something to trust blindly.Also
configs/mister_kernel_defconfigto the hash-syncpaths:filter.mister_rt.fragmentis deliberately left out — nothing there can be auto-synced, so triggering the workflow for it would only burn a runner.renovate.jsonvalidates clean: 19 customManagers, 2 custom datasources, nono-resultlookups in the dry run.Not fixed here
actionlint still flags
head.refas an untrusted expression in the commit-and-push step on this branch. That's fixed in #45 againstmaster; re-fixing it here would muddy this diff.Related
I also pushed a fix to #43 renumbering its ADR 0021 → 0022 — this branch already claims
0021-rt-kernel-first-class-ci.md, andcheck-kernel-defconfig-sync.shcites "ADR 0021" meaning that one. Whichever merged second would have silently redefined a referenced ADR number.🤖 Generated with Claude Code
https://claude.ai/code/session_01UFdgJXQKvrucXeKDami499