fix(kernel): Correct Docker tag sanitization for kernel versions
All checks were successful
Build kernel module / build (1:6.18.34-1+rpt1, trixie) (pull_request) Successful in 52s
Build kernel module / build (1:6.12.93-1+rpt1, bookworm) (pull_request) Successful in 1m23s
Build kernel module / release (pull_request) Has been skipped

Ensure Docker image tags map unsupported characters `:`, `/`, and `+`
to `-` for compatibility. This prevents invalid tags in Docker builds
when kernel version strings include these characters.
This commit is contained in:
Christian Werner 2026-06-20 04:57:26 +02:00
parent f91b06da9d
commit 2881fae5bf

View File

@ -56,8 +56,10 @@ jobs:
# is then a shared mutable name and the builds race — whichever `docker # is then a shared mutable name and the builds race — whichever `docker
# build` finishes last wins the tag, so both `docker create` calls # build` finishes last wins the tag, so both `docker create` calls
# resolve to the same image and every job emits the same vermagic. # resolve to the same image and every job emits the same vermagic.
# A unique tag per kernel version isolates them. # A unique tag per kernel version isolates them. Docker tags allow only
img="iec-kbuild:${KERNEL_VERSION//[:\/]/-}" # [a-zA-Z0-9._-], so map ':' '/' '+' (all present in 1:6.12.93-1+rpt1)
# to '-'; the tag just needs to be unique and valid, not reversible.
img="iec-kbuild:${KERNEL_VERSION//[:\/+]/-}"
# Builder image: toolchain + matching raspberrypi kernel headers. # Builder image: toolchain + matching raspberrypi kernel headers.
docker build --platform linux/arm64 \ docker build --platform linux/arm64 \
--build-arg DEBIAN_SUITE="$DEBIAN_SUITE" \ --build-arg DEBIAN_SUITE="$DEBIAN_SUITE" \