[arch-commits] Commit in python/trunk (7 files)
Allan McRae
allan at archlinux.org
Wed Oct 22 01:31:48 UTC 2008
Date: Tuesday, October 21, 2008 @ 21:31:39
Author: allan
Revision: 16668
upgpkg: python 2.6-1
Modified:
python/trunk/PKGBUILD
Deleted:
python/trunk/Python-2.4.4-gdbm-1.patch
python/trunk/Python-2.5.2-idlelib.patch
python/trunk/db4.6-setup.py-detection.patch
python/trunk/python-2.5.CVE-2007-4965-int-overflow.patch
python/trunk/python.install
python/trunk/python2.6-set_wakeup_fd4.patch
---------------------------------------------+
PKGBUILD | 41 +---
Python-2.4.4-gdbm-1.patch | 17 --
Python-2.5.2-idlelib.patch | 17 --
db4.6-setup.py-detection.patch | 11 -
python-2.5.CVE-2007-4965-int-overflow.patch | 217 --------------------------
python.install | 13 -
python2.6-set_wakeup_fd4.patch | 94 -----------
7 files changed, 16 insertions(+), 394 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2008-10-21 23:10:51 UTC (rev 16667)
+++ PKGBUILD 2008-10-22 01:31:39 UTC (rev 16668)
@@ -3,48 +3,39 @@
# Contributer: Jason Chu <jason at archlinux.org>
pkgname=python
-pkgver=2.5.2
-pkgrel=5
-_pybasever=2.5
+pkgver=2.6
+pkgrel=1
+_pybasever=2.6
pkgdesc="A high-level scripting language"
arch=('i686' 'x86_64')
license=('custom')
url="http://www.python.org"
-depends=('db4.5' 'bzip2' 'gdbm' 'openssl>=0.9.8d' 'zlib')
+depends=('db' 'bzip2' 'gdbm' 'openssl>=0.9.8d' 'zlib')
makedepends=('tk>=8.5.0' 'sqlite3')
-provides=('python-elementree' 'python-ctypes')
-replaces=('python-elementree' 'python-ctypes')
-install=python.install
+optdepends=('tk: for IDLE, pynche and modulator')
+provides=('python-elementtree' 'python-ctypes')
+replaces=('python-elementtree' 'python-ctypes')
source=(http://www.python.org/ftp/python/${pkgver}/Python-${pkgver}.tar.bz2
modulator-launcher
- pynche-launcher
- Python-2.4.4-gdbm-1.patch
- python-2.5.CVE-2007-4965-int-overflow.patch
- python2.6-set_wakeup_fd4.patch
- Python-2.5.2-idlelib.patch)
-md5sums=('afb5451049eda91fbde10bd5a4b7fadc'
+ pynche-launcher)
+md5sums=('1b3c31fc54be2250ed18eb089b4d2779'
'faa0d4b947bfe67fc8684b5c464f46f2'
- '60a44af1d8af276274e20c564c0f3d8b'
- '2b61e06365e9fb5f3af22d946efa8be6'
- '491416c1b337fc61b6cdf5981d895a7d'
- 'ec56710959deb01b5fa35829cafec6a3'
- 'e6441e0b013ac64795221154e0495e10')
+ '60a44af1d8af276274e20c564c0f3d8b')
build() {
cd ${startdir}/src/Python-${pkgver}
- patch -Np1 -i ${srcdir}/Python-2.4.4-gdbm-1.patch || return 1
- # fix http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-4965
- patch -Np1 -i ${srcdir}/python-2.5.CVE-2007-4965-int-overflow.patch || return 1
-
- patch -Np2 -i ${srcdir}/python2.6-set_wakeup_fd4.patch || return 1
- patch -Np0 -i ${srcdir}/Python-2.5.2-idlelib.patch
./configure --prefix=/usr --enable-shared --with-threads --enable-unicode
+
+ # temporary backwards compatibility stuff...
+ sed -i 's#SITEPATH=#SITEPATH=:/usr/lib/python2.5/site-packages#' Makefile
+
make || return 1
make DESTDIR=${pkgdir} install
rm ${pkgdir}/usr/bin/python
ln -sf python${_pybasever} ${pkgdir}/usr/bin/python
+ ln -sf python${_pybasever} ${pkgdir}/usr/bin/python2
# Install the tools
#modulator
@@ -65,5 +56,5 @@
install Tools/scripts/*py ${pkgdir}/usr/lib/python${_pybasever}/Tools/scripts/
# license
- install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}
Deleted: Python-2.4.4-gdbm-1.patch
===================================================================
--- Python-2.4.4-gdbm-1.patch 2008-10-21 23:10:51 UTC (rev 16667)
+++ Python-2.4.4-gdbm-1.patch 2008-10-22 01:31:39 UTC (rev 16668)
@@ -1,17 +0,0 @@
---- Python-2.4.4/setup.py.orig 2007-01-14 12:50:46.000000000 -0600
-+++ Python-2.4.4/setup.py 2007-01-14 12:54:02.000000000 -0600
-@@ -685,12 +685,12 @@
- if self.compiler.find_library_file(lib_dirs, 'ndbm'):
- ndbm_libs = ['ndbm']
- else:
-- ndbm_libs = []
-+ ndbm_libs = ['gdbm', 'gdbm_compat']
- exts.append( Extension('dbm', ['dbmmodule.c'],
- define_macros=[('HAVE_NDBM_H',None)],
- libraries = ndbm_libs ) )
- elif (self.compiler.find_library_file(lib_dirs, 'gdbm')
-- and find_file("gdbm/ndbm.h", inc_dirs, []) is not None):
-+ and find_file("ndbm.h", inc_dirs, []) is not None):
- exts.append( Extension('dbm', ['dbmmodule.c'],
- define_macros=[('HAVE_GDBM_NDBM_H',None)],
- libraries = ['gdbm'] ) )
Deleted: Python-2.5.2-idlelib.patch
===================================================================
--- Python-2.5.2-idlelib.patch 2008-10-21 23:10:51 UTC (rev 16667)
+++ Python-2.5.2-idlelib.patch 2008-10-22 01:31:39 UTC (rev 16668)
@@ -1,17 +0,0 @@
---- Lib/idlelib/WidgetRedirector.py.orig 2008-04-23 23:39:57.000000000 -0700
-+++ Lib/idlelib/WidgetRedirector.py 2008-04-23 23:46:55.000000000 -0700
-@@ -53,7 +53,13 @@
- if m:
- return m(*args)
- else:
-- return self.tk.call((self.orig, cmd) + args)
-+ #return self.tk.call((self.orig, cmd) + args)
-+ r = self.tk.call((self.orig, cmd) + args)
-+ if isinstance(r, tuple):
-+ # convert to string ourselves so we get a Tcl list
-+ # that can be converted back into a tuple
-+ r = ' '.join(map(str, r))
-+ return r
- except TclError:
- return ""
-
Deleted: db4.6-setup.py-detection.patch
===================================================================
--- db4.6-setup.py-detection.patch 2008-10-21 23:10:51 UTC (rev 16667)
+++ db4.6-setup.py-detection.patch 2008-10-22 01:31:39 UTC (rev 16668)
@@ -1,11 +0,0 @@
---- setup.py 2008-02-23 20:58:52.000000000 +0000
-+++ setup.py.new 2008-02-23 21:04:18.000000000 +0000
-@@ -608,7 +608,7 @@
- # a release. Most open source OSes come with one or more
- # versions of BerkeleyDB already installed.
-
-- max_db_ver = (4, 5)
-+ max_db_ver = (4, 6)
- # NOTE: while the _bsddb.c code links against BerkeleyDB 4.6.x
- # we leave that version disabled by default as it has proven to be
- # quite a buggy library release on many platforms.
Deleted: python-2.5.CVE-2007-4965-int-overflow.patch
===================================================================
--- python-2.5.CVE-2007-4965-int-overflow.patch 2008-10-21 23:10:51 UTC (rev 16667)
+++ python-2.5.CVE-2007-4965-int-overflow.patch 2008-10-22 01:31:39 UTC (rev 16668)
@@ -1,217 +0,0 @@
-diff -rup Python-2.5-orig/Modules/imageop.c Python-2.5/Modules/imageop.c
---- Python-2.5-orig/Modules/imageop.c 2006-01-19 01:09:39.000000000 -0500
-+++ Python-2.5/Modules/imageop.c 2007-09-19 16:42:44.000000000 -0400
-@@ -78,7 +78,7 @@ imageop_crop(PyObject *self, PyObject *a
- char *cp, *ncp;
- short *nsp;
- Py_Int32 *nlp;
-- int len, size, x, y, newx1, newx2, newy1, newy2;
-+ int len, size, x, y, newx1, newx2, newy1, newy2, nlen;
- int ix, iy, xstep, ystep;
- PyObject *rv;
-
-@@ -90,13 +90,19 @@ imageop_crop(PyObject *self, PyObject *a
- PyErr_SetString(ImageopError, "Size should be 1, 2 or 4");
- return 0;
- }
-- if ( len != size*x*y ) {
-+ /* ( len != size*x*y ) */
-+ if ( size != ((len / x) / y) ) {
- PyErr_SetString(ImageopError, "String has incorrect length");
- return 0;
- }
- xstep = (newx1 < newx2)? 1 : -1;
- ystep = (newy1 < newy2)? 1 : -1;
-
-+ nlen = (abs(newx2-newx1)+1)*(abs(newy2-newy1)+1)*size;
-+ if ( size != ((nlen / (abs(newx2-newx1)+1)) / (abs(newy2-newy1)+1)) ) {
-+ PyErr_SetString(ImageopError, "String has incorrect length");
-+ return 0;
-+ }
- rv = PyString_FromStringAndSize(NULL,
- (abs(newx2-newx1)+1)*(abs(newy2-newy1)+1)*size);
- if ( rv == 0 )
-@@ -132,7 +138,7 @@ imageop_scale(PyObject *self, PyObject *
- char *cp, *ncp;
- short *nsp;
- Py_Int32 *nlp;
-- int len, size, x, y, newx, newy;
-+ int len, size, x, y, newx, newy, nlen;
- int ix, iy;
- int oix, oiy;
- PyObject *rv;
-@@ -145,12 +151,18 @@ imageop_scale(PyObject *self, PyObject *
- PyErr_SetString(ImageopError, "Size should be 1, 2 or 4");
- return 0;
- }
-- if ( len != size*x*y ) {
-+ /* ( len != size*x*y ) */
-+ if ( size != ((len / x) / y) ) {
-+ PyErr_SetString(ImageopError, "String has incorrect length");
-+ return 0;
-+ }
-+ nlen = newx*newy*size;
-+ if ( size != ((nlen / newx) / newy) ) {
- PyErr_SetString(ImageopError, "String has incorrect length");
- return 0;
- }
-
-- rv = PyString_FromStringAndSize(NULL, newx*newy*size);
-+ rv = PyString_FromStringAndSize(NULL, nlen);
- if ( rv == 0 )
- return 0;
- ncp = (char *)PyString_AsString(rv);
-@@ -190,7 +202,8 @@ imageop_tovideo(PyObject *self, PyObject
- PyErr_SetString(ImageopError, "Size should be 1 or 4");
- return 0;
- }
-- if ( maxx*maxy*width != len ) {
-+ /* if ( maxx*maxy*width != len ) */
-+ if ( maxx != ((len / maxy) / maxz) ) {
- PyErr_SetString(ImageopError, "String has incorrect length");
- return 0;
- }
-@@ -240,7 +253,8 @@ imageop_grey2mono(PyObject *self, PyObje
- if ( !PyArg_ParseTuple(args, "s#iii", &cp, &len, &x, &y, &tres) )
- return 0;
-
-- if ( x*y != len ) {
-+ /* ( x*y != len ) */
-+ if ( x != len / y ) {
- PyErr_SetString(ImageopError, "String has incorrect length");
- return 0;
- }
-@@ -281,7 +295,8 @@ imageop_grey2grey4(PyObject *self, PyObj
- if ( !PyArg_ParseTuple(args, "s#ii", &cp, &len, &x, &y) )
- return 0;
-
-- if ( x*y != len ) {
-+ /* ( x*y != len ) */
-+ if ( x != len / y ) {
- PyErr_SetString(ImageopError, "String has incorrect length");
- return 0;
- }
-@@ -320,7 +335,8 @@ imageop_grey2grey2(PyObject *self, PyObj
- if ( !PyArg_ParseTuple(args, "s#ii", &cp, &len, &x, &y) )
- return 0;
-
-- if ( x*y != len ) {
-+ /* ( x*y != len ) */
-+ if ( x != len / y ) {
- PyErr_SetString(ImageopError, "String has incorrect length");
- return 0;
- }
-@@ -358,7 +374,8 @@ imageop_dither2mono(PyObject *self, PyOb
- if ( !PyArg_ParseTuple(args, "s#ii", &cp, &len, &x, &y) )
- return 0;
-
-- if ( x*y != len ) {
-+ /* ( x*y != len ) */
-+ if ( x != len / y ) {
- PyErr_SetString(ImageopError, "String has incorrect length");
- return 0;
- }
-@@ -404,7 +421,8 @@ imageop_dither2grey2(PyObject *self, PyO
- if ( !PyArg_ParseTuple(args, "s#ii", &cp, &len, &x, &y) )
- return 0;
-
-- if ( x*y != len ) {
-+ /* ( x*y != len ) */
-+ if ( x != len / y ) {
- PyErr_SetString(ImageopError, "String has incorrect length");
- return 0;
- }
-@@ -443,7 +461,11 @@ imageop_mono2grey(PyObject *self, PyObje
- if ( !PyArg_ParseTuple(args, "s#iiii", &cp, &len, &x, &y, &v0, &v1) )
- return 0;
-
-- nlen = x*y;
-+ nlen = x*y;
-+ if ( x != (nlen / y) ) {
-+ PyErr_SetString(ImageopError, "String has incorrect length");
-+ return 0;
-+ }
- if ( (nlen+7)/8 != len ) {
- PyErr_SetString(ImageopError, "String has incorrect length");
- return 0;
-@@ -481,6 +503,10 @@ imageop_grey22grey(PyObject *self, PyObj
- return 0;
-
- nlen = x*y;
-+ if ( x != (nlen / y) ) {
-+ PyErr_SetString(ImageopError, "String has incorrect length");
-+ return 0;
-+ }
- if ( (nlen+3)/4 != len ) {
- PyErr_SetString(ImageopError, "String has incorrect length");
- return 0;
-@@ -517,6 +543,10 @@ imageop_grey42grey(PyObject *self, PyObj
- return 0;
-
- nlen = x*y;
-+ if ( x != (nlen / y) ) {
-+ PyErr_SetString(ImageopError, "String has incorrect length");
-+ return 0;
-+ }
- if ( (nlen+1)/2 != len ) {
- PyErr_SetString(ImageopError, "String has incorrect length");
- return 0;
-@@ -554,6 +584,10 @@ imageop_rgb2rgb8(PyObject *self, PyObjec
- return 0;
-
- nlen = x*y;
-+ if ( x != (nlen / y) ) {
-+ PyErr_SetString(ImageopError, "String has incorrect length");
-+ return 0;
-+ }
- if ( nlen*4 != len ) {
- PyErr_SetString(ImageopError, "String has incorrect length");
- return 0;
-@@ -598,6 +632,10 @@ imageop_rgb82rgb(PyObject *self, PyObjec
- return 0;
-
- nlen = x*y;
-+ if ( x != (nlen / y) ) {
-+ PyErr_SetString(ImageopError, "String has incorrect length");
-+ return 0;
-+ }
- if ( nlen != len ) {
- PyErr_SetString(ImageopError, "String has incorrect length");
- return 0;
-@@ -648,6 +686,10 @@ imageop_rgb2grey(PyObject *self, PyObjec
- return 0;
-
- nlen = x*y;
-+ if ( x != (nlen / y) ) {
-+ PyErr_SetString(ImageopError, "String has incorrect length");
-+ return 0;
-+ }
- if ( nlen*4 != len ) {
- PyErr_SetString(ImageopError, "String has incorrect length");
- return 0;
-@@ -693,6 +735,10 @@ imageop_grey2rgb(PyObject *self, PyObjec
- return 0;
-
- nlen = x*y;
-+ if ( x != (nlen / y) ) {
-+ PyErr_SetString(ImageopError, "String has incorrect length");
-+ return 0;
-+ }
- if ( nlen != len ) {
- PyErr_SetString(ImageopError, "String has incorrect length");
- return 0;
-diff -rup Python-2.5-orig/Modules/rgbimgmodule.c Python-2.5/Modules/rgbimgmodule.c
---- Python-2.5-orig/Modules/rgbimgmodule.c 2006-08-11 23:18:50.000000000 -0400
-+++ Python-2.5/Modules/rgbimgmodule.c 2007-09-19 17:00:06.000000000 -0400
-@@ -299,6 +299,11 @@ longimagedata(PyObject *self, PyObject *
- xsize = image.xsize;
- ysize = image.ysize;
- zsize = image.zsize;
-+ tablen = xsize * ysize * zsize * sizeof(Py_Int32);
-+ if (xsize != (((tablen / ysize) / zsize) / sizeof(Py_Int32))) {
-+ PyErr_NoMemory();
-+ goto finally;
-+ }
- if (rle) {
- tablen = ysize * zsize * sizeof(Py_Int32);
- starttab = (Py_Int32 *)malloc(tablen);
Deleted: python.install
===================================================================
--- python.install 2008-10-21 23:10:51 UTC (rev 16667)
+++ python.install 2008-10-22 01:31:39 UTC (rev 16668)
@@ -1,13 +0,0 @@
-post_install() {
- cat << _EOF
-
-==> Python requires "tk" to use IDLE, pynche and modulator
-
-_EOF
-}
-
-post_upgrade() {
- post_install $1
-}
-
-# vim:set ts=2 sw=2 et:
Deleted: python2.6-set_wakeup_fd4.patch
===================================================================
--- python2.6-set_wakeup_fd4.patch 2008-10-21 23:10:51 UTC (rev 16667)
+++ python2.6-set_wakeup_fd4.patch 2008-10-22 01:31:39 UTC (rev 16668)
@@ -1,94 +0,0 @@
---- python/trunk/Modules/signalmodule.c 2007/12/10 23:00:12 59460
-+++ python/trunk/Modules/signalmodule.c 2007/12/19 19:41:06 59574
-@@ -12,6 +12,8 @@
-
- #include <signal.h>
-
-+#include <sys/stat.h>
-+
- #ifndef SIG_ERR
- #define SIG_ERR ((PyOS_sighandler_t)(-1))
- #endif
-@@ -75,6 +77,8 @@
- PyObject *func;
- } Handlers[NSIG];
-
-+static sig_atomic_t wakeup_fd = -1;
-+
- /* Speed up sigcheck() when none tripped */
- static volatile sig_atomic_t is_tripped = 0;
-
-@@ -128,6 +132,8 @@
- cleared in PyErr_CheckSignals() before .tripped. */
- is_tripped = 1;
- Py_AddPendingCall(checksignals_witharg, NULL);
-+ if (wakeup_fd != -1)
-+ write(wakeup_fd, "\0", 1);
- #ifdef WITH_THREAD
- }
- #endif
-@@ -267,6 +273,50 @@
- anything else -- the callable Python object used as a handler");
-
-
-+static PyObject *
-+signal_set_wakeup_fd(PyObject *self, PyObject *args)
-+{
-+ struct stat buf;
-+ int fd, old_fd;
-+ if (!PyArg_ParseTuple(args, "i:set_wakeup_fd", &fd))
-+ return NULL;
-+#ifdef WITH_THREAD
-+ if (PyThread_get_thread_ident() != main_thread) {
-+ PyErr_SetString(PyExc_ValueError,
-+ "set_wakeup_fd only works in main thread");
-+ return NULL;
-+ }
-+#endif
-+ if (fd != -1 && fstat(fd, &buf) != 0) {
-+ PyErr_SetString(PyExc_ValueError, "invalid fd");
-+ return NULL;
-+ }
-+ old_fd = wakeup_fd;
-+ wakeup_fd = fd;
-+ return PyLong_FromLong(old_fd);
-+}
-+
-+PyDoc_STRVAR(set_wakeup_fd_doc,
-+"set_wakeup_fd(fd) -> fd\n\
-+\n\
-+Sets the fd to be written to (with '\\0') when a signal\n\
-+comes in. A library can use this to wakeup select or poll.\n\
-+The previous fd is returned.\n\
-+\n\
-+The fd must be non-blocking.");
-+
-+/* C API for the same, without all the error checking */
-+int
-+PySignal_SetWakeupFd(int fd)
-+{
-+ int old_fd = wakeup_fd;
-+ if (fd < 0)
-+ fd = -1;
-+ wakeup_fd = fd;
-+ return old_fd;
-+}
-+
-+
- /* List of functions defined in the module */
- static PyMethodDef signal_methods[] = {
- #ifdef HAVE_ALARM
-@@ -274,11 +324,12 @@
- #endif
- {"signal", signal_signal, METH_VARARGS, signal_doc},
- {"getsignal", signal_getsignal, METH_VARARGS, getsignal_doc},
-+ {"set_wakeup_fd", signal_set_wakeup_fd, METH_VARARGS, set_wakeup_fd_doc},
- #ifdef HAVE_PAUSE
- {"pause", (PyCFunction)signal_pause,
- METH_NOARGS,pause_doc},
- #endif
-- {"default_int_handler", signal_default_int_handler,
-+ {"default_int_handler", signal_default_int_handler,
- METH_VARARGS, default_int_handler_doc},
- {NULL, NULL} /* sentinel */
- };
More information about the arch-commits
mailing list