ci: fix DOWNLOAD_FILE expansion for rootfs builds - #209
Merged
Conversation
f6d7df9 ("ci: select only correct targz for rootfs build") builds the rootfs archive name with ${TARGET//\//-}, but the heredoc generating the build args is single-quoted, so the substitution never happens. The literal openwrt-${TARGET_TAG}-rootfs.tar.gz then reaches setup.sh. grep finds no match, leaving file_name empty and causing the verification to check the entire sha256sums file. Every rootfs job has since failed with "12414 listed files could not be read". Expand the target tag in the shell before generating the args, while keeping DOWNLOAD_FILE as a pattern: release branches embed the version and revision in the filename, and malta/be has a -default- profile infix. The pattern must also exclude targz- image variants. Verified to match exactly one file for all eight rootfs targets on both snapshots and releases/24.10-SNAPSHOT. Make setup.sh fail loudly when the pattern matches nothing instead of producing the misleading checksum error.
Contributor
Member
Author
|
@aparcar Can you please look at this? 🙏 |
Member
|
Thanks! |
Contributor
|
Yeah, that's more like it: https://github.com/openwrt/docker/actions/runs/32007502339/job/95320009217#step:9:342 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since f6d7df9 every RootFS job fails: the build-args heredoc is single-quoted, so
${TARGET//\//-}is never expanded and setup.sh greps for the literal stringopenwrt-${TARGET_TAG}-rootfs.tar.gz. With no match,file_nameis empty andsha256sum -cruns against the whole sha256sums file — the "12414 listed files could not be read" failures visible on every PR and dispatch (e.g. the runs on #204 and #208).Expand the tag in the shell and keep
DOWNLOAD_FILEa pattern: release branches embed the version and revision in the file name (openwrt-24.10-snapshot-r…-x86-64-rootfs.tar.gz) and malta/be has a-default-profile infix there, while thetargz-image variants must not match. Verified against the live sha256sums: exactly one match for all eight rootfs targets on bothsnapshotsandreleases/24.10-SNAPSHOT.Also make setup.sh fail with a clear error when the pattern matches nothing.
Complements #208: without this fix, any rebuild of the rootfs containers — manual or scheduled — keeps failing, including for
openwrt-24.10, which the openwrt/packages runtime tests depend on.