[libgit2/epel7] Update to 0.21.5. Backport segfault fix.

Veeti Paananen vpaan at fedoraproject.org
Sat Mar 14 11:13:34 UTC 2015


commit 56a0a61aa37ff34f981fdc3a45eaf97c070a2283
Author: Veeti Paananen <veeti.paananen at rojekti.fi>
Date:   Sat Mar 14 13:12:51 2015 +0200

    Update to 0.21.5. Backport segfault fix.

 .gitignore                    |  1 +
 libgit2-0.21.0-segfault.patch | 30 ++++++++++++++++++++++++++++++
 libgit2.spec                  | 10 +++++++++-
 sources                       |  2 +-
 4 files changed, 41 insertions(+), 2 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index c51e2dd..a8492aa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
 /libgit2-0.20.0.tar.gz
 /libgit2-0.21.0.tar.gz
 /libgit2-0.21.1.tar.gz
+/libgit2-0.21.5.tar.gz
diff --git a/libgit2-0.21.0-segfault.patch b/libgit2-0.21.0-segfault.patch
new file mode 100644
index 0000000..ddad1b2
--- /dev/null
+++ b/libgit2-0.21.0-segfault.patch
@@ -0,0 +1,30 @@
+From 0b6699b8dd75de99d9c7944c90f071c11b265bc5 Mon Sep 17 00:00:00 2001
+From: Veeti Paananen <veeti.paananen at rojekti.fi>
+Date: Mon, 16 Feb 2015 17:55:20 +0200
+Subject: [PATCH] Backport 6d20006f7e8dbc26cf07bf8a945bc6972642c303
+
+remote: check the relevance of the refspec when updating FETCH_HEAD
+
+Before trying to rtransform using the given refspec to figure out what
+the name of the upstream branch is on the remote, we must make sure
+that the target of the refspec applies to the current branch's
+upstream.
+---
+ src/remote.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/remote.c b/src/remote.c
+index aa70bb7..c8c6a84 100644
+--- a/src/remote.c
++++ b/src/remote.c
+@@ -917,6 +917,7 @@ static int remote_head_for_ref(git_remote_head **out, git_refspec *spec, git_vec
+ 
+ 	if ((!git_reference__is_branch(ref_name)) ||
+ 	    (error = git_branch_upstream_name(&upstream_name, repo, ref_name)) < 0 ||
++	    !git_refspec_dst_matches(spec, git_buf_cstr(&upstream_name)) ||
+ 	    (error = git_refspec_rtransform(&remote_name, spec, upstream_name.ptr)) < 0) {
+ 		/* Not an error if there is no upstream */
+ 		if (error == GIT_ENOTFOUND)
+-- 
+2.3.0
+
diff --git a/libgit2.spec b/libgit2.spec
index 7a88b42..d40159f 100644
--- a/libgit2.spec
+++ b/libgit2.spec
@@ -1,5 +1,5 @@
 Name:           libgit2
-Version:        0.21.1
+Version:        0.21.5
 Release:        1%{?dist}
 Summary:        C implementation of the Git core methods as a library with a solid API
 License:        GPLv2 with exceptions
@@ -7,6 +7,7 @@ URL:            http://libgit2.github.com/
 Source0:        https://github.com/libgit2/libgit2/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
 # https://github.com/libgit2/libgit2/issues/2450
 #Patch0:         libgit2-0.21.0-arm.patch
+Patch0:         libgit2-0.21.0-segfault.patch
 BuildRequires:  cmake
 BuildRequires:  http-parser-devel
 BuildRequires:  libssh2-devel
@@ -44,6 +45,9 @@ sed -i 's/ionline/xonline/' CMakeLists.txt
 # Remove bundled libraries
 rm -frv deps
 
+# Run patches
+%patch0 -p1
+
 %build
 %cmake -DTHREADSAFE=ON .
 make %{?_smp_mflags}
@@ -73,6 +77,10 @@ ctest -V
 %{_includedir}/git2/
 
 %changelog
+* Sat Mar 14 2015 Veeti Paananen <veeti.paananen at rojekti.fi> - 0.21.5-1
+- Update to 0.21.5
+- Backport crash fix
+
 * Wed Aug 06 2014 Christopher Meng <rpm at cicku.me> - 0.21.1-1
 - Update to 0.21.1
 
diff --git a/sources b/sources
index 188bf56..3ca5890 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-cbf3422d54dd6f55f09855a6eb749f41  libgit2-0.21.1.tar.gz
+6f1d64b2d50239f0c518cb45fbe3da4a  libgit2-0.21.5.tar.gz


More information about the scm-commits mailing list