-
Notifications
You must be signed in to change notification settings - Fork 699
fix: kata-containers - remove flagged files #18706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Andrew Phelps (anphel31)
wants to merge
2
commits into
4.0
Choose a base branch
from
anphel/fix-kata-containers-flagged-files
base: 4.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+97
−4
Draft
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,29 @@ | ||
| [components.kata-containers] | ||
| # Release: 1%{?rcrel}%{?dist} | ||
| # Release: %[1 + %{azl_release}]%{?rcrel}%{?dist} | ||
| release = { calculation = "manual" } | ||
|
|
||
| [components.kata-containers.build.defines] | ||
| # AZL-only release counter added to upstream's Release. Bump for an AZL rebuild, | ||
| # since manual release calculation can't auto-bump the Release. | ||
| azl_release = "1" | ||
|
|
||
| [[components.kata-containers.overlays]] | ||
| description = "Fold azl_release into upstream Release so AZL rebuilds bump independently (manual release calculation can't auto-bump)" | ||
| type = "spec-set-tag" | ||
| tag = "Release" | ||
| value = "%[1 + %{azl_release}]%{?rcrel}%{?dist}" | ||
| [components.kata-containers.overlays.metadata] | ||
| category = "azl-release-management" | ||
| upstream-status = "inapplicable" | ||
|
|
||
| # The Windows-only import-library removal and the matching cargo-checksum pruning are one | ||
| # logical change; they live in overlays/0001-remove-windows-import-libraries.overlay.toml | ||
| # (auto-loaded via the project-wide overlay-files glob) under a single azl-pruning metadata | ||
| # block. The repacked vendor tarball they produce is pinned below. | ||
| [[components.kata-containers.source-files]] | ||
| filename = "kata-containers-3.26.0-vendor.tar.gz" | ||
| hash = "2a9018a423a83ca80741b203b6b96a6895bae8734751f293e3ce7de772664cd69c87ae2fb8d556e77f31ae52051ce518d7075315858a05b5638290f7ea447e4c" | ||
| hash-type = "SHA512" | ||
| origin = { type = "overlay" } | ||
| replace-upstream = true | ||
| replace-reason = "Removes the Windows-only winapi-*-pc-windows-* and windows_*_{gnu,gnullvm,msvc} static import libraries (lib/*.a and .lib) that are flagged during source package signing, and drops the corresponding entries from each crate's .cargo-checksum.json; the crates are target-gated to Windows and never built on Linux." | ||
60 changes: 60 additions & 0 deletions
60
base/comps/kata-containers/overlays/0001-remove-windows-import-libraries.overlay.toml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| # Remove the Windows-only import libraries from the vendored-dependencies archive and | ||
| # drop their now-dangling entries from each crate's .cargo-checksum.json. | ||
| # | ||
| # The winapi-*-pc-windows-* and windows_*_{gnu,gnullvm,msvc} crates are all target-gated | ||
| # (`[target.*-pc-windows-*]` / `cfg(target_env = ...)`), so they are never compiled on a | ||
| # Linux build (the vendor archive is fully unpacked in %prep, but cargo only verifies | ||
| # manifests for crates it actually builds). Their lib/ static-import archives (`.a`/`.lib`) | ||
| # ship ~1.6M ar members in aggregate (vendored several times over per arch/toolchain), which | ||
| # blows up recursive source-package scanning. Only the lib/ archives are dropped; each | ||
| # crate's Cargo.toml/src/skeleton is kept so cargo's resolve stays intact. | ||
| # | ||
| # Cargo's directory source verifies every path listed in a manifest's `files` map and fails | ||
| # with "failed to verify the checksum of <pkg>" when one is missing; it does not object to | ||
| # files that exist but are unlisted, so deleting the removed lib/ entries is the correct fix. | ||
| # In every affected manifest the lib/ keys sort between `build.rs` and `src/lib.rs`, so a | ||
| # trailing comma is always present and the JSON stays valid. The archive is repacked; the | ||
| # resulting hash is pinned via the source-files entry in kata-containers.comp.toml. | ||
|
|
||
| [metadata] | ||
| category = "azl-pruning" | ||
| upstream-status = "inapplicable" | ||
|
|
||
| [[overlays]] | ||
| description = "Remove Windows-only winapi import libraries" | ||
| type = "file-remove" | ||
| archive = "kata-containers-3.26.0-vendor.tar.gz" | ||
| file = "**/winapi-*-pc-windows-*/lib/**" | ||
|
|
||
| [[overlays]] | ||
| description = "Remove Windows-only windows_* gnu/gnullvm import libraries" | ||
| type = "file-remove" | ||
| archive = "kata-containers-3.26.0-vendor.tar.gz" | ||
| file = "**/windows_*_gnu*/lib/**" | ||
|
|
||
| [[overlays]] | ||
| description = "Remove Windows-only windows_* msvc import libraries" | ||
| type = "file-remove" | ||
| archive = "kata-containers-3.26.0-vendor.tar.gz" | ||
| file = "**/windows_*_msvc*/lib/**" | ||
|
|
||
| [[overlays]] | ||
| description = "Drop removed winapi import libraries from cargo checksum manifests" | ||
| type = "file-search-replace" | ||
| archive = "kata-containers-3.26.0-vendor.tar.gz" | ||
| file = "**/winapi-*-pc-windows-*/.cargo-checksum.json" | ||
| regex = '"lib/[^"]*":"[a-f0-9]{64}",' | ||
|
|
||
| [[overlays]] | ||
| description = "Drop removed windows_* gnu/gnullvm import libraries from cargo checksum manifests" | ||
| type = "file-search-replace" | ||
| archive = "kata-containers-3.26.0-vendor.tar.gz" | ||
| file = "**/windows_*_gnu*/.cargo-checksum.json" | ||
| regex = '"lib/[^"]*":"[a-f0-9]{64}",' | ||
|
|
||
| [[overlays]] | ||
| description = "Drop removed windows_* msvc import libraries from cargo checksum manifests" | ||
| type = "file-search-replace" | ||
| archive = "kata-containers-3.26.0-vendor.tar.gz" | ||
| file = "**/windows_*_msvc*/.cargo-checksum.json" | ||
| regex = '"lib/[^"]*":"[a-f0-9]{64}",' |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Macros file automatically generated by azldev. | ||
| # Do not edit manually; changes will be overwritten. | ||
| %azl_release 1 |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| SHA512 (kata-containers-3.26.0.tar.gz) = 836cf4c0882a9813d854b98cacf22b86806f7e27db903256b6c2a2a6ff4345f50e8c1b2c60c74f08e094471cb08b8fba208412667700a330204d82834220b271 | ||
| SHA512 (kata-containers-3.26.0-vendor.tar.gz) = ca216accbb9aeb1f4bb68547d6e1bb7ffceb2b3da58cff4d6bfff1d5af4b5bf52f9a4ae687a56bd7d6269b15437de178b8892acaffe627724c39c375ef6ea56a | ||
| SHA512 (kata-containers-3.26.0-vendor.tar.gz) = 2a9018a423a83ca80741b203b6b96a6895bae8734751f293e3ce7de772664cd69c87ae2fb8d556e77f31ae52051ce518d7075315858a05b5638290f7ea447e4c |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR description was already updated to match the config before this pass — it now states "No manual changelog entry is added — kata's spec isn't
%autochangelog", so the description/rendered-spec inconsistency is resolved (this review ran against the earlier description).On whether to add the entry at all: I'm following the maintainer guidance in this thread (r3935306771 / r3935292816) and the
rubygem-rakeprecedent — a manual-releaseazl_releasebump on a non-%autochangelogspec carries no AZL%changelogentry; theazl_releasecounter plus commit history record why the rebuild exists. Tobias Brick (@tobiasb-ms), happy to add a3.26.0-2changelog entry instead if you'd prefer it here.