rpms/python/F-8 python-2.5.1-listdir.patch, NONE, 1.1 python-2.5.1-socketmodule-constants.patch, NONE, 1.1 python-2.5.1-socketmodule-constants2.patch, NONE, 1.1 python2.6-set_wakeup_fd4.patch, NONE, 1.1 python.spec, 1.123, 1.124
James Antill (james)
fedora-extras-commits at redhat.com
Mon Jun 16 03:54:41 UTC 2008
Author: james
Update of /cvs/pkgs/rpms/python/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1667
Modified Files:
python.spec
Added Files:
python-2.5.1-listdir.patch
python-2.5.1-socketmodule-constants.patch
python-2.5.1-socketmodule-constants2.patch
python2.6-set_wakeup_fd4.patch
Log Message:
* Sun Jun 15 2008 James Antill <jantill at redhat.com> - 2.5.1-26
- Fix sporadic listdir problem
- Resolves: bug#451494
python-2.5.1-listdir.patch:
--- NEW FILE python-2.5.1-listdir.patch ---
--- Python-2.5.1/Modules/posixmodule.c.orig 2007-04-04 14:30:56.000000000 -0400
+++ Python-2.5.1/Modules/posixmodule.c 2008-06-14 17:35:47.000000000 -0400
@@ -2160,7 +2160,6 @@
struct dirent *ep;
int arg_is_unicode = 1;
- errno = 0;
if (!PyArg_ParseTuple(args, "U:listdir", &v)) {
arg_is_unicode = 0;
PyErr_Clear();
@@ -2176,6 +2175,7 @@
return NULL;
}
for (;;) {
+ errno = 0;
Py_BEGIN_ALLOW_THREADS
ep = readdir(dirp);
Py_END_ALLOW_THREADS
python-2.5.1-socketmodule-constants.patch:
--- NEW FILE python-2.5.1-socketmodule-constants.patch ---
--- Python-2.5.1i-orig/Modules/socketmodule.c 2008-03-07 16:38:47.000000000 -0500
+++ Python-2.5.1/Modules/socketmodule.c 2008-03-07 16:41:09.000000000 -0500
@@ -4507,6 +4507,60 @@
#ifdef SO_TYPE
PyModule_AddIntConstant(m, "SO_TYPE", SO_TYPE);
#endif
+#ifdef SO_SNDBUFFORCE
+ PyModule_AddIntConstant(m, "SO_SNDBUFFORCE", SO_SNDBUFFORCE);
+#endif
+#ifdef SO_RCVBUFFORCE
+ PyModule_AddIntConstant(m, "SO_RCVBUFFORCE", SO_RCVBUFFORCE);
+#endif
+#ifdef SO_NO_CHECK
+ PyModule_AddIntConstant(m, "SO_NO_CHECK", SO_NO_CHECK);
+#endif
+#ifdef SO_PRIORITY
+ PyModule_AddIntConstant(m, "SO_PRIORITY", SO_PRIORITY);
+#endif
+#ifdef SO_BSDCOMPAT
+ PyModule_AddIntConstant(m, "SO_BSDCOMPAT", SO_BSDCOMPAT);
+#endif
+#ifdef SO_PASSCRED
+ PyModule_AddIntConstant(m, "SO_PASSCRED", SO_PASSCRED);
+#endif
+#ifdef SO_PEERCRED
+ PyModule_AddIntConstant(m, "SO_PEERCRED", SO_PEERCRED);
+#endif
+#ifdef SO_SECURITY_AUTHENTICATION
+ PyModule_AddIntConstant(m, "SO_SECURITY_AUTHENTICATION", SO_SECURITY_AUTHENTICATION);
+#endif
+#ifdef SO_SECURITY_ENCRYPTION_TRANSPORT
+ PyModule_AddIntConstant(m, "SO_SECURITY_ENCRYPTION_TRANSPORT", SO_SECURITY_ENCRYPTION_TRANSPORT);
+#endif
+#ifdef SO_SECURITY_ENCRYPTION_NETWORK
+ PyModule_AddIntConstant(m, "SO_SECURITY_ENCRYPTION_NETWORK", SO_SECURITY_ENCRYPTION_NETWORK);
+#endif
+#ifdef SO_BINDTODEVICE
+ PyModule_AddIntConstant(m, "SO_BINDTODEVICE", SO_BINDTODEVICE);
+#endif
+#ifdef SO_ATTACH_FILTER
+ PyModule_AddIntConstant(m, "SO_ATTACH_FILTER", SO_ATTACH_FILTER);
+#endif
+#ifdef SO_DETACH_FILTER
+ PyModule_AddIntConstant(m, "SO_DETACH_FILTER", SO_DETACH_FILTER);
+#endif
+#ifdef SO_PEERNAME
+ PyModule_AddIntConstant(m, "SO_PEERNAME", SO_PEERNAME);
+#endif
+#ifdef SO_TIMESTAMP
+ PyModule_AddIntConstant(m, "SO_TIMESTAMP", SO_TIMESTAMP);
+#endif
+#ifdef SO_PEERSEC
+ PyModule_AddIntConstant(m, "SO_PEERSEC", SO_PEERSEC);
+#endif
+#ifdef SO_PASSSEC
+ PyModule_AddIntConstant(m, "SO_PASSSEC", SO_PASSSEC);
+#endif
+#ifdef SO_TIMESTAMPNS
+ PyModule_AddIntConstant(m, "SO_TIMESTAMPNS", SO_TIMESTAMPNS);
+#endif
/* Maximum number of connections for "listen" */
#ifdef SOMAXCONN
python-2.5.1-socketmodule-constants2.patch:
--- NEW FILE python-2.5.1-socketmodule-constants2.patch ---
diff -rup Python-2.5.1-orig/Modules/socketmodule.c Python-2.5.1/Modules/socketmodule.c
--- Python-2.5.1-orig/Modules/socketmodule.c 2008-03-25 09:59:38.000000000 -0400
+++ Python-2.5.1/Modules/socketmodule.c 2008-03-25 10:12:24.000000000 -0400
@@ -4977,6 +4977,15 @@ init_socket(void)
#ifdef TCP_QUICKACK
PyModule_AddIntConstant(m, "TCP_QUICKACK", TCP_QUICKACK);
#endif
+#ifdef TCP_CONGESTION
+ PyModule_AddIntConstant(m, "TCP_CONGESTION", TCP_CONGESTION);
+#endif
+#ifdef TCP_MD5SIG
+ PyModule_AddIntConstant(m, "TCP_MD5SIG", TCP_MD5SIG);
+#endif
+#ifdef TCP_MD5SIG_MAXKEYLEN
+ PyModule_AddIntConstant(m, "TCP_MD5SIG_MAXKEYLEN", TCP_MD5SIG_MAXKEYLEN);
+#endif
/* IPX options */
Only in Python-2.5.1/Modules: socketmodule.c~
python2.6-set_wakeup_fd4.patch:
--- NEW FILE python2.6-set_wakeup_fd4.patch ---
diff -rup Python-2.5.1-orig/Modules/signalmodule.c Python-2.5.1/Modules/signalmodule.c
--- Python-2.5.1-orig/Modules/signalmodule.c 2006-01-19 01:09:39.000000000 -0500
+++ Python-2.5.1/Modules/signalmodule.c 2008-01-07 12:32:00.000000000 -0500
@@ -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 @@ static struct {
PyObject *func;
} Handlers[NSIG];
+static int wakeup_fd = -1;
+
static int is_tripped = 0; /* Speed up sigcheck() when none tripped */
static PyObject *DefaultHandler;
@@ -112,6 +116,7 @@ checksignals_witharg(void * unused)
static void
signal_handler(int sig_num)
{
+ const char dummy_byte = '\0';
#ifdef WITH_THREAD
#ifdef WITH_PTH
if (PyThread_get_thread_ident() != main_thread) {
@@ -125,6 +130,8 @@ signal_handler(int sig_num)
is_tripped++;
Handlers[sig_num].tripped = 1;
Py_AddPendingCall(checksignals_witharg, NULL);
+ if (wakeup_fd != -1)
+ write(wakeup_fd, &dummy_byte, 1);
#ifdef WITH_THREAD
}
#endif
@@ -264,6 +271,39 @@ None -- if an unknown handler is in effe
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.");
+
+
/* List of functions defined in the module */
static PyMethodDef signal_methods[] = {
#ifdef HAVE_ALARM
@@ -271,6 +311,7 @@ static PyMethodDef signal_methods[] = {
#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},
Index: python.spec
===================================================================
RCS file: /cvs/pkgs/rpms/python/F-8/python.spec,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -r1.123 -r1.124
--- python.spec 30 Oct 2007 17:07:00 -0000 1.123
+++ python.spec 16 Jun 2008 03:53:57 -0000 1.124
@@ -20,7 +20,7 @@
Summary: An interpreted, interactive, object-oriented programming language.
Name: %{python}
Version: 2.5.1
-Release: 15%{?dist}
+Release: 26%{?dist}
License: Python Software Foundation License v2
Group: Development/Languages
Provides: python-abi = %{pybasever}
@@ -40,11 +40,12 @@
Patch10: python-2.5.1-binutils-no-dep.patch
Patch11: python-2.5.1-codec-ascii-tolower.patch
Patch12: python-2.5.1-pysqlite.patch
-
+Patch13: python-2.5.1-socketmodule-constants.patch
+Patch14: python-2.5.1-socketmodule-constants2.patch
+Patch15: python-2.5.1-listdir.patch
# upstreamed
-# disable egg-infos for now
Patch50: python-2.5-disable-egginfo.patch
# new db version
@@ -54,6 +55,9 @@
Patch101: python-2.3.4-lib64-regex.patch
Patch102: python-2.5-lib64.patch
+# New API from 2.6
+Patch260: python2.6-set_wakeup_fd4.patch
+
Patch999: python-2.5.CVE-2007-4965-int-overflow.patch
@@ -164,6 +168,20 @@
You should install the tkinter package if you'd like to use a graphical
user interface for Python programming.
+%package test
+Summary: The test modules from the main python package
+Group: Development/Languages
+Requires: %{name} = %{version}-%{release}
+
+%description test
+
+The test modules from the main python pacakge: %{name}
+These have been removed to save space, as they are never or almost
+never used in production.
+
+You might want to install the python-test package if you're developing python
+code that uses more than just unittest and/or test_support.py.
+
%prep
%setup -q -n Python-%{version}
@@ -189,12 +207,17 @@
%patch10 -p1 -b .binutils-no-dep
%patch11 -p1 -b .ascii-tolower
%patch12 -p1 -b .pysqlite-2.3.3-minimal
+%patch13 -p1 -b .socketmodule
+%patch14 -p1 -b .socketmodule
+%patch15 -p1 -b .listdir
%ifarch alpha ia64
# 64bit, but not lib64 arches need this too...
%patch101 -p1 -b .lib64-regex
%endif
+%patch260 -p1 -b .set_wakeup_fd
+
%patch999 -p1 -b .cve2007-4965
# This shouldn't be necesarry, but is right now (2.2a3)
@@ -243,8 +266,21 @@
&& cat $fixed- > $fixed && rm -f $fixed-
done
+# Junk, no point in putting in -test sub-pkg
+rm -f $RPM_BUILD_ROOT/%{_libdir}/python%{pybasever}/idlelib/testcode.py*
+
# don't include tests that are run at build time in the package
+# This is documented, and used: rhbz#387401
+if /bin/false; then
+ # Move this to -test subpackage.
+mkdir save_bits_of_test
+for i in test_support.py __init__.py; do
+ cp -a $RPM_BUILD_ROOT/%{_libdir}/python%{pybasever}/test/$i save_bits_of_test
+done
rm -rf $RPM_BUILD_ROOT/%{_libdir}/python%{pybasever}/test
+mkdir $RPM_BUILD_ROOT/%{_libdir}/python%{pybasever}/test
+cp -a save_bits_of_test/* $RPM_BUILD_ROOT/%{_libdir}/python%{pybasever}/test
+fi
%if %{main_python}
ln -s python $RPM_BUILD_ROOT%{_bindir}/python2
@@ -321,7 +357,11 @@
%endif
find $RPM_BUILD_ROOT%{_libdir}/python%{pybasever}/lib-dynload -type d | sed "s|$RPM_BUILD_ROOT|%dir |" > dynfiles
-find $RPM_BUILD_ROOT%{_libdir}/python%{pybasever}/lib-dynload -type f | grep -v "_tkinter.so$" | sed "s|$RPM_BUILD_ROOT||" >> dynfiles
+find $RPM_BUILD_ROOT%{_libdir}/python%{pybasever}/lib-dynload -type f | \
+ grep -v "_tkinter.so$" | \
+ grep -v "_ctypes_test.so$" | \
+ grep -v "_testcapimodule.so$" | \
+ sed "s|$RPM_BUILD_ROOT||" >> dynfiles
# Fix for bug #136654
rm -f $RPM_BUILD_ROOT%{_libdir}/python%{pybasever}/email/test/data/audiotest.au $RPM_BUILD_ROOT%{_libdir}/python%{pybasever}/test/audiotest.au
@@ -350,7 +390,7 @@
#elif __WORDSIZE == 64
#include "%{_pyconfig64_h}"
#else
-#error "Unkown word size"
+#error "Unknown word size"
#endif
EOF
ln -s ../../libpython%{pybasever}.so $RPM_BUILD_ROOT%{_libdir}/python%{pybasever}/config/libpython%{pybasever}.so
@@ -390,18 +430,30 @@
%{_libdir}/python%{pybasever}/site-packages/README
%{_libdir}/python%{pybasever}/*.py*
%{_libdir}/python%{pybasever}/*.doc
-%{_libdir}/python%{pybasever}/bsddb
+%dir %{_libdir}/python%{pybasever}/bsddb
+%{_libdir}/python%{pybasever}/bsddb/*.py*
%{_libdir}/python%{pybasever}/compiler
-%{_libdir}/python%{pybasever}/ctypes
+%dir %{_libdir}/python%{pybasever}/ctypes
+%{_libdir}/python%{pybasever}/ctypes/*.py*
+%{_libdir}/python%{pybasever}/ctypes/macholib
%{_libdir}/python%{pybasever}/curses
-%{_libdir}/python%{pybasever}/distutils
-%{_libdir}/python%{pybasever}/email
+%dir %{_libdir}/python%{pybasever}/distutils
+%{_libdir}/python%{pybasever}/distutils/*.py*
+%{_libdir}/python%{pybasever}/distutils/README
+%{_libdir}/python%{pybasever}/distutils/command
+%dir %{_libdir}/python%{pybasever}/email
+%{_libdir}/python%{pybasever}/email/*.py*
+%{_libdir}/python%{pybasever}/email/mime
%{_libdir}/python%{pybasever}/encodings
%{_libdir}/python%{pybasever}/hotshot
%{_libdir}/python%{pybasever}/idlelib
%{_libdir}/python%{pybasever}/logging
%{_libdir}/python%{pybasever}/plat-linux2
-%{_libdir}/python%{pybasever}/sqlite3
+%dir %{_libdir}/python%{pybasever}/sqlite3
+%{_libdir}/python%{pybasever}/sqlite3/*.py*
+%dir %{_libdir}/python%{pybasever}/test
+%{_libdir}/python%{pybasever}/test/test_support.py*
+%{_libdir}/python%{pybasever}/test/__init__.py*
%{_libdir}/python%{pybasever}/wsgiref
%{_libdir}/python%{pybasever}/xml
%if %{_lib} == lib64
@@ -417,6 +469,7 @@
%files devel
%defattr(-,root,root)
/usr/include/*
+%doc Misc/README.valgrind Misc/valgrind-python.supp Misc/gdbinit
%dir %{_libdir}/python%{pybasever}/config
%{_libdir}/python%{pybasever}/config/*
%{_libdir}/libpython%{pybasever}.so
@@ -442,7 +495,63 @@
%{_libdir}/python%{pybasever}/lib-tk
%{_libdir}/python%{pybasever}/lib-dynload/_tkinter.so
+%files test
+%defattr(-, root, root)
+%{_libdir}/python%{pybasever}/bsddb/test
+%{_libdir}/python%{pybasever}/ctypes/test
+%{_libdir}/python%{pybasever}/distutils/tests
+%{_libdir}/python%{pybasever}/email/test
+%{_libdir}/python%{pybasever}/sqlite3/test
+%{_libdir}/python%{pybasever}/test
+%{_libdir}/python%{pybasever}/lib-dynload/_ctypes_test.so
+%{_libdir}/python%{pybasever}/lib-dynload/_testcapimodule.so
+
%changelog
+* Sun Jun 15 2008 James Antill <jantill at redhat.com> - 2.5.1-26
+- Fix sporadic listdir problem
+- Resolves: bug#451494
+
+* Mon Apr 7 2008 James Antill <jantill at redhat.com> - 2.5.1-25
+- Rebuild to re-gen autoconf file due to glibc change.
+- Resolves: bug#441003
+
+* Tue Mar 25 2008 James Antill <jantill at redhat.com> - 2.5.1-24
+- Add more constants to socketmodule
+
+* Sat Mar 8 2008 James Antill <jantill at redhat.com> - 2.5.1-22
+- Add constants to socketmodule
+- Resolves: bug#436560
+
+* Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 2.5.1-22
+- Autorebuild for GCC 4.3
+
+* Sun Jan 13 2008 Tom "spot" Callaway <tcallawa at redhat.com> - 2.5.1-21
+- rebuild for new tk in rawhide
+
+* Mon Jan 7 2008 James Antill <jantill at redhat.com> - 2.5.1-20
+- Add valgrind support files, as doc, to python-devel
+- Relates: rhbz#418621
+- Add new API from 2.6, set_wakeup_fd ... use at own risk, presumably won't
+- change but I have no control to guarantee that.
+- Resolves: rhbz#427794
+- Add gdbinit support file, as doc, to python-devel
+
+* Fri Jan 4 2008 Tom "spot" Callaway <tcallawa at redhat.com> - 2.5.1-19
+- rebuild for new tcl/tk in rawhide
+
+* Fri Dec 7 2007 James Antill <jantill at redhat.com> - 2.5.1-18
+- Create a python-test sub-module, over 3MB of stuff noone wants.
+- Don't remove egginfo files, try this see what happens ... may revert.
+- Resolves: rhbz#414711
+
+* Mon Dec 3 2007 Jeremy Katz <katzj at redhat.com> - 2.5.1-17
+- rebuild for new libssl
+
+* Fri Nov 30 2007 James Antill <jantill at redhat.com> - 2.5.1-16
+- Fix pyconfig.h comment typo.
+- Add back test_support.py and the __init__.py file.
+- Resolves: rhbz#387401
+
* Tue Oct 30 2007 James Antill <jantill at redhat.com> - 2.5.1-15
- Do codec lowercase in C Locale.
- Resolves: 207134 191096
More information about the fedora-extras-commits
mailing list