python: update to 2.7.7.
This commit is contained in:
parent
dbd682313e
commit
6dc911a507
3 changed files with 12 additions and 51 deletions
srcpkgs/python
|
@ -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);
|
|
@ -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__},
|
|
@ -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 <xtraeme@gmail.com>"
|
|||
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 \
|
||||
|
|
Loading…
Reference in a new issue