Skip to content

ci: fix DOWNLOAD_FILE expansion for rootfs builds - #209

Merged
aparcar merged 1 commit into
openwrt:mainfrom
BKPepe:fix-rootfs-download-file
Aug 17, 2026
Merged

ci: fix DOWNLOAD_FILE expansion for rootfs builds#209
aparcar merged 1 commit into
openwrt:mainfrom
BKPepe:fix-rootfs-download-file

Conversation

@BKPepe

@BKPepe BKPepe commented Aug 16, 2026

Copy link
Copy Markdown
Member

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 string openwrt-${TARGET_TAG}-rootfs.tar.gz. With no match, file_name is empty and sha256sum -c runs 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_FILE a 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 the targz- image variants must not match. Verified against the live sha256sums: exactly one match for all eight rootfs targets on both snapshots and releases/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.

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.
Copilot AI lite review requested due to automatic review settings August 16, 2026 10:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@efahl

efahl commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Oho, so that's what I did wrong. I have no way to test (as mentioned in #202), so was winging it.

Thanks for this fix! Once it gets in we should rerun the 25.12.5 builds to resolve #207

@BKPepe

BKPepe commented Aug 16, 2026

Copy link
Copy Markdown
Member Author

@aparcar Can you please look at this? 🙏

@aparcar
aparcar merged commit fb30fc3 into openwrt:main Aug 17, 2026
199 of 201 checks passed
@aparcar

aparcar commented Aug 17, 2026

Copy link
Copy Markdown
Member

Thanks!

@efahl

efahl commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants