From 1d4b87d0c0d2bd7ad72ad777dd8427088b2c4d23 Mon Sep 17 00:00:00 2001 From: Toshio くらとみ Date: Feb 11 2008 22:36:20 +0000 Subject: Sync with the Fedora python-cherrypy-2.3.x. setuptools allows people to define dependencies based on version and since 2.3.x has a security fix, many projects have set their requirements to python-cherrypy >= 2.3.0 even though we have the fix backported. This should be a compatible update. --- diff --git a/.cvsignore b/.cvsignore index eddbb3c..5c3a7d2 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -CherryPy-2.2.1.tar.gz +CherryPy-2.3.0.tar.gz diff --git a/python-cherrypy-2.2.1-EINTR.patch b/python-cherrypy-2.2.1-EINTR.patch deleted file mode 100644 index 4f5b017..0000000 --- a/python-cherrypy-2.2.1-EINTR.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -up cherrypy/_cpwsgiserver.py.EINTR cherrypy/_cpwsgiserver.py ---- cherrypy/_cpwsgiserver.py.EINTR 2006-04-25 03:37:45.000000000 +0200 -+++ cherrypy/_cpwsgiserver.py 2007-11-03 01:14:20.000000000 +0100 -@@ -332,6 +332,22 @@ class CherryPyWSGIServer(object): - # notice keyboard interrupts on Win32, which don't interrupt - # 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 in ("Bad file descriptor", "Socket operation on non-socket"): -+ # Our socket was closed. -+ return -+ if msg == "Resource temporarily unavailable": -+ # Just try again. See http://www.cherrypy.org/ticket/479. -+ return -+ raise - - def stop(self): - """Gracefully shutdown a server that is serving forever.""" 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-regression-test.patch b/python-cherrypy-regression-test.patch index 0821b0d..781e28b 100644 --- a/python-cherrypy-regression-test.patch +++ b/python-cherrypy-regression-test.patch @@ -1,10 +1,12 @@ ---- cherrypy/test/test.py.orig 2006-07-13 14:12:11.000000000 -0400 -+++ cherrypy/test/test.py 2006-07-13 14:12:19.000000000 -0400 -@@ -311,7 +311,6 @@ - CommandLineParser(testList).run() - - print -- raw_input('hit enter') +Index: CherryPy-2.3.0/cherrypy/test/test.py +=================================================================== +--- CherryPy-2.3.0.orig/cherrypy/test/test.py ++++ CherryPy-2.3.0/cherrypy/test/test.py +@@ -328,7 +328,6 @@ def run(): + success = clp.run() + if clp.interactive: + print +- raw_input('hit enter') + sys.exit(success) - if __name__ == '__main__': diff --git a/python-cherrypy-tutorial-doc.patch b/python-cherrypy-tutorial-doc.patch index 6f4579f..3f0b1c4 100644 --- a/python-cherrypy-tutorial-doc.patch +++ b/python-cherrypy-tutorial-doc.patch @@ -1,13 +1,14 @@ ---- setup.py.orig 2006-07-13 14:15:25.000000000 -0400 -+++ setup.py 2006-07-13 14:16:00.000000000 -0400 -@@ -36,23 +36,11 @@ +diff -up CherryPy-2.3.0/setup.py.bak CherryPy-2.3.0/setup.py +--- CherryPy-2.3.0/setup.py.bak 2008-01-17 14:37:31.000000000 -0800 ++++ CherryPy-2.3.0/setup.py 2008-01-17 14:38:06.000000000 -0800 +@@ -36,23 +36,11 @@ url="http://www.cherrypy.org" cp_license="BSD" packages=[ "cherrypy", "cherrypy.lib", "cherrypy.lib.filter", - "cherrypy.tutorial", "cherrypy.test", "cherrypy.filters", + "cherrypy.filters", ] - download_url="http://sourceforge.net/project/showfiles.php?group_id=56099" + download_url="http://download.cherrypy.org/cherrypy/2.3.0/" data_files=[ - ('cherrypy/tutorial', - [ diff --git a/python-cherrypy.spec b/python-cherrypy.spec index 72329ab..104c2ad 100644 --- a/python-cherrypy.spec +++ b/python-cherrypy.spec @@ -1,8 +1,8 @@ %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: python-cherrypy -Version: 2.2.1 -Release: 10%{?dist} +Version: 2.3.0 +Release: 3%{?dist} Summary: A pythonic, object-oriented web development framework Group: Development/Libraries License: BSD @@ -11,8 +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}-%{version}-EINTR.patch -Patch3: cherrypy-2.2.1-security-sessionfilter.patch +Patch2: %{name}-2.3.0-EINTR.patch BuildArch: noarch @@ -30,10 +29,9 @@ results in smaller source code developed in less time. %prep %setup -q -n CherryPy-%{version} -%patch0 -%patch1 -%patch2 -%patch3 -p1 +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 %{__sed} -i 's/\r//' CHANGELOG.txt README.txt CHERRYPYTEAM.txt cherrypy/tutorial/README.txt @@ -42,11 +40,11 @@ results in smaller source code developed in less time. %install rm -rf $RPM_BUILD_ROOT -%{__python} -c 'import setuptools; execfile("setup.py")' install -O1 --skip-build --root %{buildroot} +%{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --root %{buildroot} -#%check -#cd cherrypy/test -#%{__python} test.py +%check +cd cherrypy/test +%{__python} test.py %clean rm -rf $RPM_BUILD_ROOT @@ -58,13 +56,20 @@ rm -rf $RPM_BUILD_ROOT %{python_sitelib}/* %changelog -* Mon Jan 28 2008 Toshio Kuratomi 2.2.1-10 -- Patch was a backport from CP-3.x. Fix with the 2.x version. - -* Thu Jan 22 2008 Toshio Kuratomi 2.2.1-9 +* Thu Jan 22 2008 Toshio Kuratomi 2.3.0-3 - Add egg-info so that the new TurboGears can build against cherrypy on F-7 and F-8 as well as Rawhide. +* 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 security fix. +- Refresh other patches to apply against new version. +- Change to new canonical source URL. +- Reenable tests. + * Sun Jan 6 2008 Toshio Kuratomi 2.2.1-8 - Fix a security bug with a backport of http://www.cherrypy.org/changeset/1775 - Include the egginfo files as well as the python files. diff --git a/sources b/sources index eb82315..bfca383 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -14bf17b0706bc480342cb8fcfaed74cd CherryPy-2.2.1.tar.gz +80ce0f666f2899d4e681432e4061db16 CherryPy-2.3.0.tar.gz