diff --git a/python-cherrypy-2.3.0-EINTR.patch b/python-cherrypy-2.3.0-EINTR.patch new file mode 100644 index 0000000..774bd4c --- /dev/null +++ b/python-cherrypy-2.3.0-EINTR.patch @@ -0,0 +1,17 @@ +diff -up CherryPy-2.3.0/cherrypy/_cpwsgiserver.py.bak CherryPy-2.3.0/cherrypy/_cpwsgiserver.py +--- CherryPy-2.3.0/cherrypy/_cpwsgiserver.py.bak 2008-01-17 15:57:48.000000000 -0800 ++++ CherryPy-2.3.0/cherrypy/_cpwsgiserver.py 2008-01-17 15:59:32.000000000 -0800 +@@ -404,6 +404,13 @@ class CherryPyWSGIServer(object): + # accept() by default + return + except socket.error, x: ++ if hasattr(errno, "EINTR") and x.args[0] == errno.EINTR: ++ # I *think* this is right. EINTR should occur when a signal ++ # is received during the accept() call; all docs say retry ++ # the call, and I *think* I'm reading it right that Python ++ # will then go ahead and poll for and handle the signal ++ # elsewhere. See http://www.cherrypy.org/ticket/707. ++ return + msg = x.args[1] + if msg == "Bad file descriptor": + # Our socket was closed diff --git a/python-cherrypy.spec b/python-cherrypy.spec index f7fba2b..7afda9f 100644 --- a/python-cherrypy.spec +++ b/python-cherrypy.spec @@ -2,7 +2,7 @@ Name: python-cherrypy Version: 2.3.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A pythonic, object-oriented web development framework Group: Development/Libraries License: BSD @@ -11,6 +11,7 @@ Source0: http://download.cherrypy.org/cherrypy/%{version}/CherryPy-%{vers BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Patch0: %{name}-tutorial-doc.patch Patch1: %{name}-regression-test.patch +Patch2: %{name}-2.3.0-EINTR.patch BuildArch: noarch @@ -25,6 +26,7 @@ results in smaller source code developed in less time. %setup -q -n CherryPy-%{version} %patch0 -p1 %patch1 -p1 +%patch2 -p1 %{__sed} -i 's/\r//' CHANGELOG.txt README.txt CHERRYPYTEAM.txt cherrypy/tutorial/README.txt @@ -49,8 +51,12 @@ rm -rf $RPM_BUILD_ROOT %{python_sitelib}/* %changelog +* Thu Jan 17 2008 Toshio Kuratomi 2.3.0-2 +- EINTR Patch needed to be forwarded ported as well as it is only applied to + CP trunk (3.x). + * Thu Jan 17 2008 Toshio Kuratomi 2.3.0-1 -- Update to new upstream which rolls in the backported fixes. +- Update to new upstream which rolls in the backported security fix. - Refresh other patches to apply against new version. - Change to new canonical source URL. - Reenable tests.