]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rpm,deb: package always-enabled plugins in a separated package 33422/head
authorKefu Chai <kchai@redhat.com>
Wed, 19 Feb 2020 03:51:42 +0000 (11:51 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 20 Feb 2020 14:00:37 +0000 (22:00 +0800)
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 <kchai@redhat.com>
ceph.spec.in
debian/ceph-mgr-modules-core.install [new file with mode: 0644]
debian/control

index 9c9e001958a23791914bae43290639b3e6387d18..0c88f261846cb1dff486b3df88311255f0c80f7c 100644 (file)
@@ -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 (file)
index 0000000..903a4d8
--- /dev/null
@@ -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
index 4d336b1f4cd26d0fb0c0c790759daef2ba25e77d..c4cdb806f7ac49ebebbb378bd85d87f7e433528f 100644 (file)
@@ -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}),