xtask: Fail packaging if the vendor archive has PCRE2 C sources - #2529
Open
cgwalters-bot wants to merge 1 commit into
Open
cgwalters-bot wants to merge 1 commit into
cgwalters-bot wants to merge 1 commit into
Conversation
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>
This branch has not been deployed
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.
Follow-up to #2495, and stacked on it: the first commit here is #2495's.
exclude-crate-pathsonly matches a directory name, so if a pcre2-sys update moved its bundled sources the exclusion would silently stop applying.cargo xtask packagenow reads the generated vendor tarball and fails if it contains any.c/.hfiles from pcre2-sys (a small denylist, easy to extend to other-syscrates).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 packageproduces a vendor tarball with no pcre2-sys.c/.hfiles, andbootcbuilds from the source and vendor tarballs withcargo build --offline, linking the systemlibpcre2-8. With the #2495 exclusion reverted,cargo xtask packagefails listing the 76 bundled files.just packagebuilds the RPMs.Related: #2495 (comment)
The
Signed-off-by: Colin Walters <walters@verbum.org>on these commits was added on cgwalters's approval of the review draft: cgwalters-forge#17 (review)Generated-by: https://github.com/cgwalters/#llms