diff options
-rw-r--r-- | .SRCINFO | 50 | ||||
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | ChangeLog | 48 | ||||
-rw-r--r-- | PKGBUILD | 165 | ||||
-rw-r--r-- | modulator-launcher | 2 | ||||
-rw-r--r-- | pynche-launcher | 3 | ||||
-rw-r--r-- | python-2.6-db-4.8.patch | 123 | ||||
-rw-r--r-- | python-2.6-dbm.patch | 17 | ||||
-rw-r--r-- | python-2.6-distutils.patch | 43 | ||||
-rw-r--r-- | python-2.6-internal-expat.patch | 33 | ||||
-rw-r--r-- | python-2.6-mhlib-nlinks.patch | 52 | ||||
-rw-r--r-- | python-2.6-pyexpat-segfault.patch | 13 | ||||
-rw-r--r-- | python-2.6-readline-6.3.patch | 45 | ||||
-rw-r--r-- | python-2.6-sqlite-test.patch | 12 | ||||
-rw-r--r-- | python-2.6-tkinter-86.patch | 14 | ||||
-rw-r--r-- | python-2.6-whichdb-gdbm-1.9.patch | 12 |
16 files changed, 639 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..555a34f6c835 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,50 @@ +pkgbase = python26 + pkgdesc = Legacy version Python 2.6 of the high-level scripting language + pkgver = 2.6.9 + pkgrel = 6 + url = http://www.python.org/ + changelog = ChangeLog + arch = i686 + arch = x86_64 + arch = arm + license = PSF + makedepends = tk>=8.5.0 + depends = db>=4.8 + depends = bzip2 + depends = gdbm + depends = openssl + depends = zlib + depends = expat + depends = sqlite3 + depends = libffi + optdepends = tk: for IDLE, pynche and modulator + provides = python2=2.6.9 + source = http://www.python.org/ftp/python/2.6.9/Python-2.6.9.tar.xz + source = modulator-launcher + source = pynche-launcher + source = python-2.6-db-4.8.patch + source = python-2.6-dbm.patch + source = python-2.6-distutils.patch + source = python-2.6-internal-expat.patch + source = python-2.6-mhlib-nlinks.patch + source = python-2.6-pyexpat-segfault.patch + source = python-2.6-readline-6.3.patch + source = python-2.6-sqlite-test.patch + source = python-2.6-tkinter-86.patch + source = python-2.6-whichdb-gdbm-1.9.patch + sha256sums = cae7bb995006ea5b703d9d28446f694894c441fe4bfb95d561c0ac908cd06e41 + sha256sums = 9fb0914357b43d4d6d5ea58ef7827cd0f5784792060e776dfa62d6e372b08f8e + sha256sums = e92e300ef7844478c53c37d7c05a27adc714d11106e79537da4b3b8ef039d6cb + sha256sums = 2a4b9d85c6b616e5df30d42d0890865f2c2103e8d7d5d7d77c092f1f7aff1458 + sha256sums = 43fd72dda5d85d8aeda1de100073ee472463fd5c8af55162598f7acec1d65323 + sha256sums = 68804810b351403e16c09e24053221dda123d3163f24f3feb4fb2dab595e774e + sha256sums = c99c8305180083e40aff789e3a3c74ed375037fdc7bd02876270b09274033069 + sha256sums = fd2a30acdd05e172ff3c0db2cce3371c184d67a1d9bd04a1582a5e6bc8fb80e6 + sha256sums = 2aea683887955e59c6cff227a0d63aee3991571b7207a97d5985ba9ebd69e983 + sha256sums = 5cc38033f7b7f7d6a25e63e14e9ae2de71bdf9106049e1cbad666bfe26d9cb7b + sha256sums = 9c01e3bb264eaf6444b76ba6f5265d79bda234b5542fe3d2b478628412186c1e + sha256sums = dbbc72d9c71c065fe3700af4322a130d5c5c459b6ee512f66e7e5eb9e4971171 + sha256sums = e0dc2156ca821eaaada49cf5e1e301fc828215288aae648a6e7e4d4da1b38050 + +pkgname = python26 + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..c97be7203ba9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +pkg +src +Python-2.6*.tar.xz +python26-*.tar.xz +python26-*.src.tar.gz +.AURINFO + diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 000000000000..bcfd038e8930 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,48 @@ +2015-02-01 Christopher Arndt <chris@chrisarndt.de> + + * 2.6.9-6 : + add patch for mhlib test failure (issue #7759) + +2014-09-04 Christopher Arndt <chris@chrisarndt.de> + + * 2.6.9-5 : + add arm architecture + disable failing test 'test_float' for arm (no fix known) + include 'Python 2.6' in pkgdesc for better visibility in AUR search + Add warning and abort build in 'check' function when run as root, since + this triggers several test failures + +2014-06-21 Christopher Arndt <chris@chrisarndt.de> + + * 2.6.9-4 : + add patch for test_distutils for http://bugs.python.org/issue10126 + source package and .AURINFO are now generated with mkaurball + fix version number variable substitution in provides + +2014-04-25 Christopher Arndt <chris@chrisarndt.de> + + * 2.6.9-3 : + re-enable 'make test' in check function + add patch for whichdb module to recognize files creatd by gdbm >= 1.9 + add patch for segfault in test_pyexpat with system expat + add patch for failure in test_sqlite with sqlite >= 3.8.4 + add prepare function for applying patches + +2014-04-18 Christopher Arndt <chris@chrisarndt.de> + + * 2.6.9-2 : + no pattern substitution in variables in source URL for correct + display in AUR + fix .AURINFO to include pkgrel in package version + .AURINFO is now generated automatically and not included in sources + +2014-04-16 Christopher Arndt <chris@chrisarndt.de> + + * 2.6.9-1 : + update to upstream version 2.6.9 + change checksums to sha256 + use shell variables for Python base version everywhere + include patch for building against readline >= 6.3 + include patch for building against tk <= 8.6 + modules not included: _bsddb bsddb185 dl imageop sunaudiodev + fix pynche and modulator launchers to use right Python version diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..7cc302aaacfb --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,165 @@ +# Maintainer: Christopher Arndt <aur -at- chrisarndt -dot- de> +# Contributor: Rémy Oudompheng <remy@archlinux.org> +# Contributor: Chris McDonald <xwraithanx@gmail.com> + +pkgname=python26 +pkgver=2.6.9 +pkgrel=6 +_pybasever=2.6 +pkgdesc="Legacy version Python 2.6 of the high-level scripting language" +arch=('i686' 'x86_64' 'arm') +license=('PSF') +url="http://www.python.org/" +depends=('db>=4.8' 'bzip2' 'gdbm' 'openssl' 'zlib' 'expat' 'sqlite3' 'libffi') +makedepends=('tk>=8.5.0') +optdepends=('tk: for IDLE, pynche and modulator') +provides=(python2=${pkgver}) +changelog=ChangeLog +source=(http://www.python.org/ftp/python/${pkgver}/Python-${pkgver}.tar.xz + modulator-launcher + pynche-launcher + python-2.6-db-4.8.patch + python-2.6-dbm.patch + python-2.6-distutils.patch + python-2.6-internal-expat.patch + python-2.6-mhlib-nlinks.patch + python-2.6-pyexpat-segfault.patch + python-2.6-readline-6.3.patch + python-2.6-sqlite-test.patch + python-2.6-tkinter-86.patch + python-2.6-whichdb-gdbm-1.9.patch) +sha256sums=('cae7bb995006ea5b703d9d28446f694894c441fe4bfb95d561c0ac908cd06e41' + '9fb0914357b43d4d6d5ea58ef7827cd0f5784792060e776dfa62d6e372b08f8e' + 'e92e300ef7844478c53c37d7c05a27adc714d11106e79537da4b3b8ef039d6cb' + '2a4b9d85c6b616e5df30d42d0890865f2c2103e8d7d5d7d77c092f1f7aff1458' + '43fd72dda5d85d8aeda1de100073ee472463fd5c8af55162598f7acec1d65323' + '68804810b351403e16c09e24053221dda123d3163f24f3feb4fb2dab595e774e' + 'c99c8305180083e40aff789e3a3c74ed375037fdc7bd02876270b09274033069' + 'fd2a30acdd05e172ff3c0db2cce3371c184d67a1d9bd04a1582a5e6bc8fb80e6' + '2aea683887955e59c6cff227a0d63aee3991571b7207a97d5985ba9ebd69e983' + '5cc38033f7b7f7d6a25e63e14e9ae2de71bdf9106049e1cbad666bfe26d9cb7b' + '9c01e3bb264eaf6444b76ba6f5265d79bda234b5542fe3d2b478628412186c1e' + 'dbbc72d9c71c065fe3700af4322a130d5c5c459b6ee512f66e7e5eb9e4971171' + 'e0dc2156ca821eaaada49cf5e1e301fc828215288aae648a6e7e4d4da1b38050') + +prepare() { + cd "${srcdir}/Python-${pkgver}" + + patch -Np0 -i ${srcdir}/python-2.6-internal-expat.patch + + # http://bugs.python.org/issue6949 + patch -Np0 -i ${srcdir}/python-2.6-db-4.8.patch + + patch -Np0 -i ${srcdir}/python-2.6-dbm.patch + + # http://bugs.python.org/issue10126 + patch -Np1 -i ${srcdir}/python-2.6-distutils.patch + + # http://bugs.python.org/issue7759 + patch -Np1 -i ${srcdir}/python-2.6-mhlib-nlinks.patch + + # http://bugs.python.org/issue9054 + patch -Np1 -i ${srcdir}/python-2.6-pyexpat-segfault.patch + + # http://bugs.python.org/issue20374 + patch -Np1 -i ${srcdir}/python-2.6-readline-6.3.patch + + # http://bugs.python.org/issue20901 + patch -Np1 -i ${srcdir}/python-2.6-sqlite-test.patch + + patch -Np1 -i ${srcdir}/python-2.6-tkinter-86.patch + + # http://bugs.python.org/issue13007 + patch -Np1 -i ${srcdir}/python-2.6-whichdb-gdbm-1.9.patch + + # Ensure that we are using the system copy of various libraries + # (expat, zlib and libffi), rather than copies shipped in the tarball + rm -r Modules/expat + rm -r Modules/zlib +} + +build() { + cd "${srcdir}/Python-${pkgver}" + + export OPT="${CFLAGS}" + ./configure --prefix=/usr \ + --enable-shared \ + --enable-ipv6 \ + --enable-unicode=ucs4 \ + --with-system-ffi \ + --with-threads + + make MACHDEP=linux2 +} + +check() { + cd "${srcdir}/Python-${pkgver}" + + if [ $EUID -eq 0 ]; then + echo "Effective user ID 0 detected!" + echo "Several tests will FAIL if you run them as root." + echo "If you must build this package as root," + echo "use the --nocheck option to makepkg." + return 1 + fi + + # test_float fails on arm + # issue with no fix: http://bugs.python.org/issue8265 + if [ "x$CARCH" = "xarm" ]; then + LD_LIBRARY_PATH="$(pwd)" ./python Lib/test/regrtest.py -x test_float + else + make test + fi +} + +package() { + cd "${srcdir}/Python-${pkgver}" + + make DESTDIR="${pkgdir}" altinstall maninstall + + ln -sf ../../libpython${_pybasever}.so \ + "${pkgdir}/usr/lib/python${_pybasever}/config/libpython${_pybasever}.so" + + mv "${pkgdir}/usr/bin/smtpd.py" "${pkgdir}/usr/lib/python${_pybasever}/" + + # Install the tools + + # modulator + sed -i "s#%%PYBASEVER%%#${_pybasever}#g" "${srcdir}/modulator-launcher" + install -m755 "${srcdir}/modulator-launcher" \ + "${pkgdir}/usr/bin/modulator${_pybasever}" + cp -r Tools/modulator "${pkgdir}/usr/lib/python${_pybasever}/site-packages" + + # pynche + sed -i "s#%%PYBASEVER%%#${_pybasever}#g" "${srcdir}/pynche-launcher" + install -m755 "${srcdir}/pynche-launcher" \ + "${pkgdir}/usr/bin/pynche${_pybasever}" + rm -f Tools/pynche/*.pyw + cp -r Tools/pynche "${pkgdir}/usr/lib/python${_pybasever}/site-packages" + + # some useful "stuff" + install -dm755 "${pkgdir}"/usr/lib/python${_pybasever}/Tools/{i18n,scripts} + install -m755 Tools/i18n/{msgfmt,pygettext}.py \ + "${pkgdir}/usr/lib/python${_pybasever}/Tools/i18n/" + install -m755 Tools/scripts/{README,*py} \ + "${pkgdir}/usr/lib/python${_pybasever}/Tools/scripts/" + + # fix conflicts with main python package + mv "${pkgdir}"/usr/bin/idle{,${_pybasever}} + mv "${pkgdir}"/usr/bin/pydoc{,${_pybasever}} + mv "${pkgdir}"/usr/bin/2to3{,-${_pybasever}} + mv "${pkgdir}"/usr/share/man/man1/python{.1,${pkgver}} + + # clean up #!s + find "${pkgdir}/usr/lib/python${_pybasever}/" -name '*.py' | xargs sed -i \ + "s|#[ ]*![ ]*/usr/bin/env python$|#!/usr/bin/env python${_pybasever}|" + + # clean-up reference to build directory + sed -i "s#${srcdir}/Python-${pkgver}:##" \ + "${pkgdir}/usr/lib/python${_pybasever}/config/Makefile" + + # license + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} + +# vim:set ts=2 sw=2 et: diff --git a/modulator-launcher b/modulator-launcher new file mode 100644 index 000000000000..3029f325f1fe --- /dev/null +++ b/modulator-launcher @@ -0,0 +1,2 @@ +#!/bin/bash +exec python%%PYBASEVER%% /usr/lib/python%%PYBASEVER%%/site-packages/modulator/modulator.py diff --git a/pynche-launcher b/pynche-launcher new file mode 100644 index 000000000000..654fa16c1f15 --- /dev/null +++ b/pynche-launcher @@ -0,0 +1,3 @@ +#!/bin/bash +exec python%%PYBASEVER%% /usr/lib/python%%PYBASEVER%%/site-packages/pynche/pynche + diff --git a/python-2.6-db-4.8.patch b/python-2.6-db-4.8.patch new file mode 100644 index 000000000000..2032f924c4bd --- /dev/null +++ b/python-2.6-db-4.8.patch @@ -0,0 +1,123 @@ +Index: setup.py +=================================================================== +--- setup.py (revision 74955) ++++ setup.py (working copy) +@@ -695,7 +695,7 @@ + # a release. Most open source OSes come with one or more + # versions of BerkeleyDB already installed. + +- max_db_ver = (4, 7) ++ max_db_ver = (4, 8) + min_db_ver = (3, 3) + db_setup_debug = False # verbose debug prints from this script? + +Index: Modules/_bsddb.c +=================================================================== +--- Modules/_bsddb.c (revision 74955) ++++ Modules/_bsddb.c (working copy) +@@ -215,7 +215,11 @@ + #define DB_BUFFER_SMALL ENOMEM + #endif + ++#if (DBVER < 48) ++#define DB_GID_SIZE DB_XIDDATASIZE ++#endif + ++ + /* --------------------------------------------------------------------- */ + /* Structure definitions */ + +@@ -4501,7 +4505,11 @@ + DBTxnObject *txn; + #define PREPLIST_LEN 16 + DB_PREPLIST preplist[PREPLIST_LEN]; ++#if (DBVER < 48) + long retp; ++#else ++ u_int32_t retp; ++#endif + + CHECK_ENV_NOT_CLOSED(self); + +@@ -4522,7 +4530,7 @@ + flags=DB_NEXT; /* Prepare for next loop pass */ + for (i=0; i<retp; i++) { + gid=PyBytes_FromStringAndSize((char *)(preplist[i].gid), +- DB_XIDDATASIZE); ++ DB_GID_SIZE); + if (!gid) { + Py_DECREF(list); + return NULL; +@@ -5047,6 +5055,7 @@ + } + + ++#if (DBVER < 48) + static PyObject* + DBEnv_set_rpc_server(DBEnvObject* self, PyObject* args, PyObject* kwargs) + { +@@ -5068,6 +5077,7 @@ + RETURN_IF_ERR(); + RETURN_NONE(); + } ++#endif + + static PyObject* + DBEnv_set_verbose(DBEnvObject* self, PyObject* args) +@@ -5947,9 +5957,9 @@ + if (!PyArg_ParseTuple(args, "s#:prepare", &gid, &gid_size)) + return NULL; + +- if (gid_size != DB_XIDDATASIZE) { ++ if (gid_size != DB_GID_SIZE) { + PyErr_SetString(PyExc_TypeError, +- "gid must be DB_XIDDATASIZE bytes long"); ++ "gid must be DB_GID_SIZE bytes long"); + return NULL; + } + +@@ -6539,8 +6549,10 @@ + #endif + {"set_get_returns_none",(PyCFunction)DBEnv_set_get_returns_none, METH_VARARGS}, + {"txn_recover", (PyCFunction)DBEnv_txn_recover, METH_NOARGS}, ++#if (DBVER < 48) + {"set_rpc_server", (PyCFunction)DBEnv_set_rpc_server, + METH_VARARGS||METH_KEYWORDS}, ++#endif + {"set_verbose", (PyCFunction)DBEnv_set_verbose, METH_VARARGS}, + #if (DBVER >= 42) + {"get_verbose", (PyCFunction)DBEnv_get_verbose, METH_VARARGS}, +@@ -7089,6 +7101,7 @@ + ADD_INT(d, DB_MAX_PAGES); + ADD_INT(d, DB_MAX_RECORDS); + ++#if (DBVER < 48) + #if (DBVER >= 42) + ADD_INT(d, DB_RPCCLIENT); + #else +@@ -7096,7 +7109,11 @@ + /* allow apps to be written using DB_RPCCLIENT on older Berkeley DB */ + _addIntToDict(d, "DB_RPCCLIENT", DB_CLIENT); + #endif ++#endif ++ ++#if (DBVER < 48) + ADD_INT(d, DB_XA_CREATE); ++#endif + + ADD_INT(d, DB_CREATE); + ADD_INT(d, DB_NOMMAP); +@@ -7113,7 +7130,13 @@ + ADD_INT(d, DB_INIT_TXN); + ADD_INT(d, DB_JOINENV); + ++#if (DBVER >= 48) ++ ADD_INT(d, DB_GID_SIZE); ++#else + ADD_INT(d, DB_XIDDATASIZE); ++ /* Allow new code to work in old BDB releases */ ++ _addIntToDict(d, "DB_GID_SIZE", DB_XIDDATASIZE); ++#endif + + ADD_INT(d, DB_RECOVER); + ADD_INT(d, DB_RECOVER_FATAL); diff --git a/python-2.6-dbm.patch b/python-2.6-dbm.patch new file mode 100644 index 000000000000..369db61df9e6 --- /dev/null +++ b/python-2.6-dbm.patch @@ -0,0 +1,17 @@ +--- setup.py.orig 2013-01-10 08:41:07.226990643 +0100 ++++ setup.py 2013-01-10 08:51:14.641536855 +0100 +@@ -1122,12 +1122,8 @@ + + # The standard Unix dbm module: + if platform not in ['cygwin']: +- if find_file("ndbm.h", inc_dirs, []) is not None: +- # Some systems have -lndbm, others don't +- if self.compiler.find_library_file(lib_dirs, 'ndbm'): +- ndbm_libs = ['ndbm'] +- else: +- ndbm_libs = [] ++ if find_file("ndbm.h", inc_dirs, []) and self.compiler.find_library_file(lib_dirs, 'ndbm'): ++ ndbm_libs = ['ndbm'] + exts.append( Extension('dbm', ['dbmmodule.c'], + define_macros=[('HAVE_NDBM_H',None)], + libraries = ndbm_libs ) ) diff --git a/python-2.6-distutils.patch b/python-2.6-distutils.patch new file mode 100644 index 000000000000..410c4095f569 --- /dev/null +++ b/python-2.6-distutils.patch @@ -0,0 +1,43 @@ +diff -uNr Python-2.6.9.orig/Lib/distutils/tests/test_build_ext.py Python-2.6.9/Lib/distutils/tests/test_build_ext.py +--- Python-2.6.9.orig/Lib/distutils/tests/test_build_ext.py 2013-10-29 16:04:37.000000000 +0100 ++++ Python-2.6.9/Lib/distutils/tests/test_build_ext.py 2014-06-20 17:14:14.700080398 +0200 +@@ -35,6 +35,24 @@ + sys.path.append(self.tmp_dir) + shutil.copy(_get_source_filename(), self.tmp_dir) + ++ def _fixup_command(self, cmd): ++ # When Python was build with --enable-shared, -L. is not good enough ++ # to find the libpython<blah>.so. This is because regrtest runs it ++ # under a tempdir, not in the top level where the .so lives. By the ++ # time we've gotten here, Python's already been chdir'd to the ++ # tempdir. ++ # ++ # To further add to the fun, we can't just add library_dirs to the ++ # Extension() instance because that doesn't get plumbed through to the ++ # final compiler command. ++ if not sys.platform.startswith('win'): ++ runshared = sysconfig.get_config_var('RUNSHARED') ++ if runshared is None: ++ cmd.library_dirs = ['.'] ++ else: ++ name, equals, value = runshared.partition('=') ++ cmd.library_dirs = value.split(os.pathsep) ++ + def test_build_ext(self): + global ALREADY_TESTED + xx_c = os.path.join(self.tmp_dir, 'xxmodule.c') +@@ -42,6 +60,7 @@ + dist = Distribution({'name': 'xx', 'ext_modules': [xx_ext]}) + dist.package_dir = self.tmp_dir + cmd = build_ext(dist) ++ self._fixup_command(cmd) + if os.name == "nt": + # On Windows, we must build a debug version iff running + # a debug build of Python +@@ -242,6 +261,7 @@ + dist = Distribution({'name': 'xx', + 'ext_modules': [ext]}) + cmd = build_ext(dist) ++ self._fixup_command(cmd) + cmd.ensure_finalized() + self.assertEquals(len(cmd.get_outputs()), 1) diff --git a/python-2.6-internal-expat.patch b/python-2.6-internal-expat.patch new file mode 100644 index 000000000000..86252abef002 --- /dev/null +++ b/python-2.6-internal-expat.patch @@ -0,0 +1,33 @@ +--- setup.py 2008-04-22 12:12:24.613554757 +0300 ++++ setup.py 2008-04-22 12:13:09.276544063 +0300 +@@ -1035,18 +1035,15 @@ + # + # More information on Expat can be found at www.libexpat.org. + # +- expatinc = os.path.join(os.getcwd(), srcdir, 'Modules', 'expat') +- define_macros = [ +- ('HAVE_EXPAT_CONFIG_H', '1'), +- ] ++ # Use system expat ++ expatinc = '/usr/include' ++ define_macros = [] + + exts.append(Extension('pyexpat', + define_macros = define_macros, + include_dirs = [expatinc], ++ libraries = ['expat'], + sources = ['pyexpat.c', +- 'expat/xmlparse.c', +- 'expat/xmlrole.c', +- 'expat/xmltok.c', + ], + )) + +@@ -1058,6 +1055,7 @@ + exts.append(Extension('_elementtree', + define_macros = define_macros, + include_dirs = [expatinc], ++ libraries = ['expat'], + sources = ['_elementtree.c'], + )) + diff --git a/python-2.6-mhlib-nlinks.patch b/python-2.6-mhlib-nlinks.patch new file mode 100644 index 000000000000..6eface51141e --- /dev/null +++ b/python-2.6-mhlib-nlinks.patch @@ -0,0 +1,52 @@ +diff --git a/Lib/mhlib.py b/Lib/mhlib.py +index 856e878..b6efdf9 100644 +--- a/Lib/mhlib.py ++++ b/Lib/mhlib.py +@@ -156,11 +156,6 @@ class MH: + """Return the names of the subfolders in a given folder + (prefixed with the given folder name).""" + fullname = os.path.join(self.path, name) +- # Get the link count so we can avoid listing folders +- # that have no subfolders. +- nlinks = os.stat(fullname).st_nlink +- if nlinks <= 2: +- return [] + subfolders = [] + subnames = os.listdir(fullname) + for subname in subnames: +@@ -168,11 +163,6 @@ class MH: + if os.path.isdir(fullsubname): + name_subname = os.path.join(name, subname) + subfolders.append(name_subname) +- # Stop looking for subfolders when +- # we've seen them all +- nlinks = nlinks - 1 +- if nlinks <= 2: +- break + subfolders.sort() + return subfolders + +@@ -183,11 +173,6 @@ class MH: + def listallsubfolders(self, name): + """Return the names of subfolders in a given folder, recursively.""" + fullname = os.path.join(self.path, name) +- # Get the link count so we can avoid listing folders +- # that have no subfolders. +- nlinks = os.stat(fullname).st_nlink +- if nlinks <= 2: +- return [] + subfolders = [] + subnames = os.listdir(fullname) + for subname in subnames: +@@ -200,11 +185,6 @@ class MH: + subsubfolders = self.listallsubfolders( + name_subname) + subfolders = subfolders + subsubfolders +- # Stop looking for subfolders when +- # we've seen them all +- nlinks = nlinks - 1 +- if nlinks <= 2: +- break + subfolders.sort() + return subfolders +
\ No newline at end of file diff --git a/python-2.6-pyexpat-segfault.patch b/python-2.6-pyexpat-segfault.patch new file mode 100644 index 000000000000..9ad4db9ac98c --- /dev/null +++ b/python-2.6-pyexpat-segfault.patch @@ -0,0 +1,13 @@ +diff -aur Python-2.6.9/Modules/pyexpat.c Python-2.6.9.new/Modules/pyexpat.c +--- Python-2.6.9/Modules/pyexpat.c 2014-04-25 21:34:10.703530459 +0200 ++++ Python-2.6.9.new/Modules/pyexpat.c 2014-04-25 21:34:27.836864643 +0200 +@@ -456,6 +456,9 @@ + PyObject *args; + PyObject *temp; + ++ if (!have_handler(self, CharacterData)) ++ return -1; ++ + args = PyTuple_New(1); + if (args == NULL) + return -1; diff --git a/python-2.6-readline-6.3.patch b/python-2.6-readline-6.3.patch new file mode 100644 index 000000000000..878776d42a23 --- /dev/null +++ b/python-2.6-readline-6.3.patch @@ -0,0 +1,45 @@ +diff -aur Python-2.6.9/Modules/readline.c Python-2.6.9.new/Modules/readline.c +--- Python-2.6.9/Modules/readline.c 2013-10-29 16:04:39.000000000 +0100 ++++ Python-2.6.9.new/Modules/readline.c 2014-04-16 17:05:08.806687492 +0200 +@@ -698,15 +698,24 @@ + return result; + } + ++ + static int ++#if defined(_RL_FUNCTION_TYPEDEF) + on_startup_hook(void) ++#else ++on_startup_hook() ++#endif + { + return on_hook(startup_hook); + } + + #ifdef HAVE_RL_PRE_INPUT_HOOK + static int ++#if defined(_RL_FUNCTION_TYPEDEF) + on_pre_input_hook(void) ++#else ++on_pre_input_hook() ++#endif + { + return on_hook(pre_input_hook); + } +@@ -841,12 +850,12 @@ + rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap); + rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap); + /* Set our hook functions */ +- rl_startup_hook = (Function *)on_startup_hook; ++ rl_startup_hook = on_startup_hook; + #ifdef HAVE_RL_PRE_INPUT_HOOK +- rl_pre_input_hook = (Function *)on_pre_input_hook; ++ rl_pre_input_hook = on_pre_input_hook; + #endif + /* Set our completion function */ +- rl_attempted_completion_function = (CPPFunction *)flex_complete; ++ rl_attempted_completion_function = flex_complete; + /* Set Python word break characters */ + rl_completer_word_break_characters = + strdup(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?"); +Only in Python-2.6.9/Modules: readline.c.rej diff --git a/python-2.6-sqlite-test.patch b/python-2.6-sqlite-test.patch new file mode 100644 index 000000000000..9bcdc0ca2795 --- /dev/null +++ b/python-2.6-sqlite-test.patch @@ -0,0 +1,12 @@ +diff -aur Python-2.6.9/Lib/sqlite3/test/hooks.py Python-2.6.9.new/Lib/sqlite3/test/hooks.py +--- Python-2.6.9/Lib/sqlite3/test/hooks.py 2013-10-29 16:04:37.000000000 +0100 ++++ Python-2.6.9.new/Lib/sqlite3/test/hooks.py 2014-04-25 22:10:14.336972438 +0200 +@@ -143,7 +143,7 @@ + create table bar (a, b) + """) + second_count = len(progress_calls) +- self.failUnless(first_count > second_count) ++ self.failUnless(first_count >= second_count) + + def CheckCancelOperation(self): + """ diff --git a/python-2.6-tkinter-86.patch b/python-2.6-tkinter-86.patch new file mode 100644 index 000000000000..4ebb826fde83 --- /dev/null +++ b/python-2.6-tkinter-86.patch @@ -0,0 +1,14 @@ +diff -aur Python-2.6.9/setup.py Python-2.6.9.new/setup.py +--- Python-2.6.9/setup.py 2013-10-29 16:04:39.000000000 +0100 ++++ Python-2.6.9.new/setup.py 2014-04-16 17:37:12.956701747 +0200 +@@ -1675,8 +1675,8 @@ + # 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', +- '82', '8.1', '81', '8.0', '80']: ++ 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) + if tklib and tcllib: diff --git a/python-2.6-whichdb-gdbm-1.9.patch b/python-2.6-whichdb-gdbm-1.9.patch new file mode 100644 index 000000000000..0980fc43ecaa --- /dev/null +++ b/python-2.6-whichdb-gdbm-1.9.patch @@ -0,0 +1,12 @@ +diff -aur Python-2.6.9/Lib/whichdb.py Python-2.6.9.new/Lib/whichdb.py +--- Python-2.6.9/Lib/whichdb.py 2013-10-29 16:04:38.000000000 +0100 ++++ Python-2.6.9.new/Lib/whichdb.py 2014-04-25 22:53:05.937101545 +0200 +@@ -91,7 +91,7 @@ + return "" + + # Check for GNU dbm +- if magic == 0x13579ace: ++ if magic in (0x13579ace, 0x13579acd, 0x13579acf): + return "gdbm" + + # Check for old Berkeley db hash file format v2 |