Repository navigation
fix(kata-containers): drop Windows-only vendored import libraries #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
Closed
Andrew Phelps (anphel31)
wants to merge
1
commit into
4.0
from
anphel/fix-kata-containers-flagged-files
Closed
Changes from all commits
Commits
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
Some comments aren't visible on the classic Files Changed page.
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.
Uh oh!
There was an error while loading. Please reload this page.