Skip to content

RHEL-258303: build: Exclude bundled PCRE2 sources from vendor tarballs - #2495

Merged
cgwalters merged 1 commit into
bootc-dev:mainfrom
cgwalters-bot:build/exclude-pcre2-vendor-sources
Sep 26, 2026
Merged

cgwalters merged 1 commit into
bootc-dev:mainfrom
cgwalters-bot:build/exclude-pcre2-vendor-sources

Conversation

@cgwalters-bot

Copy link
Copy Markdown
Contributor

The release vendor archive does not need the bundled PCRE2 C sources when downstream builds link against system PCRE2. Keep the Rust pcre2-sys crate but exclude its upstream/ directory. This makes the system PCRE2 development dependency necessary for builds from the filtered vendor archive.

Testing: cargo metadata --format-version=1 --no-deps and git diff --check passed. An equivalent explicit cargo vendor-filterer invocation for x86_64 GNU/Linux produced an archive without pcre2-sys/upstream; the filtered crate built against system libpcre2-8. A config-driven vendor run is blocked by a local Rust 1.97.1 LLVM target-machine error while probing tier-2 MIPS targets.

Generated-by: AI
Human review of this change and PR text is pending.

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

@bootc-bot
bootc-bot Bot requested a review from cgwalters September 24, 2026 17:08
Comment thread Cargo.toml
exclude-crate-paths = [ { name = "libz-sys", exclude = "src/zlib" },
{ name = "libz-sys", exclude = "src/zlib-ng" },
# Use the system PCRE2 library instead of vendoring its bundled sources.
{ name = "pcre2-sys", exclude = "upstream" },

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah in the future we should really have an allowlist for *.[ch] in vendor-filterer...I'll file a design issue for that.

For now though, we could magic that up as a followup to this PR as e.g. cargo xtask package that wraps vendor-filterer and inspects the resulting tarball and has a denylist that makes sure that pcre2-sys doesn't include any .[ch] say?

The release vendor archive need not ship a second copy of PCRE2 when builds link against the system library. This reduces the archive size and keeps the system PCRE2 dependency explicit for downstream packagers.

Assisted-by: AI

Generated-by: AI
Signed-off-by: Colin Walters <[email protected]>
@cgwalters-bot
cgwalters-bot force-pushed the build/exclude-pcre2-vendor-sources branch from 03b8fc8 to a8968b9 Compare September 26, 2026 02:33
@cgwalters-bot

Copy link
Copy Markdown
Contributor Author

Rebased onto main; 1 commit, no content change.

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

cgwalters-bot added a commit to cgwalters-bot/homegit that referenced this pull request Sep 26, 2026
A commit cgwalters rewrote and pushed himself (authored as him, with a
Generated-by trailer from his own tooling) trips the "bot work made with
plain git" heuristic as soon as the bot rebases it, which blocked a
plain rebase of bootc-dev/bootc#2495. With a published head to pair
against, a commit whose author, message and patch-id are unchanged was
judged when it was published; the rebase didn't make it, so it only
gets a note.

Generated-by: AI
cgwalters-bot added a commit to cgwalters-bot/homegit that referenced this pull request Sep 26, 2026
cgwalters had to point out that bootc-dev/bootc#2495 only needed a
rebase to pick up a CI fix from main. That's mechanical enough for the
loop to do by itself, so give it one safe command: it only touches PRs
the bot opened whose commits are the bot's or his, refuses on conflicts
(exit 10, with the paths, for a worker) or when a commit turns out to be
upstream already, and leaves an approved fork PR to promote, since a
push would void his approval.

A conflict-free rebase changes nothing he signed off, so it keeps his
sign-off through 'bot-git rework' and gates the push on 'bot-git check'
against the pushed head, then force-pushes with a lease. Upstream PRs
get a one-line comment saying whether any patch changed at all; fork
PRs don't need one.

Generated-by: AI
cgwalters-bot added a commit to cgwalters-bot/homegit that referenced this pull request Sep 26, 2026
bootc-dev/bootc#2495 sat with red CI until cgwalters noticed that a
rebase onto main would fix it. The listing and the command exist now,
but nothing acts on them unless the loop does: each tick the
coordinator rebases a few conflict-free ones whose failures don't look
like the PR's own, and sends conflicting ones to a worker.

Generated-by: AI
cgwalters-bot added a commit to cgwalters-bot/homegit that referenced this pull request Sep 26, 2026
A commit cgwalters rewrote and pushed himself (authored as him, with a
Generated-by trailer from his own tooling) trips the "bot work made with
plain git" heuristic as soon as the bot rebases it, which blocked a
plain rebase of bootc-dev/bootc#2495. With a published head to pair
against, a commit whose author, message and patch-id are unchanged was
judged when it was published; the rebase didn't make it, so it only
gets a note.

Generated-by: AI
cgwalters-bot added a commit to cgwalters-bot/homegit that referenced this pull request Sep 26, 2026
cgwalters had to point out that bootc-dev/bootc#2495 only needed a
rebase to pick up a CI fix from main. That's mechanical enough for the
loop to do by itself, so give it one safe command: it only touches PRs
the bot opened whose commits are the bot's or his, refuses on conflicts
(exit 10, with the paths, for a worker) or when a commit turns out to be
upstream already, and leaves an approved fork PR to promote, since a
push would void his approval.

A conflict-free rebase changes nothing he signed off, so it keeps his
sign-off through 'bot-git rework' and gates the push on 'bot-git check'
against the pushed head, then force-pushes with a lease. Upstream PRs
get a one-line comment saying whether any patch changed at all; fork
PRs don't need one.

Generated-by: AI
cgwalters-bot added a commit to cgwalters-bot/homegit that referenced this pull request Sep 26, 2026
bootc-dev/bootc#2495 sat with red CI until cgwalters noticed that a
rebase onto main would fix it. The listing and the command exist now,
but nothing acts on them unless the loop does: each tick the
coordinator rebases a few conflict-free ones whose failures don't look
like the PR's own, and sends conflicting ones to a worker.

Generated-by: AI
@cgwalters
cgwalters marked this pull request as ready for review September 26, 2026 11:37
@cgwalters
cgwalters merged commit 83d1589 into bootc-dev:main Sep 26, 2026
54 checks passed
@bootc-bot
bootc-bot Bot requested a review from cgwalters September 26, 2026 11:37
@cgwalters cgwalters changed the title build: Exclude bundled PCRE2 sources from vendor tarballs RHEL-258303: build: Exclude bundled PCRE2 sources from vendor tarballs Sep 28, 2026
@cgwalters-bot cgwalters-bot moved this to Done in Workstream Sep 30, 2026
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.

2 participants