Bug 41534 - cargo vendor is broken
Summary: cargo vendor is broken
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: rust-cargo (show other bugs)
Version: unstable
Hardware: x86_64 Linux
: P5 normal
Assignee: Alexey Gladkov
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-08 23:54 MSK by Vladimir D. Seleznev
Modified: 2021-12-20 10:53 MSK (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir D. Seleznev 2021-12-08 23:54:13 MSK
$ cargo vendor
    Updating crates.io index
error: failed to sync

Caused by:
  failed to load pkg lockfile

Caused by:
  failed to get `anymap` as a dependency of package `websocat v1.9.0 (/usr/src/RPM/BUILD/websocat)`

Caused by:
  failed to fetch `https://github.com/rust-lang/crates.io-index`

Caused by:
  invalid version 0 on git_proxy_options; class=Invalid (3)

Maybe related: https://github.com/libgit2/libgit2sharp/issues/1769
Comment 1 Vladimir D. Seleznev 2021-12-08 23:56:07 MSK
Maybe cargo should use git(1) binary instead of libgit2.
Comment 2 Alexey Gladkov 2021-12-09 00:06:36 MSK
Please provide a more detailed description of the problem. In the current form, I cannot reproduce it.
Comment 3 Vladimir D. Seleznev 2021-12-09 00:27:47 MSK
(In reply to Alexey Gladkov from comment #2)
> Please provide a more detailed description of the problem. In the current
> form, I cannot reproduce it.

Step to reproduce:

# make sure that latest Sisyphus rust-cargo is installed:
    $ rpm -q rust-cargo
    rust-cargo-1.57.0-alt1.x86_64

    # clone websocat repo:
    $ git clone https://github.com/vi/websocat
    $ cd websocat

# try to download vendor deps:
    $ cargo vendor
        Updating crates.io index
    error: failed to sync

    Caused by:
      failed to load pkg lockfile

    Caused by:
      failed to get `anymap` as a dependency of package `websocat v1.9.0 (/usr/src/RPM/BUILD/websocat)`

    Caused by:
      failed to fetch `https://github.com/rust-lang/crates.io-index`

    Caused by:
      invalid version 0 on git_proxy_options; class=Invalid (3)

# It failed.

Note: this command works successfully with upstream cargo binary.
Comment 4 Alexey Gladkov 2021-12-09 00:34:01 MSK
It also works with rust-cargo-1.56.1-alt1.
Comment 5 Repository Robot 2021-12-20 10:53:28 MSK
rust-1:1.57.0-alt2 -> sisyphus:

 Thu Dec 09 2021 Alexey Gladkov <legion@altlinux.ru> 1:1.57.0-alt2
 - Don't use system libgit2 for now (ALT#41534).