Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 950298 - dev-util/cargo-c dependency on =dev-libs/libgit2-1.8*:=
Summary: dev-util/cargo-c dependency on =dev-libs/libgit2-1.8*:=
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Luca Barbato
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-26 11:57 UTC by Hanno Böck
Modified: 2025-04-16 11:14 UTC (History)
13 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
cargo-c-0.10.12.ebuild (cargo-c-0.10.12.ebuild,8.52 KB, text/plain)
2025-04-08 18:06 UTC, Markus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hanno Böck gentoo-dev 2025-02-26 11:57:40 UTC
dev-util/cargo-c has a dependency on =dev-libs/libgit2-1.8*:=.

This is problematic. On my system, cargo-c is only installed as a build dependency, causing portage to update libgit2 to 1.9.0 a while ago, as it is not slotted.

Now, I'm unable to do a clean full upgrade including --with-bdeps=y, and am unable to run, e.g., --depclean. I think it's generally undesirable to have dependencies on old versions without slotting.

This appears to be a transitive dependency, and I'm not very familiar with the rust packaging ecosystem, so I don't know exactly what needs to happen to resolve this.
Comment 1 Forza 2025-03-12 19:39:18 UTC
There is a new version of libgit2-sys https://lib.rs/crates/libgit2-sys

Looking in Cargo.toml for cargo-c, it depends on cargo-0.86, which in turn depends on git2-0.19, which depends on libgit2-sys-0.17. The master branch of cargo has bumped git2 version to 0.20.0. So hopefully we will get a new release of cargo and cargo-c soon, which will solve the libgit dependency issue.
Comment 2 Fat-Zer 2025-03-13 05:02:24 UTC
So, we are waiting for cargo to release and then for cargo-c to bump up the dependency and release too, right?

Can't we bump up the dependencies ourself via a patch?

PS:‌ I'm not pressuring for this, just wondering
Comment 3 Jakub Paluszak 2025-03-24 17:03:51 UTC
As I can see it's fairly easy to resolve in a working but not very elegant way. libgit2-sys has a bundled version of libgit2 which is disabled by setting LIBGIT2_NO_VENDOR=1. However, if we remove the dependency =dev-libs/libgit2-1.8*:= from the ebuild and if we do not export LIBGIT2_NO_VENDOR=1 in src_configure(), then cargo-c will not depend on an obsolete version of libgit2.
Comment 4 Pavel Volkovitskiy 2025-04-06 09:33:39 UTC
A new cargo-c has been released

https://crates.io/crates/cargo-c/0.10.12+cargo-0.87.0

will it help?
Comment 5 Markus 2025-04-08 18:06:25 UTC
Created attachment 924112 [details]
cargo-c-0.10.12.ebuild

I have no idea about rust ebuilds, but something like this seems to build successfully.
Comment 6 Vincent de Phily 2025-04-16 11:14:30 UTC
New ebuild LGTM, except it needs to bump RUST_MIN_VER="1.84.0", see https://github.com/lu-zero/cargo-c/commit/8c5b7af3d6edb6d99f7bffcc94adf550cfee65b3#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542R12

Tested by building cargo-c-0.10.12, and then rustls-ffi-0.14.0 (which BDEPENDS on cargo-c).