summaryrefslogtreecommitdiff
path: root/dev-lang/python/files
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-lang/python/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-lang/python/files')
-rw-r--r--dev-lang/python/files/CVE-2013-4238_py27.patch247
-rw-r--r--dev-lang/python/files/CVE-2013-4238_py33.patch241
-rw-r--r--dev-lang/python/files/pydoc.conf7
-rwxr-xr-xdev-lang/python/files/pydoc.init25
-rw-r--r--dev-lang/python/files/python-2.5-tcl86.patch11
-rw-r--r--dev-lang/python/files/python-2.7-issue16248.patch19
-rw-r--r--dev-lang/python/files/python-2.7-issue18851.patch287
-rw-r--r--dev-lang/python/files/python-2.7.10-semaphore-pid.patch51
-rw-r--r--dev-lang/python/files/python-2.7.5-library-path.patch25
-rw-r--r--dev-lang/python/files/python-2.7.5-nonfatal-compileall.patch18
-rw-r--r--dev-lang/python/files/python-2.7.5-re_unsigned_ptrdiff.patch23
-rw-r--r--dev-lang/python/files/python-2.7.6-recvfrom_into_buffer_overflow.patch17
-rw-r--r--dev-lang/python/files/python-2.7.9-ncurses-pkg-config.patch13
-rw-r--r--dev-lang/python/files/python-3.2-CVE-2013-2099.patch51
-rw-r--r--dev-lang/python/files/python-3.2-CVE-2014-1912.patch51
-rw-r--r--dev-lang/python/files/python-3.2-CVE-2014-4616.patch39
-rw-r--r--dev-lang/python/files/python-3.2-issue16248.patch19
-rw-r--r--dev-lang/python/files/python-3.3-CVE-2013-2099.patch51
-rw-r--r--dev-lang/python/files/python-3.3-CVE-2014-4616.patch52
-rw-r--r--dev-lang/python/files/python-3.3.5-ncurses-pkg-config.patch40
-rw-r--r--dev-lang/python/files/python-3.4.3-ncurses-pkg-config.patch13
-rw-r--r--dev-lang/python/files/python-config-2.4-r158
22 files changed, 1358 insertions, 0 deletions
diff --git a/dev-lang/python/files/CVE-2013-4238_py27.patch b/dev-lang/python/files/CVE-2013-4238_py27.patch
new file mode 100644
index 000000000000..e215589d46b2
--- /dev/null
+++ b/dev-lang/python/files/CVE-2013-4238_py27.patch
@@ -0,0 +1,247 @@
+diff -r 9ddc63c039ba Lib/test/nullbytecert.pem
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Lib/test/nullbytecert.pem Sun Aug 11 18:13:17 2013 +0200
+@@ -0,0 +1,90 @@
++Certificate:
++ Data:
++ Version: 3 (0x2)
++ Serial Number: 0 (0x0)
++ Signature Algorithm: sha1WithRSAEncryption
++ Issuer: C=US, ST=Oregon, L=Beaverton, O=Python Software Foundation, OU=Python Core Development, CN=null.python.org\x00example.org/emailAddress=python-dev@python.org
++ Validity
++ Not Before: Aug 7 13:11:52 2013 GMT
++ Not After : Aug 7 13:12:52 2013 GMT
++ Subject: C=US, ST=Oregon, L=Beaverton, O=Python Software Foundation, OU=Python Core Development, CN=null.python.org\x00example.org/emailAddress=python-dev@python.org
++ Subject Public Key Info:
++ Public Key Algorithm: rsaEncryption
++ Public-Key: (2048 bit)
++ Modulus:
++ 00:b5:ea:ed:c9:fb:46:7d:6f:3b:76:80:dd:3a:f3:
++ 03:94:0b:a7:a6:db:ec:1d:df:ff:23:74:08:9d:97:
++ 16:3f:a3:a4:7b:3e:1b:0e:96:59:25:03:a7:26:e2:
++ 88:a9:cf:79:cd:f7:04:56:b0:ab:79:32:6e:59:c1:
++ 32:30:54:eb:58:a8:cb:91:f0:42:a5:64:27:cb:d4:
++ 56:31:88:52:ad:cf:bd:7f:f0:06:64:1f:cc:27:b8:
++ a3:8b:8c:f3:d8:29:1f:25:0b:f5:46:06:1b:ca:02:
++ 45:ad:7b:76:0a:9c:bf:bb:b9:ae:0d:16:ab:60:75:
++ ae:06:3e:9c:7c:31:dc:92:2f:29:1a:e0:4b:0c:91:
++ 90:6c:e9:37:c5:90:d7:2a:d7:97:15:a3:80:8f:5d:
++ 7b:49:8f:54:30:d4:97:2c:1c:5b:37:b5:ab:69:30:
++ 68:43:d3:33:78:4b:02:60:f5:3c:44:80:a1:8f:e7:
++ f0:0f:d1:5e:87:9e:46:cf:62:fc:f9:bf:0c:65:12:
++ f1:93:c8:35:79:3f:c8:ec:ec:47:f5:ef:be:44:d5:
++ ae:82:1e:2d:9a:9f:98:5a:67:65:e1:74:70:7c:cb:
++ d3:c2:ce:0e:45:49:27:dc:e3:2d:d4:fb:48:0e:2f:
++ 9e:77:b8:14:46:c0:c4:36:ca:02:ae:6a:91:8c:da:
++ 2f:85
++ Exponent: 65537 (0x10001)
++ X509v3 extensions:
++ X509v3 Basic Constraints: critical
++ CA:FALSE
++ X509v3 Subject Key Identifier:
++ 88:5A:55:C0:52:FF:61:CD:52:A3:35:0F:EA:5A:9C:24:38:22:F7:5C
++ X509v3 Key Usage:
++ Digital Signature, Non Repudiation, Key Encipherment
++ X509v3 Subject Alternative Name:
++ *************************************************************
++ WARNING: The values for DNS, email and URI are WRONG. OpenSSL
++ doesn't print the text after a NULL byte.
++ *************************************************************
++ DNS:altnull.python.org, email:null@python.org, URI:http://null.python.org, IP Address:192.0.2.1, IP Address:2001:DB8:0:0:0:0:0:1
++ Signature Algorithm: sha1WithRSAEncryption
++ ac:4f:45:ef:7d:49:a8:21:70:8e:88:59:3e:d4:36:42:70:f5:
++ a3:bd:8b:d7:a8:d0:58:f6:31:4a:b1:a4:a6:dd:6f:d9:e8:44:
++ 3c:b6:0a:71:d6:7f:b1:08:61:9d:60:ce:75:cf:77:0c:d2:37:
++ 86:02:8d:5e:5d:f9:0f:71:b4:16:a8:c1:3d:23:1c:f1:11:b3:
++ 56:6e:ca:d0:8d:34:94:e6:87:2a:99:f2:ae:ae:cc:c2:e8:86:
++ de:08:a8:7f:c5:05:fa:6f:81:a7:82:e6:d0:53:9d:34:f4:ac:
++ 3e:40:fe:89:57:7a:29:a4:91:7e:0b:c6:51:31:e5:10:2f:a4:
++ 60:76:cd:95:51:1a:be:8b:a1:b0:fd:ad:52:bd:d7:1b:87:60:
++ d2:31:c7:17:c4:18:4f:2d:08:25:a3:a7:4f:b7:92:ca:e2:f5:
++ 25:f1:54:75:81:9d:b3:3d:61:a2:f7:da:ed:e1:c6:6f:2c:60:
++ 1f:d8:6f:c5:92:05:ab:c9:09:62:49:a9:14:ad:55:11:cc:d6:
++ 4a:19:94:99:97:37:1d:81:5f:8b:cf:a3:a8:96:44:51:08:3d:
++ 0b:05:65:12:eb:b6:70:80:88:48:72:4f:c6:c2:da:cf:cd:8e:
++ 5b:ba:97:2f:60:b4:96:56:49:5e:3a:43:76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EbAxDbKAq5qkYzaL4UCAwEAAaOB0DCBzTAMBgNV
++HRMBAf8EAjAAMB0GA1UdDgQWBBSIWlXAUv9hzVKjNQ/qWpwkOCL3XDALBgNVHQ8E
++BAMCBeAwgZAGA1UdEQSBiDCBhYIeYWx0bnVsbC5weXRob24ub3JnAGV4YW1wbGUu
++Y29tgSBudWxsQHB5dGhvbi5vcmcAdXNlckBleGFtcGxlLm9yZ4YpaHR0cDovL251
++bGwucHl0aG9uLm9yZwBodHRwOi8vZXhhbXBsZS5vcmeHBMAAAgGHECABDbgAAAAA
++AAAAAAAAAAEwDQYJKoZIhvcNAQEFBQADggEBAKxPRe99SaghcI6IWT7UNkJw9aO9
++i9eo0Fj2MUqxpKbdb9noRDy2CnHWf7EIYZ1gznXPdwzSN4YCjV5d+Q9xtBaowT0j
++HPERs1ZuytCNNJTmhyqZ8q6uzMLoht4IqH/FBfpvgaeC5tBTnTT0rD5A/olXeimk
++kX4LxlEx5RAvpGB2zZVRGr6LobD9rVK91xuHYNIxxxfEGE8tCCWjp0+3ksri9SXx
++VHWBnbM9YaL32u3hxm8sYB/Yb8WSBavJCWJJqRStVRHM1koZlJmXNx2BX4vPo6iW
++RFEIPQsFZRLrtnCAiEhyT8bC2s/Njlu6ly9gtJZWSV46Q3ZjBL4q9sHKqZQ=
++-----END CERTIFICATE-----
+diff -r 9ddc63c039ba Lib/test/test_ssl.py
+--- a/Lib/test/test_ssl.py Sun Aug 11 13:04:50 2013 +0300
++++ b/Lib/test/test_ssl.py Sun Aug 11 18:13:17 2013 +0200
+@@ -25,6 +25,7 @@
+ HOST = test_support.HOST
+ CERTFILE = None
+ SVN_PYTHON_ORG_ROOT_CERT = None
++NULLBYTECERT = None
+
+ def handle_error(prefix):
+ exc_format = ' '.join(traceback.format_exception(*sys.exc_info()))
+@@ -123,6 +124,27 @@
+ ('DNS', 'projects.forum.nokia.com'))
+ )
+
++ def test_parse_cert_CVE_2013_4073(self):
++ p = ssl._ssl._test_decode_cert(NULLBYTECERT)
++ if test_support.verbose:
++ sys.stdout.write("\n" + pprint.pformat(p) + "\n")
++ subject = ((('countryName', 'US'),),
++ (('stateOrProvinceName', 'Oregon'),),
++ (('localityName', 'Beaverton'),),
++ (('organizationName', 'Python Software Foundation'),),
++ (('organizationalUnitName', 'Python Core Development'),),
++ (('commonName', 'null.python.org\x00example.org'),),
++ (('emailAddress', 'python-dev@python.org'),))
++ self.assertEqual(p['subject'], subject)
++ self.assertEqual(p['issuer'], subject)
++ self.assertEqual(p['subjectAltName'],
++ (('DNS', 'altnull.python.org\x00example.com'),
++ ('email', 'null@python.org\x00user@example.org'),
++ ('URI', 'http://null.python.org\x00http://example.org'),
++ ('IP Address', '192.0.2.1'),
++ ('IP Address', '2001:DB8:0:0:0:0:0:1\n'))
++ )
++
+ def test_DER_to_PEM(self):
+ with open(SVN_PYTHON_ORG_ROOT_CERT, 'r') as f:
+ pem = f.read()
+@@ -1360,7 +1382,7 @@
+
+
+ def test_main(verbose=False):
+- global CERTFILE, SVN_PYTHON_ORG_ROOT_CERT, NOKIACERT
++ global CERTFILE, SVN_PYTHON_ORG_ROOT_CERT, NOKIACERT, NULLBYTECERT
+ CERTFILE = os.path.join(os.path.dirname(__file__) or os.curdir,
+ "keycert.pem")
+ SVN_PYTHON_ORG_ROOT_CERT = os.path.join(
+@@ -1368,10 +1390,13 @@
+ "https_svn_python_org_root.pem")
+ NOKIACERT = os.path.join(os.path.dirname(__file__) or os.curdir,
+ "nokia.pem")
++ NULLBYTECERT = os.path.join(os.path.dirname(__file__) or os.curdir,
++ "nullbytecert.pem")
+
+ if (not os.path.exists(CERTFILE) or
+ not os.path.exists(SVN_PYTHON_ORG_ROOT_CERT) or
+- not os.path.exists(NOKIACERT)):
++ not os.path.exists(NOKIACERT) or
++ not os.path.exists(NULLBYTECERT)):
+ raise test_support.TestFailed("Can't read certificate files!")
+
+ tests = [BasicTests, BasicSocketTests]
+diff -r 9ddc63c039ba Modules/_ssl.c
+--- a/Modules/_ssl.c Sun Aug 11 13:04:50 2013 +0300
++++ b/Modules/_ssl.c Sun Aug 11 18:13:17 2013 +0200
+@@ -741,8 +741,13 @@
+
+ /* get a rendering of each name in the set of names */
+
++ int gntype;
++ ASN1_STRING *as = NULL;
++
+ name = sk_GENERAL_NAME_value(names, j);
+- if (name->type == GEN_DIRNAME) {
++ gntype = name-> type;
++ switch (gntype) {
++ case GEN_DIRNAME:
+
+ /* we special-case DirName as a tuple of tuples of attributes */
+
+@@ -764,11 +769,61 @@
+ goto fail;
+ }
+ PyTuple_SET_ITEM(t, 1, v);
++ break;
+
+- } else {
++ case GEN_EMAIL:
++ case GEN_DNS:
++ case GEN_URI:
++ /* GENERAL_NAME_print() doesn't handle NUL bytes in ASN1_string
++ correctly. */
++ t = PyTuple_New(2);
++ if (t == NULL)
++ goto fail;
++ switch (gntype) {
++ case GEN_EMAIL:
++ v = PyUnicode_FromString("email");
++ as = name->d.rfc822Name;
++ break;
++ case GEN_DNS:
++ v = PyUnicode_FromString("DNS");
++ as = name->d.dNSName;
++ break;
++ case GEN_URI:
++ v = PyUnicode_FromString("URI");
++ as = name->d.uniformResourceIdentifier;
++ break;
++ }
++ if (v == NULL) {
++ Py_DECREF(t);
++ goto fail;
++ }
++ PyTuple_SET_ITEM(t, 0, v);
++ v = PyString_FromStringAndSize((char *)ASN1_STRING_data(as),
++ ASN1_STRING_length(as));
++ if (v == NULL) {
++ Py_DECREF(t);
++ goto fail;
++ }
++ PyTuple_SET_ITEM(t, 1, v);
++ break;
+
++ default:
+ /* for everything else, we use the OpenSSL print form */
+-
++ switch (gntype) {
++ /* check for new general name type */
++ case GEN_OTHERNAME:
++ case GEN_X400:
++ case GEN_EDIPARTY:
++ case GEN_IPADD:
++ case GEN_RID:
++ break;
++ default:
++ if (PyErr_Warn(PyExc_RuntimeWarning,
++ "Unknown general name type") == -1) {
++ goto fail;
++ }
++ break;
++ }
+ (void) BIO_reset(biobuf);
+ GENERAL_NAME_print(biobuf, name);
+ len = BIO_gets(biobuf, buf, sizeof(buf)-1);
+@@ -794,6 +849,7 @@
+ goto fail;
+ }
+ PyTuple_SET_ITEM(t, 1, v);
++ break;
+ }
+
+ /* and add that rendering to the list */
diff --git a/dev-lang/python/files/CVE-2013-4238_py33.patch b/dev-lang/python/files/CVE-2013-4238_py33.patch
new file mode 100644
index 000000000000..41db4d241b53
--- /dev/null
+++ b/dev-lang/python/files/CVE-2013-4238_py33.patch
@@ -0,0 +1,241 @@
+diff -r e0f86c3b3685 Lib/test/nullbytecert.pem
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Lib/test/nullbytecert.pem Sun Aug 11 18:17:23 2013 +0200
+@@ -0,0 +1,90 @@
++Certificate:
++ Data:
++ Version: 3 (0x2)
++ Serial Number: 0 (0x0)
++ Signature Algorithm: sha1WithRSAEncryption
++ Issuer: C=US, ST=Oregon, L=Beaverton, O=Python Software Foundation, OU=Python Core Development, CN=null.python.org\x00example.org/emailAddress=python-dev@python.org
++ Validity
++ Not Before: Aug 7 13:11:52 2013 GMT
++ Not After : Aug 7 13:12:52 2013 GMT
++ Subject: C=US, ST=Oregon, L=Beaverton, O=Python Software Foundation, OU=Python Core Development, CN=null.python.org\x00example.org/emailAddress=python-dev@python.org
++ Subject Public Key Info:
++ Public Key Algorithm: rsaEncryption
++ Public-Key: (2048 bit)
++ Modulus:
++ 00:b5:ea:ed:c9:fb:46:7d:6f:3b:76:80:dd:3a:f3:
++ 03:94:0b:a7:a6:db:ec:1d:df:ff:23:74:08:9d:97:
++ 16:3f:a3:a4:7b:3e:1b:0e:96:59:25:03:a7:26:e2:
++ 88:a9:cf:79:cd:f7:04:56:b0:ab:79:32:6e:59:c1:
++ 32:30:54:eb:58:a8:cb:91:f0:42:a5:64:27:cb:d4:
++ 56:31:88:52:ad:cf:bd:7f:f0:06:64:1f:cc:27:b8:
++ a3:8b:8c:f3:d8:29:1f:25:0b:f5:46:06:1b:ca:02:
++ 45:ad:7b:76:0a:9c:bf:bb:b9:ae:0d:16:ab:60:75:
++ ae:06:3e:9c:7c:31:dc:92:2f:29:1a:e0:4b:0c:91:
++ 90:6c:e9:37:c5:90:d7:2a:d7:97:15:a3:80:8f:5d:
++ 7b:49:8f:54:30:d4:97:2c:1c:5b:37:b5:ab:69:30:
++ 68:43:d3:33:78:4b:02:60:f5:3c:44:80:a1:8f:e7:
++ f0:0f:d1:5e:87:9e:46:cf:62:fc:f9:bf:0c:65:12:
++ f1:93:c8:35:79:3f:c8:ec:ec:47:f5:ef:be:44:d5:
++ ae:82:1e:2d:9a:9f:98:5a:67:65:e1:74:70:7c:cb:
++ d3:c2:ce:0e:45:49:27:dc:e3:2d:d4:fb:48:0e:2f:
++ 9e:77:b8:14:46:c0:c4:36:ca:02:ae:6a:91:8c:da:
++ 2f:85
++ Exponent: 65537 (0x10001)
++ X509v3 extensions:
++ X509v3 Basic Constraints: critical
++ CA:FALSE
++ X509v3 Subject Key Identifier:
++ 88:5A:55:C0:52:FF:61:CD:52:A3:35:0F:EA:5A:9C:24:38:22:F7:5C
++ X509v3 Key Usage:
++ Digital Signature, Non Repudiation, Key Encipherment
++ X509v3 Subject Alternative Name:
++ *************************************************************
++ WARNING: The values for DNS, email and URI are WRONG. OpenSSL
++ doesn't print the text after a NULL byte.
++ *************************************************************
++ DNS:altnull.python.org, email:null@python.org, URI:http://null.python.org, IP Address:192.0.2.1, IP Address:2001:DB8:0:0:0:0:0:1
++ Signature Algorithm: sha1WithRSAEncryption
++ ac:4f:45:ef:7d:49:a8:21:70:8e:88:59:3e:d4:36:42:70:f5:
++ a3:bd:8b:d7:a8:d0:58:f6:31:4a:b1:a4:a6:dd:6f:d9:e8:44:
++ 3c:b6:0a:71:d6:7f:b1:08:61:9d:60:ce:75:cf:77:0c:d2:37:
++ 86:02:8d:5e:5d:f9:0f:71:b4:16:a8:c1:3d:23:1c:f1:11:b3:
++ 56:6e:ca:d0:8d:34:94:e6:87:2a:99:f2:ae:ae:cc:c2:e8:86:
++ de:08:a8:7f:c5:05:fa:6f:81:a7:82:e6:d0:53:9d:34:f4:ac:
++ 3e:40:fe:89:57:7a:29:a4:91:7e:0b:c6:51:31:e5:10:2f:a4:
++ 60:76:cd:95:51:1a:be:8b:a1:b0:fd:ad:52:bd:d7:1b:87:60:
++ d2:31:c7:17:c4:18:4f:2d:08:25:a3:a7:4f:b7:92:ca:e2:f5:
++ 25:f1:54:75:81:9d:b3:3d:61:a2:f7:da:ed:e1:c6:6f:2c:60:
++ 1f:d8:6f:c5:92:05:ab:c9:09:62:49:a9:14:ad:55:11:cc:d6:
++ 4a:19:94:99:97:37:1d:81:5f:8b:cf:a3:a8:96:44:51:08:3d:
++ 0b:05:65:12:eb:b6:70:80:88:48:72:4f:c6:c2:da:cf:cd:8e:
++ 5b:ba:97:2f:60:b4:96:56:49:5e:3a:43:76:63:04:be:2a:f6:
++ c1:ca:a9:94
++-----BEGIN CERTIFICATE-----
++MIIE2DCCA8CgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBxTELMAkGA1UEBhMCVVMx
++DzANBgNVBAgMBk9yZWdvbjESMBAGA1UEBwwJQmVhdmVydG9uMSMwIQYDVQQKDBpQ
++eXRob24gU29mdHdhcmUgRm91bmRhdGlvbjEgMB4GA1UECwwXUHl0aG9uIENvcmUg
++RGV2ZWxvcG1lbnQxJDAiBgNVBAMMG251bGwucHl0aG9uLm9yZwBleGFtcGxlLm9y
++ZzEkMCIGCSqGSIb3DQEJARYVcHl0aG9uLWRldkBweXRob24ub3JnMB4XDTEzMDgw
++NzEzMTE1MloXDTEzMDgwNzEzMTI1MlowgcUxCzAJBgNVBAYTAlVTMQ8wDQYDVQQI
++DAZPcmVnb24xEjAQBgNVBAcMCUJlYXZlcnRvbjEjMCEGA1UECgwaUHl0aG9uIFNv
++ZnR3YXJlIEZvdW5kYXRpb24xIDAeBgNVBAsMF1B5dGhvbiBDb3JlIERldmVsb3Bt
++ZW50MSQwIgYDVQQDDBtudWxsLnB5dGhvbi5vcmcAZXhhbXBsZS5vcmcxJDAiBgk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IPQsFZRLrtnCAiEhyT8bC2s/Njlu6ly9gtJZWSV46Q3ZjBL4q9sHKqZQ=
++-----END CERTIFICATE-----
+diff -r e0f86c3b3685 Lib/test/test_ssl.py
+--- a/Lib/test/test_ssl.py Sun Aug 11 13:04:50 2013 +0300
++++ b/Lib/test/test_ssl.py Sun Aug 11 18:17:23 2013 +0200
+@@ -55,6 +55,7 @@
+ WRONGCERT = data_file("XXXnonexisting.pem")
+ BADKEY = data_file("badkey.pem")
+ NOKIACERT = data_file("nokia.pem")
++NULLBYTECERT = data_file("nullbytecert.pem")
+
+ DHFILE = data_file("dh512.pem")
+ BYTES_DHFILE = os.fsencode(DHFILE)
+@@ -162,6 +163,27 @@
+ ('DNS', 'projects.forum.nokia.com'))
+ )
+
++ def test_parse_cert_CVE_2013_4073(self):
++ p = ssl._ssl._test_decode_cert(NULLBYTECERT)
++ if support.verbose:
++ sys.stdout.write("\n" + pprint.pformat(p) + "\n")
++ subject = ((('countryName', 'US'),),
++ (('stateOrProvinceName', 'Oregon'),),
++ (('localityName', 'Beaverton'),),
++ (('organizationName', 'Python Software Foundation'),),
++ (('organizationalUnitName', 'Python Core Development'),),
++ (('commonName', 'null.python.org\x00example.org'),),
++ (('emailAddress', 'python-dev@python.org'),))
++ self.assertEqual(p['subject'], subject)
++ self.assertEqual(p['issuer'], subject)
++ self.assertEqual(p['subjectAltName'],
++ (('DNS', 'altnull.python.org\x00example.com'),
++ ('email', 'null@python.org\x00user@example.org'),
++ ('URI', 'http://null.python.org\x00http://example.org'),
++ ('IP Address', '192.0.2.1'),
++ ('IP Address', '2001:DB8:0:0:0:0:0:1\n'))
++ )
++
+ def test_DER_to_PEM(self):
+ with open(SVN_PYTHON_ORG_ROOT_CERT, 'r') as f:
+ pem = f.read()
+@@ -294,6 +316,13 @@
+ fail(cert, 'foo.a.com')
+ fail(cert, 'bar.foo.com')
+
++ # NULL bytes are bad, CVE-2013-4073
++ cert = {'subject': ((('commonName',
++ 'null.python.org\x00example.org'),),)}
++ ok(cert, 'null.python.org\x00example.org') # or raise an error?
++ fail(cert, 'example.org')
++ fail(cert, 'null.python.org')
++
+ # Slightly fake real-world example
+ cert = {'notAfter': 'Jun 26 21:41:46 2011 GMT',
+ 'subject': ((('commonName', 'linuxfrz.org'),),),
+diff -r e0f86c3b3685 Modules/_ssl.c
+--- a/Modules/_ssl.c Sun Aug 11 13:04:50 2013 +0300
++++ b/Modules/_ssl.c Sun Aug 11 18:17:23 2013 +0200
+@@ -771,12 +771,14 @@
+ ext->value->length));
+
+ for(j = 0; j < sk_GENERAL_NAME_num(names); j++) {
+-
+ /* get a rendering of each name in the set of names */
++ int gntype;
++ ASN1_STRING *as = NULL;
+
+ name = sk_GENERAL_NAME_value(names, j);
+- if (name->type == GEN_DIRNAME) {
+-
++ gntype = name-> type;
++ switch (gntype) {
++ case GEN_DIRNAME:
+ /* we special-case DirName as a tuple of
+ tuples of attributes */
+
+@@ -798,11 +800,62 @@
+ goto fail;
+ }
+ PyTuple_SET_ITEM(t, 1, v);
++ break;
+
+- } else {
++ case GEN_EMAIL:
++ case GEN_DNS:
++ case GEN_URI:
++ /* GENERAL_NAME_print() doesn't handle NUL bytes in ASN1_string
++ correctly. */
++ t = PyTuple_New(2);
++ if (t == NULL)
++ goto fail;
++ switch (gntype) {
++ case GEN_EMAIL:
++ v = PyUnicode_FromString("email");
++ as = name->d.rfc822Name;
++ break;
++ case GEN_DNS:
++ v = PyUnicode_FromString("DNS");
++ as = name->d.dNSName;
++ break;
++ case GEN_URI:
++ v = PyUnicode_FromString("URI");
++ as = name->d.uniformResourceIdentifier;
++ break;
++ }
++ if (v == NULL) {
++ Py_DECREF(t);
++ goto fail;
++ }
++ PyTuple_SET_ITEM(t, 0, v);
++ v = PyUnicode_FromStringAndSize((char *)ASN1_STRING_data(as),
++ ASN1_STRING_length(as));
++ if (v == NULL) {
++ Py_DECREF(t);
++ goto fail;
++ }
++ PyTuple_SET_ITEM(t, 1, v);
++ break;
+
++ default:
+ /* for everything else, we use the OpenSSL print form */
+-
++ switch (gntype) {
++ /* check for new general name type */
++ case GEN_OTHERNAME:
++ case GEN_X400:
++ case GEN_EDIPARTY:
++ case GEN_IPADD:
++ case GEN_RID:
++ break;
++ default:
++ if (PyErr_WarnFormat(PyExc_RuntimeWarning, 1,
++ "Unknown general name type %d",
++ gntype) == -1) {
++ goto fail;
++ }
++ break;
++ }
+ (void) BIO_reset(biobuf);
+ GENERAL_NAME_print(biobuf, name);
+ len = BIO_gets(biobuf, buf, sizeof(buf)-1);
+@@ -829,6 +882,7 @@
+ goto fail;
+ }
+ PyTuple_SET_ITEM(t, 1, v);
++ break;
+ }
+
+ /* and add that rendering to the list */
diff --git a/dev-lang/python/files/pydoc.conf b/dev-lang/python/files/pydoc.conf
new file mode 100644
index 000000000000..b648cd36ab7a
--- /dev/null
+++ b/dev-lang/python/files/pydoc.conf
@@ -0,0 +1,7 @@
+# /etc/init.d/pydoc.conf
+# $Id$
+
+# This file contains the configuration for pydoc's internal webserver.
+
+# Default port for Python's pydoc server.
+@PYDOC_PORT_VARIABLE@="7464"
diff --git a/dev-lang/python/files/pydoc.init b/dev-lang/python/files/pydoc.init
new file mode 100755
index 000000000000..ede01671f772
--- /dev/null
+++ b/dev-lang/python/files/pydoc.init
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public Licence v2
+# $Id$
+
+start() {
+ local pydoc_port="${@PYDOC_PORT_VARIABLE@-${PYDOC_PORT}}"
+
+ if [ -z "${pydoc_port}" ]; then
+ eerror "Port not set"
+ return 1
+ fi
+
+ ebegin "Starting pydoc server on port ${pydoc_port}"
+ start-stop-daemon --start --background --make-pidfile \
+ --pidfile /var/run/@PYDOC@.pid \
+ --exec /usr/bin/@PYDOC@ -- -p "${pydoc_port}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping pydoc server"
+ start-stop-daemon --stop --quiet --pidfile /var/run/@PYDOC@.pid
+ eend $?
+}
diff --git a/dev-lang/python/files/python-2.5-tcl86.patch b/dev-lang/python/files/python-2.5-tcl86.patch
new file mode 100644
index 000000000000..2362e989e2e9
--- /dev/null
+++ b/dev-lang/python/files/python-2.5-tcl86.patch
@@ -0,0 +1,11 @@
+--- a/setup.py
++++ b/setup.py
+@@ -1518,7 +1518,7 @@
+ # The versions with dots are used on Unix, and the versions without
+ # dots on Windows, for detection by cygwin.
+ tcllib = tklib = tcl_includes = tk_includes = None
+- for version in ['8.5', '85', '8.4', '84', '8.3', '83', '8.2',
++ for version in ['8.6', '86', '8.5', '85', '8.4', '84', '8.3', '83', '8.2',
+ '82', '8.1', '81', '8.0', '80']:
+ tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version)
+ tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version)
diff --git a/dev-lang/python/files/python-2.7-issue16248.patch b/dev-lang/python/files/python-2.7-issue16248.patch
new file mode 100644
index 000000000000..ce9c654c565f
--- /dev/null
+++ b/dev-lang/python/files/python-2.7-issue16248.patch
@@ -0,0 +1,19 @@
+# HG changeset patch
+# User Antoine Pitrou <solipsis@pitrou.net>
+# Date 1375388712 -7200
+# Node ID 0f17aed78168e63ec058c219d03cea7240f83dd6
+# Parent bb546f6d8ab4f513804d7a420657963881e5b447
+Fix tkinter regression introduced by the security fix in #16248.
+
+diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
+--- a/Lib/lib-tk/Tkinter.py
++++ b/Lib/lib-tk/Tkinter.py
+@@ -1736,7 +1736,7 @@ class Tk(Misc, Wm):
+ # ensure that self.tk is always _something_.
+ self.tk = None
+ if baseName is None:
+- import sys, os
++ import os
+ baseName = os.path.basename(sys.argv[0])
+ baseName, ext = os.path.splitext(baseName)
+ if ext not in ('.py', '.pyc', '.pyo'):
diff --git a/dev-lang/python/files/python-2.7-issue18851.patch b/dev-lang/python/files/python-2.7-issue18851.patch
new file mode 100644
index 000000000000..35c69ae22e80
--- /dev/null
+++ b/dev-lang/python/files/python-2.7-issue18851.patch
@@ -0,0 +1,287 @@
+# HG changeset patch
+# User Antoine Pitrou <solipsis@pitrou.net>
+# Date 1377898693 -7200
+# Node ID 43749cb6bdbd0fdab70f76cd171c3c02a3f600dd
+# Parent ba54011aa295004ad87438211fe3bb1568dd69ab
+Issue #18851: Avoid a double close of subprocess pipes when the child process fails starting.
+
+diff --git a/Lib/subprocess.py b/Lib/subprocess.py
+--- a/Lib/subprocess.py
++++ b/Lib/subprocess.py
+@@ -698,12 +698,12 @@ class Popen(object):
+
+ (p2cread, p2cwrite,
+ c2pread, c2pwrite,
+- errread, errwrite) = self._get_handles(stdin, stdout, stderr)
++ errread, errwrite), to_close = self._get_handles(stdin, stdout, stderr)
+
+ try:
+ self._execute_child(args, executable, preexec_fn, close_fds,
+ cwd, env, universal_newlines,
+- startupinfo, creationflags, shell,
++ startupinfo, creationflags, shell, to_close,
+ p2cread, p2cwrite,
+ c2pread, c2pwrite,
+ errread, errwrite)
+@@ -711,18 +711,12 @@ class Popen(object):
+ # Preserve original exception in case os.close raises.
+ exc_type, exc_value, exc_trace = sys.exc_info()
+
+- to_close = []
+- # Only close the pipes we created.
+- if stdin == PIPE:
+- to_close.extend((p2cread, p2cwrite))
+- if stdout == PIPE:
+- to_close.extend((c2pread, c2pwrite))
+- if stderr == PIPE:
+- to_close.extend((errread, errwrite))
+-
+ for fd in to_close:
+ try:
+- os.close(fd)
++ if mswindows:
++ fd.Close()
++ else:
++ os.close(fd)
+ except EnvironmentError:
+ pass
+
+@@ -816,8 +810,9 @@ class Popen(object):
+ """Construct and return tuple with IO objects:
+ p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite
+ """
++ to_close = set()
+ if stdin is None and stdout is None and stderr is None:
+- return (None, None, None, None, None, None)
++ return (None, None, None, None, None, None), to_close
+
+ p2cread, p2cwrite = None, None
+ c2pread, c2pwrite = None, None
+@@ -835,6 +830,10 @@ class Popen(object):
+ # Assuming file-like object
+ p2cread = msvcrt.get_osfhandle(stdin.fileno())
+ p2cread = self._make_inheritable(p2cread)
++ # We just duplicated the handle, it has to be closed at the end
++ to_close.add(p2cread)
++ if stdin == PIPE:
++ to_close.add(p2cwrite)
+
+ if stdout is None:
+ c2pwrite = _subprocess.GetStdHandle(_subprocess.STD_OUTPUT_HANDLE)
+@@ -848,6 +847,10 @@ class Popen(object):
+ # Assuming file-like object
+ c2pwrite = msvcrt.get_osfhandle(stdout.fileno())
+ c2pwrite = self._make_inheritable(c2pwrite)
++ # We just duplicated the handle, it has to be closed at the end
++ to_close.add(c2pwrite)
++ if stdout == PIPE:
++ to_close.add(c2pread)
+
+ if stderr is None:
+ errwrite = _subprocess.GetStdHandle(_subprocess.STD_ERROR_HANDLE)
+@@ -863,10 +866,14 @@ class Popen(object):
+ # Assuming file-like object
+ errwrite = msvcrt.get_osfhandle(stderr.fileno())
+ errwrite = self._make_inheritable(errwrite)
++ # We just duplicated the handle, it has to be closed at the end
++ to_close.add(errwrite)
++ if stderr == PIPE:
++ to_close.add(errread)
+
+ return (p2cread, p2cwrite,
+ c2pread, c2pwrite,
+- errread, errwrite)
++ errread, errwrite), to_close
+
+
+ def _make_inheritable(self, handle):
+@@ -895,7 +902,7 @@ class Popen(object):
+
+ def _execute_child(self, args, executable, preexec_fn, close_fds,
+ cwd, env, universal_newlines,
+- startupinfo, creationflags, shell,
++ startupinfo,