Repository navigation
fix(ci): strip dpkg-ignored files from vendored crates for PPA builds - #368
Merged
Merged
Conversation
All six Launchpad builds of 3.1.3 failed with "failed to calculate checksum of: vendor/ring/pregenerated/vpaes-x86_64-nasm.o". dpkg-source leaves files matching its default tar-ignore patterns (*.o, *.a, *.so, *.la, VCS metadata, editor backups) out of the source tarball, while ring's .cargo-checksum.json still lists its prebuilt Windows objects, so cargo's offline build rejects the crate. ring became a compiled dependency in v3.0.0 through hickory-resolver's dnssec-ring feature (#304), and no PPA build ran between 2.4.1 and 3.1.3, so this was not noticed. sanitize-vendor.py now strips every checksum entry and file that dpkg-source would drop, using the running dpkg's default patterns with a built-in fallback list, in addition to the hidden and .orig files it already handled. A --check mode reports remaining entries, and the PPA workflow uses it in place of its inline hidden/orig check. Validated locally: after vendoring and sanitizing, the tree unpacked from a dpkg-source -b tarball builds with cargo build --release --frozen --workspace.
This branch was successfully 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.
All six Launchpad builds of 3.1.3 (
~jammy1,~noble1,~resolute1on amd64 and arm64) failed withfailed to calculate checksum of: vendor/ring/pregenerated/vpaes-x86_64-nasm.o. dpkg-source leaves files matching its default tar-ignore patterns (*.o,*.a,*.so,*.la, VCS metadata, editor backups) out of the source tarball, but ring's.cargo-checksum.jsonstill lists its prebuilt Windows objects, so cargo rejects the crate in the offline build. ring became a compiled dependency in v3.0.0 through hickory-resolver'sdnssec-ringfeature (#304), and the PPA workflow did not run between 2.4.1 and 3.1.3.debian/sanitize-vendor.pynow removes every file and checksum entry that dpkg-source would drop, using the running dpkg's default patterns plus a built-in fallback list, on top of the hidden and.origfiles it already handled. A new--checkmode replaces the inline hidden/orig check in the PPA workflow.Validation:
dpkg-source -b, unpack the tarball, thencargo build --release --frozen --workspacesucceeds.3.1.3-1~jammy2,~noble2and~resolute2(sanitizer dropped 19 ring entries), and all six Launchpad builds (amd64 and arm64) finished as "Successfully built".