25065852 23093717/22067764 need to be backed out of the Userland gate: causes 25064383 s11u3-sru14-backport
authorpkidd <patrick.kidd@oracle.com>
Wed, 09 Nov 2016 08:50:05 -0800
branchs11u3-sru14-backport
changeset 7281 084dbeea9c92
parent 7235 11e6a3bbf713
child 7282 eaaa4b66f543
25065852 23093717/22067764 need to be backed out of the Userland gate: causes 25064383
components/python/cherrypy/Makefile
components/python/cherrypy/cherrypy-PYVER.p5m
components/python/cherrypy/cherrypy.copyright
components/python/cherrypy/patches/cp-ticket-1386.patch
components/python/cherrypy/patches/cp-ticket-847.patch
--- a/components/python/cherrypy/Makefile	Wed Nov 02 09:04:15 2016 -0700
+++ b/components/python/cherrypy/Makefile	Wed Nov 09 08:50:05 2016 -0800
@@ -18,26 +18,29 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 #
 include ../../../make-rules/shared-macros.mk
 
 PATH=/usr/bin:/usr/gnu/bin:/usr/sbin
 
 COMPONENT_NAME=		CherryPy
-COMPONENT_VERSION=	5.1.0
+COMPONENT_VERSION=	3.1.2
 COMPONENT_PROJECT_URL=	http://www.cherrypy.org/
 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
 COMPONENT_ARCHIVE_HASH=	\
-    sha256:5fccc9ad3bf9a1df83bbb934772f34f42571421bdd75f90f74c170b6c0ef13b1
+    sha256:0dfd65507b047d54c09849e7a4b8bdd3616fa8776a5dbff7697cbf6ea1559bf6
 COMPONENT_ARCHIVE_URL=	http://download.cherrypy.org/cherrypy/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
 COMPONENT_BUGDB=	python-mod/cherrypy
 
-TPNO=			27797
+TPNO=			5881
 
 PATCH_LEVEL=0
 
+# This module is not Python 3 ready: syntax issues.
+PYTHON_VERSIONS = 2.7 2.6
+
 include $(WS_MAKE_RULES)/prep.mk
 include $(WS_MAKE_RULES)/setup.py.mk
 include $(WS_MAKE_RULES)/ips.mk
@@ -45,25 +48,12 @@
 COMPONENT_POST_INSTALL_ACTION = \
 	(cd $(PROTO_DIR)/usr/bin ; $(MV) cherryd cherryd$(PYTHON_VERSION))
 
-COMPONENT_TEST_DIR = 	$(SOURCE_DIR)/cherrypy/test
-COMPONENT_TEST_CMD =	nosetests -s ./
-COMPONENT_TEST_ARGS = 
-COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
-
-COMPONENT_TEST_TRANSFORMS += \
-	'-e "/^cherrypy./d" ' \
-	'-e "s|\(^Ran [0-9]\+ tests in\).*|\1|" '
-
 # common targets
 build:		$(BUILD_NO_ARCH)
 
 install:	$(INSTALL_NO_ARCH)
 
-# test are not clean, so not appropriate to run at top level
-$(SKIP_TEST_AT_TOP_LEVEL)
+test:		$(NO_TESTS)
 
-test:		$(TEST_NO_ARCH)
-
-system-test:    $(SYSTEM_TESTS_NOT_IMPLEMENTED)
 
 REQUIRED_PACKAGES += system/core-os
--- a/components/python/cherrypy/cherrypy-PYVER.p5m	Wed Nov 02 09:04:15 2016 -0700
+++ b/components/python/cherrypy/cherrypy-PYVER.p5m	Wed Nov 09 08:50:05 2016 -0800
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 #
 
 set name=pkg.fmri \
@@ -41,23 +41,16 @@
 link path=usr/bin/cherryd target=cherryd$(PYVER) mediator=python \
     mediator-version=$(PYVER)
 file path=usr/bin/cherryd$(PYVER)
-file path=usr/lib/python$(PYVER)/vendor-packages/CherryPy-$(COMPONENT_VERSION)-py$(PYVER).egg-info/PKG-INFO
-file path=usr/lib/python$(PYVER)/vendor-packages/CherryPy-$(COMPONENT_VERSION)-py$(PYVER).egg-info/SOURCES.txt
-file path=usr/lib/python$(PYVER)/vendor-packages/CherryPy-$(COMPONENT_VERSION)-py$(PYVER).egg-info/dependency_links.txt
-file path=usr/lib/python$(PYVER)/vendor-packages/CherryPy-$(COMPONENT_VERSION)-py$(PYVER).egg-info/top_level.txt
+file path=usr/lib/python$(PYVER)/vendor-packages/CherryPy-$(COMPONENT_VERSION)-py$(PYVER).egg-info
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/LICENSE.txt
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/__init__.py
-file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/__main__.py
+file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cpcgifs.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cpchecker.py
-file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cpcompat.py
-$(PYTHON_2.7_ONLY)file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cpcompat_subprocess.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cpconfig.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cpdispatch.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cperror.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cplogging.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cpmodpy.py
-file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cpnative_server.py
-file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cpreqbody.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cprequest.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cpserver.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cpthreadinglocal.py
@@ -66,41 +59,28 @@
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cpwsgi.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/_cpwsgi_server.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/cherryd mode=0555
-file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/daemon.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/favicon.ico
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/__init__.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/auth.py
-file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/auth_basic.py
-file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/auth_digest.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/caching.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/covercp.py
-file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/cpstats.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/cptools.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/encoding.py
-file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/gctools.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/http.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/httpauth.py
-file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/httputil.py
-file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/jsontools.py
-file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/lockfile.py
-file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/locking.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/profiler.py
-file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/reprconf.py
+file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/safemime.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/sessions.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/static.py
-file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/xmlrpcutil.py
+file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/tidy.py
+file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/wsgiapp.py
+file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/lib/xmlrpc.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/process/__init__.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/process/plugins.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/process/servers.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/process/win32.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/process/wspbus.py
 file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/wsgiserver/__init__.py
-file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/wsgiserver/ssl_builtin.py
-$(PYTHON_2.7_ONLY)file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/wsgiserver/ssl_pyopenssl.py
-$(PYTHON_2.7_ONLY)file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/wsgiserver/wsgiserver2.py
-$(PYTHON_3.4_ONLY)file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/wsgiserver/wsgiserver3.py
-# comment this line until bug 20861272 is resolved or PYTHON_3.5_ONLY is present in ips.mk
-#$(PYTHON_3.5_ONLY)file path=usr/lib/python$(PYVER)/vendor-packages/cherrypy/wsgiserver/wsgiserver3.py
 #
 license cherrypy.copyright license=BSD
 
--- a/components/python/cherrypy/cherrypy.copyright	Wed Nov 02 09:04:15 2016 -0700
+++ b/components/python/cherrypy/cherrypy.copyright	Wed Nov 09 08:50:05 2016 -0800
@@ -1,4 +1,4 @@
-Copyright (c) 2004-2015, CherryPy Team ([email protected])
+Copyright (c) 2004-2007, CherryPy Team ([email protected])
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, 
--- a/components/python/cherrypy/patches/cp-ticket-1386.patch	Wed Nov 02 09:04:15 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-# This issue has been offered to upstream and merged.
-# Please see https://bitbucket.org/cherrypy/cherrypy/commits/89dbd2f00b541f8f8378eaabf2caef3e932bb805
-# HG changeset patch
-# User Yiteng Zhang <[email protected]>
-# Date 1461887965 25200
-# Node ID 89dbd2f00b541f8f8378eaabf2caef3e932bb805
-# Parent  ea07b29deabd28d5a10b764a1a452c876692d028
-parse_request_uri() incorrectly parses URI which contains ://
-
---- cherrypy/wsgiserver/wsgiserver2.py
-+++ cherrypy/wsgiserver/wsgiserver2.py
[email protected]@ -92,6 +92,7 @@
- import traceback as traceback_
- import operator
- from urllib import unquote
-+from urlparse import urlparse
- import warnings
- import errno
- import logging
[email protected]@ -830,15 +831,12 @@
-         if uri == ASTERISK:
-             return None, None, uri
- 
--        i = uri.find('://')
--        if i > 0 and QUESTION_MARK not in uri[:i]:
-+        scheme, authority, path, params, query, fragment = urlparse(uri)
-+        if scheme and QUESTION_MARK not in scheme:
-             # An absoluteURI.
-             # If there's a scheme (and it must be http or https), then:
-             # http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query
-             # ]]
--            scheme, remainder = uri[:i].lower(), uri[i + 3:]
--            authority, path = remainder.split(FORWARD_SLASH, 1)
--            path = FORWARD_SLASH + path
-             return scheme, authority, path
- 
-         if uri.startswith(FORWARD_SLASH):
---- cherrypy/wsgiserver/wsgiserver3.py
-+++ cherrypy/wsgiserver/wsgiserver3.py
[email protected]@ -92,6 +92,8 @@
- import traceback as traceback_
- import errno
- import logging
-+from urllib.parse import urlparse
-+
- try:
-     # prefer slower Python-based io module
-     import _pyio as io
[email protected]@ -819,14 +821,13 @@
-         if uri == ASTERISK:
-             return None, None, uri
- 
--        scheme, sep, remainder = uri.partition(b'://')
--        if sep and QUESTION_MARK not in scheme:
-+        scheme, authority, path, params, query, fragment = urlparse(uri)
-+        if scheme and QUESTION_MARK not in scheme:
-             # An absoluteURI.
-             # If there's a scheme (and it must be http or https), then:
-             # http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query
-             # ]]
--            authority, path_a, path_b = remainder.partition(FORWARD_SLASH)
--            return scheme.lower(), authority, path_a + path_b
-+            return scheme, authority, path
- 
-         if uri.startswith(FORWARD_SLASH):
-             # An abs_path.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/python/cherrypy/patches/cp-ticket-847.patch	Wed Nov 09 08:50:05 2016 -0800
@@ -0,0 +1,44 @@
+Index: cherrypy/wsgiserver/__init__.py
+===================================================================
+--- cherrypy/wsgiserver/__init__.py	(revision 2459)
++++ cherrypy/wsgiserver/__init__.py	(working copy)
[email protected]@ -291,6 +291,7 @@
+         self.wsgi_app = wsgi_app
+         
+         self.ready = False
++        self.started_request = False
+         self.started_response = False
+         self.status = ""
+         self.outheaders = []
[email protected]@ -318,6 +319,9 @@
+         # (although your TCP stack might suffer for it: cf Apache's history
+         # with FIN_WAIT_2).
+         request_line = self.rfile.readline()
++        # Set started_request to True so communicate() knows to send 408
++        # from here on out.
++        self.started_request = True
+         if not request_line:
+             # Force self.ready = False so the connection will close.
+             self.ready = False
[email protected]@ -1169,6 +1173,9 @@
+                 # This order of operations should guarantee correct pipelining.
+                 req.parse_request()
+                 if not req.ready:
++                    # Something went wrong in the parsing (and the server has
++                    # probably already made a simple response). Return and
++                    # let the conn close.
+                     return
+                 
+                 req.respond()
[email protected]@ -1178,7 +1185,10 @@
+         except socket.error, e:
+             errnum = e.args[0]
+             if errnum == 'timed out':
+-                if req and not req.sent_headers:
++                # Don't send a 408 if there is no oustanding request; only
++                # if we're in the middle of a request.
++                # See http://www.cherrypy.org/ticket/853
++                if req and req.started_request and not req.sent_headers:
+                     req.simple_response("408 Request Timeout")
+             elif errnum not in socket_errors_to_ignore:
+                 if req and not req.sent_headers: