rpms/python/F-10 python-2.5.2-set_wakeup_fd4.patch, 1.1, 1.2 python.spec, 1.137, 1.138
Ignacio Vazquez-Abrams
ivazquez at fedoraproject.org
Sun Dec 7 05:48:26 UTC 2008
Author: ivazquez
Update of /cvs/pkgs/rpms/python/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29021
Modified Files:
python-2.5.2-set_wakeup_fd4.patch python.spec
Log Message:
Apply reconstructed set_wakeup_fd patch (#475005)
python-2.5.2-set_wakeup_fd4.patch:
Index: python-2.5.2-set_wakeup_fd4.patch
===================================================================
RCS file: /cvs/pkgs/rpms/python/F-10/python-2.5.2-set_wakeup_fd4.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- python-2.5.2-set_wakeup_fd4.patch 30 Sep 2008 19:36:58 -0000 1.1
+++ python-2.5.2-set_wakeup_fd4.patch 7 Dec 2008 05:47:56 -0000 1.2
@@ -1,6 +1,23 @@
-diff -ru Python-2.5.2-orig/Modules/signalmodule.c Python-2.5.2/Modules/signalmodule.c
---- Python-2.5.2-orig/Modules/signalmodule.c 2007-12-10 18:03:55.000000000 -0500
-+++ Python-2.5.2/Modules/signalmodule.c 2008-09-24 17:32:45.000000000 -0400
+http://svn.python.org/view?rev=59574&view=rev
+
+Index: Include/pyerrors.h
+===================================================================
+--- a/Include/pyerrors.h (revision 59573)
++++ b/Include/pyerrors.h (revision 59574)
+@@ -238,6 +238,9 @@
+ PyAPI_FUNC(int) PyErr_CheckSignals(void);
+ PyAPI_FUNC(void) PyErr_SetInterrupt(void);
+
++/* In signalmodule.c */
++int PySignal_SetWakeupFd(int fd);
++
+ /* Support for adding program text to SyntaxErrors */
+ PyAPI_FUNC(void) PyErr_SyntaxLocation(const char *, int);
+ PyAPI_FUNC(PyObject *) PyErr_ProgramText(const char *, int);
+Index: Modules/signalmodule.c
+===================================================================
+--- a/Modules/signalmodule.c (revision 59573)
++++ b/Modules/signalmodule.c (revision 59574)
@@ -12,6 +12,8 @@
#include <signal.h>
@@ -14,29 +31,21 @@
PyObject *func;
} Handlers[NSIG];
-+static int wakeup_fd = -1;
++static sig_atomic_t wakeup_fd = -1;
+
/* Speed up sigcheck() when none tripped */
static volatile sig_atomic_t is_tripped = 0;
-@@ -113,6 +117,7 @@
- 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) {
-@@ -128,6 +133,8 @@
+@@ -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, &dummy_byte, 1);
++ write(wakeup_fd, "\0", 1);
#ifdef WITH_THREAD
}
#endif
-@@ -267,6 +274,39 @@
+@@ -267,6 +273,50 @@
anything else -- the callable Python object used as a handler");
@@ -72,11 +81,22 @@
+\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,6 +314,7 @@
+@@ -274,11 +324,12 @@
#endif
{"signal", signal_signal, METH_VARARGS, signal_doc},
{"getsignal", signal_getsignal, METH_VARARGS, getsignal_doc},
@@ -84,3 +104,9 @@
#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 */
+ };
Index: python.spec
===================================================================
RCS file: /cvs/pkgs/rpms/python/F-10/python.spec,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -r1.137 -r1.138
--- python.spec 30 Sep 2008 19:36:58 -0000 1.137
+++ python.spec 7 Dec 2008 05:47:56 -0000 1.138
@@ -22,7 +22,7 @@
Summary: An interpreted, interactive, object-oriented programming language.
Name: %{python}
Version: 2.5.2
-Release: 1%{?dist}
+Release: 2%{?dist}
License: Python
Group: Development/Languages
Provides: python-abi = %{pybasever}
@@ -511,6 +511,9 @@
%{_libdir}/python%{pybasever}/lib-dynload/_testcapimodule.so
%changelog
+* Sun Dec 7 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm at gmail.com> - 2.5.2-2
+- Apply reconstructed set_wakeup_fd patch (#475005)
+
* Tue Sep 30 2008 James Antill <katzj at redhat.com> - 2.5.2-1
- Move to 2.5.2
- Fix CVE-2008-2316 hashlib overflow.
More information about the fedora-extras-commits
mailing list