diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-devel/board-packages/board-packages-0.0.1-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-devel/board-packages/board-packages-0.0.1-r1.ebuild new file mode 120000 index 0000000000..b6c615eeb3 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-devel/board-packages/board-packages-0.0.1-r1.ebuild @@ -0,0 +1 @@ +board-packages-0.0.1.ebuild \ No newline at end of file diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-devel/board-packages/board-packages-0.0.1.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-devel/board-packages/board-packages-0.0.1.ebuild index 0197918fa6..261b546798 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-devel/board-packages/board-packages-0.0.1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-devel/board-packages/board-packages-0.0.1.ebuild @@ -17,5 +17,5 @@ DEPEND="" RDEPEND=" coreos-base/coreos coreos-base/coreos-dev + dev-lang/python-oem " - # dev-lang/python-oem diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/CVE-2013-4238_py26.patch b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/CVE-2013-4238_py26.patch new file mode 100644 index 0000000000..21df540f19 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/CVE-2013-4238_py26.patch @@ -0,0 +1,320 @@ +diff -r 936621d33c38 Lib/test/keycert.pem +--- a/Lib/test/keycert.pem Wed Feb 20 18:19:55 2013 -0500 ++++ b/Lib/test/keycert.pem Fri Aug 16 02:32:42 2013 +0200 +@@ -1,32 +1,31 @@ +------BEGIN RSA PRIVATE KEY----- +-MIICXwIBAAKBgQC8ddrhm+LutBvjYcQlnH21PPIseJ1JVG2HMmN2CmZk2YukO+9L +-opdJhTvbGfEj0DQs1IE8M+kTUyOmuKfVrFMKwtVeCJphrAnhoz7TYOuLBSqt7lVH +-fhi/VwovESJlaBOp+WMnfhcduPEYHYx/6cnVapIkZnLt30zu2um+DzA9jQIDAQAB +-AoGBAK0FZpaKj6WnJZN0RqhhK+ggtBWwBnc0U/ozgKz2j1s3fsShYeiGtW6CK5nU +-D1dZ5wzhbGThI7LiOXDvRucc9n7vUgi0alqPQ/PFodPxAN/eEYkmXQ7W2k7zwsDA +-IUK0KUhktQbLu8qF/m8qM86ba9y9/9YkXuQbZ3COl5ahTZrhAkEA301P08RKv3KM +-oXnGU2UHTuJ1MAD2hOrPxjD4/wxA/39EWG9bZczbJyggB4RHu0I3NOSFjAm3HQm0 +-ANOu5QK9owJBANgOeLfNNcF4pp+UikRFqxk5hULqRAWzVxVrWe85FlPm0VVmHbb/ +-loif7mqjU8o1jTd/LM7RD9f2usZyE2psaw8CQQCNLhkpX3KO5kKJmS9N7JMZSc4j +-oog58yeYO8BBqKKzpug0LXuQultYv2K4veaIO04iL9VLe5z9S/Q1jaCHBBuXAkEA +-z8gjGoi1AOp6PBBLZNsncCvcV/0aC+1se4HxTNo2+duKSDnbq+ljqOM+E7odU+Nq +-ewvIWOG//e8fssd0mq3HywJBAJ8l/c8GVmrpFTx8r/nZ2Pyyjt3dH1widooDXYSV +-q6Gbf41Llo5sYAtmxdndTLASuHKecacTgZVhy0FryZpLKrU= +------END RSA PRIVATE KEY----- ++-----BEGIN PRIVATE KEY----- ++MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBANtb0+YrKuxevGpm ++LrjaUhZSgz6zFAmuGFmKmUbdjmfv9zSmmdsQIksK++jK0Be9LeZy20j6ahOfuVa0 ++ufEmPoP7Fy4hXegKZR9cCWcIe/A6H2xWF1IIJLRTLaU8ol/I7T+um5HD5AwAwNPP ++USNU0Eegmvp+xxWu3NX2m1Veot85AgMBAAECgYA3ZdZ673X0oexFlq7AAmrutkHt ++CL7LvwrpOiaBjhyTxTeSNWzvtQBkIU8DOI0bIazA4UreAFffwtvEuPmonDb3F+Iq ++SMAu42XcGyVZEl+gHlTPU9XRX7nTOXVt+MlRRRxL6t9GkGfUAXI3XxJDXW3c0vBK ++UL9xqD8cORXOfE06rQJBAP8mEX1ERkR64Ptsoe4281vjTlNfIbs7NMPkUnrn9N/Y ++BLhjNIfQ3HFZG8BTMLfX7kCS9D593DW5tV4Z9BP/c6cCQQDcFzCcVArNh2JSywOQ ++ZfTfRbJg/Z5Lt9Fkngv1meeGNPgIMLN8Sg679pAOOWmzdMO3V706rNPzSVMME7E5 ++oPIfAkEA8pDddarP5tCvTTgUpmTFbakm0KoTZm2+FzHcnA4jRh+XNTjTOv98Y6Ik ++eO5d1ZnKXseWvkZncQgxfdnMqqpj5wJAcNq/RVne1DbYlwWchT2Si65MYmmJ8t+F ++0mcsULqjOnEMwf5e+ptq5LzwbyrHZYq5FNk7ocufPv/ZQrcSSC+cFwJBAKvOJByS ++x56qyGeZLOQlWS2JS3KJo59XuLFGqcbgN9Om9xFa41Yb4N9NvplFivsvZdw3m1Q/ ++SPIXQuT8RMPDVNQ= ++-----END PRIVATE KEY----- + -----BEGIN CERTIFICATE----- +-MIICpzCCAhCgAwIBAgIJAP+qStv1cIGNMA0GCSqGSIb3DQEBBQUAMIGJMQswCQYD +-VQQGEwJVUzERMA8GA1UECBMIRGVsYXdhcmUxEzARBgNVBAcTCldpbG1pbmd0b24x +-IzAhBgNVBAoTGlB5dGhvbiBTb2Z0d2FyZSBGb3VuZGF0aW9uMQwwCgYDVQQLEwNT +-U0wxHzAdBgNVBAMTFnNvbWVtYWNoaW5lLnB5dGhvbi5vcmcwHhcNMDcwODI3MTY1 +-NDUwWhcNMTMwMjE2MTY1NDUwWjCBiTELMAkGA1UEBhMCVVMxETAPBgNVBAgTCERl +-bGF3YXJlMRMwEQYDVQQHEwpXaWxtaW5ndG9uMSMwIQYDVQQKExpQeXRob24gU29m +-dHdhcmUgRm91bmRhdGlvbjEMMAoGA1UECxMDU1NMMR8wHQYDVQQDExZzb21lbWFj +-aGluZS5weXRob24ub3JnMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC8ddrh +-m+LutBvjYcQlnH21PPIseJ1JVG2HMmN2CmZk2YukO+9LopdJhTvbGfEj0DQs1IE8 +-M+kTUyOmuKfVrFMKwtVeCJphrAnhoz7TYOuLBSqt7lVHfhi/VwovESJlaBOp+WMn +-fhcduPEYHYx/6cnVapIkZnLt30zu2um+DzA9jQIDAQABoxUwEzARBglghkgBhvhC +-AQEEBAMCBkAwDQYJKoZIhvcNAQEFBQADgYEAF4Q5BVqmCOLv1n8je/Jw9K669VXb +-08hyGzQhkemEBYQd6fzQ9A/1ZzHkJKb1P6yreOLSEh4KcxYPyrLRC1ll8nr5OlCx +-CMhKkTnR6qBsdNV0XtdU2+N25hqW+Ma4ZeqsN/iiJVCGNOZGnvQuvCAGWF8+J/f/ +-iHkC6gGdBJhogs4= ++MIICVDCCAb2gAwIBAgIJANfHOBkZr8JOMA0GCSqGSIb3DQEBBQUAMF8xCzAJBgNV ++BAYTAlhZMRcwFQYDVQQHEw5DYXN0bGUgQW50aHJheDEjMCEGA1UEChMaUHl0aG9u ++IFNvZnR3YXJlIEZvdW5kYXRpb24xEjAQBgNVBAMTCWxvY2FsaG9zdDAeFw0xMDEw ++MDgyMzAxNTZaFw0yMDEwMDUyMzAxNTZaMF8xCzAJBgNVBAYTAlhZMRcwFQYDVQQH ++Ew5DYXN0bGUgQW50aHJheDEjMCEGA1UEChMaUHl0aG9uIFNvZnR3YXJlIEZvdW5k ++YXRpb24xEjAQBgNVBAMTCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAw ++gYkCgYEA21vT5isq7F68amYuuNpSFlKDPrMUCa4YWYqZRt2OZ+/3NKaZ2xAiSwr7 ++6MrQF70t5nLbSPpqE5+5VrS58SY+g/sXLiFd6AplH1wJZwh78DofbFYXUggktFMt ++pTyiX8jtP66bkcPkDADA089RI1TQR6Ca+n7HFa7c1fabVV6i3zkCAwEAAaMYMBYw ++FAYDVR0RBA0wC4IJbG9jYWxob3N0MA0GCSqGSIb3DQEBBQUAA4GBAHPctQBEQ4wd ++BJ6+JcpIraopLn8BGhbjNWj40mmRqWB/NAWF6M5ne7KpGAu7tLeG4hb1zLaldK8G ++lxy2GPSRF6LFS48dpEj2HbMv2nvv6xxalDMJ9+DicWgAKTQ6bcX2j3GUkCR0g/T1 ++CRlNBAAlvhKzO7Clpf9l0YKBEfraJByX + -----END CERTIFICATE----- +diff -r 936621d33c38 Lib/test/nullbytecert.pem +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ b/Lib/test/nullbytecert.pem Fri Aug 16 02:32:42 2013 +0200 +@@ -0,0 +1,90 @@ ++Certificate: ++ Data: ++ Version: 3 (0x2) ++ Serial Number: 0 (0x0) ++ Signature Algorithm: sha1WithRSAEncryption ++ Issuer: C=US, ST=Oregon, L=Beaverton, O=Python Software Foundation, OU=Python Core Development, CN=null.python.org\x00example.org/emailAddress=python-dev@python.org ++ Validity ++ Not Before: Aug 7 13:11:52 2013 GMT ++ Not After : Aug 7 13:12:52 2013 GMT ++ Subject: C=US, ST=Oregon, L=Beaverton, O=Python Software Foundation, OU=Python Core Development, CN=null.python.org\x00example.org/emailAddress=python-dev@python.org ++ Subject Public Key Info: ++ Public Key Algorithm: rsaEncryption ++ Public-Key: (2048 bit) ++ Modulus: ++ 00:b5:ea:ed:c9:fb:46:7d:6f:3b:76:80:dd:3a:f3: ++ 03:94:0b:a7:a6:db:ec:1d:df:ff:23:74:08:9d:97: ++ 16:3f:a3:a4:7b:3e:1b:0e:96:59:25:03:a7:26:e2: ++ 88:a9:cf:79:cd:f7:04:56:b0:ab:79:32:6e:59:c1: ++ 32:30:54:eb:58:a8:cb:91:f0:42:a5:64:27:cb:d4: ++ 56:31:88:52:ad:cf:bd:7f:f0:06:64:1f:cc:27:b8: ++ a3:8b:8c:f3:d8:29:1f:25:0b:f5:46:06:1b:ca:02: ++ 45:ad:7b:76:0a:9c:bf:bb:b9:ae:0d:16:ab:60:75: ++ ae:06:3e:9c:7c:31:dc:92:2f:29:1a:e0:4b:0c:91: ++ 90:6c:e9:37:c5:90:d7:2a:d7:97:15:a3:80:8f:5d: ++ 7b:49:8f:54:30:d4:97:2c:1c:5b:37:b5:ab:69:30: ++ 68:43:d3:33:78:4b:02:60:f5:3c:44:80:a1:8f:e7: ++ f0:0f:d1:5e:87:9e:46:cf:62:fc:f9:bf:0c:65:12: ++ f1:93:c8:35:79:3f:c8:ec:ec:47:f5:ef:be:44:d5: ++ ae:82:1e:2d:9a:9f:98:5a:67:65:e1:74:70:7c:cb: ++ d3:c2:ce:0e:45:49:27:dc:e3:2d:d4:fb:48:0e:2f: ++ 9e:77:b8:14:46:c0:c4:36:ca:02:ae:6a:91:8c:da: ++ 2f:85 ++ Exponent: 65537 (0x10001) ++ X509v3 extensions: ++ X509v3 Basic Constraints: critical ++ CA:FALSE ++ X509v3 Subject Key Identifier: ++ 88:5A:55:C0:52:FF:61:CD:52:A3:35:0F:EA:5A:9C:24:38:22:F7:5C ++ X509v3 Key Usage: ++ Digital Signature, Non Repudiation, Key Encipherment ++ X509v3 Subject Alternative Name: ++ ************************************************************* ++ WARNING: The values for DNS, email and URI are WRONG. OpenSSL ++ doesn't print the text after a NULL byte. ++ ************************************************************* ++ DNS:altnull.python.org, email:null@python.org, URI:http://null.python.org, IP Address:192.0.2.1, IP Address:2001:DB8:0:0:0:0:0:1 ++ Signature Algorithm: sha1WithRSAEncryption ++ ac:4f:45:ef:7d:49:a8:21:70:8e:88:59:3e:d4:36:42:70:f5: ++ a3:bd:8b:d7:a8:d0:58:f6:31:4a:b1:a4:a6:dd:6f:d9:e8:44: ++ 3c:b6:0a:71:d6:7f:b1:08:61:9d:60:ce:75:cf:77:0c:d2:37: ++ 86:02:8d:5e:5d:f9:0f:71:b4:16:a8:c1:3d:23:1c:f1:11:b3: ++ 56:6e:ca:d0:8d:34:94:e6:87:2a:99:f2:ae:ae:cc:c2:e8:86: ++ de:08:a8:7f:c5:05:fa:6f:81:a7:82:e6:d0:53:9d:34:f4:ac: ++ 3e:40:fe:89:57:7a:29:a4:91:7e:0b:c6:51:31:e5:10:2f:a4: ++ 60:76:cd:95:51:1a:be:8b:a1:b0:fd:ad:52:bd:d7:1b:87:60: ++ d2:31:c7:17:c4:18:4f:2d:08:25:a3:a7:4f:b7:92:ca:e2:f5: ++ 25:f1:54:75:81:9d:b3:3d:61:a2:f7:da:ed:e1:c6:6f:2c:60: ++ 1f:d8:6f:c5:92:05:ab:c9:09:62:49:a9:14:ad:55:11:cc:d6: ++ 4a:19:94:99:97:37:1d:81:5f:8b:cf:a3:a8:96:44:51:08:3d: ++ 0b:05:65:12:eb:b6:70:80:88:48:72:4f:c6:c2:da:cf:cd:8e: ++ 5b:ba:97:2f:60:b4:96:56:49:5e:3a:43:76:63:04:be:2a:f6: ++ c1:ca:a9:94 ++-----BEGIN CERTIFICATE----- ++MIIE2DCCA8CgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBxTELMAkGA1UEBhMCVVMx ++DzANBgNVBAgMBk9yZWdvbjESMBAGA1UEBwwJQmVhdmVydG9uMSMwIQYDVQQKDBpQ ++eXRob24gU29mdHdhcmUgRm91bmRhdGlvbjEgMB4GA1UECwwXUHl0aG9uIENvcmUg ++RGV2ZWxvcG1lbnQxJDAiBgNVBAMMG251bGwucHl0aG9uLm9yZwBleGFtcGxlLm9y ++ZzEkMCIGCSqGSIb3DQEJARYVcHl0aG9uLWRldkBweXRob24ub3JnMB4XDTEzMDgw ++NzEzMTE1MloXDTEzMDgwNzEzMTI1MlowgcUxCzAJBgNVBAYTAlVTMQ8wDQYDVQQI ++DAZPcmVnb24xEjAQBgNVBAcMCUJlYXZlcnRvbjEjMCEGA1UECgwaUHl0aG9uIFNv ++ZnR3YXJlIEZvdW5kYXRpb24xIDAeBgNVBAsMF1B5dGhvbiBDb3JlIERldmVsb3Bt ++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 936621d33c38 Lib/test/test_ssl.py +--- a/Lib/test/test_ssl.py Wed Feb 20 18:19:55 2013 -0500 ++++ b/Lib/test/test_ssl.py Fri Aug 16 02:32:42 2013 +0200 +@@ -31,6 +31,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())) +@@ -88,6 +89,27 @@ + if test_support.verbose: + sys.stdout.write("\n" + pprint.pformat(p) + "\n") + ++ def test_parse_cert_CVE_2013_4073(self): ++ p = ssl._ssl._test_decode_cert(NULLBYTECERT) ++ if test_support.verbose: ++ sys.stdout.write("\n" + pprint.pformat(p) + "\n") ++ subject = ((('countryName', 'US'),), ++ (('stateOrProvinceName', 'Oregon'),), ++ (('localityName', 'Beaverton'),), ++ (('organizationName', 'Python Software Foundation'),), ++ (('organizationalUnitName', 'Python Core Development'),), ++ (('commonName', 'null.python.org\x00example.org'),), ++ (('emailAddress', 'python-dev@python.org'),)) ++ self.assertEqual(p['subject'], subject) ++ self.assertEqual(p['issuer'], subject) ++ self.assertEqual(p['subjectAltName'], ++ (('DNS', 'altnull.python.org\x00example.com'), ++ ('email', 'null@python.org\x00user@example.org'), ++ ('URI', 'http://null.python.org\x00http://example.org'), ++ ('IP Address', '192.0.2.1'), ++ ('IP Address', '2001:DB8:0:0:0:0:0:1\n')) ++ ) ++ + def test_DER_to_PEM(self): + with open(SVN_PYTHON_ORG_ROOT_CERT, 'r') as f: + pem = f.read() +@@ -1210,15 +1232,18 @@ + if skip_expected: + raise test_support.TestSkipped("No SSL support") + +- global CERTFILE, SVN_PYTHON_ORG_ROOT_CERT ++ global CERTFILE, SVN_PYTHON_ORG_ROOT_CERT, NULLBYTECERT + CERTFILE = os.path.join(os.path.dirname(__file__) or os.curdir, + "keycert.pem") + SVN_PYTHON_ORG_ROOT_CERT = os.path.join( + os.path.dirname(__file__) or os.curdir, + "https_svn_python_org_root.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)): ++ not os.path.exists(SVN_PYTHON_ORG_ROOT_CERT) or ++ not os.path.exists(NULLBYTECERT)): + raise test_support.TestFailed("Can't read certificate files!") + + tests = [BasicTests] +diff -r 936621d33c38 Modules/_ssl.c +--- a/Modules/_ssl.c Wed Feb 20 18:19:55 2013 -0500 ++++ b/Modules/_ssl.c Fri Aug 16 02:32:42 2013 +0200 +@@ -302,8 +302,10 @@ + self->ctx = SSL_CTX_new(TLSv1_method()); /* Set up context */ + else if (proto_version == PY_SSL_VERSION_SSL3) + self->ctx = SSL_CTX_new(SSLv3_method()); /* Set up context */ ++#ifndef OPENSSL_NO_SSL2 + else if (proto_version == PY_SSL_VERSION_SSL2) + self->ctx = SSL_CTX_new(SSLv2_method()); /* Set up context */ ++#endif + else if (proto_version == PY_SSL_VERSION_SSL23) + self->ctx = SSL_CTX_new(SSLv23_method()); /* Set up context */ + PySSL_END_ALLOW_THREADS +@@ -718,8 +720,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 */ + +@@ -741,11 +748,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); +@@ -771,6 +828,7 @@ + goto fail; + } + PyTuple_SET_ITEM(t, 1, v); ++ break; + } + + /* and add that rendering to the list */ diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/CVE-2013-4238_py27.patch b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/CVE-2013-4238_py27.patch similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/CVE-2013-4238_py27.patch rename to sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/CVE-2013-4238_py27.patch diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/CVE-2013-4238_py33.patch b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/CVE-2013-4238_py33.patch new file mode 100644 index 0000000000..41db4d241b --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/CVE-2013-4238_py33.patch @@ -0,0 +1,241 @@ +diff -r e0f86c3b3685 Lib/test/nullbytecert.pem +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ b/Lib/test/nullbytecert.pem Sun Aug 11 18:17:23 2013 +0200 +@@ -0,0 +1,90 @@ ++Certificate: ++ Data: ++ Version: 3 (0x2) ++ Serial Number: 0 (0x0) ++ Signature Algorithm: sha1WithRSAEncryption ++ Issuer: C=US, ST=Oregon, L=Beaverton, O=Python Software Foundation, OU=Python Core Development, CN=null.python.org\x00example.org/emailAddress=python-dev@python.org ++ Validity ++ Not Before: Aug 7 13:11:52 2013 GMT ++ Not After : Aug 7 13:12:52 2013 GMT ++ Subject: C=US, ST=Oregon, L=Beaverton, O=Python Software Foundation, OU=Python Core Development, CN=null.python.org\x00example.org/emailAddress=python-dev@python.org ++ Subject Public Key Info: ++ Public Key Algorithm: rsaEncryption ++ Public-Key: (2048 bit) ++ Modulus: ++ 00:b5:ea:ed:c9:fb:46:7d:6f:3b:76:80:dd:3a:f3: ++ 03:94:0b:a7:a6:db:ec:1d:df:ff:23:74:08:9d:97: ++ 16:3f:a3:a4:7b:3e:1b:0e:96:59:25:03:a7:26:e2: ++ 88:a9:cf:79:cd:f7:04:56:b0:ab:79:32:6e:59:c1: ++ 32:30:54:eb:58:a8:cb:91:f0:42:a5:64:27:cb:d4: ++ 56:31:88:52:ad:cf:bd:7f:f0:06:64:1f:cc:27:b8: ++ a3:8b:8c:f3:d8:29:1f:25:0b:f5:46:06:1b:ca:02: ++ 45:ad:7b:76:0a:9c:bf:bb:b9:ae:0d:16:ab:60:75: ++ ae:06:3e:9c:7c:31:dc:92:2f:29:1a:e0:4b:0c:91: ++ 90:6c:e9:37:c5:90:d7:2a:d7:97:15:a3:80:8f:5d: ++ 7b:49:8f:54:30:d4:97:2c:1c:5b:37:b5:ab:69:30: ++ 68:43:d3:33:78:4b:02:60:f5:3c:44:80:a1:8f:e7: ++ f0:0f:d1:5e:87:9e:46:cf:62:fc:f9:bf:0c:65:12: ++ f1:93:c8:35:79:3f:c8:ec:ec:47:f5:ef:be:44:d5: ++ ae:82:1e:2d:9a:9f:98:5a:67:65:e1:74:70:7c:cb: ++ d3:c2:ce:0e:45:49:27:dc:e3:2d:d4:fb:48:0e:2f: ++ 9e:77:b8:14:46:c0:c4:36:ca:02:ae:6a:91:8c:da: ++ 2f:85 ++ Exponent: 65537 (0x10001) ++ X509v3 extensions: ++ X509v3 Basic Constraints: critical ++ CA:FALSE ++ X509v3 Subject Key Identifier: ++ 88:5A:55:C0:52:FF:61:CD:52:A3:35:0F:EA:5A:9C:24:38:22:F7:5C ++ X509v3 Key Usage: ++ Digital Signature, Non Repudiation, Key Encipherment ++ X509v3 Subject Alternative Name: ++ ************************************************************* ++ WARNING: The values for DNS, email and URI are WRONG. OpenSSL ++ doesn't print the text after a NULL byte. ++ ************************************************************* ++ DNS:altnull.python.org, email:null@python.org, URI:http://null.python.org, IP Address:192.0.2.1, IP Address:2001:DB8:0:0:0:0:0:1 ++ Signature Algorithm: sha1WithRSAEncryption ++ ac:4f:45:ef:7d:49:a8:21:70:8e:88:59:3e:d4:36:42:70:f5: ++ a3:bd:8b:d7:a8:d0:58:f6:31:4a:b1:a4:a6:dd:6f:d9:e8:44: ++ 3c:b6:0a:71:d6:7f:b1:08:61:9d:60:ce:75:cf:77:0c:d2:37: ++ 86:02:8d:5e:5d:f9:0f:71:b4:16:a8:c1:3d:23:1c:f1:11:b3: ++ 56:6e:ca:d0:8d:34:94:e6:87:2a:99:f2:ae:ae:cc:c2:e8:86: ++ de:08:a8:7f:c5:05:fa:6f:81:a7:82:e6:d0:53:9d:34:f4:ac: ++ 3e:40:fe:89:57:7a:29:a4:91:7e:0b:c6:51:31:e5:10:2f:a4: ++ 60:76:cd:95:51:1a:be:8b:a1:b0:fd:ad:52:bd:d7:1b:87:60: ++ d2:31:c7:17:c4:18:4f:2d:08:25:a3:a7:4f:b7:92:ca:e2:f5: ++ 25:f1:54:75:81:9d:b3:3d:61:a2:f7:da:ed:e1:c6:6f:2c:60: ++ 1f:d8:6f:c5:92:05:ab:c9:09:62:49:a9:14:ad:55:11:cc:d6: ++ 4a:19:94:99:97:37:1d:81:5f:8b:cf:a3:a8:96:44:51:08:3d: ++ 0b:05:65:12:eb:b6:70:80:88:48:72:4f:c6:c2:da:cf:cd:8e: ++ 5b:ba:97:2f:60:b4:96:56:49:5e:3a:43:76:63:04:be:2a:f6: ++ c1:ca:a9:94 ++-----BEGIN CERTIFICATE----- ++MIIE2DCCA8CgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBxTELMAkGA1UEBhMCVVMx ++DzANBgNVBAgMBk9yZWdvbjESMBAGA1UEBwwJQmVhdmVydG9uMSMwIQYDVQQKDBpQ ++eXRob24gU29mdHdhcmUgRm91bmRhdGlvbjEgMB4GA1UECwwXUHl0aG9uIENvcmUg ++RGV2ZWxvcG1lbnQxJDAiBgNVBAMMG251bGwucHl0aG9uLm9yZwBleGFtcGxlLm9y ++ZzEkMCIGCSqGSIb3DQEJARYVcHl0aG9uLWRldkBweXRob24ub3JnMB4XDTEzMDgw ++NzEzMTE1MloXDTEzMDgwNzEzMTI1MlowgcUxCzAJBgNVBAYTAlVTMQ8wDQYDVQQI ++DAZPcmVnb24xEjAQBgNVBAcMCUJlYXZlcnRvbjEjMCEGA1UECgwaUHl0aG9uIFNv ++ZnR3YXJlIEZvdW5kYXRpb24xIDAeBgNVBAsMF1B5dGhvbiBDb3JlIERldmVsb3Bt ++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', 'python-dev@python.org'),)) ++ self.assertEqual(p['subject'], subject) ++ self.assertEqual(p['issuer'], subject) ++ self.assertEqual(p['subjectAltName'], ++ (('DNS', 'altnull.python.org\x00example.com'), ++ ('email', 'null@python.org\x00user@example.org'), ++ ('URI', 'http://null.python.org\x00http://example.org'), ++ ('IP Address', '192.0.2.1'), ++ ('IP Address', '2001:DB8:0:0:0:0:0:1\n')) ++ ) ++ + def test_DER_to_PEM(self): + with open(SVN_PYTHON_ORG_ROOT_CERT, 'r') as f: + pem = f.read() +@@ -294,6 +316,13 @@ + fail(cert, 'foo.a.com') + fail(cert, 'bar.foo.com') + ++ # NULL bytes are bad, CVE-2013-4073 ++ cert = {'subject': ((('commonName', ++ 'null.python.org\x00example.org'),),)} ++ ok(cert, 'null.python.org\x00example.org') # or raise an error? ++ fail(cert, 'example.org') ++ fail(cert, 'null.python.org') ++ + # Slightly fake real-world example + cert = {'notAfter': 'Jun 26 21:41:46 2011 GMT', + 'subject': ((('commonName', 'linuxfrz.org'),),), +diff -r e0f86c3b3685 Modules/_ssl.c +--- a/Modules/_ssl.c Sun Aug 11 13:04:50 2013 +0300 ++++ b/Modules/_ssl.c Sun Aug 11 18:17:23 2013 +0200 +@@ -771,12 +771,14 @@ + ext->value->length)); + + for(j = 0; j < sk_GENERAL_NAME_num(names); j++) { +- + /* get a rendering of each name in the set of names */ ++ int gntype; ++ ASN1_STRING *as = NULL; + + name = sk_GENERAL_NAME_value(names, j); +- if (name->type == GEN_DIRNAME) { +- ++ gntype = name-> type; ++ switch (gntype) { ++ case GEN_DIRNAME: + /* we special-case DirName as a tuple of + tuples of attributes */ + +@@ -798,11 +800,62 @@ + goto fail; + } + PyTuple_SET_ITEM(t, 1, v); ++ break; + +- } else { ++ case GEN_EMAIL: ++ case GEN_DNS: ++ case GEN_URI: ++ /* GENERAL_NAME_print() doesn't handle NUL bytes in ASN1_string ++ correctly. */ ++ t = PyTuple_New(2); ++ if (t == NULL) ++ goto fail; ++ switch (gntype) { ++ case GEN_EMAIL: ++ v = PyUnicode_FromString("email"); ++ as = name->d.rfc822Name; ++ break; ++ case GEN_DNS: ++ v = PyUnicode_FromString("DNS"); ++ as = name->d.dNSName; ++ break; ++ case GEN_URI: ++ v = PyUnicode_FromString("URI"); ++ as = name->d.uniformResourceIdentifier; ++ break; ++ } ++ if (v == NULL) { ++ Py_DECREF(t); ++ goto fail; ++ } ++ PyTuple_SET_ITEM(t, 0, v); ++ v = PyUnicode_FromStringAndSize((char *)ASN1_STRING_data(as), ++ ASN1_STRING_length(as)); ++ if (v == NULL) { ++ Py_DECREF(t); ++ goto fail; ++ } ++ PyTuple_SET_ITEM(t, 1, v); ++ break; + ++ default: + /* for everything else, we use the OpenSSL print form */ +- ++ switch (gntype) { ++ /* check for new general name type */ ++ case GEN_OTHERNAME: ++ case GEN_X400: ++ case GEN_EDIPARTY: ++ case GEN_IPADD: ++ case GEN_RID: ++ break; ++ default: ++ if (PyErr_WarnFormat(PyExc_RuntimeWarning, 1, ++ "Unknown general name type %d", ++ gntype) == -1) { ++ goto fail; ++ } ++ break; ++ } + (void) BIO_reset(biobuf); + GENERAL_NAME_print(biobuf, name); + len = BIO_gets(biobuf, buf, sizeof(buf)-1); +@@ -829,6 +882,7 @@ + goto fail; + } + PyTuple_SET_ITEM(t, 1, v); ++ break; + } + + /* and add that rendering to the list */ diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/pydoc.conf b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/pydoc.conf new file mode 100644 index 0000000000..20e3628ba4 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/pydoc.conf @@ -0,0 +1,7 @@ +# /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/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/pydoc.init b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/pydoc.init new file mode 100755 index 0000000000..0d62dfcf02 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/pydoc.init @@ -0,0 +1,29 @@ +#!/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/@PYDOC@.pid \ + --exec /usr/bin/@PYDOC@ -- -p "${pydoc_port}" + eend $? +} + +stop() { + ebegin "Stopping pydoc server" + start-stop-daemon --stop --quiet --pidfile /var/run/@PYDOC@.pid + eend $? +} diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/python-2.5-tcl86.patch b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/python-2.5-tcl86.patch new file mode 100644 index 0000000000..2362e989e2 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/python-2.5-tcl86.patch @@ -0,0 +1,11 @@ +--- a/setup.py ++++ b/setup.py +@@ -1518,7 +1518,7 @@ + # The versions with dots are used on Unix, and the versions without + # dots on Windows, for detection by cygwin. + tcllib = tklib = tcl_includes = tk_includes = None +- for version in ['8.5', '85', '8.4', '84', '8.3', '83', '8.2', ++ for version in ['8.6', '86', '8.5', '85', '8.4', '84', '8.3', '83', '8.2', + '82', '8.1', '81', '8.0', '80']: + tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version) + tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version) diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7-issue16248.patch b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/python-2.7-issue16248.patch similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7-issue16248.patch rename to sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/python-2.7-issue16248.patch diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7-issue18851.patch b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/python-2.7-issue18851.patch similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7-issue18851.patch rename to sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/python-2.7-issue18851.patch diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7.5-library-path.patch b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/python-2.7.5-library-path.patch similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7.5-library-path.patch rename to sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/python-2.7.5-library-path.patch diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7.5-nonfatal-compileall.patch b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/python-2.7.5-nonfatal-compileall.patch similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7.5-nonfatal-compileall.patch rename to sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/python-2.7.5-nonfatal-compileall.patch diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7.5-re_unsigned_ptrdiff.patch b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/python-2.7.5-re_unsigned_ptrdiff.patch similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7.5-re_unsigned_ptrdiff.patch rename to sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/python-2.7.5-re_unsigned_ptrdiff.patch diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/python-3.2-CVE-2013-2099.patch b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/python-3.2-CVE-2013-2099.patch new file mode 100644 index 0000000000..9055a03dfc --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/python-3.2-CVE-2013-2099.patch @@ -0,0 +1,51 @@ +# HG changeset patch +# User Antoine Pitrou +# 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/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/python-3.2-issue16248.patch b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/python-3.2-issue16248.patch new file mode 100644 index 0000000000..d0e80cae72 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/python-3.2-issue16248.patch @@ -0,0 +1,19 @@ +# HG changeset patch +# User Georg Brandl +# 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/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/python-3.3-CVE-2013-2099.patch b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/python-3.3-CVE-2013-2099.patch new file mode 100644 index 0000000000..44b9acede4 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/python-3.3-CVE-2013-2099.patch @@ -0,0 +1,51 @@ +# HG changeset patch +# User Antoine Pitrou +# 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/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/python-config-2.4-r1 b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/python-config-2.4-r1 new file mode 100644 index 0000000000..af451131ce --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/files/python-config-2.4-r1 @@ -0,0 +1,58 @@ +#! /usr/bin/python2.4 + +import sys +import os +import getopt +from distutils import sysconfig + +valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags', + 'ldflags', 'help'] + +def exit_with_usage(code=1): + print >>sys.stderr, "Usage: %s [%s]" % (sys.argv[0], + '|'.join('--'+opt for opt in valid_opts)) + sys.exit(code) + +try: + opts, args = getopt.getopt(sys.argv[1:], '', valid_opts) +except getopt.error: + exit_with_usage() + +if not opts: + #exit_with_usage() + #be compatible with our old python-config-2.4 + import string + print "-lpython2.4 -lm -L/usr/lib/python2.4/config",string.join(string.split(sysconfig.get_config_var("MODLIBS"))) + sys.exit(0) + +opt = opts[0][0] + +pyver = sysconfig.get_config_var('VERSION') +getvar = sysconfig.get_config_var + +if opt == '--help': + exit_with_usage(0) + +elif opt == '--prefix': + print sysconfig.PREFIX + +elif opt == '--exec-prefix': + print sysconfig.EXEC_PREFIX + +elif opt in ('--includes', '--cflags'): + flags = ['-I' + sysconfig.get_python_inc(), + '-I' + sysconfig.get_python_inc(plat_specific=True)] + if opt == '--cflags': + flags.extend(getvar('CFLAGS').split()) + print ' '.join(flags) + +elif opt in ('--libs', '--ldflags'): + libs = getvar('LIBS').split() + getvar('SYSLIBS').split() + libs.append('-lpython'+pyver) + # add the prefix/lib/pythonX.Y/config dir, but only if there is no + # shared library in prefix/lib/. + if opt == '--ldflags' and not getvar('Py_ENABLE_SHARED'): + libs.insert(0, '-L' + getvar('LIBPL')) + print ' '.join(libs) + + diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/python-oem-2.7.6.ebuild b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/python-oem-2.7.6.ebuild new file mode 100644 index 0000000000..9b5fcb05c0 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/python-oem-2.7.6.ebuild @@ -0,0 +1,155 @@ +# 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="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" +IUSE="hardened" + +# 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="" +DEPEND="app-arch/bzip2 + >=sys-libs/zlib-1.1.3 + virtual/libintl + virtual/pkgconfig + >=sys-devel/autoconf-2.65 + !sys-devel/gcc[libffi]" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + 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" + + 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 + + eautoconf + eautoheader +} + +src_configure() { + # Disable extraneous modules with extra dependencies. + export PYTHON_DISABLE_MODULES="dbm _bsddb gdbm _curses _curses_panel readline _sqlite3 _tkinter" + export PYTHON_DISABLE_SSL="1" + + 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." + + BUILD_DIR="${WORKDIR}/${CHOST}" + mkdir -p "${BUILD_DIR}" || die + cd "${BUILD_DIR}" || die + + ECONF_SOURCE="${S}" OPT="" \ + econf \ + --prefix=/usr/share/oem/python \ + --with-fpectl \ + --disable-shared \ + --enable-ipv6 \ + --enable-threads \ + --enable-unicode=ucs4 \ + --includedir='/discard/include' \ + --infodir='/discard/info' \ + --mandir='/discard/man' \ + --with-dbmliborder="" \ + --with-libc="" \ + --without-system-expat \ + --without-system-ffi +} + +src_compile() { + # Avoid invoking pgen for cross-compiles. + touch Include/graminit.h Python/graminit.c + + cd "${BUILD_DIR}" || die + emake +} + +src_install() { + local bindir=/usr/share/oem/python/bin + local libdir=/usr/share/oem/python/$(get_libdir)/python${SLOT} + + cd "${BUILD_DIR}" || die + emake DESTDIR="${D}" altinstall + + # create a simple versionless 'python' symlink + dosym "python${SLOT}" "${bindir}/python" + + # Throw away headers and man/info pages and extra modules + rm -r "${D}/discard" \ + "${D}${bindir}/"{idle,smtpd.py} \ + "${D}${libdir}/"{bsddb,dbhash.py,test/test_bsddb*} \ + "${D}${libdir}/"{idlelib,lib-tk} \ + "${D}${libdir}/distutils/command/"wininst-*.exe \ + "${D}${libdir}/test" \ + "${D}${libdir}/sqlite3" \ + || die +} diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/Manifest b/sdk_container/src/third_party/coreos-overlay/dev-lang/python/Manifest deleted file mode 100644 index a853d0faae..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/Manifest +++ /dev/null @@ -1,6 +0,0 @@ -DIST Python-2.6.8.tar.bz2 11127915 SHA256 c34036718ee1f091736677f543bc7960861cf9fcbea77d49572b59f7f1ab3c3f SHA512 91aa96574328d7165b7ff799cc4f33e021c18865bb0b08a4bc2d1361633c3290964cc54beb817fe42ab0a569b57652c990e2c6aa6d4d8aefe0063fcefcff7642 WHIRLPOOL 03403bcd7fd47fd670d3176e12e6778519487da168cf08c46ce663c89caa65f1f792f1b1611516d0b099c4746f17a1a595ad22caa550fefa658e8b982efb6ea2 -DIST Python-2.7.3.tar.bz2 11793433 SHA256 726457e11cb153adc3f428aaf1901fc561a374c30e5e7da6742c0742a338663c -DIST Python-2.7.5.tar.xz 10252148 SHA256 f33c4cab167dc69e10962e1cebf1c0768e2d0e8575648130c20e6bda84551db1 SHA512 c4691199d770cc4130604cd801375967ae0bb8a39ef34e01a4c8ab58d1c23ae83a1b493305178c4317c5622a19857750d33ffc3f10075becd5766ae664c68ee1 WHIRLPOOL fc5d3762cd67214b30de8b43024f5952362c4c811f23837e43ac2a7747c5353cc49b8785e75edd760ea58420609cd67a9a7e94abd2ea8ab25b3271af6a85168d -DIST python-gentoo-patches-2.6.8-0.tar.bz2 17608 SHA256 277dbeb19107d3244e58aee98f130ce98d03775e7d4074ff9e1577125c999c06 SHA512 2a988a81db888ce56e07d4591ab37b641e51f73f85c087ac0505dc2b703b1dd450ed36b2533e5e562935d2f5e17d581fbbcfd0b0dc4bee69c882f3442da29632 WHIRLPOOL 8ae0f01e1218ed758b9dfca9b4de6a9115c09db665a2831f9af7b8e3f9aa178c10d129104273b551b8a26e9ba575e3f8d3256d7622506a69d496935ce9d87685 -DIST python-gentoo-patches-2.7.3-1.tar.bz2 13858 SHA256 51f6981ba02064998dfb020725c33233641b3743c4f5cf04091657313a49b8fd -DIST python-gentoo-patches-2.7.5-0.tar.xz 13848 SHA256 b84ff6a7669d639272cb2f94d4268d3be3af64903a380f4f60ab539e4a29b111 SHA512 9fec0ba9d958894861d4282ff9145f0387ad7fd3914a3689d148308f56158c1b397f0816c58383d2cf198f9a3b9bf321f2f441ec4aa91e4a503cd957b4a7fbd4 WHIRLPOOL 39d807453f6510f14db1b74f5dac1cd2c52d00be356d132c0f9229caeb8ba8bcbbbf32b05b3d3f6236e853b204ecb961e6b12cabacaadf5f515e93f00cda71d5 diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/pydoc.conf b/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/pydoc.conf deleted file mode 100644 index 4a98fd40e4..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/pydoc.conf +++ /dev/null @@ -1,8 +0,0 @@ -# /etc/init.d/pydoc.conf -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/files/pydoc.conf,v 1.2 2008/06/30 15:10:28 hawking Exp $ - -# This file contains the configuration information for pydoc's internal -# webserver. The variables should be rather self explanatory :-) - -# Default port for Python's pydoc server -PYDOC_PORT=7464 diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/pydoc.init b/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/pydoc.init deleted file mode 100755 index 19b63e31df..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/pydoc.init +++ /dev/null @@ -1,26 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2008 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.2 2008/06/30 15:10:28 hawking Exp $ - -depend() { - need net -} - -start() { - if [ -z $PYDOC_PORT ] ; then - eerror "Port not set" - return 1 - fi - ebegin "Starting pydoc server on port $PYDOC_PORT" - start-stop-daemon --start --background --make-pidfile \ - --pidfile /var/run/pydoc.pid \ - --startas /usr/bin/pydoc -- -p $PYDOC_PORT - eend $? -} - -stop() { - ebegin "Stopping pydoc server" - start-stop-daemon --stop --quiet --pidfile /var/run/pydoc.pid - eend $? -} diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.6-cross-getaddrinfo.patch b/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.6-cross-getaddrinfo.patch deleted file mode 100644 index 9e390d5903..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.6-cross-getaddrinfo.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- configure.in.orig 2010-10-11 14:39:17.000000000 -0400 -+++ configure.in 2010-10-11 14:44:17.000000000 -0400 -@@ -2950,8 +2950,8 @@ - buggygetaddrinfo=no, - AC_MSG_RESULT(buggy) - buggygetaddrinfo=yes, --AC_MSG_RESULT(buggy) --buggygetaddrinfo=yes)], [ -+AC_MSG_RESULT(cross-compiling - assuming no) -+buggygetaddrinfo=no)], [ - AC_MSG_RESULT(no) - buggygetaddrinfo=yes - ]) diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.6.8-configure-sizeof.patch b/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.6.8-configure-sizeof.patch deleted file mode 100644 index 533e014896..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.6.8-configure-sizeof.patch +++ /dev/null @@ -1,110 +0,0 @@ -taken from upstream to fix cross-compile tests - -http://crosbug.com/35372 - -changeset: 55282:cb3aa8bcd7b0 -user: Alexandre Vassalotti -date: Fri Jul 17 05:47:33 2009 +0000 -summary: Use AC_CHECK_SIZEOF to find the size of off_t, pthread_t and time_t. - -diff -r e621e3e3196e -r cb3aa8bcd7b0 configure.in ---- a/configure.in Fri Jul 17 05:41:49 2009 +0000 -+++ b/configure.in Fri Jul 17 05:47:33 2009 +0000 -@@ -1384,26 +1384,11 @@ - #include - #endif]) - -- --# Hmph. AC_CHECK_SIZEOF() doesn't include . --AC_MSG_CHECKING(size of off_t) --AC_CACHE_VAL(ac_cv_sizeof_off_t, --[AC_TRY_RUN([#include -+AC_CHECK_SIZEOF(off_t, [], [ -+#ifdef HAVE_SYS_TYPES_H - #include --main() --{ -- FILE *f=fopen("conftestval", "w"); -- if (!f) exit(1); -- fprintf(f, "%d\n", sizeof(off_t)); -- exit(0); --}], --ac_cv_sizeof_off_t=`cat conftestval`, --ac_cv_sizeof_off_t=0, --ac_cv_sizeof_off_t=4) -+#endif - ]) --AC_MSG_RESULT($ac_cv_sizeof_off_t) --AC_DEFINE_UNQUOTED(SIZEOF_OFF_T, $ac_cv_sizeof_off_t, --[The number of bytes in an off_t.]) - - AC_MSG_CHECKING(whether to enable large file support) - if test "$have_long_long" = yes -@@ -1419,26 +1404,14 @@ - AC_MSG_RESULT(no) - fi - --# AC_CHECK_SIZEOF() doesn't include . --AC_MSG_CHECKING(size of time_t) --AC_CACHE_VAL(ac_cv_sizeof_time_t, --[AC_TRY_RUN([#include -+AC_CHECK_SIZEOF(time_t, [], [ -+#ifdef HAVE_SYS_TYPES_H -+#include -+#endif -+#ifdef HAVE_TIME_H - #include --main() --{ -- FILE *f=fopen("conftestval", "w"); -- if (!f) exit(1); -- fprintf(f, "%d\n", sizeof(time_t)); -- exit(0); --}], --ac_cv_sizeof_time_t=`cat conftestval`, --ac_cv_sizeof_time_t=0, --ac_cv_sizeof_time_t=4) -+#endif - ]) --AC_MSG_RESULT($ac_cv_sizeof_time_t) --AC_DEFINE_UNQUOTED(SIZEOF_TIME_T, $ac_cv_sizeof_time_t, --[The number of bytes in a time_t.]) -- - - # if have pthread_t then define SIZEOF_PTHREAD_T - ac_save_cc="$CC" -@@ -1449,30 +1422,17 @@ - elif test "$ac_cv_pthread" = "yes" - then CC="$CC -pthread" - fi -+ - AC_MSG_CHECKING(for pthread_t) - have_pthread_t=no - AC_TRY_COMPILE([#include ], [pthread_t x; x = *(pthread_t*)0;], have_pthread_t=yes) - AC_MSG_RESULT($have_pthread_t) - if test "$have_pthread_t" = yes ; then -- # AC_CHECK_SIZEOF() doesn't include . -- AC_MSG_CHECKING(size of pthread_t) -- AC_CACHE_VAL(ac_cv_sizeof_pthread_t, -- [AC_TRY_RUN([#include -+ AC_CHECK_SIZEOF(pthread_t, [], [ -+#ifdef HAVE_PTHREAD_H - #include -- main() -- { -- FILE *f=fopen("conftestval", "w"); -- if (!f) exit(1); -- fprintf(f, "%d\n", sizeof(pthread_t)); -- exit(0); -- }], -- ac_cv_sizeof_pthread_t=`cat conftestval`, -- ac_cv_sizeof_pthread_t=0, -- ac_cv_sizeof_pthread_t=4) -+#endif - ]) -- AC_MSG_RESULT($ac_cv_sizeof_pthread_t) -- AC_DEFINE_UNQUOTED(SIZEOF_PTHREAD_T, $ac_cv_sizeof_pthread_t, -- [The number of bytes in a pthread_t.]) - fi - CC="$ac_save_cc" - diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.6.8-cross-distutils.patch b/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.6.8-cross-distutils.patch deleted file mode 100644 index f963636be6..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.6.8-cross-distutils.patch +++ /dev/null @@ -1,94 +0,0 @@ -Extensions should be installed to the targets libdir. This is important if e.g. host -has a 64bit /usr/lib64, but the target is 32bit and has $ROOT/usr/lib. Make sure we -respect the target's lib structure by getting the libdir name from Makefile. - ---- a/Lib/distutils/command/install.py -+++ b/Lib/distutils/command/install.py -@@ -38,8 +38,8 @@ - - INSTALL_SCHEMES = { - 'unix_prefix': { -- 'purelib': '$base/@@GENTOO_LIBDIR@@/python$py_version_short/site-packages', -- 'platlib': '$platbase/@@GENTOO_LIBDIR@@/python$py_version_short/site-packages', -+ 'purelib': '$base/$libdirname/python$py_version_short/site-packages', -+ 'platlib': '$platbase/$libdirname/python$py_version_short/site-packages', - 'headers': '$base/include/python$py_version_short/$dist_name', - 'scripts': '$base/bin', - 'data' : '$base', -@@ -289,6 +289,7 @@ - # everything else. - self.config_vars['base'] = self.install_base - self.config_vars['platbase'] = self.install_platbase -+ self.config_vars['libdirname'] = self.install_libdirname - - if DEBUG: - from pprint import pprint -@@ -394,6 +395,10 @@ - - self.install_base = self.prefix - self.install_platbase = self.exec_prefix -+ self.install_libdirname = os.path.basename(get_config_vars('LIBDIR')[0]) -+ if self.install_libdirname is None: -+ self.install_libdirname = '@@GENTOO_LIBDIR@@' -+ - self.select_scheme("unix_prefix") - - # finalize_unix () ---- a/Lib/distutils/command/build_ext.py -+++ b/Lib/distutils/command/build_ext.py -@@ -201,7 +201,8 @@ - and sysconfig.get_config_var('Py_ENABLE_SHARED'): - if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): - # building third party extensions -- self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) -+ sysroot = os.getenv('SYSROOT', '') -+ self.library_dirs.append(sysroot + sysconfig.get_config_var('LIBDIR')) - else: - # building python standard extensions - self.library_dirs.append('.') ---- a/Lib/distutils/sysconfig.py -+++ b/Lib/distutils/sysconfig.py -@@ -19,9 +19,16 @@ - from distutils.errors import DistutilsPlatformError - - # These are needed in a couple of spots, so just compute them once. -+SYSROOT = os.getenv('SYSROOT', '') - PREFIX = os.path.normpath(sys.prefix) - EXEC_PREFIX = os.path.normpath(sys.exec_prefix) - -+# Make sure we respect the user specified SYSROOT environment variable. -+# This is the first step to get distutils to crosscompile stuff. -+if SYSROOT: -+ PREFIX = os.path.normpath(SYSROOT + os.path.sep + PREFIX) -+ EXEC_PREFIX = os.path.normpath(SYSROOT + os.path.sep + EXEC_PREFIX) -+ - # Path to the base directory of the project. On Windows the binary may - # live in project/PCBuild9. If we're dealing with an x64 Windows build, - # it'll live in project/PCbuild/amd64. -@@ -110,6 +117,12 @@ - - If 'prefix' is supplied, use it instead of sys.prefix or - sys.exec_prefix -- i.e., ignore 'plat_specific'. -+ -+ For the posix system we can not always assume the host's notion of the -+ libdir is the same for the target. e.g. compiling on an x86_64 system -+ will use 'lib64' but an arm 32bit target will use 'lib'. So encode all -+ the known lists of dirs and search them all (starting with the host one -+ so that native builds work just fine). - """ - if prefix is None: - prefix = plat_specific and EXEC_PREFIX or PREFIX -@@ -119,9 +119,10 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): - prefix = plat_specific and EXEC_PREFIX or PREFIX - - if os.name == "posix": -- libpython = os.path.join(prefix, -- "@@GENTOO_LIBDIR@@", -- "python" + get_python_version()) -+ for libdir in ['@@GENTOO_LIBDIR@@', 'lib64', 'lib32', 'libx32', 'lib']: -+ libpython = os.path.join(prefix, libdir, "python" + get_python_version()) -+ if os.path.exists(libpython): -+ break - if standard_lib: - return libpython - else: diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.6.8-cross-h2py.patch b/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.6.8-cross-h2py.patch deleted file mode 100644 index 072a127b11..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.6.8-cross-h2py.patch +++ /dev/null @@ -1,34 +0,0 @@ -use the host python when running the h2py code, and have that search sysroot - ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -431,8 +431,8 @@ platformspecificmods: $(BUILDPYTHON) sharedmods - cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen; \ - fi \ - fi -- @EXE="$(BUILDEXE)"; export EXE; \ -- PATH="`pwd`:$$PATH"; export PATH; \ -+ @HOSTPYTHON="`realpath $(HOSTPYTHON)`"; export HOSTPYTHON; \ -+ INCLUDE="$(SYSROOT)$(INCLUDEDIR)"; export INCLUDE; \ - PYTHONPATH="`pwd`/Lib"; export PYTHONPATH; \ - cd $(srcdir)/Lib/$(PLATDIR); \ - $(RUNSHARED) ./regen || exit 1; \ ---- a/Tools/scripts/h2py.py -+++ b/Tools/scripts/h2py.py -@@ -60,6 +60,7 @@ except KeyError: - searchdirs=['/usr/include'] - - def main(): -+ sysroot = os.getenv('SYSROOT', '') - global filedict - opts, args = getopt.getopt(sys.argv[1:], 'i:') - for o, a in opts: -@@ -72,7 +73,7 @@ def main(): - sys.stdout.write('# Generated by h2py from stdin\n') - process(sys.stdin, sys.stdout) - else: -- fp = open(filename, 'r') -+ fp = open(sysroot + filename, 'r') - outfile = os.path.basename(filename) - i = outfile.rfind('.') - if i > 0: outfile = outfile[:i] diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.6.8-cross-install-compile.patch b/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.6.8-cross-install-compile.patch deleted file mode 100644 index 4d9d0c8194..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.6.8-cross-install-compile.patch +++ /dev/null @@ -1,33 +0,0 @@ -some of the modules that we compile need more modules on the host to make work - ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -924,23 +924,23 @@ libinstall: build_all - done; \ - done - $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt -- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -+ PYTHONPATH=$(HOSTPYTHONPATH):$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - ./$(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ - -d $(LIBDEST) -f \ - -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST) -- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -+ PYTHONPATH=$(HOSTPYTHONPATH):$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - ./$(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ - -d $(LIBDEST) -f \ - -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST) -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -+ -PYTHONPATH=$(HOSTPYTHONPATH):$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - ./$(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ - -d $(LIBDEST)/site-packages -f \ - -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -+ -PYTHONPATH=$(HOSTPYTHONPATH):$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - ./$(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ - -d $(LIBDEST)/site-packages -f \ - -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -+ -PYTHONPATH=$(HOSTPYTHONPATH):$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - ./$(HOSTPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" - - # Install the include files diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.6.8-cross-libdirname.patch b/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.6.8-cross-libdirname.patch deleted file mode 100644 index a2753866eb..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.6.8-cross-libdirname.patch +++ /dev/null @@ -1,13 +0,0 @@ -the older python on the host expects LIBDIRNAME here. -once it gets upgraded to 2.6.8, we can drop this patch. - ---- Makefile.pre.in -+++ Makefile.pre.in -@@ -87,6 +87,7 @@ - INCLUDEDIR= @includedir@ - CONFINCLUDEDIR= $(exec_prefix)/include - SCRIPTDIR= $(prefix)/@@GENTOO_LIBDIR@@ -+LIBDIRNAME= @@GENTOO_LIBDIR@@ - - # Detailed destination directories - BINLIBDEST= $(LIBDIR)/python$(VERSION) diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.6.8-cross-setup-sysroot.patch b/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.6.8-cross-setup-sysroot.patch deleted file mode 100644 index 70f3f3c06e..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.6.8-cross-setup-sysroot.patch +++ /dev/null @@ -1,169 +0,0 @@ -Change setup.py to respect the SYSROOT environment variable - ---- a/setup.py -+++ b/setup.py -@@ -337,9 +337,13 @@ - - def detect_modules(self): - global disable_ssl -+ -+ # We must respect the user specified sysroot! -+ sysroot = os.getenv('SYSROOT', '') -+ - # 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') -+ add_dir_to_list(self.compiler.library_dirs, sysroot + '/usr/local/lib') -+ add_dir_to_list(self.compiler.include_dirs, sysroot + '/usr/local/include') - - # Add paths specified in the environment variables LDFLAGS and - # CPPFLAGS for header and library files. -@@ -375,12 +381,18 @@ - for directory in reversed(options.dirs): - add_dir_to_list(dir_list, directory) - -- if os.path.normpath(sys.prefix) != '/usr': -+ if os.path.normpath(sys.prefix) != '/usr/local': - add_dir_to_list(self.compiler.library_dirs, - sysconfig.get_config_var("LIBDIR")) - add_dir_to_list(self.compiler.include_dirs, - sysconfig.get_config_var("INCLUDEDIR")) - -+ # We should always look into sysroot/usr/include and consider -+ # also the lib dirs there for searching for files -+ add_dir_to_list(self.compiler.include_dirs, sysroot + '/usr/include') -+ add_dir_to_list(self.compiler.library_dirs, sysroot + '/@@GENTOO_LIBDIR@@') -+ add_dir_to_list(self.compiler.library_dirs, sysroot + '/usr/@@GENTOO_LIBDIR@@') -+ - try: - have_unicode = unicode - except NameError: -@@ -389,6 +403,9 @@ - '/lib', '/usr/lib', - ] - inc_dirs = self.compiler.include_dirs + ['/usr/include'] -+ # Ignore previous settings. -+ lib_dirs = self.compiler.library_dirs -+ inc_dirs = self.compiler.include_dirs - exts = [] - missing = [] - -@@ -613,11 +624,11 @@ - elif self.compiler.find_library_file(lib_dirs, 'curses'): - readline_libs.append('curses') - elif self.compiler.find_library_file(lib_dirs + -- ['/usr/@@GENTOO_LIBDIR@@/termcap'], -+ [sysroot + '/usr/@@GENTOO_LIBDIR@@/termcap'], - 'termcap'): - readline_libs.append('termcap') - exts.append( Extension('readline', ['readline.c'], -- library_dirs=['/usr/@@GENTOO_LIBDIR@@/termcap'], -+ library_dirs=[sysroot + '/usr/@@GENTOO_LIBDIR@@/termcap'], - extra_link_args=readline_extra_link_args, - libraries=readline_libs) ) - else: -@@ -642,20 +653,20 @@ - depends = ['socketmodule.h']) ) - # Detect SSL support for the socket module (via _ssl) - search_for_ssl_incs_in = [ -- '/usr/local/ssl/include', -- '/usr/contrib/ssl/include/' -+ sysroot + '/usr/local/ssl/include', -+ sysroot + '/usr/contrib/ssl/include/' - ] - ssl_incs = find_file('openssl/ssl.h', inc_dirs, - search_for_ssl_incs_in - ) - if ssl_incs is not None and not disable_ssl: - krb5_h = find_file('krb5.h', inc_dirs, -- ['/usr/kerberos/include']) -+ [sysroot + '/usr/kerberos/include']) - if krb5_h: - ssl_incs += krb5_h - ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, -- ['/usr/local/ssl/lib', -- '/usr/contrib/ssl/lib/' -+ [sysroot + '/usr/local/ssl/lib', -+ sysroot + '/usr/contrib/ssl/lib/' - ] ) - - if (ssl_incs is not None and -@@ -773,6 +785,7 @@ - db_inc_paths.append('/usr/local/include/db3%d' % x) - db_inc_paths.append('/pkg/db-3.%d/include' % x) - db_inc_paths.append('/opt/db-3.%d/include' % x) -+ db_inc_paths = [sysroot + x for x in db_inc_paths] - - # Add some common subdirectories for Sleepycat DB to the list, - # based on the standard include directories. This way DB3/4 gets -@@ -921,5 +933,6 @@ - '/usr/local/include/sqlite', - '/usr/local/include/sqlite3', - ] -+ sqlite_inc_paths = [sysroot + x for x in sqlite_inc_paths] - MIN_SQLITE_VERSION_NUMBER = (3, 0, 8) - MIN_SQLITE_VERSION = ".".join([str(x) -@@ -1021,7 +1033,7 @@ - # we do not build this one. Otherwise this build will pick up - # the more recent berkeleydb's db.h file first in the include path - # when attempting to compile and it will fail. -- f = "/usr/include/db.h" -+ f = sysroot + "/usr/include/db.h" - - if sys.platform == 'darwin': - if is_macosx_sdk_path(f): -@@ -1236,7 +1248,7 @@ - # More information on Expat can be found at www.libexpat.org. - # - # Use system expat -- expatinc = '/usr/include' -+ expatinc = sysroot + '/usr/include' - define_macros = [] - - exts.append(Extension('pyexpat', -@@ -1546,7 +1558,7 @@ - # For 8.4a2, the X11 headers are not included. Rather than include a - # complicated search, this is a hard-coded path. It could bail out - # if X11 libs are not found... -- include_dirs.append('/usr/X11R6/include') -+ include_dirs.append(sysroot + '/usr/X11R6/include') - frameworks = ['-framework', 'Tcl', '-framework', 'Tk'] - - # All existing framework builds of Tcl/Tk don't support 64-bit -@@ -1579,6 +1591,9 @@ - def detect_tkinter(self, inc_dirs, lib_dirs): - # The _tkinter module. - -+ # We must respect the user specified sysroot! -+ sysroot = os.getenv('SYSROOT', '') -+ - # Rather than complicate the code below, detecting and building - # AquaTk is a separate method. Only one Tkinter will be built on - # Darwin - either AquaTk, if it is found, or X11 based Tk. -@@ -1633,17 +1650,17 @@ - if platform == 'sunos5': - include_dirs.append('/usr/openwin/include') - added_lib_dirs.append('/usr/openwin/lib') -- elif os.path.exists('/usr/X11R6/include'): -- include_dirs.append('/usr/X11R6/include') -- added_lib_dirs.append('/usr/X11R6/lib64') -- added_lib_dirs.append('/usr/X11R6/lib') -- elif os.path.exists('/usr/X11R5/include'): -- include_dirs.append('/usr/X11R5/include') -- added_lib_dirs.append('/usr/X11R5/lib') -+ elif os.path.exists(sysroot + '/usr/X11R6/include'): -+ include_dirs.append(sysroot + '/usr/X11R6/include') -+ added_lib_dirs.append(sysroot + '/usr/X11R6/lib64') -+ added_lib_dirs.append(sysroot + '/usr/X11R6/lib') -+ elif os.path.exists(sysroot + '/usr/X11R5/include'): -+ include_dirs.append(sysroot + '/usr/X11R5/include') -+ added_lib_dirs.append(sysroot + '/usr/X11R5/lib') - else: - # Assume default location for X11 -- include_dirs.append('/usr/X11/include') -- added_lib_dirs.append('/usr/X11/lib') -+ include_dirs.append(sysroot + '/usr/X11/include') -+ added_lib_dirs.append(sysroot + '/usr/X11/lib') - - # If Cygwin, then verify that X is installed before proceeding - if platform == 'cygwin': diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7.3-cross-distutils.patch b/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7.3-cross-distutils.patch deleted file mode 100644 index 1644cb6016..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7.3-cross-distutils.patch +++ /dev/null @@ -1,93 +0,0 @@ -Extensions should be installed to the targets libdir. This is important if e.g. host -has a 64bit /usr/lib64, but the target is 32bit and has $ROOT/usr/lib. Make sure we -respect the target's lib structure by getting the libdir name from Makefile. - ---- a/Lib/distutils/command/install.py -+++ b/Lib/distutils/command/install.py -@@ -38,8 +38,8 @@ - - INSTALL_SCHEMES = { - 'unix_prefix': { -- 'purelib': '$base/@@GENTOO_LIBDIR@@/python$py_version_short/site-packages', -- 'platlib': '$platbase/@@GENTOO_LIBDIR@@/python$py_version_short/site-packages', -+ 'purelib': '$base/$libdirname/python$py_version_short/site-packages', -+ 'platlib': '$platbase/$libdirname/python$py_version_short/site-packages', - 'headers': '$base/include/python$py_version_short/$dist_name', - 'scripts': '$base/bin', - 'data' : '$base', -@@ -289,6 +289,7 @@ - # everything else. - self.config_vars['base'] = self.install_base - self.config_vars['platbase'] = self.install_platbase -+ self.config_vars['libdirname'] = self.install_libdirname - - if DEBUG: - from pprint import pprint -@@ -394,6 +395,10 @@ - - self.install_base = self.prefix - self.install_platbase = self.exec_prefix -+ self.install_libdirname = os.path.basename(get_config_vars('LIBDIR')[0]) -+ if self.install_libdirname is None: -+ self.install_libdirname = '@@GENTOO_LIBDIR@@' -+ - self.select_scheme("unix_prefix") - - # finalize_unix () ---- a/Lib/distutils/command/build_ext.py -+++ b/Lib/distutils/command/build_ext.py -@@ -201,7 +201,8 @@ - and sysconfig.get_config_var('Py_ENABLE_SHARED'): - if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): - # building third party extensions -- self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) -+ sysroot = os.getenv('SYSROOT', '') -+ self.library_dirs.append(sysroot + sysconfig.get_config_var('LIBDIR')) - else: - # building python standard extensions - self.library_dirs.append('.') ---- a/Lib/distutils/sysconfig.py -+++ b/Lib/distutils/sysconfig.py -@@ -19,9 +19,16 @@ - from distutils.errors import DistutilsPlatformError - - # These are needed in a couple of spots, so just compute them once. -+SYSROOT = os.getenv('SYSROOT', '') - PREFIX = os.path.normpath(sys.prefix) - EXEC_PREFIX = os.path.normpath(sys.exec_prefix) - -+# Make sure we respect the user specified SYSROOT environment variable. -+# This is the first step to get distutils to crosscompile stuff. -+if SYSROOT: -+ PREFIX = os.path.normpath(SYSROOT + os.path.sep + PREFIX) -+ EXEC_PREFIX = os.path.normpath(SYSROOT + os.path.sep + EXEC_PREFIX) -+ - # Path to the base directory of the project. On Windows the binary may - # live in project/PCBuild9. If we're dealing with an x64 Windows build, - # it'll live in project/PCbuild/amd64. -@@ -110,6 +117,12 @@ - - If 'prefix' is supplied, use it instead of sys.prefix or - sys.exec_prefix -- i.e., ignore 'plat_specific'. -+ -+ For the posix system we can not always assume the host's notion of the -+ libdir is the same for the target. e.g. compiling on an x86_64 system -+ will use 'lib64' but an arm 32bit target will use 'lib'. So encode all -+ the known lists of dirs and search them all (starting with the host one -+ so that native builds work just fine). - """ - if prefix is None: - prefix = plat_specific and EXEC_PREFIX or PREFIX -@@ -119,8 +119,10 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): - prefix = plat_specific and EXEC_PREFIX or PREFIX - - if os.name == "posix": -- libpython = os.path.join(prefix, -- "@@GENTOO_LIBDIR@@", "python" + get_python_version()) -+ for libdir in ['@@GENTOO_LIBDIR@@', 'lib64', 'lib32', 'libx32', 'lib']: -+ libpython = os.path.join(prefix, libdir, "python" + get_python_version()) -+ if os.path.exists(libpython): -+ break - if standard_lib: - return libpython - else: diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7.3-cross-h2py.patch b/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7.3-cross-h2py.patch deleted file mode 100644 index 8801fa87c0..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7.3-cross-h2py.patch +++ /dev/null @@ -1,36 +0,0 @@ -use the host python when running the h2py code, and have that search sysroot - ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -431,10 +431,10 @@ - $(srcdir)/Lib/$(PLATDIR): - mkdir $(srcdir)/Lib/$(PLATDIR) - cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen -- export PATH; PATH="`pwd`:$$PATH"; \ -+ export INCLUDE="$(SYSROOT)$(INCLUDEDIR)"; \ - export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \ - export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \ -- export EXE; EXE="$(BUILDEXE)"; \ -+ export HOSTPYTHON="`realpath $(HOSTPYTHON)`"; \ - cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen - - python-config: $(srcdir)/Misc/python-config.in ---- a/Tools/scripts/h2py.py -+++ b/Tools/scripts/h2py.py -@@ -60,6 +60,7 @@ except KeyError: - searchdirs=['/usr/include'] - - def main(): -+ sysroot = os.getenv('SYSROOT', '') - global filedict - opts, args = getopt.getopt(sys.argv[1:], 'i:') - for o, a in opts: -@@ -72,7 +73,7 @@ def main(): - sys.stdout.write('# Generated by h2py from stdin\n') - process(sys.stdin, sys.stdout) - else: -- fp = open(filename, 'r') -+ fp = open(sysroot + filename, 'r') - outfile = os.path.basename(filename) - i = outfile.rfind('.') - if i > 0: outfile = outfile[:i] diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7.3-cross-install-compile.patch b/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7.3-cross-install-compile.patch deleted file mode 100644 index 93bac05210..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7.3-cross-install-compile.patch +++ /dev/null @@ -1,35 +0,0 @@ -some of the modules that we compile need more modules on the host to make work - ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -952,25 +952,25 @@ libinstall: - $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ - $(DESTDIR)$(LIBDEST)/distutils/tests ; \ - fi -- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -+ PYTHONPATH=$(HOSTPYTHONPATH):$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - ./$(HOSTPYTHON) -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=$(HOSTPYTHONPATH):$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - ./$(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ - -d $(LIBDEST) -f \ - -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ - $(DESTDIR)$(LIBDEST) -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -+ -PYTHONPATH=$(HOSTPYTHONPATH):$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - ./$(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ - -d $(LIBDEST)/site-packages -f \ - -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -+ -PYTHONPATH=$(HOSTPYTHONPATH):$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - ./$(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ - -d $(LIBDEST)/site-packages -f \ - -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -+ -PYTHONPATH=$(HOSTPYTHONPATH):$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - ./$(HOSTPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" - - # Create the PLATDIR source directory, if one wasn't distributed.. diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7.3-cross-setup-sysroot.patch b/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7.3-cross-setup-sysroot.patch deleted file mode 100644 index e7ce4b1104..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7.3-cross-setup-sysroot.patch +++ /dev/null @@ -1,159 +0,0 @@ -Change setup.py to respect the SYSROOT environment variable - ---- a/setup.py -+++ b/setup.py -@@ -337,9 +337,13 @@ - - def detect_modules(self): - global disable_ssl -+ -+ # We must respect the user specified sysroot! -+ sysroot = os.getenv('SYSROOT', '') -+ - # 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') -+ add_dir_to_list(self.compiler.library_dirs, sysroot + '/usr/local/lib') -+ add_dir_to_list(self.compiler.include_dirs, sysroot + '/usr/local/include') - self.add_multiarch_paths() - - # Add paths specified in the environment variables LDFLAGS and -@@ -375,10 +379,16 @@ - # building a framework with different architectures than - # the one that is currently installed (issue #7473) - add_dir_to_list(self.compiler.library_dirs, -- sysconfig.get_config_var("LIBDIR")) -+ sysroot + sysconfig.get_config_var("LIBDIR")) - add_dir_to_list(self.compiler.include_dirs, -- sysconfig.get_config_var("INCLUDEDIR")) -+ sysroot + sysconfig.get_config_var("INCLUDEDIR")) - -+ # We should always look into sysroot/usr/include and consider -+ # also the lib dirs there for searching for files -+ add_dir_to_list(self.compiler.include_dirs, sysroot + '/usr/include') -+ add_dir_to_list(self.compiler.library_dirs, sysroot + '/@@GENTOO_LIBDIR@@') -+ add_dir_to_list(self.compiler.library_dirs, sysroot + '/usr/@@GENTOO_LIBDIR@@') -+ - try: - have_unicode = unicode - except NameError: -@@ -389,6 +399,9 @@ - '/lib', '/usr/lib', - ] - inc_dirs = self.compiler.include_dirs + ['/usr/include'] -+ # Ignore previous settings. -+ lib_dirs = self.compiler.library_dirs -+ inc_dirs = self.compiler.include_dirs - exts = [] - missing = [] - -@@ -613,11 +626,11 @@ - elif curses_library: - readline_libs.append(curses_library) - elif self.compiler.find_library_file(lib_dirs + -- ['/usr/@@GENTOO_LIBDIR@@/termcap'], -+ [sysroot + '/usr/@@GENTOO_LIBDIR@@/termcap'], - 'termcap'): - readline_libs.append('termcap') - exts.append( Extension('readline', ['readline.c'], -- library_dirs=['/usr/@@GENTOO_LIBDIR@@/termcap'], -+ library_dirs=[sysroot + '/usr/@@GENTOO_LIBDIR@@/termcap'], - extra_link_args=readline_extra_link_args, - libraries=readline_libs) ) - else: -@@ -642,20 +655,20 @@ - depends = ['socketmodule.h']) ) - # Detect SSL support for the socket module (via _ssl) - search_for_ssl_incs_in = [ -- '/usr/local/ssl/include', -- '/usr/contrib/ssl/include/' -+ sysroot + '/usr/local/ssl/include', -+ sysroot + '/usr/contrib/ssl/include/' - ] - ssl_incs = find_file('openssl/ssl.h', inc_dirs, - search_for_ssl_incs_in - ) - if ssl_incs is not None and not disable_ssl: - krb5_h = find_file('krb5.h', inc_dirs, -- ['/usr/kerberos/include']) -+ [sysroot + '/usr/kerberos/include']) - if krb5_h: - ssl_incs += krb5_h - ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, -- ['/usr/local/ssl/lib', -- '/usr/contrib/ssl/lib/' -+ [sysroot + '/usr/local/ssl/lib', -+ sysroot + '/usr/contrib/ssl/lib/' - ] ) - - if (ssl_incs is not None and -@@ -773,6 +786,7 @@ - db_inc_paths.append('/usr/local/include/db3%d' % x) - db_inc_paths.append('/pkg/db-3.%d/include' % x) - db_inc_paths.append('/opt/db-3.%d/include' % x) -+ db_inc_paths = [sysroot + x for x in db_inc_paths] - - # Add some common subdirectories for Sleepycat DB to the list, - # based on the standard include directories. This way DB3/4 gets -@@ -921,5 +935,6 @@ - '/usr/local/include/sqlite', - '/usr/local/include/sqlite3', - ] -+ sqlite_inc_paths = [sysroot + x for x in sqlite_inc_paths] - MIN_SQLITE_VERSION_NUMBER = (3, 0, 8) - MIN_SQLITE_VERSION = ".".join([str(x) -@@ -1021,7 +1036,7 @@ - # we do not build this one. Otherwise this build will pick up - # the more recent berkeleydb's db.h file first in the include path - # when attempting to compile and it will fail. -- f = "/usr/include/db.h" -+ f = sysroot + "/usr/include/db.h" - - if sys.platform == 'darwin': - if is_macosx_sdk_path(f): -@@ -1546,7 +1561,7 @@ - # For 8.4a2, the X11 headers are not included. Rather than include a - # complicated search, this is a hard-coded path. It could bail out - # if X11 libs are not found... -- include_dirs.append('/usr/X11R6/include') -+ include_dirs.append(sysroot + '/usr/X11R6/include') - frameworks = ['-framework', 'Tcl', '-framework', 'Tk'] - - # All existing framework builds of Tcl/Tk don't support 64-bit -@@ -1579,6 +1594,9 @@ - def detect_tkinter(self, inc_dirs, lib_dirs): - # The _tkinter module. - -+ # We must respect the user specified sysroot! -+ sysroot = os.getenv('SYSROOT', '') -+ - # Rather than complicate the code below, detecting and building - # AquaTk is a separate method. Only one Tkinter will be built on - # Darwin - either AquaTk, if it is found, or X11 based Tk. -@@ -1633,17 +1651,17 @@ - if platform == 'sunos5': - include_dirs.append('/usr/openwin/include') - added_lib_dirs.append('/usr/openwin/lib') -- elif os.path.exists('/usr/X11R6/include'): -- include_dirs.append('/usr/X11R6/include') -- added_lib_dirs.append('/usr/X11R6/lib64') -- added_lib_dirs.append('/usr/X11R6/lib') -- elif os.path.exists('/usr/X11R5/include'): -- include_dirs.append('/usr/X11R5/include') -- added_lib_dirs.append('/usr/X11R5/lib') -+ elif os.path.exists(sysroot + '/usr/X11R6/include'): -+ include_dirs.append(sysroot + '/usr/X11R6/include') -+ added_lib_dirs.append(sysroot + '/usr/X11R6/lib64') -+ added_lib_dirs.append(sysroot + '/usr/X11R6/lib') -+ elif os.path.exists(sysroot + '/usr/X11R5/include'): -+ include_dirs.append(sysroot + '/usr/X11R5/include') -+ added_lib_dirs.append(sysroot + '/usr/X11R5/lib') - else: - # Assume default location for X11 -- include_dirs.append('/usr/X11/include') -- added_lib_dirs.append('/usr/X11/lib') -+ include_dirs.append(sysroot + '/usr/X11/include') -+ added_lib_dirs.append(sysroot + '/usr/X11/lib') - - # If Cygwin, then verify that X is installed before proceeding - if platform == 'cygwin': diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7.3-gcc-4_8.patch b/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7.3-gcc-4_8.patch deleted file mode 100644 index 4147b7e7b4..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7.3-gcc-4_8.patch +++ /dev/null @@ -1,58 +0,0 @@ -Fix gcc 4.8 build broken for python 2.7. -The error was reported while building chromeos-chrome - "error: -'PyArg_ParseTuple' is an unrecognized format function type". The issue is that -'-Wformat' is no longer included by default in gcc 4.8. The solution is to add -'-Wformat' explictly to configure. For GCC 4.7, since '-Wformat' is enabled by -default, the modification has no impact to current gcc. Below shows the -difference between gcc 4.7 and gcc 4.8. - - void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2))); - int - main () - { - - ; - return 0; - } - - With gcc 4.7: - $ gcc -Werror /tmp/foo.c - /tmp/foo.c:1:1: error: ‘PyArg_ParseTuple’ is an unrecognized format function type [-Werror=format] - cc1: all warnings being treated as errors - $ echo $? - 1 - - With gcc 4.8: - $ ~/coding/gcc-python/gcc-svn-trunk/install/bin/gcc -Werror /tmp/foo.c - $ echo $? - 0 - - but on adding -Wall: - $ ~/coding/gcc-python/gcc-svn-trunk/install/bin/gcc -Werror -Wall /tmp/foo.c - /tmp/foo.c:1:1: error: ‘PyArg_ParseTuple’ is an unrecognized format function type [-Werror=format=] - void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2))); - ^ - cc1: all warnings being treated as errors - $ echo $? - 1 - - or indeed just -Wformat: - - $ ~/coding/gcc-python/gcc-svn-trunk/install/bin/gcc -Werror -Wformat /tmp/foo.c - /tmp/foo.c:1:1: error: ‘PyArg_ParseTuple’ is an unrecognized format function type [-Werror=format=] - void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2))); - ^ - cc1: all warnings being treated as errors - $ echo $? - 1 ---- configure.in.orig 2013-04-09 11:13:52.568435225 -0700 -+++ configure.in 2013-04-09 11:14:06.998565440 -0700 -@@ -1192,7 +1192,7 @@ if test "$GCC" = "yes" - then - AC_MSG_CHECKING(whether gcc supports ParseTuple __format__) - save_CFLAGS=$CFLAGS -- CFLAGS="$CFLAGS -Werror" -+ CFLAGS="$CFLAGS -Werror -Wformat" - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));]], [[]]) - ],[ diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7.5-cross-distutils.patch b/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7.5-cross-distutils.patch deleted file mode 100644 index e212aeeb5c..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/files/python-2.7.5-cross-distutils.patch +++ /dev/null @@ -1,96 +0,0 @@ -diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py -index 923197b..b6ee689 100644 ---- a/Lib/distutils/command/build_ext.py -+++ b/Lib/distutils/command/build_ext.py -@@ -239,7 +239,8 @@ class build_ext (Command): - and sysconfig.get_config_var('Py_ENABLE_SHARED')): - if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): - # building third party extensions -- self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) -+ sysroot = os.getenv('SYSROOT', '') -+ self.library_dirs.append(sysroot + sysconfig.get_config_var('LIBDIR')) - else: - # building python standard extensions - self.library_dirs.append('.') -diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py -index a2822e8..ab7f8e8 100644 ---- a/Lib/distutils/command/install.py -+++ b/Lib/distutils/command/install.py -@@ -41,8 +41,8 @@ else: - - INSTALL_SCHEMES = { - 'unix_prefix': { -- 'purelib': '$base/@@GENTOO_LIBDIR@@/python$py_version_short/site-packages', -- 'platlib': '$platbase/@@GENTOO_LIBDIR@@/python$py_version_short/site-packages', -+ 'purelib': '$base/$libdirname/python$py_version_short/site-packages', -+ 'platlib': '$platbase/$libdirname/python$py_version_short/site-packages', - 'headers': '$base/include/python$py_version_short/$dist_name', - 'scripts': '$base/bin', - 'data' : '$base', -@@ -319,6 +319,7 @@ class install (Command): - # everything else. - self.config_vars['base'] = self.install_base - self.config_vars['platbase'] = self.install_platbase -+ self.config_vars['libdirname'] = self.install_libdirname - - if DEBUG: - from pprint import pprint -@@ -435,6 +436,10 @@ class install (Command): - - self.install_base = self.prefix - self.install_platbase = self.exec_prefix -+ self.install_libdirname = os.path.basename(get_config_vars('LIBDIR')[0]) -+ if self.install_libdirname is None: -+ self.install_libdirname = '@@GENTOO_LIBDIR@@' -+ - self.select_scheme("unix_prefix") - - # finalize_unix () -diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py -index e16b05c..c67434a 100644 ---- a/Lib/distutils/sysconfig.py -+++ b/Lib/distutils/sysconfig.py -@@ -19,9 +19,16 @@ import sys - from distutils.errors import DistutilsPlatformError - - # These are needed in a couple of spots, so just compute them once. -+SYSROOT = os.getenv('SYSROOT', '') - PREFIX = os.path.normpath(sys.prefix) - EXEC_PREFIX = os.path.normpath(sys.exec_prefix) - -+# Make sure we respect the user specified SYSROOT environment variable. -+# This is the first step to get distutils to crosscompile stuff. -+if SYSROOT: -+ PREFIX = os.path.normpath(SYSROOT + os.path.sep + PREFIX) -+ EXEC_PREFIX = os.path.normpath(SYSROOT + os.path.sep + EXEC_PREFIX) -+ - # Path to the base directory of the project. On Windows the binary may - # live in project/PCBuild9. If we're dealing with an x64 Windows build, - # it'll live in project/PCbuild/amd64. -@@ -114,13 +121,21 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): - - If 'prefix' is supplied, use it instead of sys.prefix or - sys.exec_prefix -- i.e., ignore 'plat_specific'. -+ -+ For the posix system we can not always assume the host's notion of the -+ libdir is the same for the target. e.g. compiling on an x86_64 system -+ will use 'lib64' but an arm 32bit target will use 'lib'. So encode all -+ the known lists of dirs and search them all (starting with the host one -+ so that native builds work just fine). - """ - if prefix is None: - prefix = plat_specific and EXEC_PREFIX or PREFIX - - if os.name == "posix": -- libpython = os.path.join(prefix, -- "@@GENTOO_LIBDIR@@", "python" + get_python_version()) -+ for libdir in ['@@GENTOO_LIBDIR@@', 'lib64', 'lib32', 'libx32', 'lib']: -+ libpython = os.path.join(prefix, libdir, "python" + get_python_version()) -+ if os.path.exists(libpython): -+ break - if standard_lib: - return libpython - else: --- -1.8.1.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/metadata.xml b/sdk_container/src/third_party/coreos-overlay/dev-lang/python/metadata.xml deleted file mode 100644 index 51a9e80800..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/metadata.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - -python - - Enable threading support. (DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU'RE DOING) - 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) - Install Windows executables required to create an executable installer for MS Windows. - - diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/python-2.6.8-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/dev-lang/python/python-2.6.8-r1.ebuild deleted file mode 100644 index 391454ff4d..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/python-2.6.8-r1.ebuild +++ /dev/null @@ -1,372 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.6.8.ebuild,v 1.15 2012/05/26 17:27:12 armin76 Exp $ - -EAPI="2" -WANT_AUTOMAKE="none" -WANT_LIBTOOL="none" - -inherit autotools eutils flag-o-matic multilib pax-utils python toolchain-funcs multiprocessing - -MY_P="Python-${PV}" -PATCHSET_REVISION="0" - -DESCRIPTION="Python is an interpreted, interactive, object-oriented programming language." -HOMEPAGE="http://www.python.org/" -SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.bz2 - mirror://gentoo/python-gentoo-patches-${PV}-${PATCHSET_REVISION}.tar.bz2" - -LICENSE="PSF-2" -SLOT="2.6" -PYTHON_ABI="${SLOT}" -KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd" -IUSE="-berkdb build doc elibc_uclibc examples gdbm ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml" - -RDEPEND="app-arch/bzip2 - >=sys-libs/zlib-1.1.3 - virtual/libffi - virtual/libintl - !build? ( - berkdb? ( || ( - 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 ) - ncurses? ( - >=sys-libs/ncurses-5.2 - readline? ( >=sys-libs/readline-4.1 ) - ) - sqlite? ( >=dev-db/sqlite-3.3.3:3 ) - ssl? ( dev-libs/openssl ) - tk? ( - >=dev-lang/tk-8.0 - dev-tcltk/blt - ) - xml? ( >=dev-libs/expat-2.1 ) - ) - !!/dev/null - OPT="-O1" CFLAGS="" CPPFLAGS="" LDFLAGS="" CC="" \ - "${S}"/configure \ - --{build,host}=${CBUILD} \ - || die "cross-configure failed" - ) & - multijob_post_fork - 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.6 correctly. - # Needed on FreeBSD unless Python 2.6 is already installed. - # Please query BSD team before removing this! - append-ldflags "-L." - - cd "${WORKDIR}"/${CHOST} - 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-libc="" \ - --with-system-ffi - - 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 || die "cross-make failed" - [[ -e build/lib.linux-x86_64-2.6/unicodedata.so ]] || die - # 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 EPYTHON="python${PV%%.*}" || die "emake failed" - - # Work around bug 329499. See also bug 413751. - pax-mark m python -} - -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} - - # Byte compiling should be enabled here. - # Otherwise test_import fails. - python_enable_pyc - - # Skip failing tests. - local skipped_tests="distutils tcl" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" || die - 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/ || die - 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}$(python_get_libdir)/test'" - elog "and run the tests separately." - - python_disable_pyc - - if [[ "${result}" -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - [[ -z "${ED}" ]] && ED="${D%/}${EPREFIX}/" - - cd "${WORKDIR}"/${CHOST} - emake DESTDIR="${D}" altinstall maninstall || die "emake altinstall maninstall failed" - python_clean_installation_image -q - - mv "${ED}usr/bin/python${SLOT}-config" "${ED}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}" - mv "${ED}usr/share/man/man1/python.1" "${ED}usr/share/man/man1/python${SLOT}.1" - rm -f "${ED}usr/bin/smtpd.py" - - if use build; then - rm -fr "${ED}usr/bin/idle${SLOT}" "${ED}$(python_get_libdir)/"{bsddb,dbhash.py,idlelib,lib-tk,sqlite3,test} - else - use elibc_uclibc && rm -fr "${ED}$(python_get_libdir)/"{bsddb/test,test} - use berkdb || rm -fr "${ED}$(python_get_libdir)/"{bsddb,dbhash.py,test/test_bsddb*} - use sqlite || rm -fr "${ED}$(python_get_libdir)/"{sqlite3,test/test_sqlite*} - use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${ED}$(python_get_libdir)/"{idlelib,lib-tk} - fi - - use threads || rm -fr "${ED}$(python_get_libdir)/multiprocessing" - use wininst || rm -f "${ED}$(python_get_libdir)/distutils/command/"wininst-*.exe - - dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} || die "dodoc failed" - - if use examples; then - insinto /usr/share/doc/${PF}/examples - doins -r "${S}"/Tools || die "doins failed" - fi - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} || die "newconfd failed" - newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} || die "newinitd failed" - 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" -} - -pkg_preinst() { - if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version "${CATEGORY}/${PN}:2.6" && ! has_version "${CATEGORY}/${PN}:2.7"; then - python_updater_warning="1" - fi -} - -eselect_python_update() { - [[ -z "${EROOT}" || (! -d "${EROOT}" && -d "${ROOT}") ]] && EROOT="${ROOT%/}${EPREFIX}/" - - 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 - - python_mod_optimize -f -x "/(site-packages|test|tests)/" $(python_get_libdir) - - 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 - - python_mod_cleanup $(python_get_libdir) -} diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/python-2.7.3-r5.ebuild b/sdk_container/src/third_party/coreos-overlay/dev-lang/python/python-2.7.3-r5.ebuild deleted file mode 100644 index f16026aa6d..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/python-2.7.3-r5.ebuild +++ /dev/null @@ -1,420 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.7.3-r3.ebuild,v 1.5 2012/12/19 18:03:41 floppym Exp $ - -EAPI="2" -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.bz2 - mirror://gentoo/python-gentoo-patches-${PV}-${PATCHSET_REVISION}.tar.bz2" - -LICENSE="PSF-2" -SLOT="2.7" -KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" -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: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 ) - ncurses? ( - >=sys-libs/ncurses-5.2 - readline? ( >=sys-libs/readline-4.1 ) - ) - sqlite? ( >=dev-db/sqlite-3.3.8:3[extensions] ) - ssl? ( dev-libs/openssl ) - tk? ( - >=dev-lang/tk-8.0 - dev-tcltk/blt - ) - xml? ( >=dev-libs/expat-2.1 ) - ) - !!/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/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 - - cd "${WORKDIR}"/${CHOST} - 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 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 || die "cross-make failed" - [[ -e build/lib.linux-x86_64-${SLOT}/unicodedata.so ]] || die - # 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} - default - - # Work around bug 329499. See also bug 413751. - pax-mark m python -} - -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="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." - - python_disable_pyc - - if [[ "${result}" -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - [[ -z "${ED}" ]] && ED="${D%/}${EPREFIX}/" - - local libdir=${ED}/usr/$(get_libdir)/python${SLOT} - - cd "${WORKDIR}"/${CHOST} - emake DESTDIR="${D}" altinstall maninstall || die "emake altinstall maninstall failed" - - 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} || die - - # 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 elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test} - use berkdb || rm -fr "${libdir}/"{bsddb,dbhash.py,test/test_bsddb*} - use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*} - use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,lib-tk} - fi - - use threads || rm -fr "${libdir}/multiprocessing" - use wininst || rm -f "${libdir})/distutils/command/"wininst-*.exe - - dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} || die "dodoc failed" - - if use examples; then - insinto /usr/share/doc/${PF}/examples - doins -r "${S}"/Tools || die "doins failed" - 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} || die "newconfd failed" - newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} || die "newinitd failed" - 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 - - # The sysconfig module will actually read the pyconfig.h at runtime to see what kind - # of functionality is enabled in the build. Deploy it behind the back of portage as - # need be. - ln "${ED}/usr/include/python${SLOT}/pyconfig.h" "${libdir}/pyconfig_h" || die - - # Workaround https://bugs.gentoo.org/380569 - keepdir /etc/env.d/python -} - -pkg_preinst() { - if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version "${CATEGORY}/${PN}:2.7"; then - python_updater_warning="1" - fi -} - -eselect_python_update() { - [[ -z "${EROOT}" || (! -d "${EROOT}" && -d "${ROOT}") ]] && EROOT="${ROOT%/}${EPREFIX}/" - - 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 - - local pyconfig="${EROOT}/usr/$(get_libdir)/python${SLOT}/pyconfig_h" - if [[ ! -e ${EROOT}/usr/include/python${SLOT}/pyconfig.h ]] ; then - # See pkg_preinst above for details. - install -D -m644 "${pyconfig}" "${EROOT}/usr/include/python${SLOT}/pyconfig.h" || die - fi - rm "${pyconfig}" || die -} - -pkg_postrm() { - eselect_python_update -} diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/python-2.7.5-r2.ebuild b/sdk_container/src/third_party/coreos-overlay/dev-lang/python/python-2.7.5-r2.ebuild deleted file mode 100644 index 89fb42fd9e..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/python-2.7.5-r2.ebuild +++ /dev/null @@ -1,409 +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-r2.ebuild,v 1.13 2013/08/28 15:59:25 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="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" -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 ) - ) - !!/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 - - # The configure script requires this to be explicit - export ac_cv_file__dev_ptmx=yes - export ac_cv_file__dev_ptc=no - 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 - - cd "${WORKDIR}"/${CHOST} - 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 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} - default - - # 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="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 "${WORKDIR}"/${CHOST} - 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 \ - 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}: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/sdk_container/src/third_party/coreos-overlay/dev-lang/python/python-2.7.5-r4.ebuild b/sdk_container/src/third_party/coreos-overlay/dev-lang/python/python-2.7.5-r4.ebuild deleted file mode 100644 index 4e3982e268..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/dev-lang/python/python-2.7.5-r4.ebuild +++ /dev/null @@ -1,367 +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-r4.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="~alpha amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" -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 ) - ) - !!/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 -}