Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (fdb9f64d8d8e9254f08774fa5e279add8ee815a1)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Vlad Glagolev <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (fdb9f64d8d8e9254f08774fa5e279add8ee815a1)
  • Date: Fri, 6 Mar 2015 03:59:55 -0600

GIT changes to master grimoire by Vlad Glagolev <stealth AT sourcemage.org>:

devel/python/HISTORY | 4 ++
devel/python/PRE_BUILD | 11 ++++-
devel/python/libressl.patch | 83
++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 96 insertions(+), 2 deletions(-)

New commits:
commit fdb9f64d8d8e9254f08774fa5e279add8ee815a1
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

python: fixed build with libressl

diff --git a/devel/python/HISTORY b/devel/python/HISTORY
index 3dbb794..1f58bcf 100644
--- a/devel/python/HISTORY
+++ b/devel/python/HISTORY
@@ -1,3 +1,7 @@
+2015-03-06 Vlad Glagolev <stealth AT sourcemage.org>
+ * PRE_BUILD: apply a patch; quoting paths
+ * libressl.patch: added, backported official patch from OpenBSD
+
2014-12-11 Vlad Glagolev <stealth AT sourcemage.org>
* DETAILS: updated spell to 2.7.9; SECURITY_PATCH++ (CVE-2013-1753,
CVE-2013-1752, CVE-2013-1752)
diff --git a/devel/python/PRE_BUILD b/devel/python/PRE_BUILD
index ee53ba4..e5c77c5 100755
--- a/devel/python/PRE_BUILD
+++ b/devel/python/PRE_BUILD
@@ -1,4 +1,11 @@
-default_pre_build &&
-cd $SOURCE_DIRECTORY/Lib &&
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+
+# the patch drops EGD support for LibreSSL, so make it optional
+if is_depends_enabled $SPELL $(get_spell_provider $SPELL SSL) && [[
$(get_spell_provider $SPELL SSL) == "libressl" ]]; then
+ patch -p0 < "$SPELL_DIRECTORY/libressl.patch"
+fi &&
+
+cd "$SOURCE_DIRECTORY/Lib" &&

cp -R plat-linux2 plat-linux3
diff --git a/devel/python/libressl.patch b/devel/python/libressl.patch
new file mode 100644
index 0000000..82cea83
--- /dev/null
+++ b/devel/python/libressl.patch
@@ -0,0 +1,83 @@
+$OpenBSD: patch-Lib_ssl_py,v 1.2 2014/12/14 08:32:55 rpointel Exp $
+--- Lib/ssl.py.orig Wed Dec 10 16:59:40 2014
++++ Lib/ssl.py Sat Dec 13 12:15:08 2014
+@@ -106,7 +106,7 @@ from _ssl import CERT_NONE, CERT_OPTIONAL, CERT_REQUIR
+ from _ssl import (VERIFY_DEFAULT, VERIFY_CRL_CHECK_LEAF,
VERIFY_CRL_CHECK_CHAIN,
+ VERIFY_X509_STRICT)
+ from _ssl import txt2obj as _txt2obj, nid2obj as _nid2obj
+-from _ssl import RAND_status, RAND_egd, RAND_add
++from _ssl import RAND_status, RAND_add
+
+ def _import_symbols(prefix):
+ for n in dir(_ssl):
+$OpenBSD: patch-Modules__ssl_c,v 1.3 2014/12/14 08:32:55 rpointel Exp $
+--- Modules/_ssl.c.orig Wed Dec 10 16:59:53 2014
++++ Modules/_ssl.c Sat Dec 13 12:16:17 2014
+@@ -3301,32 +3301,6 @@ Returns 1 if the OpenSSL PRNG has been seeded with eno
+ It is necessary to seed the PRNG with RAND_add() on some platforms before\n\
+ using the ssl() function.");
+
+-static PyObject *
+-PySSL_RAND_egd(PyObject *self, PyObject *arg)
+-{
+- int bytes;
+-
+- if (!PyString_Check(arg))
+- return PyErr_Format(PyExc_TypeError,
+- "RAND_egd() expected string, found %s",
+- Py_TYPE(arg)->tp_name);
+- bytes = RAND_egd(PyString_AS_STRING(arg));
+- if (bytes == -1) {
+- PyErr_SetString(PySSLErrorObject,
+- "EGD connection failed or EGD did not return "
+- "enough data to seed the PRNG");
+- return NULL;
+- }
+- return PyInt_FromLong(bytes);
+-}
+-
+-PyDoc_STRVAR(PySSL_RAND_egd_doc,
+-"RAND_egd(path) -> bytes\n\
+-\n\
+-Queries the entropy gather daemon (EGD) on the socket named by 'path'.\n\
+-Returns number of bytes read. Raises SSLError if connection to EGD\n\
+-fails or if it does not provide enough data to seed PRNG.");
+-
+ #endif /* HAVE_OPENSSL_RAND */
+
+
+@@ -3720,8 +3694,6 @@ static PyMethodDef PySSL_methods[] = {
+ #ifdef HAVE_OPENSSL_RAND
+ {"RAND_add", PySSL_RAND_add, METH_VARARGS,
+ PySSL_RAND_add_doc},
+- {"RAND_egd", PySSL_RAND_egd, METH_VARARGS,
+- PySSL_RAND_egd_doc},
+ {"RAND_status", (PyCFunction)PySSL_RAND_status, METH_NOARGS,
+ PySSL_RAND_status_doc},
+ #endif
+$OpenBSD: patch-Lib_socket_py,v 1.1 2014/04/19 14:17:47 espie Exp $
+--- Lib/socket.py.orig Sat Apr 19 16:07:48 2014
++++ Lib/socket.py Sat Apr 19 16:07:54 2014
+@@ -67,7 +67,6 @@ else:
+ from _ssl import SSLError as sslerror
+ from _ssl import \
+ RAND_add, \
+- RAND_egd, \
+ RAND_status, \
+ SSL_ERROR_ZERO_RETURN, \
+ SSL_ERROR_WANT_READ, \
+$OpenBSD: patch-Lib_test_test_ssl_py,v 1.2 2014/12/14 08:32:55 rpointel Exp $
+
+No RAND_egd on OpenBSD.
+
+--- Lib/test/test_ssl.py.orig Wed Dec 10 16:59:47 2014
++++ Lib/test/test_ssl.py Sat Dec 13 12:13:40 2014
+@@ -169,8 +169,6 @@ class BasicSocketTests(unittest.TestCase):
+ sys.stdout.write("\n RAND_status is %d (%s)\n"
+ % (v, (v and "sufficient randomness") or
+ "insufficient randomness"))
+- self.assertRaises(TypeError, ssl.RAND_egd, 1)
+- self.assertRaises(TypeError, ssl.RAND_egd, 'foo', 1)
+ ssl.RAND_add("this is a random string", 75.0)
+
+ def test_parse_cert(self):



  • [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (fdb9f64d8d8e9254f08774fa5e279add8ee815a1), Vlad Glagolev, 03/06/2015

Archive powered by MHonArc 2.6.24.

Top of Page