Incorrect patch stub format causes dh-cargo-vendored-sources to fail

Bug #2132631 reported by Max Gilmour
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
rustc-1.89 (Ubuntu)
Status tracked in Resolute
Resolute
In Progress
Medium
Max Gilmour

Bug Description

Starting in rustc-1.89, cargo-vendor-filterer was used to automatically generate crate stubs for unwanted vendored dependencies.

However, dh-cargo-vendored-sources checks for an empty src/lib.rs to determine whether or not a given crate is a stub, and the patch used to generate the crate stubs contains a single newline, making dh-cargo-vendored-sources erroneously believe these crates were indeed included in the source.

Max Gilmour (maxgmr)
affects: rustc-1.88 (Ubuntu) → rustc-1.89 (Ubuntu)
Revision history for this message
Max Gilmour (maxgmr) wrote :

This is the first of the two new tarballs. It contains all upstream code except vendored dependencies.

Changed in rustc-1.89 (Ubuntu):
importance: Undecided → Medium
milestone: none → ubuntu-26.04
Revision history for this message
Max Gilmour (maxgmr) wrote :

This is the second of the two new orig tarballs. This tarball component contains the pruned vendored dependencies.

Revision history for this message
Max Gilmour (maxgmr) wrote :

I would be very grateful if someone could sponsor this fix. The new tarballs can be found in my previous comments.

This patch fixes LP: #2132631, an issue where the incorrect formatting of stubbed vendored dependencies caused the list of vendored sources to be incorrect, thus potentially causing problems down the line for automated dependency checkers.

===============
Notable Changes
===============
- The d/prune-unused-deps overhaul has been reversed, as it is no longer used to generate patch stubs.
- d/vendor-deps has been added, and d/rules edited, to implement the vendor-tarball rule. This allows the maintainer to generate the pruned vendored dependencies as a tarball component.
- d/p/series,d/p/prune/d-0021-vendor-remove-windows-dependencies.patch: This very large patch, which generated the vendored crate stubs, has been removed entirely as it is no longer necessary.
- d/add-vendored-copyright-overrides has been added as a way to conveniently override Lintian warnings for missing copyright stanzas of empty vendored crate stubs.
- The obsolete autogenerated vendor Files-Excluded list has been removed from d/copyright.

The vast majority of this debdiff is taken up by the newly-generated vendored dependency stubs. They aren't anything new, they're just included in the orig tarball rather than being generated on-the-fly via a patch.

=====
Links
=====
PPA: https://launchpad.net/~maxgmr/+archive/ubuntu/rustc-1.89-lp2132631/+packages
Source: https://git.launchpad.net/~canonical-foundations/ubuntu/+source/rustc/log/?h=merge-1.89
amd64 Autopkgtests: https://autopkgtest.ubuntu.com/results/autopkgtest-resolute-maxgmr-rustc-1.89-lp2132631/resolute/amd64/r/rustc-1.89/20251202_230803_1df8a@/log.gz

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.