From 9c31c3ab0e6c6000cf2dc031ca545b40a3bfa624 Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 15 Dec 2019 21:48:53 +0100 Subject: [PATCH] cargo: make sure to pin git2 as well The git2 crate is tied to specific versions of libgit2-sys, so when upstream updates it, it will break builds. By pinning git2 as well as libgit2-sys, we can prevent this. Fixes #17339. --- srcpkgs/cargo/template | 2 ++ 1 file changed, 2 insertions(+) diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template index 008ba9e3bd..4389d8de4b 100644 --- a/srcpkgs/cargo/template +++ b/srcpkgs/cargo/template @@ -12,6 +12,7 @@ maintainer="Enno Boland " license="MIT, Apache-2.0" homepage="https://crates.io/" _libgit2_ver=0.9.1 +_git2_ver=0.10.1 distfiles="https://github.com/rust-lang/cargo/archive/${version}.tar.gz https://github.com/rust-lang/git2-rs/archive/libgit2-sys-${_libgit2_ver}.tar.gz" checksum="b0a6808a2eaa9b20ccaeedeb04f583ee34b33d289f4d0076044b9fc2b1f4c59d @@ -113,6 +114,7 @@ do_build() { # gotta pin out libgit2-sys at the version $cargo update + $cargo update --package git2 --precise ${_git2_ver} $cargo update --package libgit2-sys --precise ${_libgit2_ver} $cargo build --release $(vopt_if static --features="all-static") }