--- a/components/python/xattr/Makefile Wed Sep 07 14:48:40 2016 -0700
+++ b/components/python/xattr/Makefile Wed Sep 07 14:48:41 2016 -0700
@@ -20,22 +20,22 @@
#
#
-# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
#
include ../../../make-rules/shared-macros.mk
COMPONENT_NAME= xattr
-COMPONENT_VERSION= 0.7.4
+COMPONENT_VERSION= 0.8.0
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
COMPONENT_ARCHIVE_HASH= \
- sha256:16c612ac01b9b5a31967e231c7f7d32b7263f151d5e3c617c69378170054805f
+ sha256:71d08712f78ed543215e4145779a336e42acb4003b97e16d493a680cf08f1d01
COMPONENT_ARCHIVE_URL= $(call pypi_url)
COMPONENT_PROJECT_URL= http://github.com/xattr/xattr
COMPONENT_BUGDB= python-mod/xattr
-TPNO= 16912
+TPNO= 30241
include $(WS_MAKE_RULES)/prep.mk
include $(WS_MAKE_RULES)/setup.py.mk
@@ -45,7 +45,7 @@
CFFI = $(WS_COMPONENTS)/python/cffi/build/prototype/$(MACH)/$(PYTHON_LIB)
-COMPONENT_BUILD_ENV += PYTHONPATH=$(CFFI)
+COMPONENT_BUILD_ENV += PYTHONPATH=$(CFFI)
COMPONENT_INSTALL_ENV += PYTHONPATH=$(CFFI):$(PROTO_DIR)/$(PYTHON_LIB)
COMPONENT_TEST_ENV += PYTHONPATH=$(CFFI):$(PROTO_DIR)/$(PYTHON_LIB)
# The test suite wants to use some unicode filenames, which don't work in the C
@@ -56,7 +56,7 @@
COMPONENT_TEST_ARGS = test
COMPONENT_POST_INSTALL_ACTION += \
- (cd $(PROTO_DIR)/usr/bin; $(MV) xattr xattr-$(PYTHON_VERSION))
+ (cd $(PROTO_DIR)/usr/bin; $(MV) xattr xattr-$(PYTHON_VERSION))
# Tests run under setuptools work very hard to run in the source directory
# itself, and will thus blow up with an VerificationError (wrong ELF class)
@@ -73,7 +73,7 @@
test: $(TEST_32_and_64)
-system-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED)
+system-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED)
REQUIRED_PACKAGES += library/python/setuptools-27
REQUIRED_PACKAGES += library/python/setuptools-34
--- a/components/python/xattr/patches/solaris.patch Wed Sep 07 14:48:40 2016 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-Patch needed for xattr to build properly on Solaris, with Studio compilers.
-
-Merged as of 0.7.6.
-
-diff --git a/xattr/lib.py b/xattr/lib.py
-index 0466d30..390c333 100644
---- a/xattr/lib.py
-+++ b/xattr/lib.py
-@@ -29,12 +29,13 @@ lib = ffi.verify("""
- #include "Python.h"
- #ifdef __FreeBSD__
- #include <sys/extattr.h>
--#elif defined(__SUN__) || defined(__sun__) || defined(sun)
-+#elif defined(__SUN__) || defined(__sun__) || defined(__sun)
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <fcntl.h>
- #include <unistd.h>
- #include <dirent.h>
-+#include <alloca.h>
- #else
- #include <sys/xattr.h>
- #endif
-@@ -59,7 +60,7 @@ static void convert_bsd_list(char *namebuf, size_t size)
- while(offset < size) {
- int length = (int) namebuf[offset];
- memmove(namebuf+offset, namebuf+offset+1, length);
-- namebuf[offset+length] = '\0';
-+ namebuf[offset+length] = '\\0';
- offset += length+1;
- }
- }
-@@ -260,7 +261,7 @@ static ssize_t xattr_flistxattr(int fd, char *namebuf, size_t size, int options)
- return rv;
- }
-
--#elif defined(__SUN__) || defined(__sun__) || defined(sun)
-+#elif defined(__SUN__) || defined(__sun__) || defined(__sun)
-
- /* Solaris 9 and later compatibility API */
- #define XATTR_XATTR_NOFOLLOW 0x0001
-@@ -268,6 +269,9 @@ static ssize_t xattr_flistxattr(int fd, char *namebuf, size_t size, int options)
- #define XATTR_XATTR_REPLACE 0x0004
- #define XATTR_XATTR_NOSECURITY 0x0008
-
-+#define XATTR_CREATE 0x1
-+#define XATTR_REPLACE 0x2
-+
- #ifndef u_int32_t
- #define u_int32_t uint32_t
- #endif
-@@ -429,7 +433,7 @@ static ssize_t xattr_xflistxattr(int xfd, char *namebuf, size_t size, int option
- snprintf((char *)(namebuf + nsize), esize + 1,
- entry->d_name);
- }
-- nsize += esize + 1; /* +1 for \0 */
-+ nsize += esize + 1; /* +1 for \\0 */
- }
- closedir(dirp);
- return nsize;
-@@ -438,7 +442,7 @@ static ssize_t xattr_flistxattr(int fd, char *namebuf, size_t size, int options)
- {
- int xfd;
-
-- xfd = openat(fd, ".", O_RDONLY);
-+ xfd = openat(fd, ".", O_RDONLY | O_XATTR);
- return xattr_xflistxattr(xfd, namebuf, size, options);
- }
-
-@@ -716,7 +720,7 @@ def _flistxattr(fd, options=0):
- flistxattr(fd, options=0) -> str
- """
- res = lib.xattr_flistxattr(fd, ffi.NULL, 0, options)
-- if res == 1:
-+ if res == -1:
- raise error()
- buf = ffi.new("char[]", res)
- res = lib.xattr_flistxattr(fd, buf, res, options)
--- a/components/python/xattr/patches/test.patch Wed Sep 07 14:48:40 2016 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-Every file on Solaris 11 and on has two extended attributes, so if we find
-them, we shouldn't fail. Also, we don't support extended attributes on
-symlinks, so just quietly pass that test.
-
-Additionally, fix comparison of lists to dict_keys in Python 3. This has been
-fixed in newer versions of xattr which will be part of a future update of the
-userland version of xattr.
-
-Merged as of 0.7.6.
-
-diff --git a/xattr/tests/test_xattr.py b/xattr/tests/test_xattr.py
---- a/xattr/tests/test_xattr.py Mon Mar 3 10:12:24 2014
-+++ b/xattr/tests/test_xattr.py Wed Mar 26 16:29:24 2014
-@@ -1,4 +1,5 @@
- import os
-+import sys
- from unittest import TestCase
- from tempfile import mkdtemp, NamedTemporaryFile
-
-@@ -8,9 +9,18 @@
- class BaseTestXattr(object):
- def test_attr(self):
- x = xattr.xattr(self.tempfile)
-- self.assertEqual(x.keys(), [])
-- self.assertEqual(x.list(), [])
-- self.assertEqual(dict(x), {})
-+
-+ # Solaris 11 and forward contain system attributes (file flags) in
-+ # extended attributes present on all files, so cons them up into a
-+ # comparison dict.
-+ d = {}
-+ if sys.platform == 'sunos5' and 'SUNWattr_ro' in x:
-+ d['SUNWattr_ro'] = x['SUNWattr_ro']
-+ d['SUNWattr_rw'] = x['SUNWattr_rw']
-+
-+ self.assertEqual(x.keys(), list(d.keys()))
-+ self.assertEqual(x.list(), list(d.keys()))
-+ self.assertEqual(dict(x), d)
-
- x['user.sopal'] = b'foo'
- x['user.sop.foo'] = b'bar'
-@@ -38,6 +48,9 @@
- self.assertTrue('user.sop.foo' not in x)
-
- def test_symlink_attrs(self):
-+ # Solaris doesn't support extended attributes on symlinks
-+ if sys.platform == 'sunos5':
-+ return
- symlinkPath = self.tempfilename + '.link'
- os.symlink(self.tempfilename, symlinkPath)
- try:
--- a/components/python/xattr/xattr-PYVER.p5m Wed Sep 07 14:48:40 2016 -0700
+++ b/components/python/xattr/xattr-PYVER.p5m Wed Sep 07 14:48:41 2016 -0700
@@ -46,16 +46,14 @@
file path=usr/lib/python$(PYVER)/vendor-packages/xattr-$(COMPONENT_VERSION)-py$(PYVER).egg-info/not-zip-safe
file path=usr/lib/python$(PYVER)/vendor-packages/xattr-$(COMPONENT_VERSION)-py$(PYVER).egg-info/requires.txt
file path=usr/lib/python$(PYVER)/vendor-packages/xattr-$(COMPONENT_VERSION)-py$(PYVER).egg-info/top_level.txt
-$(PYTHON_2.7_ONLY)file path=usr/lib/python$(PYVER)/vendor-packages/xattr/64/_cffi__x422b51e3xe621c3cb.so
-$(PYTHON_3.5_ONLY)file path=usr/lib/python$(PYVER)/vendor-packages/xattr/64/_cffi__x5da52ce5xe621c3cb.so
-$(PYTHON_3.4_ONLY)file path=usr/lib/python$(PYVER)/vendor-packages/xattr/64/_cffi__xab4d019cxe621c3cb.so
+$(PYTHON_3.4_ONLY)file path=usr/lib/python$(PYVER)/vendor-packages/xattr/64/_cffi__xb665bd52x3f40c4a9.so
+$(PYTHON_2.7_ONLY)file path=usr/lib/python$(PYVER)/vendor-packages/xattr/64/_cffi__xf88a1d89x3f40c4a9.so
file path=usr/lib/python$(PYVER)/vendor-packages/xattr/__init__.py
-$(PYTHON_2.7_ONLY)file path=usr/lib/python$(PYVER)/vendor-packages/xattr/_cffi__x422b51e3xe621c3cb.so
+$(PYTHON_3.5_ONLY)file path=usr/lib/python$(PYVER)/vendor-packages/xattr/_cffi__x480bb259x3f40c4a9.so
+$(PYTHON_2.7_ONLY)file path=usr/lib/python$(PYVER)/vendor-packages/xattr/_cffi__xf88a1d89x3f40c4a9.so
file path=usr/lib/python$(PYVER)/vendor-packages/xattr/lib.py
-# The bypass for zlib is temporary until pkgdepend learns about PEP 3149,
-# new in Python 3.x; see 19510349.
-file path=usr/lib/python$(PYVER)/vendor-packages/xattr/tool.py \
- pkg.depend.bypass-generate=.*zlib.*
+file path=usr/lib/python$(PYVER)/vendor-packages/xattr/pyxattr_compat.py
+file path=usr/lib/python$(PYVER)/vendor-packages/xattr/tool.py
#
license LICENSE.txt license=MIT