[Pkg-rust-maintainers] Patch metadata in packages

Ximin Luo infinity0 at debian.org
Sun Jun 24 20:01:00 BST 2018

Josh Triplett:
> On Sun, Jun 24, 2018 at 02:01:20PM +0200, Paul van Tilburg wrote:
>> Hi,
>> I have noticed that patch metadata (i.e. the .pc dir) ends up in all
>> the -dev packages, even if there are no patches, and this is kind of
>> useless. Do you want me to file a bug report for that against
>> dh-cargo?
>> See for example this package listing (still in NEW):
>> https://ftp-master.debian.org/new/rust-lazy-static_1.0.1-1.html#binary-
>> librust-lazy-static-dev-contents
>>  any built rust-*-dev deb on your system will have it.
> Argh. Checking upstream, it looks like the lazy_static crate does not
> include this directory, so it's an artifact of the Debian package build.
> It'd be trivial for dh-cargo to exclude the .pc directory, just as it
> currently excludes the debian directory and .git directory. It's
> theoretically possible that an upstream crate could include a .pc
> directory; it *shouldn't*, but it could. Hopefully that doesn't happen.
Cool so it is a bug then. I thought you might have done it on purpose, to indicate whether we did patch the original source code or not.

The fix should be easy in dh-cargo. But we should also add debian/patches (if it exists) to the crate so that it's obvious from the binary package whether we patched it or not.

For example I'm patching pkg-config and some other packages to remove the need to set special-snowflake envvars to enable cross-compiling: https://ftp-master.debian.org/new/rust-pkg-config_0.3.11-1.html#binary-librust-pkg-config-dev-contents

I think it's OK to leave the existing NEW packages as-is since it is slightly untidy but not too harmful.


GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE

More information about the Pkg-rust-maintainers mailing list