diff --git a/0001-git-svn-control-destruction-order-to-avoid-segfault.patch b/0001-git-svn-control-destruction-order-to-avoid-segfault.patch new file mode 100644 index 0000000..8518dd5 --- /dev/null +++ b/0001-git-svn-control-destruction-order-to-avoid-segfault.patch @@ -0,0 +1,40 @@ +From 7f6f75e97acd25f8e95ce431e16d2e1c2093845d Mon Sep 17 00:00:00 2001 +From: Eric Wong +Date: Mon, 29 Jan 2018 23:11:07 +0000 +Subject: [PATCH] git-svn: control destruction order to avoid segfault + +It seems necessary to control destruction ordering to avoid a +segfault with SVN 1.9.5 when using "git svn branch". I've also +reported the problem against libsvn-perl to Debian [Bug #888791], +but releasing the SVN::Client instance can be beneficial anyways to +save memory. + +ref: https://bugs.debian.org/888791 +Tested-by: Todd Zullinger +Reported-by: brian m. carlson +Signed-off-by: Eric Wong +Signed-off-by: Junio C Hamano +Signed-off-by: Todd Zullinger +--- + git-svn.perl | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/git-svn.perl b/git-svn.perl +index aa242d4f4f..b012980246 100755 +--- a/git-svn.perl ++++ b/git-svn.perl +@@ -1199,6 +1199,11 @@ sub cmd_branch { + $ctx->copy($src, $rev, $dst) + unless $_dry_run; + ++ # Release resources held by ctx before creating another SVN::Ra ++ # so destruction is orderly. This seems necessary with SVN 1.9.5 ++ # to avoid segfaults. ++ $ctx = undef; ++ + $gs->fetch_all; + } + +-- +2.16.1 + diff --git a/git.spec b/git.spec index 91ed278..88520ac 100644 --- a/git.spec +++ b/git.spec @@ -47,7 +47,7 @@ Name: git Version: 2.16.1 -Release: 1%{?rcrev}%{?dist} +Release: 2%{?rcrev}%{?dist} Summary: Fast Version Control System License: GPLv2 Group: Development/Tools @@ -81,6 +81,8 @@ Source99: print-failed-test-output Patch0: git-1.8-gitweb-home-link.patch # https://bugzilla.redhat.com/490602 Patch1: git-cvsimport-Ignore-cvsps-2.2b1-Branches-output.patch +# https://public-inbox.org/git/20180129231653.GA22834@starla/ +Patch2: 0001-git-svn-control-destruction-order-to-avoid-segfault.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -596,9 +598,7 @@ find %{buildroot}%{_pkgdocdir} -name "*.html" | xargs linkchecker %endif # Tests to skip on all releases and architectures -# - tests in t9128, t9141, and t9167 which call 'git svn branch' fail -# intermittently with SIGSEGV in the subversion bindings -GIT_SKIP_TESTS="t9128.[34] t9141.[34] t9167.3" +GIT_SKIP_TESTS="" %ifarch aarch64 %{arm} %{power64} # Skip tests which fail on aarch64, arm, and ppc @@ -803,6 +803,10 @@ rm -rf %{buildroot} # No files for you! %changelog +* Mon Jan 29 2018 Todd Zullinger - 2.16.1-2 +- git-svn: avoid segfaults in 'git svn branch', re-enable t9128, t9141, and + t9167 + * Mon Jan 22 2018 Todd Zullinger - 2.16.1-1 - Update to 2.16.1 - Avoid python dependency in git-core (#1536471)