From 6dc911a5074774e323db496e20236126d3afcdf7 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 2 Jun 2014 11:07:39 +0200 Subject: [PATCH] python: update to 2.7.7. --- .../patches/patch-Modules_socketmodule.c | 19 --------------- .../python-fix-posix-close-clash.patch | 20 ---------------- srcpkgs/python/template | 24 +++++++++---------- 3 files changed, 12 insertions(+), 51 deletions(-) delete mode 100644 srcpkgs/python/patches/patch-Modules_socketmodule.c delete mode 100644 srcpkgs/python/patches/python-fix-posix-close-clash.patch diff --git a/srcpkgs/python/patches/patch-Modules_socketmodule.c b/srcpkgs/python/patches/patch-Modules_socketmodule.c deleted file mode 100644 index 1d88fd921c..0000000000 --- a/srcpkgs/python/patches/patch-Modules_socketmodule.c +++ /dev/null @@ -1,19 +0,0 @@ -$NetBSD$ - -Fix vulnerability reported in SA56624. Patch taken from here: - -http://hg.python.org/cpython/rev/87673659d8f7 - ---- Modules/socketmodule.c.orig 2013-11-10 07:36:41.000000000 +0000 -+++ Modules/socketmodule.c 2014-02-09 08:41:25.000000000 +0000 -@@ -2742,6 +2742,10 @@ - if (recvlen == 0) { - /* If nbytes was not specified, use the buffer's length */ - recvlen = buflen; -+ } else if (recvlen > buflen) { -+ PyErr_SetString(PyExc_ValueError, -+ "nbytes is greater than the length of the buffer"); -+ goto error; - } - - readlen = sock_recvfrom_guts(s, buf.buf, recvlen, flags, &addr); diff --git a/srcpkgs/python/patches/python-fix-posix-close-clash.patch b/srcpkgs/python/patches/python-fix-posix-close-clash.patch deleted file mode 100644 index 700e70b598..0000000000 --- a/srcpkgs/python/patches/python-fix-posix-close-clash.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- Modules/posixmodule.c -+++ Modules/posixmodule.c -@@ -6582,7 +6582,7 @@ - Close a file descriptor (for low level IO)."); - - static PyObject * --posix_close(PyObject *self, PyObject *args) -+posix_closex(PyObject *self, PyObject *args) - { - int fd, res; - if (!PyArg_ParseTuple(args, "i:close", &fd)) -@@ -8960,7 +8960,7 @@ - {"tcsetpgrp", posix_tcsetpgrp, METH_VARARGS, posix_tcsetpgrp__doc__}, - #endif /* HAVE_TCSETPGRP */ - {"open", posix_open, METH_VARARGS, posix_open__doc__}, -- {"close", posix_close, METH_VARARGS, posix_close__doc__}, -+ {"close", posix_closex, METH_VARARGS, posix_close__doc__}, - {"closerange", posix_closerange, METH_VARARGS, posix_closerange__doc__}, - {"dup", posix_dup, METH_VARARGS, posix_dup__doc__}, - {"dup2", posix_dup2, METH_VARARGS, posix_dup2__doc__}, diff --git a/srcpkgs/python/template b/srcpkgs/python/template index beb6e80d66..e75e010c95 100644 --- a/srcpkgs/python/template +++ b/srcpkgs/python/template @@ -1,7 +1,7 @@ # Template build file for 'python'. pkgname=python -version=2.7.6 -revision=8 +version=2.7.7 +revision=1 wrksrc="Python-${version}" hostmakedepends="pkg-config" makedepends="libffi-devel readline-devel>=6.3 gdbm-devel openssl-devel expat-devel sqlite-devel bzip2-devel zlib-devel" @@ -11,26 +11,26 @@ maintainer="Juan RP " homepage="http://www.python.org" license="PSF" distfiles="http://www.python.org/ftp/python/$version/Python-$version.tar.xz" -checksum=1fd68e81f8bf7386ff239b7faee9ba387129d2cf34eab13350bd8503a0bff6a1 +checksum=2983e3cd089b30c50e2b2234f07c2ac4fb8a5df230ab8f2e1133a1d8b208da78 pre_configure() { # Ensure that internal copies of expat, libffi and zlib are not used. rm -r Modules/expat rm -r Modules/_ctypes/libffi* rm -r Modules/zlib - # Fix readline module to build with readline>=6.3. - sed -e 's,(CPPFunction \*),,g;s,(Function \*),,g' -i Modules/readline.c } do_configure() { - unset CC CXX LD AR AS RANLIB + unset GCC CC CXX CPP LD AR AS RANLIB if [ "$CROSS_BUILD" ]; then - CFLAGS=-Os CXXFLAGS= LDFLAGS= ./configure - make ${makejobs} python - mkdir hostpython - mv python hostpython - make distclean - patch -Np0 -i ${FILESDIR}/Python-${version}-xcompile.patch + mkdir -p host-build + cd host-build + env -i PATH=$PATH ../configure + env -i PATH=$PATH make ${makejobs} python + mkdir -p ../hostpython + mv python ../hostpython + cd .. + patch -Np0 -i ${FILESDIR}/Python-2.7.6-xcompile.patch fi ./configure ${configure_args} --build=${XBPS_MACHINE}-unknown-linux-gnu \ --with-threads --enable-ipv6 --with-signal-module \