Commit aa8e062
ci(image): patch upstream OpenWRT 25.12 Image Builder rootfs.mk bug
Run 25749740914 failed in Image Builder's prepare_rootfs step with a
bash syntax error in code we didn't write. Root-caused upstream: in
include/rootfs.mk on openwrt-25.12 and main both, the recipe wraps
opkg-only fixups in `if [ -z "$(CONFIG_USE_APK)" ]; then ... fi`,
where the body is two `$(if ...)` substitutions. Under apk builds
(CONFIG_USE_APK=y) the `then` branch is never executed at runtime,
but bash still has to *parse* it. In Image Builder context (IB=y)
the awk substitution collapses to empty, and bash sees the rendered
recipe as:
if [ -z "y" ]; then ; sed -i "..." ; fi
— an empty `then` body before `;` is a syntax error. Same broken
recipe in openwrt-25.12 and main; no upstream issue or PR reported.
Affects any 25.12.x Image Builder consumer with SOURCE_DATE_EPOCH
set (Image Builder appears to set it automatically).
Verified our side is clean: the apk install reported "OK: 67.4 MiB
in 171 packages", which means our DEPENDS:= against the 25.12.3
feed resolves correctly. The crash is downstream of every line of
our code.
Workaround: new `Patch Image Builder rootfs.mk` step inserts a `: ;`
no-op so the `then` block has at least one parseable statement
regardless of which Make substitutions collapse. Patch is local to
this CI run's Image Builder copy; nothing leaves the runner; no
fork of openwrt/openwrt. A grep-after-sed fails the build if
upstream ever changes the recipe shape so we notice instead of
silently doing nothing. Also drops `yubikey-personalization` from
the dep-list comment in the prior staging step, in line with the
WebAuthn-only auth model that landed in 6cc71b7.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 1bdd6d8 commit aa8e062
1 file changed
Lines changed: 35 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
250 | | - | |
251 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
256 | 288 | | |
257 | 289 | | |
258 | 290 | | |
| |||
0 commit comments