From edce000caba0b7249fb003aa302587edba5d28c1e1364601adf68e34795d2129 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Thu, 23 Feb 2012 14:34:30 +0000 Subject: [PATCH] Accepting request 106499 from devel:languages:python - Fix incorrect gpgme initialization (bnc#745257), patch extracted by Benjamin Haskell. (forwarded request 106454 from fcrozat) OBS-URL: https://build.opensuse.org/request/show/106499 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-gpgme?expand=0&rev=11 --- pygpgme-0.1-context.patch | 13 +++++++++++++ python-gpgme.changes | 6 ++++++ python-gpgme.spec | 16 +++++++--------- 3 files changed, 26 insertions(+), 9 deletions(-) create mode 100644 pygpgme-0.1-context.patch diff --git a/pygpgme-0.1-context.patch b/pygpgme-0.1-context.patch new file mode 100644 index 0000000..55c983a --- /dev/null +++ b/pygpgme-0.1-context.patch @@ -0,0 +1,13 @@ +Based on suggestion found at: +http://lists.mandriva.com/bugs/2010-05/msg03921.php + +--- a/pygpgme-0.1/src/pygpgme-context.c ++++ b/pygpgme-0.1/src/pygpgme-context.c +@@ -83,6 +83,7 @@ static int + pygpgme_context_init(PyGpgmeContext *self, PyObject *args, PyObject *kwargs) + { + static char *kwlist[] = { NULL }; ++ gpgme_check_version(NULL); + + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "", kwlist)) + return -1; diff --git a/python-gpgme.changes b/python-gpgme.changes index 6a38eea..03a4195 100644 --- a/python-gpgme.changes +++ b/python-gpgme.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Feb 22 13:07:05 UTC 2012 - fcrozat@suse.com + +- Fix incorrect gpgme initialization (bnc#745257), patch extracted + by Benjamin Haskell. + ------------------------------------------------------------------- Fri Feb 1 14:37:24 CET 2008 - cthiel@suse.de diff --git a/python-gpgme.spec b/python-gpgme.spec index 86cba47..29117b9 100644 --- a/python-gpgme.spec +++ b/python-gpgme.spec @@ -1,7 +1,7 @@ # -# spec file for package python-gpgme (Version 0.1) +# spec file for package python-gpgme # -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,21 +15,20 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild - Name: python-gpgme Version: 0.1 -Release: 98 +Release: 0 Summary: A Python module for working with OpenPGP messages -Group: Development/Libraries/Python License: LGPL-2.1+ +Group: Development/Libraries/Python Url: http://pypi.python.org/pypi/pygpgme Source: pygpgme-%{version}.tar.bz2 Patch: pygpgme-0.1-py23.patch +Patch1: pygpgme-0.1-context.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: python-devel BuildRequires: gpgme-devel +BuildRequires: python-devel %description PyGPGME is a Python module that lets you sign, verify, encrypt and @@ -46,6 +45,7 @@ Authors: %prep %setup -q -n pygpgme-%{version} %patch -p1 +%patch1 -p2 %build #CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build @@ -64,5 +64,3 @@ rm -rf $RPM_BUILD_ROOT %{py_sitedir}/* %changelog -* Fri Feb 01 2008 cthiel@suse.de -- initial package (version 0.1)