Skip to content

xtask: Fail packaging if the vendor archive has PCRE2 C sources - #17

Closed
cgwalters-bot wants to merge 2 commits into
mainfrom
bot/xtask-package-denylist
Closed

cgwalters-bot wants to merge 2 commits into
mainfrom
bot/xtask-package-denylist

Conversation

@cgwalters-bot

@cgwalters-bot cgwalters-bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to bootc-dev#2495, and stacked on it: the first commit here is bootc-dev#2495's.

exclude-crate-paths only matches a directory name, so if a pcre2-sys update moved its bundled sources the exclusion would silently stop applying. cargo xtask package now reads the generated vendor tarball and fails if it contains any .c/.h files from pcre2-sys (a small denylist, easy to extend to other -sys crates).

Testing, on a 16-core RHEL 10 devspace with stable Rust:
cargo test -p xtask (15 passed, including new table-driven tests) and the Makefile's clippy config are clean. cargo xtask package produces a vendor tarball with no pcre2-sys .c/.h files, and bootc builds from the source and vendor tarballs with cargo build --offline, linking the system libpcre2-8. With the bootc-dev#2495 exclusion reverted, cargo xtask package fails listing the 76 bundled files. just package builds the RPMs.

Related: bootc-dev#2495 (comment)

Generated-by: https://github.com/cgwalters/#llms


Review draft in cgwalters-forge, not upstream yet. This section is removed when the PR is opened upstream.

  • Upstream: bootc-dev/bootc, base main
  • Board item: PVTI_lADOE9oHIs4BlJLczg9kEcY
  • Fork CI: off; the devspace testing described above is this PR's CI, and upstream CI runs once it is opened there

To review:

  • Approve, or comment /promote on a line of its own, to open it upstream, ready for review. Either covers only the commits pushed so far.
  • If upstream requires DCO, approving also signs off: promote adds Signed-off-by: Colin Walters <walters@verbum.org> to the commits lacking it (the bot's and yours; anyone else's only if you ask), with you as committer.
  • Add a /draft line (in the same comment or before) to open it upstream as a draft (/ready undoes that).
  • Close to drop it.
  • Edit the title and description freely: they become the upstream PR's. Review comments are squashed into the commits they concern, with a reply here.

to-existing-root emptied the whole ESP, which can hold content bootc
cannot recreate. On Asahi this includes m1n1/boot.bin, vendorfw/ and
ubootefi.var; wiping them leaves the machine unbootable.

Only remove EFI/ and loader/, which we reinstall. Factor out
remove_dir_no_xdev() to share the recursive removal.

Generated-by: AI
Signed-off-by: Eric Curtin <eric.curtin@docker.com>
The vendor tarball excludes pcre2-sys's bundled sources via
exclude-crate-paths, but that only matches a directory name. If a
pcre2-sys update moved them, the exclusion would silently stop applying
and we would be back to shipping (and possibly building) a second copy
of PCRE2. Inspect the generated archive against a small denylist
instead, so that shows up as a packaging failure.

Longer term vendor-filterer itself should support an allowlist for
C sources.

Generated-by: AI
Signed-off-by: Colin Walters <walters@verbum.org>
@cgwalters-bot
cgwalters-bot force-pushed the bot/xtask-package-denylist branch from f2af777 to c125a9a Compare October 2, 2026 15:01
@cgwalters-bot

Copy link
Copy Markdown
Collaborator Author

Signed off 1 commit(s) with Signed-off-by: Colin Walters <walters@verbum.org> for bootc-dev/bootc's DCO check, on cgwalters's approval #17 (review) of f2af7772ad87. Same trees; the head is now 3448338c91fb.

@cgwalters-bot
cgwalters-bot force-pushed the bot/xtask-package-denylist branch from c125a9a to 3448338 Compare October 2, 2026 15:01
@cgwalters-bot

Copy link
Copy Markdown
Collaborator Author

Opened upstream as bootc-dev#2529. Closing this review draft.

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.

3 participants