repository update: select stable kernels from a config file - #407
repository update: select stable kernels from a config file#407igorpecovnik wants to merge 8 commits into
Conversation
The stable/ branch of Copy operations never moved anything: it ran copy-kernel-packages.sh with DRY_RUN=true, reading incoming/nightly/debs-beta/ and writing to /tmp/x, while guarding on incoming/stable. A stable dispatch reported success and ingested nothing. Wire it for real, driven by config/repository-kernel-selection.conf. Kernels are a selection rather than a sweep - there is one linux-image per (linuxfamily, branch) - so the file names which families the repository carries, and copy-kernel-packages.sh resolves what exists from image-info.json. Seeded with the three that are stable enough to carry between releases: KERNEL_SELECT="x86 arm64 bcm2711" # uefi-x86, uefi-arm64, Raspberry Pi linux-libc-dev travels with them; u-boot does not - none of the three boot through Armbian's u-boot, so COPY_UBOOT is false. Note the tokens are LINUXFAMILY values, which differ from the board and BOARDFAMILY names: uefi-x86 builds linuxfamily x86, uefi-arm64 builds arm64, rpi4b builds bcm2711. Verified against the live image-info.json with a fixture: the x86, arm64 and bcm2711 image/dtb/headers/libc-dev debs are copied, a rockchip64 kernel and a u-boot deb in the same directory are left behind. Signed-off-by: Igor Pecovnik <igor@armbian.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Gives the weekly update one ordinary, non-critical board that gets the complete set - kernel, dtb, headers, libc-dev and u-boot - so a regression in the full path shows up on something harmless rather than on a flagship board. udoo builds linuxfamily imx6 (current and edge), so KERNEL_SELECT gains imx6. U-Boot is per BOARD rather than per family, so it needs COPY_UBOOT=true plus an explicit UBOOT_SELECT: an empty UBOOT_SELECT means EVERY board, not none - the filter is skipped when it is empty - which with COPY_UBOOT on would drag the whole fleet's u-boot into the repository. Verified with a fixture: both imx6 branches' image/dtb/headers/libc-dev and both udoo u-boot debs are copied, while a rockchip64 kernel and the rpi4b and orangepi5 u-boot debs sitting beside them are left behind. Signed-off-by: Igor Pecovnik <igor@armbian.com>
|
Added udoo with the complete artifact set, so the weekly update exercises the full path on one ordinary board. KERNEL_SELECT="x86 arm64 bcm2711 imx6" # + udoo
COPY_UBOOT="true"
UBOOT_SELECT="udoo"udoo builds linuxfamily imx6 (branches current and edge), which is why the kernel token is The u-boot switch needed care. To confirm headers: they're always copied, no flag involved — the script does Fixture run:
|
cubox-i is imx6 like udoo, so it already gets the kernel selected above; adding its u-boot makes it the second complete, updatable board in the weekly update. Verified with a fixture: both cubox-i and both udoo u-boot debs are copied, while cubieboard and rpi4b u-boot debs sitting beside them are left behind. Signed-off-by: Igor Pecovnik <igor@armbian.com>
|
Added the cubox-i bootloader: UBOOT_SELECT="udoo cubox-i"cubox-i is imx6 too, so it already receives the kernel selected by Fixture run:
That leaves the imx6 family in this shape: udoo and cubox-i fully updatable (kernel + bootloader), while the remaining imx6 boards receive the shared family kernel without a u-boot update. Worth naming more boards in |
The package is linux-u-boot-<board>-<branch>, so a board building current and edge produces two of them. A bare board token takes every branch, which is what makes udoo and cubox-i completely updatable - the kernel selection covers each branch and the bootloader has to match it. Signed-off-by: Igor Pecovnik <igor@armbian.com>
…arget Keying the kernel selection on target == stable/ made it unreachable on the path that actually produces those packages: the weekly chain builds them (uploading to incoming/stable/) and then runs base-files, and base-files is what fires the repository update - so the payload says base-files/ and the stable/ arm never runs. Treat it like the generic packages: incoming is a drop box, so whatever is in it gets ingested, whoever rang the bell. The stable/ case arm is now a no-op and the selection runs unconditionally, guarded on the directory existing. Signed-off-by: Igor Pecovnik <igor@armbian.com>
|
Caught a gap while tracing the end-to-end path, fixed in the latest commit. The kernel selection was inside Now it works like the generic block: unconditional, guarded on |
Better than running it unconditionally. base-files/ is the weekly chain's completion signal - build-all-stable uploads to incoming/stable/, then runs base-files, and base-files fires the repository update - so gating there catches the kernels while still being an explicit target, and a manual stable/ dispatch keeps working through the same function. It also removes the cost of the unconditional version: copy-kernel-packages.sh copies rather than moves and nothing drains incoming/stable, so running on every dispatch meant the eight daily cron updates re-copied the same debs. Now the selection runs once per weekly chain. The generic packages stay unconditional: they are moved, so they are ingested once by whichever update sees them first, and they should never wait for a particular pipeline to finish. Signed-off-by: Igor Pecovnik <igor@armbian.com>
|
Gated under ingest_stable_kernels() { ... } # config + copy-kernel-packages.sh
case "$TARGET" in
"stable/") ingest_stable_kernels || exit 1 ;; # manual / unchained
"base-files/") ingest_stable_kernels || exit 1 ;; # the weekly chain's signal
"cron/") ... rsync as before ...
It also removes the cost of the unconditional version I flagged earlier: The generic packages stay unconditional — they're moved, so whichever update sees them first ingests them exactly once, and they shouldn't have to wait for a specific pipeline. Behaviour by target:
|
What was wanted has been copied; the rest is every other family's kernel and every other board's u-boot, which this repository does not carry. Leaving them means incoming grows without bound and every weekly run re-copies the same debs over the last. Only reached when every copy above succeeded, so nothing is dropped on the strength of a failed run, and the .deb count is written to the step summary first - widening KERNEL_SELECT means next week's build supplies them again, but this week's are gone. The rm is guarded on INCOMING_PATH being under the storage path, matching the checks the other destructive steps in this workflow already make. Signed-off-by: Igor Pecovnik <igor@armbian.com>
|
# … selection loop, both debs and debs-beta …
ST_TOTAL=$(find "${INCOMING_PATH}/stable" -type f -name '*.deb' | wc -l)
echo "## Dropping incoming/stable (${ST_TOTAL} .deb, selected ones already copied)" >> "$GITHUB_STEP_SUMMARY"
case "${INCOMING_PATH}" in
*"/armbian/openssh-server/storage"*) rm -rf "${INCOMING_PATH}/stable" ;;
*) echo "::error::refusing to remove …"; return 1 ;;
esacThree things that make it safe to be destructive here:
The trade-off, stated plainly: widening |
cron/ is the nightly repository: build-all runs with nightlybuild=yes, so its debs land in debs-beta. Sweeping the base-files drop box on that dispatch mixed stable-side packages into a run that has no business carrying them. The generic move becomes a function called from the two stable-side targets, stable/ and base-files/, alongside the kernel selection. cron/ now does exactly what it did before this branch: rsync incoming/cron into storage and drop the source. Signed-off-by: Igor Pecovnik <igor@armbian.com>
|
Corrected: the generic packages are no longer swept on the
Both ingests are now functions called from the two stable-side targets only:
The trade-off I flagged earlier stands, and is now yours by choice rather than by default: if the weekly chain's dispatch is ever lost, the generic packages wait in |
Stacked on #406 — review that first; this diff is only the stable/kernel part.
Problem
The
stable/branch ofCopy operationsnever moved anything:A stable dispatch reported success and ingested nothing.
Change
Wired for real, driven by a config file, because kernels are a selection rather than a sweep — there is one
linux-imageper (linuxfamily, branch), and only some belong in the repository.config/repository-kernel-selection.conf:Seeded with the three kernels stable enough to carry between releases.
linux-libc-devtravels with them; u-boot does not, since none of the three boot through Armbian's u-boot.Gotcha worth knowing: the tokens are
LINUXFAMILYvalues, not board orBOARDFAMILYnames —uefi-x86builds linuxfamilyx86,uefi-arm64buildsarm64, andrpi4bbuildsbcm2711. The config documents this inline.Verification
Ran the real script against the live
image-info.jsonwith a fixture directory:linux-{image,dtb,headers,libc-dev}-current-x86linux-{image,dtb,headers,libc-dev}-edge-arm64linux-{image,dtb,headers,libc-dev}-current-bcm2711linux-{image,dtb}-current-rockchip64linux-u-boot-rpi4b-currentCOPY_UBOOT=falseA selected family/branch with no deb present is reported as
MISSING:in the step summary and does not fail the run — that is the script's existing behaviour, and it matters because not every family builds every branch every week.