commit: 16277a6ef66b163aa512a718b4af355b68ce9e89 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> AuthorDate: Mon Nov 3 15:45:28 2014 +0000 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> CommitDate: Mon Nov 3 15:45:28 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=16277a6e
dev-lang/python: in tree versions work Package-Manager: portage-2.2.8-r2 Manifest-Sign-Key: 0xF52D4BBA --- dev-lang/python/files/CVE-2013-4238_py27.patch | 247 -------------- dev-lang/python/files/CVE-2013-4238_py33.patch | 241 ------------- .../Python-2.7.5-remove-ptmx-ptc-checks.patch | 76 ----- .../Python-3.3.4-remove-ptmx-ptc-checks.patch | 76 ----- dev-lang/python/files/pydoc.conf | 7 - dev-lang/python/files/pydoc.init | 29 -- dev-lang/python/files/python-2.7-issue16248.patch | 19 -- dev-lang/python/files/python-2.7-issue18851.patch | 287 ---------------- .../python/files/python-2.7.5-library-path.patch | 25 -- .../files/python-2.7.5-nonfatal-compileall.patch | 18 - .../files/python-2.7.5-re_unsigned_ptrdiff.patch | 23 -- .../python/files/python-3.2-CVE-2013-2099.patch | 51 --- dev-lang/python/files/python-3.2-issue16248.patch | 19 -- .../python/files/python-3.3-CVE-2013-2099.patch | 51 --- .../files/python-3.3-fix-posix-close-clash.patch | 21 -- dev-lang/python/files/python-3.3-lchmod.patch | 17 - dev-lang/python/files/python-3.3-xattr.patch | 22 -- .../files/python-fix-posix-close-clash.patch | 20 -- dev-lang/python/metadata.xml | 10 - dev-lang/python/python-2.7.5-r99.ebuild | 359 ------------------- dev-lang/python/python-2.7.6-r99.ebuild | 361 -------------------- dev-lang/python/python-3.2.5-r99.ebuild | 379 --------------------- dev-lang/python/python-3.3.3-r99.ebuild | 325 ------------------ dev-lang/python/python-3.3.4-r99.ebuild | 323 ------------------ 24 files changed, 3006 deletions(-) diff --git a/dev-lang/python/files/CVE-2013-4238_py27.patch b/dev-lang/python/files/CVE-2013-4238_py27.patch deleted file mode 100644 index e215589..0000000 --- a/dev-lang/python/files/CVE-2013-4238_py27.patch +++ /dev/null @@ -1,247 +0,0 @@ -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/[email protected] -+ 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/[email protected] -+ 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:[email protected], 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 -+ZW50MSQwIgYDVQQDDBtudWxsLnB5dGhvbi5vcmcAZXhhbXBsZS5vcmcxJDAiBgkq -+hkiG9w0BCQEWFXB5dGhvbi1kZXZAcHl0aG9uLm9yZzCCASIwDQYJKoZIhvcNAQEB -+BQADggEPADCCAQoCggEBALXq7cn7Rn1vO3aA3TrzA5QLp6bb7B3f/yN0CJ2XFj+j -+pHs+Gw6WWSUDpybiiKnPec33BFawq3kyblnBMjBU61ioy5HwQqVkJ8vUVjGIUq3P -+vX/wBmQfzCe4o4uM89gpHyUL9UYGG8oCRa17dgqcv7u5rg0Wq2B1rgY+nHwx3JIv -+KRrgSwyRkGzpN8WQ1yrXlxWjgI9de0mPVDDUlywcWze1q2kwaEPTM3hLAmD1PESA -+oY/n8A/RXoeeRs9i/Pm/DGUS8ZPINXk/yOzsR/XvvkTVroIeLZqfmFpnZeF0cHzL -+08LODkVJJ9zjLdT7SA4vnne4FEbAxDbKAq5qkYzaL4UCAwEAAaOB0DCBzTAMBgNV -+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', '[email protected]'),)) -+ self.assertEqual(p['subject'], subject) -+ self.assertEqual(p['issuer'], subject) -+ self.assertEqual(p['subjectAltName'], -+ (('DNS', 'altnull.python.org\x00example.com'), -+ ('email', '[email protected]\[email protected]'), -+ ('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 deleted file mode 100644 index 41db4d2..0000000 --- a/dev-lang/python/files/CVE-2013-4238_py33.patch +++ /dev/null @@ -1,241 +0,0 @@ -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/[email protected] -+ 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/[email protected] -+ 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:[email protected], 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 -+ZW50MSQwIgYDVQQDDBtudWxsLnB5dGhvbi5vcmcAZXhhbXBsZS5vcmcxJDAiBgkq -+hkiG9w0BCQEWFXB5dGhvbi1kZXZAcHl0aG9uLm9yZzCCASIwDQYJKoZIhvcNAQEB -+BQADggEPADCCAQoCggEBALXq7cn7Rn1vO3aA3TrzA5QLp6bb7B3f/yN0CJ2XFj+j -+pHs+Gw6WWSUDpybiiKnPec33BFawq3kyblnBMjBU61ioy5HwQqVkJ8vUVjGIUq3P -+vX/wBmQfzCe4o4uM89gpHyUL9UYGG8oCRa17dgqcv7u5rg0Wq2B1rgY+nHwx3JIv -+KRrgSwyRkGzpN8WQ1yrXlxWjgI9de0mPVDDUlywcWze1q2kwaEPTM3hLAmD1PESA -+oY/n8A/RXoeeRs9i/Pm/DGUS8ZPINXk/yOzsR/XvvkTVroIeLZqfmFpnZeF0cHzL -+08LODkVJJ9zjLdT7SA4vnne4FEbAxDbKAq5qkYzaL4UCAwEAAaOB0DCBzTAMBgNV -+HRMBAf8EAjAAMB0GA1UdDgQWBBSIWlXAUv9hzVKjNQ/qWpwkOCL3XDALBgNVHQ8E -+BAMCBeAwgZAGA1UdEQSBiDCBhYIeYWx0bnVsbC5weXRob24ub3JnAGV4YW1wbGUu -+Y29tgSBudWxsQHB5dGhvbi5vcmcAdXNlckBleGFtcGxlLm9yZ4YpaHR0cDovL251 -+bGwucHl0aG9uLm9yZwBodHRwOi8vZXhhbXBsZS5vcmeHBMAAAgGHECABDbgAAAAA -+AAAAAAAAAAEwDQYJKoZIhvcNAQEFBQADggEBAKxPRe99SaghcI6IWT7UNkJw9aO9 -+i9eo0Fj2MUqxpKbdb9noRDy2CnHWf7EIYZ1gznXPdwzSN4YCjV5d+Q9xtBaowT0j -+HPERs1ZuytCNNJTmhyqZ8q6uzMLoht4IqH/FBfpvgaeC5tBTnTT0rD5A/olXeimk -+kX4LxlEx5RAvpGB2zZVRGr6LobD9rVK91xuHYNIxxxfEGE8tCCWjp0+3ksri9SXx -+VHWBnbM9YaL32u3hxm8sYB/Yb8WSBavJCWJJqRStVRHM1koZlJmXNx2BX4vPo6iW -+RFEIPQsFZRLrtnCAiEhyT8bC2s/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', '[email protected]'),)) -+ self.assertEqual(p['subject'], subject) -+ self.assertEqual(p['issuer'], subject) -+ self.assertEqual(p['subjectAltName'], -+ (('DNS', 'altnull.python.org\x00example.com'), -+ ('email', '[email protected]\[email protected]'), -+ ('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/Python-2.7.5-remove-ptmx-ptc-checks.patch b/dev-lang/python/files/Python-2.7.5-remove-ptmx-ptc-checks.patch deleted file mode 100644 index 1d7d9da..0000000 --- a/dev-lang/python/files/Python-2.7.5-remove-ptmx-ptc-checks.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff -Naur Python-2.7.5.orig/configure Python-2.7.5/configure ---- Python-2.7.5.orig/configure 2014-03-01 13:57:22.604047699 +0000 -+++ Python-2.7.5/configure 2014-03-01 14:01:12.096060532 +0000 -@@ -14247,72 +14247,6 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5 - $as_echo "$as_me: checking for device files" >&6;} - --if test "x$cross_compiling" = xyes; then -- if test "${ac_cv_file__dev_ptmx+set}" != set; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5 --$as_echo_n "checking for /dev/ptmx... " >&6; } -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5 --$as_echo "not set" >&6; } -- as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5 -- fi -- if test "${ac_cv_file__dev_ptc+set}" != set; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5 --$as_echo_n "checking for /dev/ptc... " >&6; } -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5 --$as_echo "not set" >&6; } -- as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5 -- fi --fi -- --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5 --$as_echo_n "checking for /dev/ptmx... " >&6; } --if ${ac_cv_file__dev_ptmx+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- test "$cross_compiling" = yes && -- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 --if test -r "/dev/ptmx"; then -- ac_cv_file__dev_ptmx=yes --else -- ac_cv_file__dev_ptmx=no --fi --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5 --$as_echo "$ac_cv_file__dev_ptmx" >&6; } --if test "x$ac_cv_file__dev_ptmx" = xyes; then : -- --fi -- --if test "x$ac_cv_file__dev_ptmx" = xyes; then -- --$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h -- --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5 --$as_echo_n "checking for /dev/ptc... " >&6; } --if ${ac_cv_file__dev_ptc+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- test "$cross_compiling" = yes && -- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 --if test -r "/dev/ptc"; then -- ac_cv_file__dev_ptc=yes --else -- ac_cv_file__dev_ptc=no --fi --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5 --$as_echo "$ac_cv_file__dev_ptc" >&6; } --if test "x$ac_cv_file__dev_ptc" = xyes; then : -- --fi -- --if test "x$ac_cv_file__dev_ptc" = xyes; then -- --$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h -- --fi -- - if test "$have_long_long" = yes - then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5 diff --git a/dev-lang/python/files/Python-3.3.4-remove-ptmx-ptc-checks.patch b/dev-lang/python/files/Python-3.3.4-remove-ptmx-ptc-checks.patch deleted file mode 100644 index 5d392ca..0000000 --- a/dev-lang/python/files/Python-3.3.4-remove-ptmx-ptc-checks.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff -Naur Python-3.3.4.org/configure Python-3.3.4/configure ---- Python-3.3.4.org/configure 2014-03-01 14:04:59.596073253 +0000 -+++ Python-3.3.4/configure 2014-03-01 14:06:48.095079319 +0000 -@@ -14660,72 +14660,6 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5 - $as_echo "$as_me: checking for device files" >&6;} - --if test "x$cross_compiling" = xyes; then -- if test "${ac_cv_file__dev_ptmx+set}" != set; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5 --$as_echo_n "checking for /dev/ptmx... " >&6; } -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5 --$as_echo "not set" >&6; } -- as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5 -- fi -- if test "${ac_cv_file__dev_ptc+set}" != set; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5 --$as_echo_n "checking for /dev/ptc... " >&6; } -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5 --$as_echo "not set" >&6; } -- as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5 -- fi --fi -- --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5 --$as_echo_n "checking for /dev/ptmx... " >&6; } --if ${ac_cv_file__dev_ptmx+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- test "$cross_compiling" = yes && -- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 --if test -r "/dev/ptmx"; then -- ac_cv_file__dev_ptmx=yes --else -- ac_cv_file__dev_ptmx=no --fi --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5 --$as_echo "$ac_cv_file__dev_ptmx" >&6; } --if test "x$ac_cv_file__dev_ptmx" = xyes; then : -- --fi -- --if test "x$ac_cv_file__dev_ptmx" = xyes; then -- --$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h -- --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5 --$as_echo_n "checking for /dev/ptc... " >&6; } --if ${ac_cv_file__dev_ptc+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- test "$cross_compiling" = yes && -- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 --if test -r "/dev/ptc"; then -- ac_cv_file__dev_ptc=yes --else -- ac_cv_file__dev_ptc=no --fi --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5 --$as_echo "$ac_cv_file__dev_ptc" >&6; } --if test "x$ac_cv_file__dev_ptc" = xyes; then : -- --fi -- --if test "x$ac_cv_file__dev_ptc" = xyes; then -- --$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h -- --fi -- - if test "$have_long_long" = yes - then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5 diff --git a/dev-lang/python/files/pydoc.conf b/dev-lang/python/files/pydoc.conf deleted file mode 100644 index 20e3628..0000000 --- a/dev-lang/python/files/pydoc.conf +++ /dev/null @@ -1,7 +0,0 @@ -# /etc/init.d/pydoc.conf -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/files/pydoc.conf,v 1.3 2011/10/27 13:56:55 neurogeek Exp $ - -# 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 deleted file mode 100755 index 0d62dfc..0000000 --- a/dev-lang/python/files/pydoc.init +++ /dev/null @@ -1,29 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2011 Gentoo Technologies, Inc. -# Distributed under the terms of the GNU General Public Licence v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/files/pydoc.init,v 1.4 2011/10/27 13:56:55 neurogeek Exp $ - -depend() { - need net -} - -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/@[email protected] \ - --exec /usr/bin/@PYDOC@ -- -p "${pydoc_port}" - eend $? -} - -stop() { - ebegin "Stopping pydoc server" - start-stop-daemon --stop --quiet --pidfile /var/run/@[email protected] - eend $? -} diff --git a/dev-lang/python/files/python-2.7-issue16248.patch b/dev-lang/python/files/python-2.7-issue16248.patch deleted file mode 100644 index ce9c654..0000000 --- a/dev-lang/python/files/python-2.7-issue16248.patch +++ /dev/null @@ -1,19 +0,0 @@ -# HG changeset patch -# User Antoine Pitrou <[email protected]> -# 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 deleted file mode 100644 index 35c69ae..0000000 --- a/dev-lang/python/files/python-2.7-issue18851.patch +++ /dev/null @@ -1,287 +0,0 @@ -# HG changeset patch -# User Antoine Pitrou <[email protected]> -# 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, creationflags, shell, to_close, - p2cread, p2cwrite, - c2pread, c2pwrite, - errread, errwrite): -@@ -934,6 +941,10 @@ class Popen(object): - # kill children. - creationflags |= _subprocess.CREATE_NEW_CONSOLE - -+ def _close_in_parent(fd): -+ fd.Close() -+ to_close.remove(fd) -+ - # Start the process - try: - hp, ht, pid, tid = _subprocess.CreateProcess(executable, args, -@@ -958,11 +969,11 @@ class Popen(object): - # pipe will not close when the child process exits and the - # ReadFile will hang. - if p2cread is not None: -- p2cread.Close() -+ _close_in_parent(p2cread) - if c2pwrite is not None: -- c2pwrite.Close() -+ _close_in_parent(c2pwrite) - if errwrite is not None: -- errwrite.Close() -+ _close_in_parent(errwrite) - - # Retain the process handle, but close the thread handle - self._child_created = True -@@ -1088,6 +1099,7 @@ class Popen(object): - """Construct and return tuple with IO objects: - p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite - """ -+ to_close = set() - p2cread, p2cwrite = None, None - c2pread, c2pwrite = None, None - errread, errwrite = None, None -@@ -1096,6 +1108,7 @@ class Popen(object): - pass - elif stdin == PIPE: - p2cread, p2cwrite = self.pipe_cloexec() -+ to_close.update((p2cread, p2cwrite)) - elif isinstance(stdin, int): - p2cread = stdin - else: -@@ -1106,6 +1119,7 @@ class Popen(object): - pass - elif stdout == PIPE: - c2pread, c2pwrite = self.pipe_cloexec() -+ to_close.update((c2pread, c2pwrite)) - elif isinstance(stdout, int): - c2pwrite = stdout - else: -@@ -1116,6 +1130,7 @@ class Popen(object): - pass - elif stderr == PIPE: - errread, errwrite = self.pipe_cloexec() -+ to_close.update((errread, errwrite)) - elif stderr == STDOUT: - errwrite = c2pwrite - elif isinstance(stderr, int): -@@ -1126,7 +1141,7 @@ class Popen(object): - - return (p2cread, p2cwrite, - c2pread, c2pwrite, -- errread, errwrite) -+ errread, errwrite), to_close - - - def _set_cloexec_flag(self, fd, cloexec=True): -@@ -1170,7 +1185,7 @@ class Popen(object): - - def _execute_child(self, args, executable, preexec_fn, close_fds, - cwd, env, universal_newlines, -- startupinfo, creationflags, shell, -+ startupinfo, creationflags, shell, to_close, - p2cread, p2cwrite, - c2pread, c2pwrite, - errread, errwrite): -@@ -1189,6 +1204,10 @@ class Popen(object): - if executable is None: - executable = args[0] - -+ def _close_in_parent(fd): -+ os.close(fd) -+ to_close.remove(fd) -+ - # For transferring possible exec failure from child to parent - # The first char specifies the exception type: 0 means - # OSError, 1 means some other error. -@@ -1283,17 +1302,17 @@ class Popen(object): - # be sure the FD is closed no matter what - os.close(errpipe_write) - -- if p2cread is not None and p2cwrite is not None: -- os.close(p2cread) -- if c2pwrite is not None and c2pread is not None: -- os.close(c2pwrite) -- if errwrite is not None and errread is not None: -- os.close(errwrite) -- - # Wait for exec to fail or succeed; possibly raising exception - # Exception limited to 1M - data = _eintr_retry_call(os.read, errpipe_read, 1048576) - finally: -+ if p2cread is not None and p2cwrite is not None: -+ _close_in_parent(p2cread) -+ if c2pwrite is not None and c2pread is not None: -+ _close_in_parent(c2pwrite) -+ if errwrite is not None and errread is not None: -+ _close_in_parent(errwrite) -+ - # be sure the FD is closed no matter what - os.close(errpipe_read) - -diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py ---- a/Lib/test/test_subprocess.py -+++ b/Lib/test/test_subprocess.py -@@ -14,6 +14,10 @@ try: - import resource - except ImportError: - resource = None -+try: -+ import threading -+except ImportError: -+ threading = None - - mswindows = (sys.platform == "win32") - -@@ -629,6 +633,36 @@ class ProcessTestCase(BaseTestCase): - if c.exception.errno not in (errno.ENOENT, errno.EACCES): - raise c.exception - -+ @unittest.skipIf(threading is None, "threading required") -+ def test_double_close_on_error(self): -+ # Issue #18851 -+ fds = [] -+ def open_fds(): -+ for i in range(20): -+ fds.extend(os.pipe()) -+ time.sleep(0.001) -+ t = threading.Thread(target=open_fds) -+ t.start() -+ try: -+ with self.assertRaises(EnvironmentError): -+ subprocess.Popen(['nonexisting_i_hope'], -+ stdin=subprocess.PIPE, -+ stdout=subprocess.PIPE, -+ stderr=subprocess.PIPE) -+ finally: -+ t.join() -+ exc = None -+ for fd in fds: -+ # If a double close occurred, some of those fds will -+ # already have been closed by mistake, and os.close() -+ # here will raise. -+ try: -+ os.close(fd) -+ except OSError as e: -+ exc = e -+ if exc is not None: -+ raise exc -+ - def test_handles_closed_on_exception(self): - # If CreateProcess exits with an error, ensure the - # duplicate output handles are released -@@ -783,7 +817,7 @@ class POSIXProcessTestCase(BaseTestCase) - - def _execute_child( - self, args, executable, preexec_fn, close_fds, cwd, env, -- universal_newlines, startupinfo, creationflags, shell, -+ universal_newlines, startupinfo, creationflags, shell, to_close, - p2cread, p2cwrite, - c2pread, c2pwrite, - errread, errwrite): -@@ -791,7 +825,7 @@ class POSIXProcessTestCase(BaseTestCase) - subprocess.Popen._execute_child( - self, args, executable, preexec_fn, close_fds, - cwd, env, universal_newlines, -- startupinfo, creationflags, shell, -+ startupinfo, creationflags, shell, to_close, - p2cread, p2cwrite, - c2pread, c2pwrite, - errread, errwrite) diff --git a/dev-lang/python/files/python-2.7.5-library-path.patch b/dev-lang/python/files/python-2.7.5-library-path.patch deleted file mode 100644 index 6f43575..0000000 --- a/dev-lang/python/files/python-2.7.5-library-path.patch +++ /dev/null @@ -1,25 +0,0 @@ -# HG changeset patch -# User Ned Deily <[email protected]> -# Date 1368666045 25200 -# Node ID cd577c3288860b0deb459443ca5c489dc0f99ef6 -# Parent 149340b3004acfcb68e5ed36b1e96b7463c756c7 -Issue #17990: Only modify include and library search paths when cross-compiling. - -diff --git a/setup.py b/setup.py ---- a/setup.py -+++ b/setup.py -@@ -437,9 +437,11 @@ class PyBuildExt(build_ext): - - def detect_modules(self): - # Ensure that /usr/local is always used -- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') -- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') -- self.add_gcc_paths() -+ if not cross_compiling: -+ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') -+ add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') -+ if cross_compiling: -+ self.add_gcc_paths() - self.add_multiarch_paths() - - # Add paths specified in the environment variables LDFLAGS and diff --git a/dev-lang/python/files/python-2.7.5-nonfatal-compileall.patch b/dev-lang/python/files/python-2.7.5-nonfatal-compileall.patch deleted file mode 100644 index a762dfb..0000000 --- a/dev-lang/python/files/python-2.7.5-nonfatal-compileall.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/Makefile.pre.in b/Makefile.pre.in ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -1000,12 +1000,12 @@ - $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ - $(DESTDIR)$(LIBDEST)/distutils/tests ; \ - fi -- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - $(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ - -d $(LIBDEST) -f \ - -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ - $(DESTDIR)$(LIBDEST) -- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ - -d $(LIBDEST) -f \ - -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ diff --git a/dev-lang/python/files/python-2.7.5-re_unsigned_ptrdiff.patch b/dev-lang/python/files/python-2.7.5-re_unsigned_ptrdiff.patch deleted file mode 100644 index a905839..0000000 --- a/dev-lang/python/files/python-2.7.5-re_unsigned_ptrdiff.patch +++ /dev/null @@ -1,23 +0,0 @@ -https://bugs.gentoo.org/show_bug.cgi?id=476426 -http://bugs.python.org/issue17998 -diff -r d91da96a55bf Modules/_sre.c ---- a/Modules/_sre.c Thu May 16 22:47:47 2013 +0100 -+++ b/Modules/_sre.c Fri May 17 21:02:48 2013 +0300 -@@ -1028,7 +1028,7 @@ - TRACE(("|%p|%p|REPEAT_ONE %d %d\n", ctx->pattern, ctx->ptr, - ctx->pattern[1], ctx->pattern[2])); - -- if (ctx->pattern[1] > end - ctx->ptr) -+ if ((Py_ssize_t) ctx->pattern[1] > end - ctx->ptr) - RETURN_FAILURE; /* cannot match */ - - state->ptr = ctx->ptr; -@@ -1111,7 +1111,7 @@ - TRACE(("|%p|%p|MIN_REPEAT_ONE %d %d\n", ctx->pattern, ctx->ptr, - ctx->pattern[1], ctx->pattern[2])); - -- if (ctx->pattern[1] > end - ctx->ptr) -+ if ((Py_ssize_t) ctx->pattern[1] > end - ctx->ptr) - RETURN_FAILURE; /* cannot match */ - - state->ptr = ctx->ptr; diff --git a/dev-lang/python/files/python-3.2-CVE-2013-2099.patch b/dev-lang/python/files/python-3.2-CVE-2013-2099.patch deleted file mode 100644 index 9055a03..0000000 --- a/dev-lang/python/files/python-3.2-CVE-2013-2099.patch +++ /dev/null @@ -1,51 +0,0 @@ -# HG changeset patch -# User Antoine Pitrou <[email protected]> -# Date 1368892602 -7200 -# Sat May 18 17:56:42 2013 +0200 -# Branch 3.2 -# Node ID b9b521efeba385af0142988899a55de1c1c805c7 -# Parent 6255b40c6a6127933d8ea7a2b9de200f5a0e6154 -Issue #17980: Fix possible abuse of ssl.match_hostname() for denial of service using certificates with many wildcards (CVE-2013-2099). - -diff --git a/Lib/ssl.py b/Lib/ssl.py ---- a/Lib/ssl.py -+++ b/Lib/ssl.py -@@ -108,9 +108,16 @@ - pass - - --def _dnsname_to_pat(dn): -+def _dnsname_to_pat(dn, max_wildcards=1): - pats = [] - for frag in dn.split(r'.'): -+ if frag.count('*') > max_wildcards: -+ # Issue #17980: avoid denials of service by refusing more -+ # than one wildcard per fragment. A survery of established -+ # policy among SSL implementations showed it to be a -+ # reasonable choice. -+ raise CertificateError( -+ "too many wildcards in certificate DNS name: " + repr(dn)) - if frag == '*': - # When '*' is a fragment by itself, it matches a non-empty dotless - # fragment. -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py ---- a/Lib/test/test_ssl.py -+++ b/Lib/test/test_ssl.py -@@ -326,6 +326,17 @@ - self.assertRaises(ValueError, ssl.match_hostname, None, 'example.com') - self.assertRaises(ValueError, ssl.match_hostname, {}, 'example.com') - -+ # Issue #17980: avoid denials of service by refusing more than one -+ # wildcard per fragment. -+ cert = {'subject': ((('commonName', 'a*b.com'),),)} -+ ok(cert, 'axxb.com') -+ cert = {'subject': ((('commonName', 'a*b.co*'),),)} -+ ok(cert, 'axxb.com') -+ cert = {'subject': ((('commonName', 'a*b*.com'),),)} -+ with self.assertRaises(ssl.CertificateError) as cm: -+ ssl.match_hostname(cert, 'axxbxxc.com') -+ self.assertIn("too many wildcards", str(cm.exception)) -+ - def test_server_side(self): - # server_hostname doesn't work for server sockets - ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23) diff --git a/dev-lang/python/files/python-3.2-issue16248.patch b/dev-lang/python/files/python-3.2-issue16248.patch deleted file mode 100644 index d0e80ca..0000000 --- a/dev-lang/python/files/python-3.2-issue16248.patch +++ /dev/null @@ -1,19 +0,0 @@ -# HG changeset patch -# User Georg Brandl <[email protected]> -# Date 1379142489 -7200 -# Node ID c18c18774e240377d47638fb23e8276c1ac2e606 -# Parent b9b521efeba385af0142988899a55de1c1c805c7 -Fix tkinter regression introduced by the security fix in #16248. - -diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py ---- a/Lib/tkinter/__init__.py -+++ b/Lib/tkinter/__init__.py -@@ -1722,7 +1722,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-3.3-CVE-2013-2099.patch b/dev-lang/python/files/python-3.3-CVE-2013-2099.patch deleted file mode 100644 index 44b9ace..0000000 --- a/dev-lang/python/files/python-3.3-CVE-2013-2099.patch +++ /dev/null @@ -1,51 +0,0 @@ -# HG changeset patch -# User Antoine Pitrou <[email protected]> -# Date 1368892602 -7200 -# Sat May 18 17:56:42 2013 +0200 -# Branch 3.3 -# Node ID c627638753e2d25a98950585b259104a025937a9 -# Parent 9682241dc8fcb4b1aef083bd30860efa070c3d6d -Issue #17980: Fix possible abuse of ssl.match_hostname() for denial of service using certificates with many wildcards (CVE-2013-2099). - -diff --git a/Lib/ssl.py b/Lib/ssl.py ---- a/Lib/ssl.py -+++ b/Lib/ssl.py -@@ -129,9 +129,16 @@ - pass - - --def _dnsname_to_pat(dn): -+def _dnsname_to_pat(dn, max_wildcards=1): - pats = [] - for frag in dn.split(r'.'): -+ if frag.count('*') > max_wildcards: -+ # Issue #17980: avoid denials of service by refusing more -+ # than one wildcard per fragment. A survery of established -+ # policy among SSL implementations showed it to be a -+ # reasonable choice. -+ raise CertificateError( -+ "too many wildcards in certificate DNS name: " + repr(dn)) - if frag == '*': - # When '*' is a fragment by itself, it matches a non-empty dotless - # fragment. -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py ---- a/Lib/test/test_ssl.py -+++ b/Lib/test/test_ssl.py -@@ -349,6 +349,17 @@ - self.assertRaises(ValueError, ssl.match_hostname, None, 'example.com') - self.assertRaises(ValueError, ssl.match_hostname, {}, 'example.com') - -+ # Issue #17980: avoid denials of service by refusing more than one -+ # wildcard per fragment. -+ cert = {'subject': ((('commonName', 'a*b.com'),),)} -+ ok(cert, 'axxb.com') -+ cert = {'subject': ((('commonName', 'a*b.co*'),),)} -+ ok(cert, 'axxb.com') -+ cert = {'subject': ((('commonName', 'a*b*.com'),),)} -+ with self.assertRaises(ssl.CertificateError) as cm: -+ ssl.match_hostname(cert, 'axxbxxc.com') -+ self.assertIn("too many wildcards", str(cm.exception)) -+ - def test_server_side(self): - # server_hostname doesn't work for server sockets - ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23) diff --git a/dev-lang/python/files/python-3.3-fix-posix-close-clash.patch b/dev-lang/python/files/python-3.3-fix-posix-close-clash.patch deleted file mode 100644 index e28e592..0000000 --- a/dev-lang/python/files/python-3.3-fix-posix-close-clash.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -Naur Python-3.3.2.orig/Modules/posixmodule.c Python-3.3.2/Modules/posixmodule.c ---- Python-3.3.2.orig/Modules/posixmodule.c 2013-05-15 16:32:59.000000000 +0000 -+++ Python-3.3.2/Modules/posixmodule.c 2014-01-15 15:36:55.852467918 +0000 -@@ -7679,7 +7679,7 @@ - Close a file descriptor (for low level IO)."); - - static PyObject * --posix_close(PyObject *self, PyObject *args) -+posix_closex(PyObject *self, PyObject *args) - { - int fd, res; - if (!PyArg_ParseTuple(args, "i:close", &fd)) -@@ -11082,7 +11082,7 @@ - {"open", (PyCFunction)posix_open,\ - METH_VARARGS | METH_KEYWORDS, - posix_open__doc__}, -- {"close", posix_close, METH_VARARGS, posix_close__doc__}, -+ {"close", posix_closex, METH_VARARGS, posix_close__doc__}, - {"closerange", posix_closerange, METH_VARARGS, posix_closerange__doc__}, - {"device_encoding", device_encoding, METH_VARARGS, device_encoding__doc__}, - {"dup", posix_dup, METH_VARARGS, posix_dup__doc__}, diff --git a/dev-lang/python/files/python-3.3-lchmod.patch b/dev-lang/python/files/python-3.3-lchmod.patch deleted file mode 100644 index 4174d14..0000000 --- a/dev-lang/python/files/python-3.3-lchmod.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/Python-3.3.3/Modules/posixmodule.c -+++ b/Python-3.3.3/Modules/posixmodule.c -@@ -2837,8 +2837,13 @@ - else - #endif - #ifdef HAVE_LCHMOD -- if ((!follow_symlinks) && (dir_fd == DEFAULT_DIR_FD)) -+ if ((!follow_symlinks) && (dir_fd == DEFAULT_DIR_FD)) { - result = lchmod(path.narrow, mode); -+ fchmodat_nofollow_unsupported = -+ result && -+ ((errno == ENOTSUP) || (errno == EOPNOTSUPP)) && -+ !follow_symlinks; -+ } - else - #endif - #ifdef HAVE_FCHMODAT diff --git a/dev-lang/python/files/python-3.3-xattr.patch b/dev-lang/python/files/python-3.3-xattr.patch deleted file mode 100644 index d54e9c6..0000000 --- a/dev-lang/python/files/python-3.3-xattr.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/Python-3.3.3/Modules/posixmodule.c -+++ b/Python-3.3.3/Modules/posixmodule.c -@@ -114,7 +114,7 @@ - #undef HAVE_SCHED_SETAFFINITY - #endif - --#if defined(HAVE_SYS_XATTR_H) && defined(__GLIBC__) -+#if defined(HAVE_SYS_XATTR_H) - #define USE_XATTRS - #endif - -@@ -122,6 +122,10 @@ - #include <sys/xattr.h> - #endif - -+#if defined(__linux__) -+#include <linux/limits.h> -+#endif -+ - #if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__APPLE__) - #ifdef HAVE_SYS_SOCKET_H - #include <sys/socket.h> diff --git a/dev-lang/python/files/python-fix-posix-close-clash.patch b/dev-lang/python/files/python-fix-posix-close-clash.patch deleted file mode 100644 index e6e45e8..0000000 --- a/dev-lang/python/files/python-fix-posix-close-clash.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- Python-2.7.6.org/Modules/posixmodule.c -+++ Python-2.7.6/Modules/posixmodule.c -@@ -6582,7 +6582,7 @@ - Close a file descriptor (for low level IO)."); - - static PyObject * --posix_close(PyObject *self, PyObject *args) -+posix_closex(PyObject *self, PyObject *args) - { - int fd, res; - if (!PyArg_ParseTuple(args, "i:close", &fd)) -@@ -8960,7 +8960,7 @@ - {"tcsetpgrp", posix_tcsetpgrp, METH_VARARGS, posix_tcsetpgrp__doc__}, - #endif /* HAVE_TCSETPGRP */ - {"open", posix_open, METH_VARARGS, posix_open__doc__}, -- {"close", posix_close, METH_VARARGS, posix_close__doc__}, -+ {"close", posix_closex, METH_VARARGS, posix_close__doc__}, - {"closerange", posix_closerange, METH_VARARGS, posix_closerange__doc__}, - {"dup", posix_dup, METH_VARARGS, posix_dup__doc__}, - {"dup2", posix_dup2, METH_VARARGS, posix_dup2__doc__}, diff --git a/dev-lang/python/metadata.xml b/dev-lang/python/metadata.xml deleted file mode 100644 index 51a9e80..0000000 --- a/dev-lang/python/metadata.xml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<herd>python</herd> -<use> - <flag name="threads">Enable threading support. (DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU'RE DOING)</flag> - <flag name="wide-unicode">Enable wide Unicode implementation which uses 4-byte Unicode characters. Switching of this USE flag changes ABI of Python and requires reinstallation of many Python modules. (DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU'RE DOING)</flag> - <flag name="wininst">Install Windows executables required to create an executable installer for MS Windows.</flag> -</use> -</pkgmetadata> diff --git a/dev-lang/python/python-2.7.5-r99.ebuild b/dev-lang/python/python-2.7.5-r99.ebuild deleted file mode 100644 index f237d49..0000000 --- a/dev-lang/python/python-2.7.5-r99.ebuild +++ /dev/null @@ -1,359 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.7.5-r3.ebuild,v 1.3 2013/12/30 21:57:26 floppym Exp $ - -EAPI="4" -WANT_AUTOMAKE="none" -WANT_LIBTOOL="none" - -inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing - -MY_P="Python-${PV}" -PATCHSET_REVISION="0" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE="http://www.python.org/" -SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz - mirror://gentoo/python-gentoo-patches-${PV}-${PATCHSET_REVISION}.tar.xz" - -LICENSE="PSF-2" -SLOT="2.7" -KEYWORDS="amd64 arm ~mips x86" -IUSE="-berkdb build doc elibc_uclibc examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND="app-arch/bzip2 - >=sys-libs/zlib-1.1.3 - virtual/libffi - virtual/libintl - !build? ( - berkdb? ( || ( - sys-libs/db:5.3 - sys-libs/db:5.2 - sys-libs/db:5.1 - sys-libs/db:5.0 - sys-libs/db:4.8 - sys-libs/db:4.7 - sys-libs/db:4.6 - sys-libs/db:4.5 - sys-libs/db:4.4 - sys-libs/db:4.3 - sys-libs/db:4.2 - ) ) - gdbm? ( sys-libs/gdbm[berkdb] ) - ncurses? ( - >=sys-libs/ncurses-5.2 - readline? ( >=sys-libs/readline-4.1 ) - ) - sqlite? ( >=dev-db/sqlite-3.3.8:3 ) - ssl? ( dev-libs/openssl ) - tk? ( - >=dev-lang/tk-8.0 - dev-tcltk/blt - ) - xml? ( >=dev-libs/expat-2.1 ) - ) - !!<sys-apps/portage-2.1.9" -DEPEND="${RDEPEND} - virtual/pkgconfig - >=sys-devel/autoconf-2.65 - !sys-devel/gcc[libffi]" -RDEPEND+=" !build? ( app-misc/mime-types ) - doc? ( dev-python/python-docs:${SLOT} )" -PDEPEND="app-admin/eselect-python - app-admin/python-updater" - -S="${WORKDIR}/${MY_P}" - -pkg_setup() { - if use berkdb; then - ewarn "'bsddb' module is out-of-date and no longer maintained inside" - ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been additionally" - ewarn "removed in Python 3. A maintained alternative of 'bsddb3' module" - ewarn "is provided by dev-python/bsddb3." - else - if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then - ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb]" - ewarn "to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]." - ewarn "You might need to migrate your databases." - fi - fi -} - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -r Modules/expat || die - rm -r Modules/_ctypes/libffi* || die - rm -r Modules/zlib || die - - if tc-is-cross-compiler; then - local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch" - fi - - EPATCH_SUFFIX="patch" epatch "${WORKDIR}/${PV}-${PATCHSET_REVISION}" - - epatch "${FILESDIR}/${P}-library-path.patch" #474882 - epatch "${FILESDIR}/${P}-re_unsigned_ptrdiff.patch" #476426 - epatch "${FILESDIR}/CVE-2013-4238_py27.patch" - epatch "${FILESDIR}/python-2.7-issue16248.patch" - - # Fix for cross-compiling. - epatch "${FILESDIR}/python-2.7.5-nonfatal-compileall.patch" - - # Fix for class with posix_close on musl - epatch "${FILESDIR}/python-fix-posix-close-clash.patch" - - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ - Lib/distutils/command/install.py \ - Lib/distutils/sysconfig.py \ - Lib/site.py \ - Lib/sysconfig.py \ - Lib/test/test_site.py \ - Makefile.pre.in \ - Modules/Setup.dist \ - Modules/getpath.c \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - epatch_user - epatch "${FILESDIR}/Python-2.7.5-remove-ptmx-ptc-checks.patch" - - eautoconf - eautoheader -} - -src_configure() { - if use build; then - # Disable extraneous modules with extra dependencies. - export PYTHON_DISABLE_MODULES="dbm _bsddb gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat" - export PYTHON_DISABLE_SSL="1" - else - # dbm module can be linked against berkdb or gdbm. - # Defaults to gdbm when both are enabled, #204343. - local disable - use berkdb || use gdbm || disable+=" dbm" - use berkdb || disable+=" _bsddb" - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. - export PYTHON_DISABLE_MODULES="${disable}" - - if ! use xml; then - ewarn "You have configured Python without XML support." - ewarn "This is NOT a recommended configuration as you" - ewarn "may face problems parsing any XML documents." - fi - fi - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - if [[ "$(gcc-major-version)" -ge 4 ]]; then - append-flags -fwrapv - fi - - filter-flags -malign-double - - [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC - - # https://bugs.gentoo.org/show_bug.cgi?id=50309 - if is-flagq -O3; then - is-flagq -fstack-protector-all && replace-flags -O3 -O2 - use hardened && replace-flags -O3 -O2 - fi - - # Export CXX so it ends up in /usr/lib/python2.X/config/Makefile. - tc-export CXX - # The configure script fails to use pkg-config correctly. - # http://bugs.python.org/issue15506 - export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) - - # Set LDFLAGS so we link modules with -lpython2.7 correctly. - # Needed on FreeBSD unless Python 2.7 is already installed. - # Please query BSD team before removing this! - append-ldflags "-L." - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - if use berkdb; then - dbmliborder+="${dbmliborder:+:}bdb" - fi - - BUILD_DIR="${WORKDIR}/${CHOST}" - mkdir -p "${BUILD_DIR}" || die - cd "${BUILD_DIR}" || die - - ECONF_SOURCE="${S}" OPT="" \ - econf \ - --with-fpectl \ - --enable-shared \ - $(use_enable ipv6) \ - $(use_with threads) \ - $(use wide-unicode && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2") \ - --infodir='${prefix}/share/info' \ - --mandir='${prefix}/share/man' \ - --with-dbmliborder="${dbmliborder}" \ - --with-libc="" \ - --enable-loadable-sqlite-extensions \ - --with-system-expat \ - --with-system-ffi - - if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi -} - -src_compile() { - # Avoid invoking pgen for cross-compiles. - touch Include/graminit.h Python/graminit.c - - cd "${BUILD_DIR}" || die - emake - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - cd "${BUILD_DIR}" || die - - # Skip failing tests. - local skipped_tests="distutils gdb" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - # Rerun failed tests in verbose mode (regrtest -w). - emake test EXTRATESTOPTS="-w" < /dev/tty - local result="$?" - - for test in ${skipped_tests}; do - mv "${T}/test_${test}.py" "${S}"/Lib/test - done - - elog "The following tests have been skipped:" - for test in ${skipped_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'" - elog "and run the tests separately." - - if [[ "${result}" -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - local libdir=${ED}/usr/$(get_libdir)/python${SLOT} - - cd "${BUILD_DIR}" || die - emake DESTDIR="${D}" altinstall - - sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die "sed failed" - - # Backwards compat with Gentoo divergence. - dosym python${SLOT}-config /usr/bin/python-config-${SLOT} - - # Fix collisions between different slots of Python. - mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}" - mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}" - mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}" - rm -f "${ED}usr/bin/smtpd.py" - - if use build; then - rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{bsddb,dbhash.py,idlelib,lib-tk,sqlite3,test} - else - use berkdb || rm -r "${libdir}/"{bsddb,dbhash.py,test/test_bsddb*} || die - use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die - use tk || rm -r "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,lib-tk} || die - use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test} - fi - - use threads || rm -r "${libdir}/multiprocessing" || die - use wininst || rm -r "${libdir}/distutils/command/"wininst-*.exe || die - - dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} || die "dodoc failed" - - if use examples; then - insinto /usr/share/doc/${PF}/examples - doins -r "${S}"/Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ - emake --no-print-directory -s -f - 2>/dev/null) - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} - newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${SLOT}:" \ - -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed" - - # for python-exec - python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR - - # if not using a cross-compiler, use the fresh binary - if ! tc-is-cross-compiler; then - local PYTHON=./python - local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}. - fi - - echo "EPYTHON='${EPYTHON}'" > epython.py - python_domodule epython.py -} - -pkg_preinst() { - if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version "${CATEGORY}/${PN}:2.7"; then - python_updater_warning="1" - fi -} - -eselect_python_update() { - if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then - eselect python update - fi - - if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then - eselect python update --python${PV%%.*} - fi -} - -pkg_postinst() { - eselect_python_update - - if [[ "${python_updater_warning}" == "1" ]]; then - ewarn "You have just upgraded from an older version of Python." - ewarn "You should switch active version of Python ${PV%%.*} and run" - ewarn "'python-updater [options]' to rebuild Python modules." - fi -} - -pkg_postrm() { - eselect_python_update -} diff --git a/dev-lang/python/python-2.7.6-r99.ebuild b/dev-lang/python/python-2.7.6-r99.ebuild deleted file mode 100644 index 6778fed..0000000 --- a/dev-lang/python/python-2.7.6-r99.ebuild +++ /dev/null @@ -1,361 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.7.6.ebuild,v 1.8 2014/03/20 14:13:55 jer Exp $ - -EAPI="4" -WANT_AUTOMAKE="none" -WANT_LIBTOOL="none" - -inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing - -MY_P="Python-${PV}" -PATCHSET_REVISION="1" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE="http://www.python.org/" -SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz - mirror://gentoo/python-gentoo-patches-${PV}-${PATCHSET_REVISION}.tar.xz - http://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PV}-${PATCHSET_REVISION}.tar.xz" - -LICENSE="PSF-2" -SLOT="2.7" -KEYWORDS="amd64 arm mips x86" -IUSE="-berkdb build doc elibc_uclibc examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND="app-arch/bzip2 - >=sys-libs/zlib-1.1.3 - virtual/libffi - virtual/libintl - !build? ( - berkdb? ( || ( - sys-libs/db:5.3 - sys-libs/db:5.2 - sys-libs/db:5.1 - sys-libs/db:5.0 - sys-libs/db:4.8 - sys-libs/db:4.7 - sys-libs/db:4.6 - sys-libs/db:4.5 - sys-libs/db:4.4 - sys-libs/db:4.3 - sys-libs/db:4.2 - ) ) - gdbm? ( sys-libs/gdbm[berkdb] ) - ncurses? ( - >=sys-libs/ncurses-5.2 - readline? ( >=sys-libs/readline-4.1 ) - ) - sqlite? ( >=dev-db/sqlite-3.3.8:3 ) - ssl? ( dev-libs/openssl ) - tk? ( - >=dev-lang/tk-8.0 - dev-tcltk/blt - ) - xml? ( >=dev-libs/expat-2.1 ) - ) - !!<sys-apps/portage-2.1.9" -DEPEND="${RDEPEND} - virtual/pkgconfig - >=sys-devel/autoconf-2.65 - !sys-devel/gcc[libffi]" -RDEPEND+=" !build? ( app-misc/mime-types ) - doc? ( dev-python/python-docs:${SLOT} )" -PDEPEND="app-admin/eselect-python - app-admin/python-updater" - -S="${WORKDIR}/${MY_P}" - -pkg_setup() { - if use berkdb; then - ewarn "'bsddb' module is out-of-date and no longer maintained inside" - ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been additionally" - ewarn "removed in Python 3. A maintained alternative of 'bsddb3' module" - ewarn "is provided by dev-python/bsddb3." - else - if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then - ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb]" - ewarn "to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]." - ewarn "You might need to migrate your databases." - fi - fi -} - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -r Modules/expat || die - rm -r Modules/_ctypes/libffi* || die - rm -r Modules/zlib || die - - if tc-is-cross-compiler; then - local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch" - fi - - EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches" - - # Fix for cross-compiling. - epatch "${FILESDIR}/python-2.7.5-nonfatal-compileall.patch" - - # Fix for class with posix_close on musl - epatch "${FILESDIR}/python-fix-posix-close-clash.patch" - - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ - Lib/distutils/command/install.py \ - Lib/distutils/sysconfig.py \ - Lib/site.py \ - Lib/sysconfig.py \ - Lib/test/test_site.py \ - Makefile.pre.in \ - Modules/Setup.dist \ - Modules/getpath.c \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - epatch_user - epatch "${FILESDIR}/Python-2.7.5-remove-ptmx-ptc-checks.patch" - - eautoconf - eautoheader -} - -src_configure() { - if use build; then - # Disable extraneous modules with extra dependencies. - export PYTHON_DISABLE_MODULES="dbm _bsddb gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat" - export PYTHON_DISABLE_SSL="1" - else - # dbm module can be linked against berkdb or gdbm. - # Defaults to gdbm when both are enabled, #204343. - local disable - use berkdb || use gdbm || disable+=" dbm" - use berkdb || disable+=" _bsddb" - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. - export PYTHON_DISABLE_MODULES="${disable}" - - if ! use xml; then - ewarn "You have configured Python without XML support." - ewarn "This is NOT a recommended configuration as you" - ewarn "may face problems parsing any XML documents." - fi - fi - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - if [[ "$(gcc-major-version)" -ge 4 ]]; then - append-flags -fwrapv - fi - - filter-flags -malign-double - - [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC - - # https://bugs.gentoo.org/show_bug.cgi?id=50309 - if is-flagq -O3; then - is-flagq -fstack-protector-all && replace-flags -O3 -O2 - use hardened && replace-flags -O3 -O2 - fi - - if tc-is-cross-compiler; then - # Force some tests that try to poke fs paths. - export ac_cv_file__dev_ptc=no - export ac_cv_file__dev_ptmx=yes - fi - - # Export CXX so it ends up in /usr/lib/python2.X/config/Makefile. - tc-export CXX - # The configure script fails to use pkg-config correctly. - # http://bugs.python.org/issue15506 - export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) - - # Set LDFLAGS so we link modules with -lpython2.7 correctly. - # Needed on FreeBSD unless Python 2.7 is already installed. - # Please query BSD team before removing this! - append-ldflags "-L." - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - if use berkdb; then - dbmliborder+="${dbmliborder:+:}bdb" - fi - - BUILD_DIR="${WORKDIR}/${CHOST}" - mkdir -p "${BUILD_DIR}" || die - cd "${BUILD_DIR}" || die - - ECONF_SOURCE="${S}" OPT="" \ - econf \ - --with-fpectl \ - --enable-shared \ - $(use_enable ipv6) \ - $(use_with threads) \ - $(use wide-unicode && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2") \ - --infodir='${prefix}/share/info' \ - --mandir='${prefix}/share/man' \ - --with-dbmliborder="${dbmliborder}" \ - --with-libc="" \ - --enable-loadable-sqlite-extensions \ - --with-system-expat \ - --with-system-ffi - - if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi -} - -src_compile() { - # Avoid invoking pgen for cross-compiles. - touch Include/graminit.h Python/graminit.c - - cd "${BUILD_DIR}" || die - emake - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - cd "${BUILD_DIR}" || die - - # Skip failing tests. - local skipped_tests="distutils gdb" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - # Rerun failed tests in verbose mode (regrtest -w). - emake test EXTRATESTOPTS="-w" < /dev/tty - local result="$?" - - for test in ${skipped_tests}; do - mv "${T}/test_${test}.py" "${S}"/Lib/test - done - - elog "The following tests have been skipped:" - for test in ${skipped_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'" - elog "and run the tests separately." - - if [[ "${result}" -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - local libdir=${ED}/usr/$(get_libdir)/python${SLOT} - - cd "${BUILD_DIR}" || die - emake DESTDIR="${D}" altinstall - - sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die "sed failed" - - # Backwards compat with Gentoo divergence. - dosym python${SLOT}-config /usr/bin/python-config-${SLOT} - - # Fix collisions between different slots of Python. - mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}" - mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}" - mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}" - rm -f "${ED}usr/bin/smtpd.py" - - if use build; then - rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{bsddb,dbhash.py,idlelib,lib-tk,sqlite3,test} - else - use berkdb || rm -r "${libdir}/"{bsddb,dbhash.py,test/test_bsddb*} || die - use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die - use tk || rm -r "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,lib-tk} || die - use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test} - fi - - use threads || rm -r "${libdir}/multiprocessing" || die - use wininst || rm -r "${libdir}/distutils/command/"wininst-*.exe || die - - dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - insinto /usr/share/doc/${PF}/examples - doins -r "${S}"/Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ - emake --no-print-directory -s -f - 2>/dev/null) - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} - newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${SLOT}:" \ - -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed" - - # for python-exec - python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR - - # if not using a cross-compiler, use the fresh binary - if ! tc-is-cross-compiler; then - local PYTHON=./python - local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}. - fi - - echo "EPYTHON='${EPYTHON}'" > epython.py - python_domodule epython.py -} - -pkg_preinst() { - if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version "${CATEGORY}/${PN}:2.7"; then - python_updater_warning="1" - fi -} - -eselect_python_update() { - if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then - eselect python update - fi - - if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then - eselect python update --python${PV%%.*} - fi -} - -pkg_postinst() { - eselect_python_update - - if [[ "${python_updater_warning}" == "1" ]]; then - ewarn "You have just upgraded from an older version of Python." - ewarn "You should switch active version of Python ${PV%%.*} and run" - ewarn "'python-updater [options]' to rebuild Python modules." - fi -} - -pkg_postrm() { - eselect_python_update -} diff --git a/dev-lang/python/python-3.2.5-r99.ebuild b/dev-lang/python/python-3.2.5-r99.ebuild deleted file mode 100644 index ec8267c..0000000 --- a/dev-lang/python/python-3.2.5-r99.ebuild +++ /dev/null @@ -1,379 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-3.2.5-r3.ebuild,v 1.3 2013/12/30 21:57:26 floppym Exp $ - -EAPI="4" -WANT_AUTOMAKE="none" -WANT_LIBTOOL="none" - -inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing - -MY_P="Python-${PV}" -PATCHSET_REVISION="0" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE="http://www.python.org/" -SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz - mirror://gentoo/python-gentoo-patches-${PV}-${PATCHSET_REVISION}.tar.xz" - -LICENSE="PSF-2" -SLOT="3.2" -KEYWORDS="amd64 arm ~mips x86" -IUSE="build doc elibc_uclibc examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND="app-arch/bzip2 - >=sys-libs/zlib-1.1.3 - virtual/libffi - virtual/libintl - !build? ( - gdbm? ( sys-libs/gdbm[berkdb] ) - ncurses? ( - >=sys-libs/ncurses-5.2 - readline? ( >=sys-libs/readline-4.1 ) - ) - sqlite? ( >=dev-db/sqlite-3.3.8:3 ) - ssl? ( dev-libs/openssl ) - tk? ( - >=dev-lang/tk-8.0 - dev-tcltk/blt - ) - xml? ( >=dev-libs/expat-2.1 ) - )" -DEPEND="${RDEPEND} - virtual/pkgconfig - >=sys-devel/autoconf-2.65 - !sys-devel/gcc[libffi]" -RDEPEND+=" !build? ( app-misc/mime-types ) - doc? ( dev-python/python-docs:${SLOT} )" -PDEPEND="app-admin/eselect-python - app-admin/python-updater" - -S="${WORKDIR}/${MY_P}" - -pkg_setup() { - if [[ "${PV}" =~ ^3\.2(\.[1234])?(_pre)? ]]; then - rm -f "${EROOT}usr/$(get_libdir)/llibpython3.so" - else - die "Deprecated code not deleted" - fi -} - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -r Modules/expat - rm -r Modules/_ctypes/libffi* - rm -r Modules/zlib - - local excluded_patches - if ! tc-is-cross-compiler; then - excluded_patches="*_all_crosscompile.patch" - fi - - EPATCH_EXCLUDE="${excluded_patches}" EPATCH_SUFFIX="patch" \ - epatch "${WORKDIR}/${PV}-${PATCHSET_REVISION}" - - epatch "${FILESDIR}/python-3.2-CVE-2013-2099.patch" - epatch "${FILESDIR}/CVE-2013-4238_py33.patch" - epatch "${FILESDIR}/python-3.2-issue16248.patch" - - # Fix for class with posix_close on musl - epatch "${FILESDIR}/python-fix-posix-close-clash.patch" - - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ - Lib/distutils/command/install.py \ - Lib/distutils/sysconfig.py \ - Lib/site.py \ - Lib/sysconfig.py \ - Lib/test/test_site.py \ - Makefile.pre.in \ - Modules/Setup.dist \ - Modules/getpath.c \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - # Disable ABI flags. - sed -e "s/ABIFLAGS=\"\${ABIFLAGS}.*\"/:/" -i configure.ac || die "sed failed" - - epatch_user - - eautoconf - eautoheader -} - -src_configure() { - if use build; then - # Disable extraneous modules with extra dependencies. - export PYTHON_DISABLE_MODULES="gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat" - export PYTHON_DISABLE_SSL="1" - else - local disable - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. - export PYTHON_DISABLE_MODULES="${disable}" - - if ! use xml; then - ewarn "You have configured Python without XML support." - ewarn "This is NOT a recommended configuration as you" - ewarn "may face problems parsing any XML documents." - fi - fi - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - if [[ "$(gcc-major-version)" -ge 4 ]]; then - append-flags -fwrapv - fi - - filter-flags -malign-double - - [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC - - # https://bugs.gentoo.org/show_bug.cgi?id=50309 - if is-flagq -O3; then - is-flagq -fstack-protector-all && replace-flags -O3 -O2 - use hardened && replace-flags -O3 -O2 - fi - - # Run the configure scripts in parallel. - multijob_init - - mkdir -p "${WORKDIR}"/{${CBUILD},${CHOST}} - - if tc-is-cross-compiler; then - ( - multijob_child_init - cd "${WORKDIR}"/${CBUILD} >/dev/null - OPT="-O1" CFLAGS="" CPPFLAGS="" LDFLAGS="" CC="" \ - "${S}"/configure \ - --{build,host}=${CBUILD} \ - || die "cross-configure failed" - ) & - multijob_post_fork - - # The configure script assumes it's buggy when cross-compiling. - export ac_cv_buggy_getaddrinfo=no - export ac_cv_have_long_long_format=yes - fi - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - tc-export CXX - # The configure script fails to use pkg-config correctly. - # http://bugs.python.org/issue15506 - export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) - - # Set LDFLAGS so we link modules with -lpython3.2 correctly. - # Needed on FreeBSD unless Python 3.2 is already installed. - # Please query BSD team before removing this! - append-ldflags "-L." - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - cd "${WORKDIR}"/${CHOST} - ECONF_SOURCE=${S} OPT="" \ - econf \ - --with-fpectl \ - --enable-shared \ - $(use_enable ipv6) \ - $(use_with threads) \ - $(use_with wide-unicode) \ - --infodir='${prefix}/share/info' \ - --mandir='${prefix}/share/man' \ - --with-computed-gotos \ - --with-dbmliborder="${dbmliborder}" \ - --with-libc="" \ - --enable-loadable-sqlite-extensions \ - --with-system-expat \ - --with-system-ffi - - if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi - - if tc-is-cross-compiler; then - # Modify the Makefile.pre so we don't regen for the host/ one. - # We need to link the host python programs into $PWD and run - # them from here because the distutils sysconfig module will - # parse Makefile/etc... from argv[0], and we need it to pick - # up the target settings, not the host ones. - sed -i \ - -e '1iHOSTPYTHONPATH = ./hostpythonpath:' \ - -e '/^HOSTPYTHON/s:=.*:= ./hostpython:' \ - -e '/^HOSTPGEN/s:=.*:= ./Parser/hostpgen:' \ - Makefile{.pre,} || die "sed failed" - fi - - multijob_finish -} - -src_compile() { - if tc-is-cross-compiler; then - cd "${WORKDIR}"/${CBUILD} - # Disable as many modules as possible -- but we need a few to install. - PYTHON_DISABLE_MODULES=$( - sed -n "/Extension('/{s:^.*Extension('::;s:'.*::;p}" "${S}"/setup.py | \ - egrep -v '(unicodedata|time|cStringIO|_struct|binascii)' - ) \ - PTHON_DISABLE_SSL="1" \ - SYSROOT= \ - emake - # See comment in src_configure about these. - ln python ../${CHOST}/hostpython || die - ln Parser/pgen ../${CHOST}/Parser/hostpgen || die - ln -s ../${CBUILD}/build/lib.*/ ../${CHOST}/hostpythonpath || die - fi - - cd "${WORKDIR}"/${CHOST} - emake CPPFLAGS="" CFLAGS="" LDFLAGS="" - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - cd "${WORKDIR}"/${CHOST} - - # Skip failing tests. - local skipped_tests="gdb" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - # Rerun failed tests in verbose mode (regrtest -w). - PYTHONDONTWRITEBYTECODE="" emake test EXTRATESTOPTS="-w" CPPFLAGS="" CFLAGS="" LDFLAGS="" < /dev/tty - local result="$?" - - for test in ${skipped_tests}; do - mv "${T}/test_${test}.py" "${S}"/Lib/test - done - - elog "The following tests have been skipped:" - for test in ${skipped_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'" - elog "and run the tests separately." - - if [[ "${result}" -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - local libdir=${ED}/usr/$(get_libdir)/python${SLOT} - - cd "${WORKDIR}"/${CHOST} - emake DESTDIR="${D}" altinstall - - sed \ - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ - -e "s/\(PY_LDFLAGS=\).*/\1/" \ - -i "${libdir}/config-${SLOT}/Makefile" || die "sed failed" - - # Backwards compat with Gentoo divergence. - dosym python${SLOT}-config /usr/bin/python-config-${SLOT} - - # Fix collisions between different slots of Python. - rm "${ED}usr/$(get_libdir)/libpython3.so" || die - - if use build; then - rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,sqlite3,test,tkinter} - else - use elibc_uclibc && rm -fr "${libdir}/test" - use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*} - use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,tkinter,test/test_tk*} - fi - - use threads || rm -fr "${libdir}/multiprocessing" - use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe - - dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - insinto /usr/share/doc/${PF}/examples - find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr - doins -r "${S}"/Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ - emake --no-print-directory -s -f - 2>/dev/null) - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} - newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${SLOT}:" \ - -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed" - - # for python-exec - python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR - - # if not using a cross-compiler, use the fresh binary - if ! tc-is-cross-compiler; then - local PYTHON=./python \ - LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}. - export LD_LIBRARY_PATH - fi - - echo "EPYTHON='${EPYTHON}'" > epython.py - python_domodule epython.py -} - -pkg_preinst() { - if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version ">=${CATEGORY}/${PN}-${SLOT}_alpha"; then - python_updater_warning="1" - fi -} - -eselect_python_update() { - if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then - eselect python update - fi - - if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then - eselect python update --python${PV%%.*} - fi -} - -pkg_postinst() { - eselect_python_update - - if [[ "${python_updater_warning}" == "1" ]]; then - ewarn "You have just upgraded from an older version of Python." - ewarn "You should switch active version of Python ${PV%%.*} and run" - ewarn "'python-updater [options]' to rebuild Python modules." - fi -} - -pkg_postrm() { - eselect_python_update -} diff --git a/dev-lang/python/python-3.3.3-r99.ebuild b/dev-lang/python/python-3.3.3-r99.ebuild deleted file mode 100644 index 99e1961..0000000 --- a/dev-lang/python/python-3.3.3-r99.ebuild +++ /dev/null @@ -1,325 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-3.3.3.ebuild,v 1.12 2014/01/19 12:34:50 maekke Exp $ - -EAPI="4" -WANT_AUTOMAKE="none" -WANT_LIBTOOL="none" - -inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing - -MY_P="Python-${PV}" -PATCHSET_REVISION="0" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE="http://www.python.org/" -SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz - http://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PV}-${PATCHSET_REVISION}.tar.xz - mirror://gentoo/python-gentoo-patches-${PV}-${PATCHSET_REVISION}.tar.xz" - -LICENSE="PSF-2" -SLOT="3.3" -KEYWORDS="amd64 arm ~mips x86" -IUSE="build doc elibc_uclibc examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl +threads tk wininst +xml" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND="app-arch/bzip2 - app-arch/xz-utils - >=sys-libs/zlib-1.1.3 - virtual/libffi - virtual/libintl - !build? ( - gdbm? ( sys-libs/gdbm[berkdb] ) - ncurses? ( - >=sys-libs/ncurses-5.2 - readline? ( >=sys-libs/readline-4.1 ) - ) - sqlite? ( >=dev-db/sqlite-3.3.8:3 ) - ssl? ( dev-libs/openssl ) - tk? ( - >=dev-lang/tk-8.0 - dev-tcltk/blt - ) - xml? ( >=dev-libs/expat-2.1 ) - ) - !!<sys-apps/sandbox-2.6-r1" -DEPEND="${RDEPEND} - virtual/pkgconfig - >=sys-devel/autoconf-2.65 - !sys-devel/gcc[libffi]" -RDEPEND+=" !build? ( app-misc/mime-types ) - doc? ( dev-python/python-docs:${SLOT} )" -PDEPEND="app-admin/eselect-python - app-admin/python-updater" - -S="${WORKDIR}/${MY_P}" - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat - rm -fr Modules/_ctypes/libffi* - rm -fr Modules/zlib - - if tc-is-cross-compiler; then - # Invokes BUILDPYTHON, which is built for the host arch - local EPATCH_EXCLUDE="05_all_regenerate_platform-specific_modules.patch" - fi - - EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches" - - epatch "${FILESDIR}/python-3.3-fix-posix-close-clash.patch" - epatch "${FILESDIR}/python-3.3-xattr.patch" - epatch "${FILESDIR}/python-3.3-lchmod.patch" - - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ - Lib/distutils/command/install.py \ - Lib/distutils/sysconfig.py \ - Lib/site.py \ - Lib/sysconfig.py \ - Lib/test/test_site.py \ - Makefile.pre.in \ - Modules/Setup.dist \ - Modules/getpath.c \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - # Disable ABI flags. - sed -e "s/ABIFLAGS=\"\${ABIFLAGS}.*\"/:/" -i configure.ac || die "sed failed" - - epatch_user - epatch "${FILESDIR}/Python-3.3.4-remove-ptmx-ptc-checks.patch" - - eautoconf - eautoheader -} - -src_configure() { - if use build; then - # Disable extraneous modules with extra dependencies. - export PYTHON_DISABLE_MODULES="gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat" - export PYTHON_DISABLE_SSL="1" - else - local disable - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. - export PYTHON_DISABLE_MODULES="${disable}" - - if ! use xml; then - ewarn "You have configured Python without XML support." - ewarn "This is NOT a recommended configuration as you" - ewarn "may face problems parsing any XML documents." - fi - fi - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - if [[ "$(gcc-major-version)" -ge 4 ]]; then - append-flags -fwrapv - fi - - filter-flags -malign-double - - [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC - - # https://bugs.gentoo.org/show_bug.cgi?id=50309 - if is-flagq -O3; then - is-flagq -fstack-protector-all && replace-flags -O3 -O2 - use hardened && replace-flags -O3 -O2 - fi - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - tc-export CXX - # The configure script fails to use pkg-config correctly. - # http://bugs.python.org/issue15506 - export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) - - # Set LDFLAGS so we link modules with -lpython3.2 correctly. - # Needed on FreeBSD unless Python 3.2 is already installed. - # Please query BSD team before removing this! - append-ldflags "-L." - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - BUILD_DIR="${WORKDIR}/${CHOST}" - mkdir -p "${BUILD_DIR}" || die - cd "${BUILD_DIR}" || die - - ECONF_SOURCE="${S}" OPT="" \ - econf \ - --with-fpectl \ - --enable-shared \ - $(use_enable ipv6) \ - $(use_with threads) \ - --infodir='${prefix}/share/info' \ - --mandir='${prefix}/share/man' \ - --with-computed-gotos \ - --with-dbmliborder="${dbmliborder}" \ - --with-libc="" \ - --enable-loadable-sqlite-extensions \ - --with-system-expat \ - --with-system-ffi - - if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi -} - -src_compile() { - # Avoid invoking pgen for cross-compiles. - touch Include/graminit.h Python/graminit.c || die - - cd "${BUILD_DIR}" || die - emake CPPFLAGS="" CFLAGS="" LDFLAGS="" - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - cd "${BUILD_DIR}" || die - - # Skip failing tests. - local skipped_tests="gdb" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - PYTHONDONTWRITEBYTECODE="" emake test EXTRATESTOPTS="-u -network" FLAGS="" CFLAGS="" LDFLAGS="" < /dev/tty - local result="$?" - - for test in ${skipped_tests}; do - mv "${T}/test_${test}.py" "${S}"/Lib/test - done - - elog "The following tests have been skipped:" - for test in ${skipped_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'" - elog "and run the tests separately." - - if [[ "${result}" -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - local libdir=${ED}/usr/$(get_libdir)/python${SLOT} - - cd "${BUILD_DIR}" || die - - emake -j1 DESTDIR="${D}" altinstall - - sed \ - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ - -e "s/\(PY_LDFLAGS=\).*/\1/" \ - -i "${libdir}/config-${SLOT}/Makefile" || die "sed failed" - - # Backwards compat with Gentoo divergence. - dosym python${SLOT}-config /usr/bin/python-config-${SLOT} - - # Fix collisions between different slots of Python. - rm -f "${ED}usr/$(get_libdir)/libpython3.so" - - if use build; then - rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,sqlite3,test,tkinter} - else - use elibc_uclibc && rm -fr "${libdir}/test" - use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*} - use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,tkinter,test/test_tk*} - fi - - use threads || rm -fr "${libdir}/multiprocessing" - use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe - - dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - insinto /usr/share/doc/${PF}/examples - find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr - doins -r "${S}"/Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ - emake --no-print-directory -s -f - 2>/dev/null) - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} - newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${SLOT}:" \ - -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed" - - # for python-exec - python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR - - # if not using a cross-compiler, use the fresh binary - if ! tc-is-cross-compiler; then - local PYTHON=./python - local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}. - fi - - echo "EPYTHON='${EPYTHON}'" > epython.py - python_domodule epython.py -} - -pkg_preinst() { - if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version ">=${CATEGORY}/${PN}-${SLOT}_alpha"; then - python_updater_warning="1" - fi -} - -eselect_python_update() { - if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then - eselect python update - fi - - if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then - eselect python update --python${PV%%.*} - fi -} - -pkg_postinst() { - eselect_python_update - - if [[ "${python_updater_warning}" == "1" ]]; then - ewarn "You have just upgraded from an older version of Python." - ewarn - ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." - ewarn - ewarn "For legacy packages, you should switch active version of Python and run 'python-updater [options]' to rebuild Python modules." - fi -} - -pkg_postrm() { - eselect_python_update -} diff --git a/dev-lang/python/python-3.3.4-r99.ebuild b/dev-lang/python/python-3.3.4-r99.ebuild deleted file mode 100644 index fb6e4b4..0000000 --- a/dev-lang/python/python-3.3.4-r99.ebuild +++ /dev/null @@ -1,323 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-3.3.4.ebuild,v 1.1 2014/02/17 17:21:02 floppym Exp $ - -EAPI="4" -WANT_AUTOMAKE="none" -WANT_LIBTOOL="none" - -inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing - -MY_P="Python-${PV}" -PATCHSET_VERSION="${PV}-0" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE="http://www.python.org/" -SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz - http://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz - mirror://gentoo/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" - -LICENSE="PSF-2" -SLOT="3.3" -KEYWORDS="~amd64 ~arm ~mips ~x86" -IUSE="build doc elibc_uclibc examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl +threads tk wininst +xml" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND="app-arch/bzip2 - app-arch/xz-utils - >=sys-libs/zlib-1.1.3 - virtual/libffi - virtual/libintl - !build? ( - gdbm? ( sys-libs/gdbm[berkdb] ) - ncurses? ( - >=sys-libs/ncurses-5.2 - readline? ( >=sys-libs/readline-4.1 ) - ) - sqlite? ( >=dev-db/sqlite-3.3.8:3 ) - ssl? ( dev-libs/openssl ) - tk? ( - >=dev-lang/tk-8.0 - dev-tcltk/blt - ) - xml? ( >=dev-libs/expat-2.1 ) - ) - !!<sys-apps/sandbox-2.6-r1" -DEPEND="${RDEPEND} - virtual/pkgconfig - >=sys-devel/autoconf-2.65 - !sys-devel/gcc[libffi]" -RDEPEND+=" !build? ( app-misc/mime-types ) - doc? ( dev-python/python-docs:${SLOT} )" -PDEPEND="app-admin/eselect-python - app-admin/python-updater" - -S="${WORKDIR}/${MY_P}" - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat - rm -fr Modules/_ctypes/libffi* - rm -fr Modules/zlib - - if tc-is-cross-compiler; then - # Invokes BUILDPYTHON, which is built for the host arch - local EPATCH_EXCLUDE="05_all_regenerate_platform-specific_modules.patch" - fi - - EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches" - - epatch "${FILESDIR}/python-3.3-fix-posix-close-clash.patch" - - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ - Lib/distutils/command/install.py \ - Lib/distutils/sysconfig.py \ - Lib/site.py \ - Lib/sysconfig.py \ - Lib/test/test_site.py \ - Makefile.pre.in \ - Modules/Setup.dist \ - Modules/getpath.c \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - # Disable ABI flags. - sed -e "s/ABIFLAGS=\"\${ABIFLAGS}.*\"/:/" -i configure.ac || die "sed failed" - - epatch_user - epatch "${FILESDIR}/Python-3.3.4-remove-ptmx-ptc-checks.patch" - - eautoconf - eautoheader -} - -src_configure() { - if use build; then - # Disable extraneous modules with extra dependencies. - export PYTHON_DISABLE_MODULES="gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat" - export PYTHON_DISABLE_SSL="1" - else - local disable - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. - export PYTHON_DISABLE_MODULES="${disable}" - - if ! use xml; then - ewarn "You have configured Python without XML support." - ewarn "This is NOT a recommended configuration as you" - ewarn "may face problems parsing any XML documents." - fi - fi - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - if [[ "$(gcc-major-version)" -ge 4 ]]; then - append-flags -fwrapv - fi - - filter-flags -malign-double - - [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC - - # https://bugs.gentoo.org/show_bug.cgi?id=50309 - if is-flagq -O3; then - is-flagq -fstack-protector-all && replace-flags -O3 -O2 - use hardened && replace-flags -O3 -O2 - fi - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - tc-export CXX - # The configure script fails to use pkg-config correctly. - # http://bugs.python.org/issue15506 - export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) - - # Set LDFLAGS so we link modules with -lpython3.2 correctly. - # Needed on FreeBSD unless Python 3.2 is already installed. - # Please query BSD team before removing this! - append-ldflags "-L." - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - BUILD_DIR="${WORKDIR}/${CHOST}" - mkdir -p "${BUILD_DIR}" || die - cd "${BUILD_DIR}" || die - - ECONF_SOURCE="${S}" OPT="" \ - econf \ - --with-fpectl \ - --enable-shared \ - $(use_enable ipv6) \ - $(use_with threads) \ - --infodir='${prefix}/share/info' \ - --mandir='${prefix}/share/man' \ - --with-computed-gotos \ - --with-dbmliborder="${dbmliborder}" \ - --with-libc="" \ - --enable-loadable-sqlite-extensions \ - --with-system-expat \ - --with-system-ffi - - if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi -} - -src_compile() { - # Avoid invoking pgen for cross-compiles. - touch Include/graminit.h Python/graminit.c || die - - cd "${BUILD_DIR}" || die - emake CPPFLAGS="" CFLAGS="" LDFLAGS="-lpython3.3" - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - cd "${BUILD_DIR}" || die - - # Skip failing tests. - local skipped_tests="gdb" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - PYTHONDONTWRITEBYTECODE="" emake test EXTRATESTOPTS="-u -network" FLAGS="" CFLAGS="" LDFLAGS="" < /dev/tty - local result="$?" - - for test in ${skipped_tests}; do - mv "${T}/test_${test}.py" "${S}"/Lib/test - done - - elog "The following tests have been skipped:" - for test in ${skipped_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'" - elog "and run the tests separately." - - if [[ "${result}" -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - local libdir=${ED}/usr/$(get_libdir)/python${SLOT} - - cd "${BUILD_DIR}" || die - - emake -j1 DESTDIR="${D}" altinstall - - sed \ - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ - -e "s/\(PY_LDFLAGS=\).*/\1/" \ - -i "${libdir}/config-${SLOT}/Makefile" || die "sed failed" - - # Backwards compat with Gentoo divergence. - dosym python${SLOT}-config /usr/bin/python-config-${SLOT} - - # Fix collisions between different slots of Python. - rm -f "${ED}usr/$(get_libdir)/libpython3.so" - - if use build; then - rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,sqlite3,test,tkinter} - else - use elibc_uclibc && rm -fr "${libdir}/test" - use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*} - use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,tkinter,test/test_tk*} - fi - - use threads || rm -fr "${libdir}/multiprocessing" - use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe - - dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - insinto /usr/share/doc/${PF}/examples - find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr - doins -r "${S}"/Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ - emake --no-print-directory -s -f - 2>/dev/null) - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} - newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${SLOT}:" \ - -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed" - - # for python-exec - python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR - - # if not using a cross-compiler, use the fresh binary - if ! tc-is-cross-compiler; then - local PYTHON=./python - local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}. - fi - - echo "EPYTHON='${EPYTHON}'" > epython.py - python_domodule epython.py -} - -pkg_preinst() { - if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version ">=${CATEGORY}/${PN}-${SLOT}_alpha"; then - python_updater_warning="1" - fi -} - -eselect_python_update() { - if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then - eselect python update - fi - - if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then - eselect python update --python${PV%%.*} - fi -} - -pkg_postinst() { - eselect_python_update - - if [[ "${python_updater_warning}" == "1" ]]; then - ewarn "You have just upgraded from an older version of Python." - ewarn - ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." - ewarn - ewarn "For legacy packages, you should switch active version of Python and run 'python-updater [options]' to rebuild Python modules." - fi -} - -pkg_postrm() { - eselect_python_update -}
