Skip to content

Bump libgit2-sys version to be compatible with systems that have newer libgit2 #598

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 21, 2022

Conversation

saethlin
Copy link
Member

@saethlin saethlin commented Jan 10, 2022

cargo run -- prepare-local doesn't work at the moment on Arch/Manjaro, because rolling release distros are shipping libgit 1.3.0, which has a compatability break (intentional or not it's unclear) since 1.1.0. libgit2-sys will build a vendored version if the system version is too old, but not if it is too new. So with this change, the build should be correct on all systems.

I'm running into the same error as rustsec/rustsec#431 and applying the fix suggested therein.

libgit2-sys builds a vendored libgit2 if the system version is too old,
but not if it is too new. So at the moment we need to keep this updated
or we end up linked against an incompatible version on systems that
upgrade system packages aggressively.
@saethlin saethlin changed the title Fix for recent libgit2 proxy setting Bump libgit2-sys version to be compatible with systems that have newer libgit2 Jan 11, 2022
@Mark-Simulacrum
Copy link
Member

Can you say whether this is a problem if the system is old? (Including quite old -- some of our servers with Crater running on them are on pretty old LTS distributions these days).

@saethlin
Copy link
Member Author

saethlin commented Feb 2, 2022

This PR bumps the required libgit2 version from 1.1.0 to 1.3.0. The libgit2-sys crate compiles a vendored libgit2 version is if the system version is too old. So as far as I can tell, on any LTS Ubuntu, the distro version of libgit2 was already too old (they only ship 0.28 at best). So those servers should already be building a vendored libgit2, this patch would just change the version that the builds are vendoring.

@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Feb 21, 2022

📌 Commit 3cafbf2 has been approved by Mark-Simulacrum

@bors
Copy link
Contributor

bors commented Feb 21, 2022

⌛ Testing commit 3cafbf2 with merge 0c572ab...

@bors
Copy link
Contributor

bors commented Feb 21, 2022

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing 0c572ab to master...

@bors bors merged commit 0c572ab into rust-lang:master Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants