--- a/components/python/imaging/Makefile Tue Sep 01 10:00:07 2015 -0700
+++ b/components/python/imaging/Makefile Tue Sep 01 09:29:08 2015 -0700
@@ -44,9 +44,6 @@
include $(WS_MAKE_RULES)/setup.py.mk
include $(WS_MAKE_RULES)/ips.mk
-TEST_PYTHONPATH.32 = $(PROTO_DIR)/usr/lib/python$(PYTHON_VERSION)/vendor-packages/PIL
-TEST_PYTHONPATH.64 = $(PROTO_DIR)/usr/lib/python$(PYTHON_VERSION)/vendor-packages/PIL:$(PROTO_DIR)/usr/lib/python$(PYTHON_VERSION)/vendor-packages/PIL/64
-
# This binary image file accompanies the test which is created along with a fix
# in patches/04-CVE-2014-9601.patch
COMPONENT_PRE_TEST_ACTION= \
@@ -57,7 +54,7 @@
COMPONENT_TEST_DIR= $(COMPONENT_SRC)
COMPONENT_TEST_ARGS= ./selftest.py
-COMPONENT_TEST_ENV= PYTHONPATH=$(TEST_PYTHONPATH.$(BITS))
+COMPONENT_TEST_ENV= PYTHONPATH=$(PROTO_DIR)$(PYTHON_VENDOR_PACKAGES.32)
# Master test results are the same for both 32-bit and 64-bit,
# for all versions of Python, so override
@@ -65,8 +62,21 @@
COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
COMPONENT_TEST_TRANSFORMS += \
+ '-e "s|^PIL [0-9]\{1,\}\(\.[0-9]\{1,\}\)\{1,\}|PIL|" ' \
+ '-e "s|\(^Python modules loaded from \).*|\1|" ' \
'-e "s|\(^Binary modules loaded from \).*|\1|" '
+# This binary image file accompanies the test which is created along with a fix
+# in patches/04-CVE-2014-9601.patch
+COMPONENT_PRE_SYSTEM_TEST_ACTION= \
+ if [ ! -e $(SOURCE_DIR)/Images/png_decompression_dos.png ]; then \
+ $(CP) files/png_decompression_dos.png \
+ $(SOURCE_DIR)/Images/png_decompression_dos.png ; \
+ fi
+COMPONENT_SYSTEM_TEST_DIR= $(COMPONENT_SRC)
+COMPONENT_SYSTEM_TEST_ARGS= ./selftest.py
+COMPONENT_SYSTEM_TEST_ENV= PYTHONPATH=$(PYTHON_VENDOR_PACKAGES.32)
+
ASLR_MODE = $(ASLR_NOT_APPLICABLE)
# common targets
@@ -76,7 +86,7 @@
test: $(TEST_32_and_64)
-system-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED)
+system-test: $(SYSTEM_TEST_32_and_64)
REQUIRED_PACKAGES += image/library/libjpeg
--- a/components/python/imaging/imaging-PYVER.p5m Tue Sep 01 10:00:07 2015 -0700
+++ b/components/python/imaging/imaging-PYVER.p5m Tue Sep 01 09:29:08 2015 -0700
@@ -20,7 +20,7 @@
#
#
-# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
#
<transform file path=usr.*/man/.+ -> default mangler.man.stability uncommitted>
@@ -147,6 +147,7 @@
file path=usr/lib/python$(PYVER)/vendor-packages/PIL/_imaging.so
file path=usr/lib/python$(PYVER)/vendor-packages/PIL/_imagingft.so
file path=usr/lib/python$(PYVER)/vendor-packages/PIL/_imagingmath.so
+file path=usr/lib/python$(PYVER)/vendor-packages/PIL/_imagingtk.so
#
license imaging.license license="Historical Permission Notice and Disclaimer"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/python/imaging/patches/05-selftest_py.patch Tue Sep 01 09:29:08 2015 -0700
@@ -0,0 +1,16 @@
+Solaris-specific patch for testing in Userland framework.
+Not appropriate for upstream.
+
+--- Imaging-1.1.7-orig/selftest.py 2015-08-25 10:45:10.000000000 -0700
++++ Imaging-1.1.7/selftest.py 2015-08-26 10:21:50.931646299 -0700
+@@ -4,6 +4,10 @@ ROOT = "."
+
+ import os, sys
+ sys.path.insert(0, ROOT)
++# PYTHONPATH should be searched first, to find PIL modules installed on
++# the system, ahead of the current directory and the source directory
++# where this script resides
++sys.path.insert(0, os.environ.get('PYTHONPATH'))
+
+ from PIL import Image
+ from PIL import ImageDraw
--- a/components/python/imaging/test/results-all.master Tue Sep 01 10:00:07 2015 -0700
+++ b/components/python/imaging/test/results-all.master Tue Sep 01 09:29:08 2015 -0700
@@ -1,14 +1,14 @@
--------------------------------------------------------------------
-PIL 1.1.7 TEST SUMMARY
+PIL TEST SUMMARY
--------------------------------------------------------------------
-Python modules loaded from ./PIL
+Python modules loaded from
Binary modules loaded from
--------------------------------------------------------------------
-*** PIL CORE support not installed
-*** TKINTER support not installed
+--- PIL CORE support ok
+--- TKINTER support ok
--- JPEG support ok
--- ZLIB (PNG/ZIP) support ok
-*** FREETYPE2 support not installed
+--- FREETYPE2 support ok
*** LITTLECMS support not installed
--------------------------------------------------------------------
Running selftest: