From: @xinghe_1
Reviewed-by: @liuzhiqiang26
Signed-off-by: @liuzhiqiang26
This commit is contained in:
openeuler-ci-bot 2021-02-10 14:11:02 +08:00 committed by Gitee
commit 71ab558377

169
ceph.spec
View File

@ -97,7 +97,7 @@
%{!?python3_version: %global python3_version 3} %{!?python3_version: %global python3_version 3}
# define _python_buildid macro which will expand to the empty string when # define _python_buildid macro which will expand to the empty string when
# building with python2 # building with python2
%global _python_buildid %{?_defined_if_python2_absent:%{python3_pkgversion}} %global _python_buildid %{python3_pkgversion}
# unify libexec for all targets # unify libexec for all targets
%global _libexecdir %{_exec_prefix}/lib %global _libexecdir %{_exec_prefix}/lib
@ -110,7 +110,7 @@
################################################################################# #################################################################################
Name: ceph Name: ceph
Version: 14.2.15 Version: 14.2.15
Release: 1%{?dist} Release: 2%{?dist}
%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} %if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
Epoch: 2 Epoch: 2
%endif %endif
@ -268,9 +268,6 @@ BuildRequires: openldap-devel
BuildRequires: openssl-devel BuildRequires: openssl-devel
BuildRequires: CUnit-devel BuildRequires: CUnit-devel
#BuildRequires: redhat-lsb-core #BuildRequires: redhat-lsb-core
%if 0%{with python2}
BuildRequires: python2-Cython
%endif
BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-setuptools
%if 0%{?rhel} == 7 %if 0%{?rhel} == 7
@ -534,11 +531,7 @@ Group: System/Filesystems
Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release}
%if 0%{?fedora} || 0%{?rhel} > 7 || 0%{?suse_version} || 0%{?openEuler} %if 0%{?fedora} || 0%{?rhel} > 7 || 0%{?suse_version} || 0%{?openEuler}
Requires: python%{_python_buildid}-numpy Requires: python%{_python_buildid}-numpy
%if 0%{without python2}
Requires: python3-scipy Requires: python3-scipy
%else
Requires: python2-scipy
%endif
%endif %endif
%if 0%{?rhel} == 7 %if 0%{?rhel} == 7
Requires: numpy Requires: numpy
@ -747,21 +740,6 @@ Obsoletes: librgw2-devel < %{_epoch_prefix}%{version}-%{release}
This package contains libraries and headers needed to develop programs This package contains libraries and headers needed to develop programs
that use RADOS gateway client library. that use RADOS gateway client library.
%if 0%{with python2}
%package -n python-rgw
Summary: Python 2 libraries for the RADOS gateway
%if 0%{?suse_version}
Group: Development/Libraries/Python
%endif
Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
Requires: python-rados = %{_epoch_prefix}%{version}-%{release}
%{?python_provide:%python_provide python-rgw}
Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
%description -n python-rgw
This package contains Python 2 libraries for interacting with Cephs RADOS
gateway.
%endif
%package -n python%{python3_pkgversion}-rgw %package -n python%{python3_pkgversion}-rgw
Summary: Python 3 libraries for the RADOS gateway Summary: Python 3 libraries for the RADOS gateway
%if 0%{?suse_version} %if 0%{?suse_version}
@ -770,28 +748,10 @@ Group: Development/Libraries/Python
Requires: librgw2 = %{_epoch_prefix}%{version}-%{release} Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release} Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
%{?python_provide:%python_provide python%{python3_pkgversion}-rgw} %{?python_provide:%python_provide python%{python3_pkgversion}-rgw}
%if 0%{without python2}
Provides: python-rgw = %{_epoch_prefix}%{version}-%{release}
Obsoletes: python-rgw < %{_epoch_prefix}%{version}-%{release}
%endif
%description -n python%{python3_pkgversion}-rgw %description -n python%{python3_pkgversion}-rgw
This package contains Python 3 libraries for interacting with Cephs RADOS This package contains Python 3 libraries for interacting with Cephs RADOS
gateway. gateway.
%if 0%{with python2}
%package -n python-rados
Summary: Python 2 libraries for the RADOS object store
%if 0%{?suse_version}
Group: Development/Libraries/Python
%endif
Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
%{?python_provide:%python_provide python-rados}
Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
%description -n python-rados
This package contains Python 2 libraries for interacting with Cephs RADOS
object store.
%endif
%package -n python%{python3_pkgversion}-rados %package -n python%{python3_pkgversion}-rados
Summary: Python 3 libraries for the RADOS object store Summary: Python 3 libraries for the RADOS object store
%if 0%{?suse_version} %if 0%{?suse_version}
@ -800,10 +760,6 @@ Group: Development/Libraries/Python
Requires: python%{python3_pkgversion} Requires: python%{python3_pkgversion}
Requires: librados2 = %{_epoch_prefix}%{version}-%{release} Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
%{?python_provide:%python_provide python%{python3_pkgversion}-rados} %{?python_provide:%python_provide python%{python3_pkgversion}-rados}
%if 0%{without python2}
Provides: python-rados = %{_epoch_prefix}%{version}-%{release}
Obsoletes: python-rados < %{_epoch_prefix}%{version}-%{release}
%endif
%description -n python%{python3_pkgversion}-rados %description -n python%{python3_pkgversion}-rados
This package contains Python 3 libraries for interacting with Cephs RADOS This package contains Python 3 libraries for interacting with Cephs RADOS
object store. object store.
@ -869,21 +825,6 @@ Obsoletes: librbd1-devel < %{_epoch_prefix}%{version}-%{release}
This package contains libraries and headers needed to develop programs This package contains libraries and headers needed to develop programs
that use RADOS block device. that use RADOS block device.
%if 0%{with python2}
%package -n python-rbd
Summary: Python 2 libraries for the RADOS block device
%if 0%{?suse_version}
Group: Development/Libraries/Python
%endif
Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
Requires: python-rados = %{_epoch_prefix}%{version}-%{release}
%{?python_provide:%python_provide python-rbd}
Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
%description -n python-rbd
This package contains Python 2 libraries for interacting with Cephs RADOS
block device.
%endif
%package -n python%{python3_pkgversion}-rbd %package -n python%{python3_pkgversion}-rbd
Summary: Python 3 libraries for the RADOS block device Summary: Python 3 libraries for the RADOS block device
%if 0%{?suse_version} %if 0%{?suse_version}
@ -893,10 +834,6 @@ Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release} Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
%{?python_provide:%python_provide python%{python3_pkgversion}-rbd} %{?python_provide:%python_provide python%{python3_pkgversion}-rbd}
Provides: python3-rbd = %{_epoch_prefix}%{version}-%{release} Provides: python3-rbd = %{_epoch_prefix}%{version}-%{release}
%if 0%{without python2}
Provides: python-rbd = %{_epoch_prefix}%{version}-%{release}
Obsoletes: python-rbd < %{_epoch_prefix}%{version}-%{release}
%endif
%description -n python%{python3_pkgversion}-rbd %description -n python%{python3_pkgversion}-rbd
This package contains Python 3 libraries for interacting with Cephs RADOS This package contains Python 3 libraries for interacting with Cephs RADOS
block device. block device.
@ -931,22 +868,6 @@ Obsoletes: libcephfs2-devel < %{_epoch_prefix}%{version}-%{release}
This package contains libraries and headers needed to develop programs This package contains libraries and headers needed to develop programs
that use Cephs distributed file system. that use Cephs distributed file system.
%if 0%{with python2}
%package -n python-cephfs
Summary: Python 2 libraries for Ceph distributed file system
%if 0%{?suse_version}
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}
%{?python_provide:%python_provide python-cephfs}
Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
%description -n python-cephfs
This package contains Python 2 libraries for interacting with Cephs distributed
file system.
%endif
%package -n python%{python3_pkgversion}-cephfs %package -n python%{python3_pkgversion}-cephfs
Summary: Python 3 libraries for Ceph distributed file system Summary: Python 3 libraries for Ceph distributed file system
%if 0%{?suse_version} %if 0%{?suse_version}
@ -956,27 +877,10 @@ Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release} Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
Requires: python%{python3_pkgversion}-ceph-argparse = %{_epoch_prefix}%{version}-%{release} Requires: python%{python3_pkgversion}-ceph-argparse = %{_epoch_prefix}%{version}-%{release}
%{?python_provide:%python_provide python%{python3_pkgversion}-cephfs} %{?python_provide:%python_provide python%{python3_pkgversion}-cephfs}
%if 0%{without python2}
Provides: python-cephfs = %{_epoch_prefix}%{version}-%{release}
Obsoletes: python-cephfs < %{_epoch_prefix}%{version}-%{release}
%endif
%description -n python%{python3_pkgversion}-cephfs %description -n python%{python3_pkgversion}-cephfs
This package contains Python 3 libraries for interacting with Cephs distributed This package contains Python 3 libraries for interacting with Cephs distributed
file system. 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 %package -n python%{python3_pkgversion}-ceph-argparse
Summary: Python 3 utility libraries for Ceph CLI Summary: Python 3 utility libraries for Ceph CLI
%if 0%{?suse_version} %if 0%{?suse_version}
@ -1085,25 +989,6 @@ populated file-systems.
%endif %endif
%if 0%{with python2}
%package -n python-ceph-compat
Summary: Compatibility package for Cephs python libraries
%if 0%{?suse_version}
Group: Development/Libraries/Python
%endif
Obsoletes: python-ceph
Requires: python-rados = %{_epoch_prefix}%{version}-%{release}
Requires: python-rbd = %{_epoch_prefix}%{version}-%{release}
Requires: python-cephfs = %{_epoch_prefix}%{version}-%{release}
Requires: python-rgw = %{_epoch_prefix}%{version}-%{release}
Provides: python-ceph
%description -n python-ceph-compat
This is a compatibility package to accommodate python-ceph split into
python-rados, python-rbd, python-rgw and python-cephfs. Packages still
depending on python-ceph should be fixed to depend on python-rados,
python-rbd, python-rgw or python-cephfs instead.
%endif
%package grafana-dashboards %package grafana-dashboards
Summary: The set of Grafana dashboards for monitoring purposes Summary: The set of Grafana dashboards for monitoring purposes
BuildArch: noarch BuildArch: noarch
@ -1201,12 +1086,8 @@ ${CMAKE} .. \
-DWITH_MANPAGE=ON \ -DWITH_MANPAGE=ON \
-DWITH_PYTHON3=%{python3_version} \ -DWITH_PYTHON3=%{python3_version} \
-DWITH_MGR_DASHBOARD_FRONTEND=OFF \ -DWITH_MGR_DASHBOARD_FRONTEND=OFF \
%if %{with python2}
-DWITH_PYTHON2=ON \
%else
-DWITH_PYTHON2=OFF \ -DWITH_PYTHON2=OFF \
-DMGR_PYTHON_VERSION=3 \ -DMGR_PYTHON_VERSION=3 \
%endif
%if 0%{without ceph_test_package} %if 0%{without ceph_test_package}
-DWITH_TESTS=OFF \ -DWITH_TESTS=OFF \
%endif %endif
@ -1375,15 +1256,9 @@ rm -rf %{buildroot}
%{_fillupdir}/sysconfig.* %{_fillupdir}/sysconfig.*
%endif %endif
%{_unitdir}/ceph.target %{_unitdir}/ceph.target
%if 0%{with python2}
%dir %{python_sitelib}/ceph_volume
%{python_sitelib}/ceph_volume/*
%{python_sitelib}/ceph_volume-*
%else
%dir %{python3_sitelib}/ceph_volume %dir %{python3_sitelib}/ceph_volume
%{python3_sitelib}/ceph_volume/* %{python3_sitelib}/ceph_volume/*
%{python3_sitelib}/ceph_volume-* %{python3_sitelib}/ceph_volume-*
%endif
%{_mandir}/man8/ceph-deploy.8* %{_mandir}/man8/ceph-deploy.8*
%{_mandir}/man8/ceph-create-keys.8* %{_mandir}/man8/ceph-create-keys.8*
%{_mandir}/man8/ceph-run.8* %{_mandir}/man8/ceph-run.8*
@ -2017,12 +1892,6 @@ fi
%{_includedir}/rados/page.h %{_includedir}/rados/page.h
%{_includedir}/rados/rados_types.hpp %{_includedir}/rados/rados_types.hpp
%if 0%{with python2}
%files -n python-rados
%{python_sitearch}/rados.so
%{python_sitearch}/rados-*.egg-info
%endif
%files -n python%{python3_pkgversion}-rados %files -n python%{python3_pkgversion}-rados
%{python3_sitearch}/rados.cpython*.so %{python3_sitearch}/rados.cpython*.so
%{python3_sitearch}/rados-*.egg-info %{python3_sitearch}/rados-*.egg-info
@ -2086,22 +1955,10 @@ fi
%{_libdir}/librgw_rados_tp.so %{_libdir}/librgw_rados_tp.so
%endif %endif
%if 0%{with python2}
%files -n python-rgw
%{python_sitearch}/rgw.so
%{python_sitearch}/rgw-*.egg-info
%endif
%files -n python%{python3_pkgversion}-rgw %files -n python%{python3_pkgversion}-rgw
%{python3_sitearch}/rgw.cpython*.so %{python3_sitearch}/rgw.cpython*.so
%{python3_sitearch}/rgw-*.egg-info %{python3_sitearch}/rgw-*.egg-info
%if 0%{with python2}
%files -n python-rbd
%{python_sitearch}/rbd.so
%{python_sitearch}/rbd-*.egg-info
%endif
%files -n python%{python3_pkgversion}-rbd %files -n python%{python3_pkgversion}-rbd
%{python3_sitearch}/rbd.cpython*.so %{python3_sitearch}/rbd.cpython*.so
%{python3_sitearch}/rbd-*.egg-info %{python3_sitearch}/rbd-*.egg-info
@ -2120,25 +1977,12 @@ fi
%{_includedir}/cephfs/ceph_ll_client.h %{_includedir}/cephfs/ceph_ll_client.h
%{_libdir}/libcephfs.so %{_libdir}/libcephfs.so
%if 0%{with python2}
%files -n python-cephfs
%{python_sitearch}/cephfs.so
%{python_sitearch}/cephfs-*.egg-info
%{python_sitelib}/ceph_volume_client.py*
%endif
%files -n python%{python3_pkgversion}-cephfs %files -n python%{python3_pkgversion}-cephfs
%{python3_sitearch}/cephfs.cpython*.so %{python3_sitearch}/cephfs.cpython*.so
%{python3_sitearch}/cephfs-*.egg-info %{python3_sitearch}/cephfs-*.egg-info
%{python3_sitelib}/ceph_volume_client.py %{python3_sitelib}/ceph_volume_client.py
%{python3_sitelib}/__pycache__/ceph_volume_client.cpython*.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 %files -n python%{python3_pkgversion}-ceph-argparse
%{python3_sitelib}/ceph_argparse.py %{python3_sitelib}/ceph_argparse.py
%{python3_sitelib}/__pycache__/ceph_argparse.cpython*.py* %{python3_sitelib}/__pycache__/ceph_argparse.cpython*.py*
@ -2286,12 +2130,6 @@ fi
exit 0 exit 0
%endif %endif
%if 0%{with python2}
%files -n python-ceph-compat
# We need an empty %%files list for python-ceph-compat, to tell rpmbuild to
# actually build this meta package.
%endif
%files grafana-dashboards %files grafana-dashboards
%if 0%{?suse_version} %if 0%{?suse_version}
%attr(0755,root,root) %dir %{_sysconfdir}/grafana %attr(0755,root,root) %dir %{_sysconfdir}/grafana
@ -2313,6 +2151,9 @@ exit 0
%changelog %changelog
* Wed Feb 10 2021 yanglongkang <yanglongkang@huawei.com> - 1:14.2.15-2
- fix build
* Fri Jan 22 2021 yanglongkang <yanglongkang@huawei.com> - 1:14.2.15-1 * Fri Jan 22 2021 yanglongkang <yanglongkang@huawei.com> - 1:14.2.15-1
- update to 14.2.15 - update to 14.2.15