[Pkg-rust-maintainers] Bug#1014996: Bug#1014996: librust-curl-sys-dev: has build loop with librust-curl-dev that causes rebuild delay when building against local debian source

Fabian Grünbichler f.gruenbichler at proxmox.com
Mon Jul 18 15:49:07 BST 2022


On July 18, 2022 4:22 pm, Daniel Kahn Gillmor wrote:
> Hi Fabian--
> 
> On Mon 2022-07-18 14:50:50 +0200, Fabian Grünbichler wrote:
>> note that the rerun line upstream refers to the vendored copy of the 
>> curl library which is contained as a git submodule (and directory, in 
>> the published .crate file) - to pick up any changes made to the 
>> submodule during development.
>>
>> we do (obviously ;)) remove that directory in Debian[0], which then 
>> makes the reference to 'curl' point to the 'curl' crate.
> 
> Thanks for this explanation!  I didn't realize that the string "curl"
> would change its semantics in the context the deletion of the
> submodule/directory, but it makes sense now that you've explained it.

you made me take a closer look - what I wrote above is actually not 
quite true at all. if I replace the rerun-if-changed to point to another 
path that doesn't exist (e.g., 'foobar' instead of 'curl'), the same 
behaviour is obversable. so it's a 'rerun-if-changed' stanza pointing at 
a path that doesn't exist at all that is the problem - if we had 
replaced the curl dir with an empty one instead of replacing it 
altogether it would have worked without the patch ;) and indeed, a 
simple `mkdir /usr/share/cargo/registry/curl-sys-0.4.49/curl` also fixes 
the spurious rebuild.

>> but, we also patch out the println[1]. seems like that fixed version
>> never got uploaded though - but that would likely fix it.
> 
> that would be great.  if i have time to do more work on debcargo in the
> nearterm, i'll probably start by finalizing the -2 of curl-sys, but if
> it takes me ~1 week to get to it, i'll just let you go forward with it
> as part of your cargo/debcargo work.
> 
>> note that I am currently working on upgrading cargo/debcargo which will 
>> also entail updating curl-sys and curl, so if you want to wait for that 
>> (ETA ~1 week) instead of uploading the prepared -2 that should also fix 
>> it in due course, but I am happy to rebase on top of a finalized -2 
>> version as well :)
> 
> ok, thanks for doing this work, i really appreciate it!

it's sorely needed - I've already started hitting crates where our 
outdated cargo version (used by debcargo) makes packaging current 
versions of crates impossible, since their crates.io index entries are 
not understood, falling back to the last 'v1' one:

 https://github.com/rust-lang/crates.io-index/blob/master/li/bg/libgit2-sys

only versions up to 0.13.2+1.4.2 are visible to our cargo/debcargo 
(which is especially fun given that it's in the dep tree of the current 
cargo version ;)).

thankfully this only affects ~400 crates at the moment, of which only 
libgit2-sys, phf and rpassword are packaged in Debian.. but it will 
become more widespread as more upstream devs make use of the new cargo 
features.



More information about the Pkg-rust-maintainers mailing list