Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Aug 2019 21:04:21 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r509173 - in head/lang/rust-nightly: . files
Message-ID:  <201908172104.x7HL4LcN090831@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Sat Aug 17 21:04:21 2019
New Revision: 509173
URL: https://svnweb.freebsd.org/changeset/ports/509173

Log:
  lang/rust-nightly: unbreak cargo git fetch after r507928
  
  libgit2-sys 0.8.2 switched to libgit2 0.29 API without bumping minor
  version and adjusting pkg-config check. devel/libgit2 is still at
  0.28, so FFI silently fails with a confusing error e.g.,
  
    invalid version 3 on git_proxy_options; class=Invalid (3)
  
  USES=cargo consumers are affected but none use libgit2-sys 0.8.2 yet.
  
  PR:		239785
  Reported by:	yuri

Added:
  head/lang/rust-nightly/files/patch-vendor_libgit2-sys_lib.rs   (contents, props changed)
Modified:
  head/lang/rust-nightly/Makefile   (contents, props changed)

Modified: head/lang/rust-nightly/Makefile
==============================================================================
--- head/lang/rust-nightly/Makefile	Sat Aug 17 20:56:18 2019	(r509172)
+++ head/lang/rust-nightly/Makefile	Sat Aug 17 21:04:21 2019	(r509173)
@@ -3,7 +3,7 @@
 
 PORTVERSION=	1.39.0.${NIGHTLY_DATE:C,-,,g}
 # Always set PORTREVISION explicitly as otherwise it is inherited from lang/rust
-PORTREVISION=	0
+PORTREVISION=	1
 PKGNAMESUFFIX=	-nightly
 DISTNAME=	rustc-nightly-src
 

Added: head/lang/rust-nightly/files/patch-vendor_libgit2-sys_lib.rs
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/rust-nightly/files/patch-vendor_libgit2-sys_lib.rs	Sat Aug 17 21:04:21 2019	(r509173)
@@ -0,0 +1,30 @@
+Revert to libgit2 0.28 API per https://github.com/rust-lang/git2-rs/issues/458
+
+--- vendor/libgit2-sys/lib.rs.orig	2019-08-16 20:27:18.000000000 +0000
++++ vendor/libgit2-sys/lib.rs	2019-08-17 19:47:11.087276682 +0000
+@@ -331,7 +331,6 @@ pub struct git_remote_callbacks {
+     pub push_negotiation: Option<git_push_negotiation>,
+     pub transport: Option<git_transport_cb>,
+     pub payload: *mut c_void,
+-    pub resolve_url: Option<git_url_resolve_cb>,
+ }
+ 
+ #[repr(C)]
+@@ -385,8 +384,6 @@ pub type git_push_negotiation =
+ 
+ pub type git_push_update_reference_cb =
+     extern "C" fn(*const c_char, *const c_char, *mut c_void) -> c_int;
+-pub type git_url_resolve_cb =
+-    extern "C" fn(*mut git_buf, *const c_char, c_int, *mut c_void) -> c_int;
+ 
+ #[repr(C)]
+ pub struct git_push_update {
+@@ -2233,7 +2230,7 @@ extern "C" {
+         source: *const git_tree,
+     ) -> c_int;
+     pub fn git_treebuilder_clear(bld: *mut git_treebuilder);
+-    pub fn git_treebuilder_entrycount(bld: *mut git_treebuilder) -> size_t;
++    pub fn git_treebuilder_entrycount(bld: *mut git_treebuilder) -> c_uint;
+     pub fn git_treebuilder_free(bld: *mut git_treebuilder);
+     pub fn git_treebuilder_get(
+         bld: *mut git_treebuilder,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908172104.x7HL4LcN090831>