From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 35FD5139694 for ; Sun, 14 May 2017 22:34:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F241721C043; Sun, 14 May 2017 22:34:18 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BB8D521C043 for ; Sun, 14 May 2017 22:34:18 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 296BA3416A3 for ; Sun, 14 May 2017 22:34:17 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E34497439 for ; Sun, 14 May 2017 22:34:15 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1494801206.e7878326f5127b3bb61c8ba69428f2ce2ffeec61.floppym@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pygit2/files/, dev-python/pygit2/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/pygit2/files/pygit2-0.25.1-cffi-1.10.patch dev-python/pygit2/pygit2-0.25.1.ebuild X-VCS-Directories: dev-python/pygit2/files/ dev-python/pygit2/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: e7878326f5127b3bb61c8ba69428f2ce2ffeec61 X-VCS-Branch: master Date: Sun, 14 May 2017 22:34:15 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 543767ce-2c12-4e11-ac17-f0416716a64f X-Archives-Hash: 6640654c9a80dfc89d88627ae1a83afc commit: e7878326f5127b3bb61c8ba69428f2ce2ffeec61 Author: Mike Gilbert gentoo org> AuthorDate: Sun May 14 22:33:26 2017 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Sun May 14 22:33:26 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7878326 dev-python/pygit2: backport cffi-1.10 fix Bug: https://bugs.gentoo.org/618470 Package-Manager: Portage-2.3.5_p32, Repoman-2.3.2_p62 .../pygit2/files/pygit2-0.25.1-cffi-1.10.patch | 55 ++++++++++++++++++++++ dev-python/pygit2/pygit2-0.25.1.ebuild | 4 ++ 2 files changed, 59 insertions(+) diff --git a/dev-python/pygit2/files/pygit2-0.25.1-cffi-1.10.patch b/dev-python/pygit2/files/pygit2-0.25.1-cffi-1.10.patch new file mode 100644 index 00000000000..c071f9e5dd6 --- /dev/null +++ b/dev-python/pygit2/files/pygit2-0.25.1-cffi-1.10.patch @@ -0,0 +1,55 @@ +From b88dc868423af2f760f649960112efd0e37e5335 Mon Sep 17 00:00:00 2001 +From: Lukas Fleischer +Date: Sat, 6 May 2017 21:39:33 +0200 +Subject: [PATCH] Fix parameter passing of describe patterns + +When ffi.new() is used to build a new pointer object, the returned +pointer object has ownership on the allocated memory. When it is +garbage-collected, then the memory is freed. Thus, we need to make sure +the original object survives its use, otherwise the casted pointer will +point to garbage. + +This fixes one test which was failing with the latest CFFI version, see +issue #694. Thus, this commit also reverts 803b1cb (cffi 1.10 not yet +supported, 2017-03-22) where the latest CFFI version was marked as +unsupported. + +Signed-off-by: Lukas Fleischer +--- + .travis.yml | 2 +- + pygit2/repository.py | 6 +++++- + setup.py | 4 ++-- + 3 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/pygit2/repository.py b/pygit2/repository.py +index 9377aa2..472f4ff 100644 +--- a/pygit2/repository.py ++++ b/pygit2/repository.py +@@ -692,7 +692,11 @@ def describe(self, committish=None, max_candidates_tags=None, + if describe_strategy is not None: + options.describe_strategy = describe_strategy + if pattern: +- options.pattern = ffi.new('char[]', to_bytes(pattern)) ++ # The returned pointer object has ownership on the allocated ++ # memory. Make sure it is kept alive until git_describe_commit() or ++ # git_describe_workdir() are called below. ++ pattern_char = ffi.new('char[]', to_bytes(pattern)) ++ options.pattern = pattern_char + if only_follow_first_parent is not None: + options.only_follow_first_parent = only_follow_first_parent + if show_commit_oid_as_fallback is not None: +diff --git a/setup.py b/setup.py +index f4a9f8c..18d3eb0 100644 +--- a/setup.py ++++ b/setup.py +@@ -203,8 +203,8 @@ def run(self): + long_description=long_description, + packages=['pygit2'], + package_data={'pygit2': ['decl.h']}, +- setup_requires=['cffi<1.10'], +- install_requires=['cffi<1.10', 'six'], ++ setup_requires=['cffi'], ++ install_requires=['cffi', 'six'], + zip_safe=False, + cmdclass=cmdclass, + **extra_args) diff --git a/dev-python/pygit2/pygit2-0.25.1.ebuild b/dev-python/pygit2/pygit2-0.25.1.ebuild index a88aff4993c..35a8f52ddc9 100644 --- a/dev-python/pygit2/pygit2-0.25.1.ebuild +++ b/dev-python/pygit2/pygit2-0.25.1.ebuild @@ -21,6 +21,10 @@ RDEPEND=" " DEPEND="${RDEPEND}" +PATCHES=( + "${FILESDIR}"/pygit2-0.25.1-cffi-1.10.patch +) + python_test() { esetup.py test }