[Pkg-rust-maintainers] Bug#1016573: Bug#1016573: Acknowledgement (debcargo: Doesn't find sources)

Fabian Grünbichler f.gruenbichler at proxmox.com
Thu Aug 4 08:33:37 BST 2022


On August 3, 2022 11:57 am, Christian Marillat wrote:
> On 03 août 2022 09:54, Fabian Grünbichler <f.gruenbichler at proxmox.com> wrote:
> 
> [...]
> 
>> works for me here (both the unversioned command and the versioned 
>> command fetch the same current upstream version)
>>
>> but there is a known issue where libgit2 sometimes gets stuck and 
>> doesn't properly update the crates.io index. the usual workaround is 
>> setting the `net.git-fetch-with-cli` option for cargo (debcargo uses 
>> cargo as a library internally), e.g. like so:
>>
>> CARGO_NET_GIT_FETCH_WITH_CLI=1 debcargo package ..
> 
> Must be true or false not 1 or 0
> 
> [...]
> 
>> could you please report back whether either approach solves the issue 
>> for you?
> 
> I launched debcargo with CARGO_NET_GIT_FETCH_WITH_CLI=true for one
> source "time" and now I'm able to download latest source for "smallvec"
> and "paste" without CARGO_NET_GIT_FETCH_WITH_CLI

that matches experience of other people in the past when they triggered 
this issue - the local cache will be correctly updated when using `git` 
(the binary) instead of the built-in libgit2 mechanism, and therefore 
the information about crates other than the one being currently 
processed is also updated correctly.

>> please also note that cargo and debcargo are currently prepared for 
>> upgrading, including upgrading the version of libgit2 they are linked 
>> with. this upgrade will also solve another issue with crate version 
>> availability affecting crates that have opted-into using new cargo 
>> features that are not compatible with the currently packaged 
>> cargo/debcargo versions - thankfully there aren't that many yet, and 
>> almost all of them are not (yet) package for Debian either.
>>
>> unfortunately this update is quite an involved process, so it will 
>> likely take a few more weeks at least until it will be available.
> 
> OK. Which version should fix these issues above ?

I am not sure whether the new version (cargo 0.63) fixes the "stuck 
index" issue (I've only ever encountered it once myself, and promptly 
fixed it via the workaround above and never managed to hit or reproduce 
it again).

there is an upstream issue for it:
 https://github.com/rust-lang/cargo/issues/10230

where one theory is that something went wrong with a index squash (which 
would mean that only systems having the pre-squash index cached are 
unable to update, and would explain the lack of reproducibility).

I can say that cargo 0.63 (and any debcargo version using that once it 
hits the repositories) is able to process "v2" crates.io index entries, 
which the current cargo/debcargo versions can't - but that is a separate 
issue (with similar symptoms - the old cargo/debcargo will just not know 
that the new, incompatible crate version exists).

These are the Draft MRs for updating src:cargo, src:cargo-rust (and 
dependencies) and src:debcargo:

 https://salsa.debian.org/rust-team/cargo/-/merge_requests/14
 https://salsa.debian.org/rust-team/debcargo-conf/-/merge_requests/368
 https://salsa.debian.org/rust-team/debcargo/-/merge_requests/41

Also note that cargo is working on switching the index fetching to HTTP 
instead of git:

 https://github.com/rust-lang/cargo/issues/9069

which might get rid of some of the libgit2 related woes ;)



More information about the Pkg-rust-maintainers mailing list