Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Dec 2015 12:06:30 +0000 (UTC)
From:      Bernard Spil <brnrd@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r404347 - in head/lang: python-doc-html python33 python33/files
Message-ID:  <201512241206.tBOC6UYk038028@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brnrd
Date: Thu Dec 24 12:06:30 2015
New Revision: 404347
URL: https://svnweb.freebsd.org/changeset/ports/404347

Log:
  lang/python33: Update to 3.3.6
  
    - Update to 3.3.6 (released 2014-10-11)
    - Backport issue21356 RAND_egd fix [1]
    - Fix build for openssl -nossl3
    - Remove unixcompiler patch, included upstream
    - Switch regression-test to TEST_TARGET/TEST_ARGS
    - Mark DEPRECATED, EXPIRES Sept 2017 [2]
  
  [1] http://bugs.python.org/issue21356
  [2] https://www.python.org/dev/peps/pep-0398/#lifespan
  
  This is a bug/security fix update. Changelog:
  
    https://docs.python.org/3.3/whatsnew/changelog.html#python-3-3-6
  
  PR:		195511
  Reviewed by:	koobs (mentor, python), feld, miwi, AMDmi3
  Approved by:	koobs (python), miwi, AMDmi3
  Differential_Revision:	https://reviews.freebsd.org/D4695

Added:
  head/lang/python33/files/patch-PR195511   (contents, props changed)
Deleted:
  head/lang/python33/files/patch-Lib__distutils__unixccompiler.py
Modified:
  head/lang/python-doc-html/distinfo
  head/lang/python33/Makefile
  head/lang/python33/distinfo
  head/lang/python33/pkg-plist

Modified: head/lang/python-doc-html/distinfo
==============================================================================
--- head/lang/python-doc-html/distinfo	Thu Dec 24 11:49:48 2015	(r404346)
+++ head/lang/python-doc-html/distinfo	Thu Dec 24 12:06:30 2015	(r404347)
@@ -14,14 +14,14 @@ SHA256 (python/python-3.2.6-docs-pdf-let
 SIZE (python/python-3.2.6-docs-pdf-letter.tar.bz2) = 10418952
 SHA256 (python/python-3.2.6-docs-text.tar.bz2) = 889a9f5358d0ded2f2c4b1027967c4b8ec0e99cf57eddefa038f2a0abba7fe88
 SIZE (python/python-3.2.6-docs-text.tar.bz2) = 1573432
-SHA256 (python/python-3.3.4-docs-html.tar.bz2) = 43ab01c98d5bacb301519a99ed25192cebe0b69ac4a85b95302958b225868efc
-SIZE (python/python-3.3.4-docs-html.tar.bz2) = 4951380
-SHA256 (python/python-3.3.4-docs-pdf-a4.tar.bz2) = 692eb7dd255b12252c701ca32f530932d3761e4f0582b7461c8277cd70282251
-SIZE (python/python-3.3.4-docs-pdf-a4.tar.bz2) = 11284079
-SHA256 (python/python-3.3.4-docs-pdf-letter.tar.bz2) = 21aabe30ad03ef4c78e57b14fa257670ea8899ae053cc709805d7807efe58b7a
-SIZE (python/python-3.3.4-docs-pdf-letter.tar.bz2) = 11337167
-SHA256 (python/python-3.3.4-docs-text.tar.bz2) = 82c98238d9df22650d27f3bff40b31888306aaf5f7636bbb145f94266365f273
-SIZE (python/python-3.3.4-docs-text.tar.bz2) = 1783407
+SHA256 (python/python-3.3.6-docs-html.tar.bz2) = 54da33f8a91be819e7ac22fdc88c5125bdd4c67494f52dd79d6b603572c41fb0
+SIZE (python/python-3.3.6-docs-html.tar.bz2) = 4961517
+SHA256 (python/python-3.3.6-docs-pdf-a4.tar.bz2) = 5a031f0abfe41121f9aa883cfb8a99e36363744c486d30d97a9bcf4c0b7a634b
+SIZE (python/python-3.3.6-docs-pdf-a4.tar.bz2) = 11298923
+SHA256 (python/python-3.3.6-docs-pdf-letter.tar.bz2) = 3b01fdbb8c8589e247677313cedb65837cdd1c68ce29d0a62c8b35790d2a2da3
+SIZE (python/python-3.3.6-docs-pdf-letter.tar.bz2) = 11343796
+SHA256 (python/python-3.3.6-docs-text.tar.bz2) = 1b4ddbdd83658846fe968e282c7873f8c58e41d892bc7e54cdf20c1435e8bed7
+SIZE (python/python-3.3.6-docs-text.tar.bz2) = 1779902
 SHA256 (python/python-3.4.3-docs-html.tar.bz2) = 87d4f8739205fe6f2cbcb10c6f1b33546d3b7f41e6bc96de34f992ccf5c10fbf
 SIZE (python/python-3.4.3-docs-html.tar.bz2) = 5444773
 SHA256 (python/python-3.4.3-docs-text.tar.bz2) = 03f851f8d078680fccff67a9bedbc698c5e4b5bdd25477e9a6b397080ef46ce2

Modified: head/lang/python33/Makefile
==============================================================================
--- head/lang/python33/Makefile	Thu Dec 24 11:49:48 2015	(r404346)
+++ head/lang/python33/Makefile	Thu Dec 24 12:06:30 2015	(r404347)
@@ -1,8 +1,7 @@
 # $FreeBSD$
 
 PORTNAME=	python33
-PORTVERSION=	3.3.5
-PORTREVISION=	8
+PORTVERSION=	3.3.6
 CATEGORIES=	lang python ipv6
 MASTER_SITES=	PYTHON/ftp/python/${PORTVERSION}
 DISTNAME=	Python-${PORTVERSION}
@@ -13,6 +12,9 @@ COMMENT=	Interpreted object-oriented pro
 
 LICENSE=	PSFL
 
+DEPRECATED=	No longer receives bug fixes, only security updates. Please update to Python 3.5
+EXPIRATION_DATE=	2017-09-01
+
 USES=		cpe ncurses pkgconfig readline tar:xz
 USE_OPENSSL=	yes
 USE_LDCONFIG=	yes
@@ -30,6 +32,9 @@ MAKE_ARGS+=		INSTALL_SHARED="${INSTALL_L
 MAKE_ARGS+=		LIBPC="${PREFIX}/libdata/pkgconfig"			# Until pathfix gets support for files other than Makefile.in
 MAKE_JOBS_UNSAFE=	yes							# Parser/pgen build bug. See Issue: 200622, 201974
 
+TEST_TARGET=		buildbottest
+TEST_ARGS=		TESTOPTS=-j${MAKE_JOBS_NUMBER}
+
 SUB_FILES=		pkg-message
 SUB_LIST=		PYTHON_SUFFIX=${PORTVERSION:R:S/.//g}
 
@@ -113,7 +118,4 @@ post-install:
 	for i in ${STAGEDIR}${PREFIX}/lib/python3.3/lib-dynload/*.so; do \
 		${STRIP_CMD} $$i; done								# Strip shared extensions
 
-regression-test: build
-	@cd ${WRKSRC} && ${MAKE} TESTOPTS=-j${MAKE_JOBS_NUMBER} buildbottest
-
 .include <bsd.port.mk>

Modified: head/lang/python33/distinfo
==============================================================================
--- head/lang/python33/distinfo	Thu Dec 24 11:49:48 2015	(r404346)
+++ head/lang/python33/distinfo	Thu Dec 24 12:06:30 2015	(r404347)
@@ -1,2 +1,2 @@
-SHA256 (python/Python-3.3.5.tar.xz) = abe99b484434503d8b23be0f243ec27139e743a4798cd71c1dce3cf40e63b6e5
-SIZE (python/Python-3.3.5.tar.xz) = 12116308
+SHA256 (python/Python-3.3.6.tar.xz) = 5226e4bf7a530c3ff2bcde0c94e0e09e59a8bcde0114fe0268bc925bdabb5d3f
+SIZE (python/Python-3.3.6.tar.xz) = 12116460

Added: head/lang/python33/files/patch-PR195511
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/python33/files/patch-PR195511	Thu Dec 24 12:06:30 2015	(r404347)
@@ -0,0 +1,166 @@
+--- Modules/_ssl.c.orig	2014-03-09 09:40:26.000000000 +0100
++++ Modules/_ssl.c	2015-09-26 15:53:49.266985391 +0200
+@@ -1746,8 +1746,10 @@ context_new(PyTypeObject *type, PyObject
+     PySSL_BEGIN_ALLOW_THREADS
+     if (proto_version == PY_SSL_VERSION_TLS1)
+         ctx = SSL_CTX_new(TLSv1_method());
++#ifndef OPENSSL_NO_SSL3
+     else if (proto_version == PY_SSL_VERSION_SSL3)
+         ctx = SSL_CTX_new(SSLv3_method());
++#endif
+ #ifndef OPENSSL_NO_SSL2
+     else if (proto_version == PY_SSL_VERSION_SSL2)
+         ctx = SSL_CTX_new(SSLv2_method());
+@@ -2559,6 +2561,9 @@ Returns 1 if the OpenSSL PRNG has been s
+ It is necessary to seed the PRNG with RAND_add() on some platforms before\n\
+ using the ssl() function.");
+ 
++/* ### Fix build with LibreSSL (does not have RAND_egd)
++   ### PR195511, http://bugs.python.org/issue21356 */
++#ifndef OPENSSL_NO_EGD
+ static PyObject *
+ PySSL_RAND_egd(PyObject *self, PyObject *args)
+ {
+@@ -2586,6 +2591,8 @@ PyDoc_STRVAR(PySSL_RAND_egd_doc,
+ 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 /* OPENSSL_NO_EGD */
++/* ### End PR195511  */
+ 
+ #endif /* HAVE_OPENSSL_RAND */
+ 
+@@ -2604,8 +2611,13 @@ static PyMethodDef PySSL_methods[] = {
+      PySSL_RAND_bytes_doc},
+     {"RAND_pseudo_bytes",   PySSL_RAND_pseudo_bytes, METH_VARARGS,
+      PySSL_RAND_pseudo_bytes_doc},
++/* ### Fix build with LibreSSL (does not have RAND_egd)
++   ### PR195511, http://bugs.python.org/issue21356 */
++#ifndef OPENSSL_NO_EGD
+     {"RAND_egd",            PySSL_RAND_egd, METH_VARARGS,
+      PySSL_RAND_egd_doc},
++#endif /* OPENSSL_NO_EGD */
++/* ### End PR195511  */
+     {"RAND_status",         (PyCFunction)PySSL_RAND_status, METH_NOARGS,
+      PySSL_RAND_status_doc},
+ #endif
+@@ -2842,8 +2854,10 @@ PyInit__ssl(void)
+     PyModule_AddIntConstant(m, "PROTOCOL_SSLv2",
+                             PY_SSL_VERSION_SSL2);
+ #endif
++#ifndef OPENSSL_NO_SSL3
+     PyModule_AddIntConstant(m, "PROTOCOL_SSLv3",
+                             PY_SSL_VERSION_SSL3);
++#endif
+     PyModule_AddIntConstant(m, "PROTOCOL_SSLv23",
+                             PY_SSL_VERSION_SSL23);
+     PyModule_AddIntConstant(m, "PROTOCOL_TLSv1",
+--- Lib/ssl.py.orig	2014-03-09 09:40:13.000000000 +0100
++++ Lib/ssl.py	2015-09-26 15:55:40.209981202 +0200
+@@ -78,7 +78,15 @@ try:
+     from _ssl import OP_SINGLE_ECDH_USE
+ except ImportError:
+     pass
+-from _ssl import RAND_status, RAND_egd, RAND_add, RAND_bytes, RAND_pseudo_bytes
++### Fix build with LibreSSL (does not have RAND_egd)
++### PR195511, http://bugs.python.org/issue21356
++from _ssl import RAND_status, RAND_add, RAND_bytes, RAND_pseudo_bytes
++try:
++    from _ssl import RAND_egd
++except ImportError:
++    # LibreSSL does not provide RAND_egd
++    pass
++### End PR195511
+ from _ssl import (
+     SSL_ERROR_ZERO_RETURN,
+     SSL_ERROR_WANT_READ,
+@@ -91,14 +99,13 @@ from _ssl import (
+     SSL_ERROR_INVALID_ERROR_CODE,
+     )
+ from _ssl import HAS_SNI, HAS_ECDH, HAS_NPN
+-from _ssl import (PROTOCOL_SSLv3, PROTOCOL_SSLv23,
++from _ssl import (PROTOCOL_SSLv23,
+                   PROTOCOL_TLSv1)
+ from _ssl import _OPENSSL_API_VERSION
+ 
+ _PROTOCOL_NAMES = {
+     PROTOCOL_TLSv1: "TLSv1",
+     PROTOCOL_SSLv23: "SSLv23",
+-    PROTOCOL_SSLv3: "SSLv3",
+ }
+ try:
+     from _ssl import PROTOCOL_SSLv2
+@@ -107,6 +114,13 @@ except ImportError:
+     _SSLv2_IF_EXISTS = None
+ else:
+     _PROTOCOL_NAMES[PROTOCOL_SSLv2] = "SSLv2"
++try:
++    from _ssl import PROTOCOL_SSLv3
++    _SSLv3_IF_EXISTS = PROTOCOL_SSLv3
++except ImportError:
++    _SSLv3_IF_EXISTS = None
++else:
++    _PROTOCOL_NAMES[PROTOCOL_SSLv2] = "SSLv3"
+ 
+ from socket import getnameinfo as _getnameinfo
+ from socket import error as socket_error
+@@ -664,7 +678,7 @@ def PEM_cert_to_DER_cert(pem_cert_string
+     d = pem_cert_string.strip()[len(PEM_HEADER):-len(PEM_FOOTER)]
+     return base64.decodebytes(d.encode('ASCII', 'strict'))
+ 
+-def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None):
++def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv23, ca_certs=None):
+     """Retrieve the certificate from the server at the specified address,
+     and return it as a PEM-encoded string.
+     If 'ca_certs' is specified, validate the server cert against it.
+--- Lib/test/test_ssl.py.orig	2014-03-09 09:40:19.000000000 +0100
++++ Lib/test/test_ssl.py	2015-09-26 15:58:58.264964564 +0200
+@@ -21,11 +21,12 @@ import functools
+ ssl = support.import_module("ssl")
+ 
+ PROTOCOLS = [
+-    ssl.PROTOCOL_SSLv3,
+     ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1
+ ]
+ if hasattr(ssl, 'PROTOCOL_SSLv2'):
+     PROTOCOLS.append(ssl.PROTOCOL_SSLv2)
++if hasattr(ssl, 'PROTOCOL_SSLv3'):
++    PROTOCOLS.append(ssl.PROTOCOL_SSLv3)
+ 
+ HOST = support.HOST
+ 
+@@ -96,7 +97,8 @@ class BasicSocketTests(unittest.TestCase
+     def test_constants(self):
+         #ssl.PROTOCOL_SSLv2
+         ssl.PROTOCOL_SSLv23
+-        ssl.PROTOCOL_SSLv3
++        if hasattr(ssl, 'PROTOCOL_SSLv3'):
++            ssl.PROTOCOL_SSLv3
+         ssl.PROTOCOL_TLSv1
+         ssl.CERT_NONE
+         ssl.CERT_OPTIONAL
+@@ -130,8 +132,12 @@ class BasicSocketTests(unittest.TestCase
+         self.assertRaises(ValueError, ssl.RAND_bytes, -5)
+         self.assertRaises(ValueError, ssl.RAND_pseudo_bytes, -5)
+ 
+-        self.assertRaises(TypeError, ssl.RAND_egd, 1)
+-        self.assertRaises(TypeError, ssl.RAND_egd, 'foo', 1)
++### Fix build with LibreSSL (does not have RAND_egd)
++### PR195511, http://bugs.python.org/issue21356        
++        if hasattr(ssl, 'RAND_egd'):
++            self.assertRaises(TypeError, ssl.RAND_egd, 1)
++            self.assertRaises(TypeError, ssl.RAND_egd, 'foo', 1)
++### End PR195511
+         ssl.RAND_add("this is a random string", 75.0)
+ 
+     @unittest.skipUnless(os.name == 'posix', 'requires posix')
+@@ -512,7 +518,8 @@ class ContextTests(unittest.TestCase):
+         if hasattr(ssl, 'PROTOCOL_SSLv2'):
+             ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv2)
+         ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
+-        ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv3)
++        if hasattr(ssl, 'PROTOCOL_SSLv3'):
++            ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv3)
+         ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
+         self.assertRaises(TypeError, ssl.SSLContext)
+         self.assertRaises(ValueError, ssl.SSLContext, -1)

Modified: head/lang/python33/pkg-plist
==============================================================================
--- head/lang/python33/pkg-plist	Thu Dec 24 11:49:48 2015	(r404346)
+++ head/lang/python33/pkg-plist	Thu Dec 24 12:06:30 2015	(r404347)
@@ -1839,9 +1839,9 @@ lib/python3.3/lib-dynload/time.so
 lib/python3.3/lib-dynload/unicodedata.so
 %%NO_DEBUG%%lib/python3.3/lib-dynload/xxlimited.so
 lib/python3.3/lib-dynload/zlib.so
-lib/python3.3/lib2to3/Grammar3.3.5.final.0.pickle
+lib/python3.3/lib2to3/Grammar3.3.6.final.0.pickle
 lib/python3.3/lib2to3/Grammar.txt
-lib/python3.3/lib2to3/PatternGrammar3.3.5.final.0.pickle
+lib/python3.3/lib2to3/PatternGrammar3.3.6.final.0.pickle
 lib/python3.3/lib2to3/PatternGrammar.txt
 lib/python3.3/lib2to3/__init__.py
 lib/python3.3/lib2to3/__main__.py



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512241206.tBOC6UYk038028>