From sbrabez@gmail.com  Wed Jan 13 14:51:57 2010
Return-Path: <sbrabez@gmail.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9E985106566B;
	Wed, 13 Jan 2010 14:51:57 +0000 (UTC)
	(envelope-from sbrabez@gmail.com)
Received: from mx2.wallix.com (mx2.wallix.com [84.14.156.235])
	by mx1.freebsd.org (Postfix) with ESMTP id C77BC8FC0C;
	Wed, 13 Jan 2010 14:51:56 +0000 (UTC)
Received: from localhost (localhost.localdomain [127.0.0.1])
	by mx2.wallix.com (Postfix) with ESMTP id 5ECA024500AA;
	Wed, 13 Jan 2010 15:51:55 +0100 (CET)
Received: from mx2.wallix.com ([127.0.0.1])
	by localhost (com.ifr.lan [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id kgXG0XuKQY4k; Wed, 13 Jan 2010 15:51:51 +0100 (CET)
Received: from zimbra.ifr.lan (zimbra.ifr.lan [10.10.1.211])
	by mx2.wallix.com (Postfix) with ESMTP id 5B9F024500A5;
	Wed, 13 Jan 2010 15:51:51 +0100 (CET)
Received: from localhost (net4-id84.ifr.lan [10.10.4.84])
	by zimbra.ifr.lan (Postfix) with ESMTP id 480FDA0001F;
	Wed, 13 Jan 2010 15:51:51 +0100 (CET)
Message-Id: <20100113145151.480FDA0001F@zimbra.ifr.lan>
Date: Wed, 13 Jan 2010 15:51:51 +0100 (CET)
From: Sofian Brabez <sbrabez@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: perky@FreeBSD.org
Subject: [patch] security/py-openssl: update to 0.10
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         142784
>Category:       ports
>Synopsis:       [patch] security/py-openssl: update to 0.10
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    perky
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 13 15:00:07 UTC 2010
>Closed-Date:    Thu Feb 18 10:55:17 UTC 2010
>Last-Modified:  Thu Feb 18 11:00:05 UTC 2010
>Originator:     Sofian Brabez
>Release:        FreeBSD 7.2-STABLE i386
>Organization:
>Environment:
System: FreeBSD freebsd.ifr.lan 7.2-STABLE FreeBSD 7.2-STABLE #2: Thu Nov 19 01:59:45 CET 2009
>Description:
- Update to 0.10
- Respect NOPORTEXAMPLES
- Remove unnecessary patch, it is now applied upstream

Removed file(s):
- files/patch-threading

Port maintainer (perky@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:

--- py26-openssl-0.10.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/security/py-openssl/Makefile /tmp/py-openssl/Makefile
--- /usr/ports/security/py-openssl/Makefile	2009-08-22 02:35:03.000000000 +0200
+++ /tmp/py-openssl/Makefile	2010-01-13 15:38:59.000000000 +0100
@@ -7,10 +7,9 @@
 #
 
 PORTNAME=	openssl
-PORTVERSION=	0.8
-PORTREVISION=	1
+PORTVERSION=	0.10
 CATEGORIES=	security python
-MASTER_SITES=	SF/py${PORTNAME}/py${PORTNAME}/${PORTVERSION}
+MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 DISTNAME=	pyOpenSSL-${PORTVERSION}
 
@@ -23,9 +22,17 @@
 PYDISTUTILS_PKGNAME=	pyOpenSSL
 USE_OPENSSL=	yes
 
+EXAMPLESDIR=	${PREFIX}/share/examples/py-${PORTNAME}
+
 pre-configure:
 	@${ECHO_CMD} "[build_ext]" >> ${WRKSRC}/setup.cfg
 	@${ECHO_CMD} "include-dirs = ${OPENSSLINC}" >> ${WRKSRC}/setup.cfg
 	@${ECHO_CMD} "library-dirs = ${OPENSSLLIB}" >> ${WRKSRC}/setup.cfg
 
+.if !defined(NOPORTEXAMPLES)
+post-install:
+	${MKDIR} ${EXAMPLESDIR}
+	(cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} \* ${EXAMPLESDIR})
+.endif
+
 .include <bsd.port.mk>
diff -ruN --exclude=CVS /usr/ports/security/py-openssl/distinfo /tmp/py-openssl/distinfo
--- /usr/ports/security/py-openssl/distinfo	2008-12-04 11:33:13.000000000 +0100
+++ /tmp/py-openssl/distinfo	2010-01-13 15:07:42.000000000 +0100
@@ -1,3 +1,3 @@
-MD5 (pyOpenSSL-0.8.tar.gz) = 00377690f224d9e59c833fb0459603f4
-SHA256 (pyOpenSSL-0.8.tar.gz) = 2284411d21f1031f08f23c4f49dc0a341e38b07833495d0fe21a87eb25f3ffe3
-SIZE (pyOpenSSL-0.8.tar.gz) = 193035
+MD5 (pyOpenSSL-0.10.tar.gz) = 34db8056ec53ce80c7f5fc58bee9f093
+SHA256 (pyOpenSSL-0.10.tar.gz) = 4514f8960389042ca2587f9cb801a13f7990387753fc678680b0c084719b5b60
+SIZE (pyOpenSSL-0.10.tar.gz) = 222169
diff -ruN --exclude=CVS /usr/ports/security/py-openssl/files/patch-threading /tmp/py-openssl/files/patch-threading
--- /usr/ports/security/py-openssl/files/patch-threading	2009-02-11 02:52:18.000000000 +0100
+++ /tmp/py-openssl/files/patch-threading	1970-01-01 01:00:00.000000000 +0100
@@ -1,241 +0,0 @@
-
-$FreeBSD: ports/security/py-openssl/files/patch-threading,v 1.1 2009/02/11 01:52:18 sobomax Exp $
-
-This patch fixes an issue in the py-openssl package that can lead to
-interpreter crash with the following error code:
-
-Fatal Python error: ceval: tstate mix-up
-Abort trap: 6 (core dumped)
-
-Detailed explanation and analysis can be found here:
-
-https://sourceforge.net/tracker2/?func=detail&aid=2543118&group_id=31249&atid=401760 
-
---- src/ssl/connection.c.orig
-+++ src/ssl/connection.c
-@@ -260,9 +260,9 @@
-     if (!PyArg_ParseTuple(args, "s#|i:send", &buf, &len, &flags))
-         return NULL;
- 
--    MY_BEGIN_ALLOW_THREADS(self->tstate)
-+    MY_BEGIN_ALLOW_THREADS(self->context)
-     ret = SSL_write(self->ssl, buf, len);
--    MY_END_ALLOW_THREADS(self->tstate)
-+    MY_END_ALLOW_THREADS(self->context)
- 
-     if (PyErr_Occurred())
-     {
-@@ -305,9 +305,9 @@
-         return NULL;
- 
-     do {
--        MY_BEGIN_ALLOW_THREADS(self->tstate)
-+        MY_BEGIN_ALLOW_THREADS(self->context)
-         ret = SSL_write(self->ssl, buf, len);
--        MY_END_ALLOW_THREADS(self->tstate)
-+        MY_END_ALLOW_THREADS(self->context)
-         if (PyErr_Occurred())
-         {
-             flush_error_queue();
-@@ -358,9 +358,9 @@
-     if (buf == NULL)
-         return NULL;
- 
--    MY_BEGIN_ALLOW_THREADS(self->tstate)
-+    MY_BEGIN_ALLOW_THREADS(self->context)
-     ret = SSL_read(self->ssl, PyString_AsString(buf), bufsiz);
--    MY_END_ALLOW_THREADS(self->tstate)
-+    MY_END_ALLOW_THREADS(self->context)
- 
-     if (PyErr_Occurred())
-     {
-@@ -399,9 +399,9 @@
-     if (!PyArg_ParseTuple(args, ":renegotiate"))
-         return NULL;
- 
--    MY_BEGIN_ALLOW_THREADS(self->tstate);
-+    MY_BEGIN_ALLOW_THREADS(self->context);
-     ret = SSL_renegotiate(self->ssl);
--    MY_END_ALLOW_THREADS(self->tstate);
-+    MY_END_ALLOW_THREADS(self->context);
- 
-     if (PyErr_Occurred())
-     {
-@@ -428,9 +428,9 @@
-     if (!PyArg_ParseTuple(args, ":do_handshake"))
-         return NULL;
- 
--    MY_BEGIN_ALLOW_THREADS(self->tstate);
-+    MY_BEGIN_ALLOW_THREADS(self->context);
-     ret = SSL_do_handshake(self->ssl);
--    MY_END_ALLOW_THREADS(self->tstate);
-+    MY_END_ALLOW_THREADS(self->context);
- 
-     if (PyErr_Occurred())
-     {
-@@ -643,9 +643,9 @@
-     if (!PyArg_ParseTuple(args, ":shutdown"))
-         return NULL;
- 
--    MY_BEGIN_ALLOW_THREADS(self->tstate)
-+    MY_BEGIN_ALLOW_THREADS(self->context)
-     ret = SSL_shutdown(self->ssl);
--    MY_END_ALLOW_THREADS(self->tstate)
-+    MY_END_ALLOW_THREADS(self->context)
- 
-     if (PyErr_Occurred())
-     {
-@@ -969,8 +969,6 @@
-     Py_INCREF(Py_None);
-     self->app_data = Py_None;
- 
--    self->tstate = NULL;
--
-     fd = PyObject_AsFileDescriptor(self->socket);
-     if (fd < 0)
-     {
-
-$FreeBSD: ports/security/py-openssl/files/patch-threading,v 1.1 2009/02/11 01:52:18 sobomax Exp $
-
---- src/ssl/context.c.orig
-+++ src/ssl/context.c
-@@ -80,7 +80,7 @@
-      * we invoke might segfault or blow up the sun.  The reverse will be done
-      * before returning.
-      */
--    MY_END_ALLOW_THREADS(ctx->tstate);
-+    MY_END_ALLOW_THREADS(ctx);
- 
-     /* The Python callback is called with a (maxlen,verify,userdata) tuple */
-     argv = Py_BuildValue("(iiO)", maxlen, verify, ctx->passphrase_userdata);
-@@ -136,7 +136,7 @@
-     /*
-      * This function is returning into OpenSSL.  Release the GIL again.
-      */
--    MY_BEGIN_ALLOW_THREADS(ctx->tstate);
-+    MY_BEGIN_ALLOW_THREADS(ctx);
-     return len;
- }
- 
-@@ -162,7 +162,7 @@
-     ssl = (SSL *)X509_STORE_CTX_get_app_data(x509_ctx);
-     conn = (ssl_ConnectionObj *)SSL_get_app_data(ssl);
- 
--    MY_END_ALLOW_THREADS(conn->tstate);
-+    MY_END_ALLOW_THREADS(conn->context);
- 
-     cert = crypto_X509_New(X509_STORE_CTX_get_current_cert(x509_ctx), 0);
-     errnum = X509_STORE_CTX_get_error(x509_ctx);
-@@ -182,7 +182,7 @@
-         c_ret = 0;
-     }
- 
--    MY_BEGIN_ALLOW_THREADS(conn->tstate);
-+    MY_BEGIN_ALLOW_THREADS(conn->context);
-     return c_ret;
- }
- 
-@@ -207,7 +207,7 @@
-      * we invoke might segfault or blow up the sun.  The reverse will be done
-      * before returning.
-      */
--    MY_END_ALLOW_THREADS(conn->tstate);
-+    MY_END_ALLOW_THREADS(conn->context);
- 
-     argv = Py_BuildValue("(Oii)", (PyObject *)conn, where, _ret);
-     ret = PyEval_CallObject(conn->context->info_callback, argv);
-@@ -225,7 +225,7 @@
-     /*
-      * This function is returning into OpenSSL.  Release the GIL again.
-      */
--    MY_BEGIN_ALLOW_THREADS(conn->tstate);
-+    MY_BEGIN_ALLOW_THREADS(conn->context);
-     return;
- }
- 
-@@ -478,9 +478,9 @@
-     if (!PyArg_ParseTuple(args, "s|i:use_privatekey_file", &keyfile, &filetype))
-         return NULL;
- 
--    MY_BEGIN_ALLOW_THREADS(self->tstate);
-+    MY_BEGIN_ALLOW_THREADS(self);
-     ret = SSL_CTX_use_PrivateKey_file(self->ctx, keyfile, filetype);
--    MY_END_ALLOW_THREADS(self->tstate);
-+    MY_END_ALLOW_THREADS(self);
- 
-     if (PyErr_Occurred())
-     {
-
-$FreeBSD: ports/security/py-openssl/files/patch-threading,v 1.1 2009/02/11 01:52:18 sobomax Exp $
-
---- src/ssl/ssl.c
-+++ src/ssl/ssl.c
-@@ -32,8 +32,6 @@
- 
- void **crypto_API;
- 
--int _pyOpenSSL_tstate_key;
--
- /* Exceptions defined by the SSL submodule */
- PyObject *ssl_Error,                   /* Base class              */
-          *ssl_ZeroReturnError,         /* Used with SSL_get_error */
-@@ -203,13 +201,6 @@
-     if (!init_ssl_connection(dict))
-         goto error;
- 
--#ifdef WITH_THREAD
--    /*
--     * Initialize this module's threading support structures.
--     */
--    _pyOpenSSL_tstate_key = PyThread_create_key();
--#endif
--
-   error:
-     ;
- }
-
-$FreeBSD: ports/security/py-openssl/files/patch-threading,v 1.1 2009/02/11 01:52:18 sobomax Exp $
-
---- src/ssl/ssl.h
-+++ src/ssl/ssl.h
-@@ -46,10 +46,6 @@
- 
- #define ssl_API_pointers          2
- 
--#ifdef WITH_THREAD
--extern int _pyOpenSSL_tstate_key;
--#endif /* WITH_THREAD */
--
- #ifdef SSL_MODULE
- 
- extern ssl_Context_New_RETURN    ssl_Context_New    ssl_Context_New_PROTO;
-
-$FreeBSD: ports/security/py-openssl/files/patch-threading,v 1.1 2009/02/11 01:52:18 sobomax Exp $
-
---- src/util.h.orig
-+++ src/util.h
-@@ -36,18 +36,18 @@
-  * in this thread can get it, if it needs to restore the threadstate to run
-  * some Python.
-  */
--#  define MY_BEGIN_ALLOW_THREADS(ignored)                               \
--    PyThread_set_key_value(_pyOpenSSL_tstate_key, PyEval_SaveThread());
-+#  define MY_BEGIN_ALLOW_THREADS(context)                               \
-+    (context)->tstate = PyEval_SaveThread();
- 
- /*
-  * Get the previous Python threadstate and restore it.
-  */
--#  define MY_END_ALLOW_THREADS(ignored)                                 \
--    PyEval_RestoreThread(PyThread_get_key_value(_pyOpenSSL_tstate_key));
-+#  define MY_END_ALLOW_THREADS(context)                                 \
-+    PyEval_RestoreThread((context)->tstate);
- 
- #else
--#  define MY_BEGIN_ALLOW_THREADS(st)
--#  define MY_END_ALLOW_THREADS(st)      { st = NULL; }
-+#  define MY_BEGIN_ALLOW_THREADS(context)
-+#  define MY_END_ALLOW_THREADS(context)      { (context)->tstate = NULL; }
- #endif
- 
- #if !defined(PY_MAJOR_VERSION) || PY_VERSION_HEX < 0x02000000
diff -ruN --exclude=CVS /usr/ports/security/py-openssl/pkg-plist /tmp/py-openssl/pkg-plist
--- /usr/ports/security/py-openssl/pkg-plist	2008-10-31 04:33:27.000000000 +0100
+++ /tmp/py-openssl/pkg-plist	2010-01-13 15:42:50.000000000 +0100
@@ -10,9 +10,15 @@
 %%PYTHON_SITELIBDIR%%/OpenSSL/test/test_crypto.py
 %%PYTHON_SITELIBDIR%%/OpenSSL/test/test_crypto.pyc
 %%PYTHON_SITELIBDIR%%/OpenSSL/test/test_crypto.pyo
+%%PYTHON_SITELIBDIR%%/OpenSSL/test/test_rand.py
+%%PYTHON_SITELIBDIR%%/OpenSSL/test/test_rand.pyc
+%%PYTHON_SITELIBDIR%%/OpenSSL/test/test_rand.pyo
 %%PYTHON_SITELIBDIR%%/OpenSSL/test/test_ssl.py
 %%PYTHON_SITELIBDIR%%/OpenSSL/test/test_ssl.pyc
 %%PYTHON_SITELIBDIR%%/OpenSSL/test/test_ssl.pyo
+%%PYTHON_SITELIBDIR%%/OpenSSL/test/util.py
+%%PYTHON_SITELIBDIR%%/OpenSSL/test/util.pyo
+%%PYTHON_SITELIBDIR%%/OpenSSL/test/util.pyc
 %%PYTHON_SITELIBDIR%%/OpenSSL/tsafe.py
 %%PYTHON_SITELIBDIR%%/OpenSSL/tsafe.pyc
 %%PYTHON_SITELIBDIR%%/OpenSSL/tsafe.pyo
@@ -21,3 +27,13 @@
 %%PYTHON_SITELIBDIR%%/OpenSSL/version.pyo
 @dirrm %%PYTHON_SITELIBDIR%%/OpenSSL/test
 @dirrm %%PYTHON_SITELIBDIR%%/OpenSSL
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/README
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/simple/README
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/simple/client.py
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/simple/server.py
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/SecureXMLRPCServer.py
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/certgen.py
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mk_simple_certs.py
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%//proxy.py
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/simple
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
--- py26-openssl-0.10.patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->perky 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Jan 13 15:00:18 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=142784 
State-Changed-From-To: open->closed 
State-Changed-By: gahr 
State-Changed-When: Thu Feb 18 10:55:16 UTC 2010 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=142784 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/142784: commit references a PR
Date: Thu, 18 Feb 2010 10:54:54 +0000 (UTC)

 gahr        2010-02-18 10:54:41 UTC
 
   FreeBSD ports repository
 
   Modified files:
     security/py-openssl  Makefile distinfo pkg-plist 
   Removed files:
     security/py-openssl/files patch-threading 
   Log:
   - Update to 0.10
   - Respect NOPORTEXAMPLES
   - Remove unnecessary patch, it is now applied upstream
   
   PR:             142784
   Submitted by:   Sofian Brabez <sbrabez@gmail.com>
   Approved by:    maintainer timeout (more than 1 month)
   Feature safe:   yes
   
   Revision  Changes    Path
   1.13      +10 -3     ports/security/py-openssl/Makefile
   1.9       +3 -3      ports/security/py-openssl/distinfo
   1.2       +0 -241    ports/security/py-openssl/files/patch-threading (dead)
   1.6       +16 -0     ports/security/py-openssl/pkg-plist
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
