diff options
author | Patrick McLean <chutzpah@gentoo.org> | 2017-03-01 16:37:34 -0800 |
---|---|---|
committer | Patrick McLean <chutzpah@gentoo.org> | 2017-03-01 16:38:06 -0800 |
commit | ddd6de576d3d0f0e992974e3f6064c48f2c31039 (patch) | |
tree | a3d1215208d7b9f4c6bd0dc712fac925f71dd634 /sys-cluster/ceph/files | |
parent | x11-base/xorg-server: Drop kdrive-evdev option. (diff) | |
download | gentoo-ddd6de576d3d0f0e992974e3f6064c48f2c31039.tar.gz gentoo-ddd6de576d3d0f0e992974e3f6064c48f2c31039.tar.bz2 gentoo-ddd6de576d3d0f0e992974e3f6064c48f2c31039.zip |
sys-cluster/ceph: Revision bump, pull in some python3 patches from upstream
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'sys-cluster/ceph/files')
2 files changed, 67 insertions, 0 deletions
diff --git a/sys-cluster/ceph/files/ceph-10.2.5-Make-CephFS-bindings-and-tests-compatible-with-Python-3.patch b/sys-cluster/ceph/files/ceph-10.2.5-Make-CephFS-bindings-and-tests-compatible-with-Python-3.patch new file mode 100644 index 000000000000..08a7920035aa --- /dev/null +++ b/sys-cluster/ceph/files/ceph-10.2.5-Make-CephFS-bindings-and-tests-compatible-with-Python-3.patch @@ -0,0 +1,22 @@ +commit e1dc386f93eb4613dc7e89cc76a031aeee5022ba +Author: Oleh Prypin <oleh@pryp.in> +Date: Thu Jul 21 18:33:25 2016 +0300 + + pybind: Make CephFS bindings and tests compatible with Python 3 + + Signed-off-by: Oleh Prypin <oleh@pryp.in> + +diff --git a/src/pybind/cephfs/cephfs.pyx b/src/pybind/cephfs/cephfs.pyx +index ac17ada1a1..bd14de3b16 100644 +--- a/src/pybind/cephfs/cephfs.pyx ++++ b/src/pybind/cephfs/cephfs.pyx +@@ -613,8 +613,7 @@ cdef class LibCephFS(object): + + if not isinstance(mode, int): + raise TypeError('mode must be an int') +- if isinstance(flags, basestring): +- flags = cstr(flags, 'flags') ++ if isinstance(flags, str_type): + cephfs_flags = 0 + if flags == '': + cephfs_flags = os.O_RDONLY diff --git a/sys-cluster/ceph/files/ceph-10.2.5-Make-RBD-Python-bindings-compatible-with-Python-3.patch b/sys-cluster/ceph/files/ceph-10.2.5-Make-RBD-Python-bindings-compatible-with-Python-3.patch new file mode 100644 index 000000000000..a81aae6e7ce8 --- /dev/null +++ b/sys-cluster/ceph/files/ceph-10.2.5-Make-RBD-Python-bindings-compatible-with-Python-3.patch @@ -0,0 +1,45 @@ +commit 773e01294da518c6ec18f0a8b72e05def85fef6c +Author: Oleh Prypin <oleh@pryp.in> +Date: Fri Jun 24 15:48:57 2016 +0300 + + pybind: Make RBD Python bindings compatible with Python 3 + + Signed-off-by: Oleh Prypin <oleh@pryp.in> + +diff --git a/src/pybind/rbd/rbd.pyx b/src/pybind/rbd/rbd.pyx +index 52727bf39e..8f25dfbee0 100644 +--- a/src/pybind/rbd/rbd.pyx ++++ b/src/pybind/rbd/rbd.pyx +@@ -745,7 +745,7 @@ class RBD(object): + break + elif ret != -errno.ERANGE: + raise make_ex(ret, 'error listing images') +- return [decode_cstr(name) for name in c_names[:ret].split('\0') ++ return [decode_cstr(name) for name in c_names[:ret].split(b'\0') + if name] + finally: + free(c_names) +@@ -1885,8 +1885,8 @@ written." % (self.name, ret, length)) + raise make_ex(ret, 'error listing images') + if ret == 0: + return [] +- pools = map(decode_cstr, c_pools[:pools_size - 1].split('\0')) +- images = map(decode_cstr, c_images[:images_size - 1].split('\0')) ++ pools = map(decode_cstr, c_pools[:pools_size - 1].split(b'\0')) ++ images = map(decode_cstr, c_images[:images_size - 1].split(b'\0')) + return list(zip(pools, images)) + finally: + free(c_pools) +@@ -1933,9 +1933,9 @@ written." % (self.name, ret, length)) + raise make_ex(ret, 'error listing images') + if ret == 0: + return [] +- clients = map(decode_cstr, c_clients[:clients_size - 1].split('\0')) +- cookies = map(decode_cstr, c_cookies[:cookies_size - 1].split('\0')) +- addrs = map(decode_cstr, c_addrs[:addrs_size - 1].split('\0')) ++ clients = map(decode_cstr, c_clients[:clients_size - 1].split(b'\0')) ++ cookies = map(decode_cstr, c_cookies[:cookies_size - 1].split(b'\0')) ++ addrs = map(decode_cstr, c_addrs[:addrs_size - 1].split(b'\0')) + return { + 'tag' : decode_cstr(c_tag), + 'exclusive' : exclusive == 1, |