[arch-commits] Commit in python2-gnutls/repos (4 files)

2018-11-09 Thread Evangelos Foutras via arch-commits
Date: Friday, November 9, 2018 @ 21:55:50
  Author: foutrelis
Revision: 404790

archrelease: copy trunk to community-staging-any

Added:
  python2-gnutls/repos/community-staging-any/
  python2-gnutls/repos/community-staging-any/PKGBUILD
(from rev 404789, python2-gnutls/trunk/PKGBUILD)
  python2-gnutls/repos/community-staging-any/libraryfunctions.patch
(from rev 404789, python2-gnutls/trunk/libraryfunctions.patch)
  python2-gnutls/repos/community-staging-any/libraryinit.patch
(from rev 404789, python2-gnutls/trunk/libraryinit.patch)

+
 PKGBUILD   |   29 +++
 libraryfunctions.patch |  363 +++
 libraryinit.patch  |   12 +
 3 files changed, 404 insertions(+)

Copied: python2-gnutls/repos/community-staging-any/PKGBUILD (from rev 404789, 
python2-gnutls/trunk/PKGBUILD)
===
--- community-staging-any/PKGBUILD  (rev 0)
+++ community-staging-any/PKGBUILD  2018-11-09 21:55:50 UTC (rev 404790)
@@ -0,0 +1,29 @@
+# Maintainer: Sergej Pupykin 
+# Maintainer: Hugo Doria 
+# Contributor: N3RD3X 
+
+pkgname=python2-gnutls
+pkgver=3.0.0
+pkgrel=2
+pkgdesc="Python wrapper for the GNUTLS library"
+arch=('any')
+url="http://cheeseshop.python.org/pypi/python-gnutls;
+depends=('python2' 'gnutls' 'libgcrypt')
+license=('LGPL')
+source=(https://pypi.python.org/packages/source/p/python-gnutls/python-gnutls-${pkgver}.tar.gz
+   libraryinit.patch
+   libraryfunctions.patch)
+sha256sums=('6c1274c9f5c0c8c18d050134d6aa2bff3dbf59349fe5485f447fff5c24eb2dfb'
+'d288e90fae55652aada402a4e3c60b797df01a0da6ecc500a3a26b903c821d2b'
+'8443ae32fdbfc4c1880bf5e1a1d9cc71077d6ee5c5d52f01a9c9c4c291ae64d9')
+
+prepare() {
+  cd "$srcdir"/python-gnutls-${pkgver}
+#  patch -p1 <"$srcdir"/libraryinit.patch
+#  patch -p1 <"$srcdir"/libraryfunctions.patch
+}
+
+package() {
+  cd "$srcdir"/python-gnutls-${pkgver}
+  python2 setup.py install --root="$pkgdir"
+}

Copied: python2-gnutls/repos/community-staging-any/libraryfunctions.patch (from 
rev 404789, python2-gnutls/trunk/libraryfunctions.patch)
===
--- community-staging-any/libraryfunctions.patch
(rev 0)
+++ community-staging-any/libraryfunctions.patch2018-11-09 21:55:50 UTC 
(rev 404790)
@@ -0,0 +1,363 @@
+diff -wbBur python-gnutls-2.0.1.org/gnutls/connection.py 
python-gnutls-2.0.1/gnutls/connection.py
+--- python-gnutls-2.0.1.org/gnutls/connection.py   2014-07-02 
15:19:26.0 +0400
 python-gnutls-2.0.1/gnutls/connection.py   2015-04-20 20:23:20.288498813 
+0300
+@@ -24,22 +24,22 @@
+ from gnutls.library.constants import GNUTLS_A_CERTIFICATE_EXPIRED, 
GNUTLS_A_CERTIFICATE_REVOKED
+ from gnutls.library.constants import GNUTLS_NAME_DNS
+ from gnutls.library.types import gnutls_certificate_credentials_t, 
gnutls_session_t, gnutls_x509_crt_t
+-from gnutls.library.types import 
gnutls_certificate_server_retrieve_function
++from gnutls.library.types import gnutls_certificate_retrieve_function2
+ from gnutls.library.functions import *
+ 
+ 
+-@gnutls_certificate_server_retrieve_function
+-def _retrieve_server_certificate(c_session, retr_st):
++@gnutls_certificate_retrieve_function2
++def _retrieve_server_certificate(c_session, a, b, c, d, retr2_st):
+ session = PyObj_FromPtr(gnutls_session_get_ptr(c_session))
+ identity = session.credentials.select_server_identity(session)
+-retr_st.contents.type = GNUTLS_CRT_X509
+-retr_st.contents.deinit_all = 0
++retr2_st.contents.cert_type = GNUTLS_CRT_X509
++retr2_st.contents.deinit_all = 0
+ if identity is None:
+-retr_st.contents.ncerts = 0
++retr2_st.contents.ncerts = 0
+ else:
+-retr_st.contents.ncerts = 1
+-retr_st.contents.cert.x509.contents = identity.cert._c_object
+-retr_st.contents.key.x509 = identity.key._c_object
++retr2_st.contents.ncerts = 1
++retr2_st.contents.cert.x509.contents = identity.cert._c_object
++retr2_st.contents.key.x509 = identity.key._c_object
+ return 0
+ 
+ 
+@@ -91,7 +91,7 @@
+ gnutls_certificate_set_x509_key(self._c_object, 
byref(cert._c_object), 1, key._c_object)
+ elif (cert, key) != (None, None):
+ raise ValueError("Specify neither or both the certificate and 
private key")
+-gnutls_certificate_server_set_retrieve_function(self._c_object, 
_retrieve_server_certificate)
++gnutls_certificate_set_retrieve_function2(self._c_object, 
_retrieve_server_certificate)
+ self._max_depth = 5
+ self._max_bits  = 8200
+ self._type = CRED_CERTIFICATE
+@@ -189,11 +189,14 @@
+ """Select which identity the server will use for a given session. The 
default selection algorithm uses
+ the server name extension. A subclass 

[arch-commits] Commit in python2-gnutls/repos (4 files)

2016-03-10 Thread Sergej Pupykin
Date: Thursday, March 10, 2016 @ 13:29:21
  Author: spupykin
Revision: 165931

archrelease: copy trunk to community-any

Added:
  python2-gnutls/repos/community-any/
  python2-gnutls/repos/community-any/PKGBUILD
(from rev 165930, python2-gnutls/trunk/PKGBUILD)
  python2-gnutls/repos/community-any/libraryfunctions.patch
(from rev 165930, python2-gnutls/trunk/libraryfunctions.patch)
  python2-gnutls/repos/community-any/libraryinit.patch
(from rev 165930, python2-gnutls/trunk/libraryinit.patch)

+
 PKGBUILD   |   30 +++
 libraryfunctions.patch |  363 +++
 libraryinit.patch  |   12 +
 3 files changed, 405 insertions(+)

Copied: python2-gnutls/repos/community-any/PKGBUILD (from rev 165930, 
python2-gnutls/trunk/PKGBUILD)
===
--- community-any/PKGBUILD  (rev 0)
+++ community-any/PKGBUILD  2016-03-10 12:29:21 UTC (rev 165931)
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 74655 2012-08-01 13:54:20Z spupykin $
+# Maintainer: Sergej Pupykin 
+# Maintainer: Hugo Doria 
+# Contributor: N3RD3X 
+
+pkgname=python2-gnutls
+pkgver=3.0.0
+pkgrel=1
+pkgdesc="Python wrapper for the GNUTLS library"
+arch=('any')
+url="http://cheeseshop.python.org/pypi/python-gnutls;
+depends=('python2' 'gnutls' 'libgcrypt')
+license=('LGPL')
+source=(http://pypi.python.org/packages/source/p/python-gnutls/python-gnutls-${pkgver}.tar.gz
+   libraryinit.patch
+   libraryfunctions.patch)
+md5sums=('bea3c2452ed3e92b2c58c62b0d8b5ea0'
+ 'cf61e4cb5a8e1ef1a96384aed0c0670a'
+ 'ed930abe1554dd53a7f6f14747496f2e')
+
+prepare() {
+  cd ${srcdir}/python-gnutls-${pkgver}
+#  patch -p1 <$srcdir/libraryinit.patch
+#  patch -p1 <$srcdir/libraryfunctions.patch
+}
+
+package() {
+  cd ${srcdir}/python-gnutls-${pkgver}
+  python2 setup.py install --root=${pkgdir}
+}

Copied: python2-gnutls/repos/community-any/libraryfunctions.patch (from rev 
165930, python2-gnutls/trunk/libraryfunctions.patch)
===
--- community-any/libraryfunctions.patch(rev 0)
+++ community-any/libraryfunctions.patch2016-03-10 12:29:21 UTC (rev 
165931)
@@ -0,0 +1,363 @@
+diff -wbBur python-gnutls-2.0.1.org/gnutls/connection.py 
python-gnutls-2.0.1/gnutls/connection.py
+--- python-gnutls-2.0.1.org/gnutls/connection.py   2014-07-02 
15:19:26.0 +0400
 python-gnutls-2.0.1/gnutls/connection.py   2015-04-20 20:23:20.288498813 
+0300
+@@ -24,22 +24,22 @@
+ from gnutls.library.constants import GNUTLS_A_CERTIFICATE_EXPIRED, 
GNUTLS_A_CERTIFICATE_REVOKED
+ from gnutls.library.constants import GNUTLS_NAME_DNS
+ from gnutls.library.types import gnutls_certificate_credentials_t, 
gnutls_session_t, gnutls_x509_crt_t
+-from gnutls.library.types import 
gnutls_certificate_server_retrieve_function
++from gnutls.library.types import gnutls_certificate_retrieve_function2
+ from gnutls.library.functions import *
+ 
+ 
+-@gnutls_certificate_server_retrieve_function
+-def _retrieve_server_certificate(c_session, retr_st):
++@gnutls_certificate_retrieve_function2
++def _retrieve_server_certificate(c_session, a, b, c, d, retr2_st):
+ session = PyObj_FromPtr(gnutls_session_get_ptr(c_session))
+ identity = session.credentials.select_server_identity(session)
+-retr_st.contents.type = GNUTLS_CRT_X509
+-retr_st.contents.deinit_all = 0
++retr2_st.contents.cert_type = GNUTLS_CRT_X509
++retr2_st.contents.deinit_all = 0
+ if identity is None:
+-retr_st.contents.ncerts = 0
++retr2_st.contents.ncerts = 0
+ else:
+-retr_st.contents.ncerts = 1
+-retr_st.contents.cert.x509.contents = identity.cert._c_object
+-retr_st.contents.key.x509 = identity.key._c_object
++retr2_st.contents.ncerts = 1
++retr2_st.contents.cert.x509.contents = identity.cert._c_object
++retr2_st.contents.key.x509 = identity.key._c_object
+ return 0
+ 
+ 
+@@ -91,7 +91,7 @@
+ gnutls_certificate_set_x509_key(self._c_object, 
byref(cert._c_object), 1, key._c_object)
+ elif (cert, key) != (None, None):
+ raise ValueError("Specify neither or both the certificate and 
private key")
+-gnutls_certificate_server_set_retrieve_function(self._c_object, 
_retrieve_server_certificate)
++gnutls_certificate_set_retrieve_function2(self._c_object, 
_retrieve_server_certificate)
+ self._max_depth = 5
+ self._max_bits  = 8200
+ self._type = CRED_CERTIFICATE
+@@ -189,11 +189,14 @@
+ """Select which identity the server will use for a given session. The 
default selection algorithm uses
+ the server name extension. A subclass can overwrite it if a different 
selection algorithm is desired."""
+