From 03c7bee4ee6ba4de9f3368e47c50f6d7a2f0605b Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 14 Jul 2018 11:36:04 +0800 Subject: [PATCH] deb,rpm: python-cephfs should depend on python-ceph-argparse python-ceph-argparse is required by ceph_volume_client.py. hence we do need list it as a dependency of python-cephfs. Fixes: http://tracker.ceph.com/issues/24919 Signed-off-by: Kefu Chai --- ceph.spec.in | 24 ++++++++++++++++++++++-- debian/ceph-common.install | 2 -- debian/control | 18 ++++++++++++++++++ debian/python-ceph-argparse.install | 2 ++ 4 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 debian/python-ceph-argparse.install diff --git a/ceph.spec.in b/ceph.spec.in index 1b66c5a453a..968b3d752d2 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -348,6 +348,7 @@ Requires: python%{_python_buildid}-rados = %{_epoch_prefix}%{version}-%{release} Requires: python%{_python_buildid}-rbd = %{_epoch_prefix}%{version}-%{release} Requires: python%{_python_buildid}-cephfs = %{_epoch_prefix}%{version}-%{release} Requires: python%{_python_buildid}-rgw = %{_epoch_prefix}%{version}-%{release} +Requires: python%{_python_buildid}-ceph-argparse = %{_epoch_prefix}%{version}-%{release} %if 0%{?fedora} || 0%{?rhel} Requires: python%{_python_buildid}-prettytable Requires: python%{_python_buildid}-requests @@ -731,6 +732,7 @@ Group: Development/Libraries/Python %endif Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} Requires: python-rados = %{_epoch_prefix}%{version}-%{release} +Requires: python-ceph-argparse = %{_epoch_prefix}%{version}-%{release} Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release} %description -n python-cephfs This package contains Python 2 libraries for interacting with Cephs distributed @@ -744,10 +746,24 @@ Group: Development/Libraries/Python %endif Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release} +Requires: python%{python3_pkgversion}-ceph-argparse = %{_epoch_prefix}%{version}-%{release} %description -n python%{python3_pkgversion}-cephfs This package contains Python 3 libraries for interacting with Cephs distributed file system. +%if 0%{with python2} +%package -n python-ceph-argparse +Summary: Python 2 utility libraries for Ceph CLI +%if 0%{?suse_version} +Group: Development/Libraries/Python +%endif +%description -n python-ceph-argparse +This package contains types and routines for Python 2 used by the Ceph CLI as +well as the RESTful interface. These have to do with querying the daemons for +command-description information, validating user command input against those +descriptions, and submitting the command to the appropriate daemon. +%endif + %package -n python%{python3_pkgversion}-ceph-argparse Summary: Python 3 utility libraries for Ceph CLI %if 0%{?suse_version} @@ -1200,8 +1216,6 @@ fi %config %{_sysconfdir}/bash_completion.d/radosgw-admin %config(noreplace) %{_sysconfdir}/ceph/rbdmap %{_unitdir}/rbdmap.service -%{python_sitelib}/ceph_argparse.py* -%{python_sitelib}/ceph_daemon.py* %dir %{_udevrulesdir} %{_udevrulesdir}/50-rbd.rules %attr(3770,ceph,ceph) %dir %{_localstatedir}/log/ceph/ @@ -1726,6 +1740,12 @@ fi %{python3_sitelib}/ceph_volume_client.py %{python3_sitelib}/__pycache__/ceph_volume_client.cpython*.py* +%if 0%{with python2} +%files -n python-ceph-argparse +%{python_sitelib}/ceph_argparse.py* +%{python_sitelib}/ceph_daemon.py* +%endif + %files -n python%{python3_pkgversion}-ceph-argparse %{python3_sitelib}/ceph_argparse.py %{python3_sitelib}/__pycache__/ceph_argparse.cpython*.py* diff --git a/debian/ceph-common.install b/debian/ceph-common.install index dd81c9962c4..b84a3164d3e 100755 --- a/debian/ceph-common.install +++ b/debian/ceph-common.install @@ -42,5 +42,3 @@ usr/share/ceph/id_rsa_drop.ceph.com usr/share/ceph/id_rsa_drop.ceph.com.pub etc/ceph/rbdmap lib/udev/rules.d/50-rbd.rules -usr/lib/python*/dist-packages/ceph_argparse.py* -usr/lib/python*/dist-packages/ceph_daemon.py* diff --git a/debian/control b/debian/control index 8cde074afa1..b2cfc11bcb7 100644 --- a/debian/control +++ b/debian/control @@ -394,6 +394,7 @@ Package: ceph-common Architecture: linux-any Depends: librbd1 (= ${binary:Version}), python-cephfs (= ${binary:Version}), + python-ceph-argparse (= ${binary:Version}), python-prettytable, python-rados (= ${binary:Version}), python-rbd (= ${binary:Version}), @@ -960,6 +961,7 @@ Architecture: linux-any Section: python Depends: libcephfs2 (= ${binary:Version}), python-rados (= ${binary:Version}), + python-ceph-argparse (= ${binary:Version}), ${misc:Depends}, ${python:Depends}, ${shlibs:Depends}, @@ -995,6 +997,7 @@ Architecture: linux-any Section: python Depends: libcephfs2 (= ${binary:Version}), python3-rados (= ${binary:Version}), + python3-ceph-argparse (= ${binary:Version}), ${misc:Depends}, ${python3:Depends}, ${shlibs:Depends}, @@ -1023,6 +1026,21 @@ Description: Python 3 libraries for the Ceph libcephfs library . This package contains the debugging symbols for python3-cephfs. +Package: python-ceph-argparse +Architecture: linux-any +Section: python +Depends: ${misc:Depends}, + ${python:Depends}, +Replaces: ceph-common (<< 14.0.0) +Breaks: ceph-common (<< 14.0.0) +Description: Python 2 utility libraries for Ceph CLI + Ceph is a massively scalable, open-source, distributed + storage system that runs on commodity hardware and delivers object, + block and file system storage. + . + This package contains types and routines for Python 2 used by the + Ceph CLI as well as the RESTful interface. + Package: python3-ceph-argparse Architecture: linux-any Section: python diff --git a/debian/python-ceph-argparse.install b/debian/python-ceph-argparse.install new file mode 100644 index 00000000000..fca2f0bc429 --- /dev/null +++ b/debian/python-ceph-argparse.install @@ -0,0 +1,2 @@ +usr/lib/python2*/dist-packages/ceph_argparse.py +usr/lib/python2*/dist-packages/ceph_daemon.py