From 589626464d475b4ad96905fbddf11a5782a040f0 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 19 Feb 2020 11:51:42 +0800 Subject: [PATCH] rpm,deb: package always-enabled plugins in a separated package ceph-mgr depends on it in the sense that these plugins are a hard dependency of ceph-mgr. like cmake depends on cmake-data, even if the later cannot function on its own without the former. the reason why we need a separated package is that mgr modules are written in python, and should be arch independent. this change helps the downstream to understand this and help to minimize the divergence between upstream and downstream, because distros like debian and its derivatives encourage splitting architecture independent data into its own package. see https://www.debian.org/doc/manuals/developers-reference/best-pkging-practices.html#architecture-independent-data also, the python related runtime dependencies are also moved into ceph-mgr-modules-core. if a python dependency is shared by another ceph-mgr-* package and ceph-mgr-modules-core. it's only added to ceph-mgr-modules-core for simplicity and consistency. as the name of dependency might vary on different distros, so it's tedious and error-prone to repeat these conditons and checks. Signed-off-by: Kefu Chai --- ceph.spec.in | 106 +++++++++++++++------------ debian/ceph-mgr-modules-core.install | 22 ++++++ debian/control | 16 +++- 3 files changed, 98 insertions(+), 46 deletions(-) create mode 100644 debian/ceph-mgr-modules-core.install diff --git a/ceph.spec.in b/ceph.spec.in index 9c9e001958a..0c88f261846 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -487,37 +487,16 @@ Summary: Ceph Manager Daemon Group: System/Filesystems %endif Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} +Requires: ceph-mgr-modules-core = %{_epoch_prefix}%{version}-%{release} %if 0%{?rhel} == 7 -Requires: python%{python3_version_nodots}-bcrypt -Requires: python%{python3_version_nodots}-pyOpenSSL -Requires: python%{python3_version_nodots}-requests Requires: python%{python3_version_nodots}-six %else -Requires: python%{python3_pkgversion}-bcrypt -Requires: python%{python3_pkgversion}-pecan -Requires: python%{python3_pkgversion}-pyOpenSSL -Requires: python%{python3_pkgversion}-requests Requires: python%{python3_pkgversion}-six %endif -%if 0%{?fedora} || 0%{?rhel} >= 8 -Requires: python%{python3_pkgversion}-cherrypy -Requires: python%{python3_pkgversion}-werkzeug -%if 0%{?rhel} == 7 -Requires: python%{python3_version_nodots}-PyYAML -%else -Requires: python%{python3_pkgversion}-pyyaml -%endif -%endif -%if 0%{?suse_version} -Requires: python%{python3_pkgversion}-CherryPy -Requires: python%{python3_pkgversion}-Werkzeug -Requires: python%{python3_pkgversion}-PyYAML -%endif %if 0%{?weak_deps} Recommends: ceph-mgr-dashboard = %{_epoch_prefix}%{version}-%{release} Recommends: ceph-mgr-diskprediction-local = %{_epoch_prefix}%{version}-%{release} Recommends: ceph-mgr-diskprediction-cloud = %{_epoch_prefix}%{version}-%{release} -Recommends: ceph-mgr-rook = %{_epoch_prefix}%{version}-%{release} Recommends: ceph-mgr-k8sevents = %{_epoch_prefix}%{version}-%{release} Recommends: ceph-mgr-cephadm = %{_epoch_prefix}%{version}-%{release} Recommends: python%{python3_pkgversion}-influxdb @@ -594,6 +573,40 @@ Requires: python2-protobuf ceph-mgr-diskprediction-cloud is a ceph-mgr plugin that tries to predict disk failures using services in the Google cloud. +%package mgr-modules-core +Summary: Ceph Manager modules which are always enabled +BuildArch: noarch +%if 0%{?suse_version} +Group: System/Filesystems +%endif +%if 0%{?rhel} == 7 +Requires: python%{python3_version_nodots}-bcrypt +Requires: python%{python3_version_nodots}-pyOpenSSL +Requires: python%{python3_version_nodots}-requests +Requires: python%{python3_version_nodots}-PyYAML +%else +Requires: python%{python3_pkgversion}-bcrypt +Requires: python%{python3_pkgversion}-pecan +Requires: python%{python3_pkgversion}-pyOpenSSL +Requires: python%{python3_pkgversion}-requests +%endif +%if 0%{?fedora} || 0%{?rhel} >= 8 +Requires: python%{python3_pkgversion}-cherrypy +Requires: python%{python3_pkgversion}-pyyaml +Requires: python%{python3_pkgversion}-werkzeug +%endif +%if 0%{?suse_version} +Requires: python%{python3_pkgversion}-CherryPy +Requires: python%{python3_pkgversion}-PyYAML +Requires: python%{python3_pkgversion}-Werkzeug +%endif +%if 0%{?weak_deps} +Recommends: ceph-mgr-rook = %{_epoch_prefix}%{version}-%{release} +%endif +%description mgr-modules-core +ceph-mgr-modules-core provides a set of modules which are always +enabled by ceph-mgr. + %package mgr-rook BuildArch: noarch Summary: Ceph Manager plugin for Rook-based orchestration @@ -1586,31 +1599,8 @@ fi %files mgr %{_bindir}/ceph-mgr %dir %{_datadir}/ceph/mgr -%{_datadir}/ceph/mgr/alerts -%{_datadir}/ceph/mgr/balancer -%{_datadir}/ceph/mgr/crash -%{_datadir}/ceph/mgr/devicehealth -%{_datadir}/ceph/mgr/influx -%{_datadir}/ceph/mgr/insights -%{_datadir}/ceph/mgr/iostat -%{_datadir}/ceph/mgr/localpool %{_datadir}/ceph/mgr/mgr_module.* %{_datadir}/ceph/mgr/mgr_util.* -%{_datadir}/ceph/mgr/orchestrator -%{_datadir}/ceph/mgr/osd_perf_query -%{_datadir}/ceph/mgr/osd_support -%{_datadir}/ceph/mgr/pg_autoscaler -%{_datadir}/ceph/mgr/progress -%{_datadir}/ceph/mgr/prometheus -%{_datadir}/ceph/mgr/rbd_support -%{_datadir}/ceph/mgr/restful -%{_datadir}/ceph/mgr/selftest -%{_datadir}/ceph/mgr/status -%{_datadir}/ceph/mgr/telegraf -%{_datadir}/ceph/mgr/telemetry -%{_datadir}/ceph/mgr/test_orchestrator -%{_datadir}/ceph/mgr/volumes -%{_datadir}/ceph/mgr/zabbix %if 0%{?rhel} == 7 %{_datadir}/ceph/mgr/__pycache__ %endif @@ -1698,6 +1688,32 @@ if [ $1 -eq 1 ] ; then /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : fi +%files mgr-modules-core +%dir %{_datadir}/ceph/mgr +%{_datadir}/ceph/mgr/alerts +%{_datadir}/ceph/mgr/balancer +%{_datadir}/ceph/mgr/crash +%{_datadir}/ceph/mgr/devicehealth +%{_datadir}/ceph/mgr/influx +%{_datadir}/ceph/mgr/insights +%{_datadir}/ceph/mgr/iostat +%{_datadir}/ceph/mgr/localpool +%{_datadir}/ceph/mgr/orchestrator +%{_datadir}/ceph/mgr/osd_perf_query +%{_datadir}/ceph/mgr/osd_support +%{_datadir}/ceph/mgr/pg_autoscaler +%{_datadir}/ceph/mgr/progress +%{_datadir}/ceph/mgr/prometheus +%{_datadir}/ceph/mgr/rbd_support +%{_datadir}/ceph/mgr/restful +%{_datadir}/ceph/mgr/selftest +%{_datadir}/ceph/mgr/status +%{_datadir}/ceph/mgr/telegraf +%{_datadir}/ceph/mgr/telemetry +%{_datadir}/ceph/mgr/test_orchestrator +%{_datadir}/ceph/mgr/volumes +%{_datadir}/ceph/mgr/zabbix + %files mgr-rook %{_datadir}/ceph/mgr/rook diff --git a/debian/ceph-mgr-modules-core.install b/debian/ceph-mgr-modules-core.install new file mode 100644 index 00000000000..903a4d8b014 --- /dev/null +++ b/debian/ceph-mgr-modules-core.install @@ -0,0 +1,22 @@ +usr/share/ceph/mgr/alerts +usr/share/ceph/mgr/balancer +usr/share/ceph/mgr/crash +usr/share/ceph/mgr/devicehealth +usr/share/ceph/mgr/influx +usr/share/ceph/mgr/insights +usr/share/ceph/mgr/iostat +usr/share/ceph/mgr/localpool +usr/share/ceph/mgr/orchestrator +usr/share/ceph/mgr/osd_perf_query +usr/share/ceph/mgr/pg_autoscaler +usr/share/ceph/mgr/progress +usr/share/ceph/mgr/prometheus +usr/share/ceph/mgr/rbd_support +usr/share/ceph/mgr/restful +usr/share/ceph/mgr/selftest +usr/share/ceph/mgr/status +usr/share/ceph/mgr/telegraf +usr/share/ceph/mgr/telemetry +usr/share/ceph/mgr/test_orchestrator +usr/share/ceph/mgr/volumes +usr/share/ceph/mgr/zabbix diff --git a/debian/control b/debian/control index 4d336b1f4cd..c4cdb806f7a 100644 --- a/debian/control +++ b/debian/control @@ -212,6 +212,7 @@ Description: debugging symbols for ceph-mds Package: ceph-mgr Architecture: linux-any Depends: ceph-base (= ${binary:Version}), + ceph-mgr-modules-core (= ${binary:Version}), python3-bcrypt, python3-cherrypy3, python3-jwt, @@ -225,7 +226,6 @@ Depends: ceph-base (= ${binary:Version}), Recommends: ceph-mgr-dashboard, ceph-mgr-diskprediction-local, ceph-mgr-diskprediction-cloud, - ceph-mgr-rook, ceph-mgr-k8sevents, ceph-mgr-cephadm Suggests: python3-influxdb @@ -294,6 +294,20 @@ Description: diskprediction-cloud plugin for ceph-mgr This package contains the diskprediction_cloud plugin for the ceph-mgr daemon, which helps predict disk failures. +Package: ceph-mgr-modules-core +Architecture: all +Depends: ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends}, +Recommends: ceph-mgr-rook +Description: ceph manager modules which are always enabled + 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 a set of core ceph-mgr modules which are always + enabled. + Package: ceph-mgr-rook Architecture: all Depends: ceph-mgr (= ${binary:Version}), -- 2.39.5