ceph/debian
Kefu Chai ef19547e83 debian: add .requires for specifying python3 deps
we use dh_python3 to define subvar of ${python3:Depends} as a part
of the runtime dependencies of python3 packages, like,
ceph-mgr modules named "ceph-mgr-*", python3 bindings named "python3-*".

but unlike python3 bindings of Ceph APIs, the ceph-mgr modules are
not packaged in a typical python way. in other words, they do not
ship a "dist-info" or an "egg-info" directory. instead, we just
install the python scripts into a directory which can be found by
ceph-mgr, by default it is /usr/share/ceph/mgr/dashboard/plugins.

this does not follow the convention of python packaging or
debian packaging policies related to python package. but it
still makes to put these files in this non-convention place, as
they are not supposed to be python packages consumed by the
outer world -- they are but plugins. and should always work
with the same version of ceph-mgr.

the problem is, despite that we have ${python3:Depends} in
the "Depends" field of packages like ceph-mgr-dashboard, dh_python3
is not able to figure out the dependencies by looking at the
installed files. for instance, we have following "Depends" of
ceph-mgr-dashboard:

Depends: ceph-mgr (= 17.0.0-12481-g805d2320-1focal), python3-cherrypy3, python3-jwt, python3-bcrypt, python3-werkzeug, python3-routes

and in the debian/control file we have:

Depends: ceph-mgr (= ${binary:Version}),
         python3-cherrypy3,
         python3-jwt,
         python3-bcrypt,
         python3-werkzeug,
         python3-routes,
         ${misc:Depends},
         ${python:Depends},
         ${shlibs:Depends},

apparently, none of the subvar is materialized to
a non-empty string.

to improve the packaging, in this change:

* drop all subvars from ceph-mgr-*, as they
  are all implemented in pure python.
* add debian/ceph-mgr-*.requires, it's content
  is replicated with the corresponding requirements.txt
  files.
  * add python3-distutils for distutils, as debian
    and its derivatives package non-essetial part of
    distutils into a separate package, see
    https://packages.debian.org/stable/python3-distutils
* add ${python3:Depends} so dh_python3
  can extract the deps from debian/ceph-mgr-*.pydist
* update the rule for "override_dh_python3" target,
  so dh_python3 can pick up the dependencies specified
  in .requires file.
* remove the python3 dependencies not used by
  ceph-mgr from ceph-mgr's "Depends"

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-05-31 19:42:32 +08:00
..
source
.gitignore
ceph-base.dirs
ceph-base.docs
ceph-base.install rpm, debian: move smartmontools and nvme-cli to ceph-base 2021-08-25 13:20:23 +00:00
ceph-base.lintian-overrides
ceph-base.maintscript
ceph-base.postinst
ceph-base.prerm
ceph-common.dirs
ceph-common.install doc: add crushdiff(8) man page 2021-08-24 11:09:08 +03:00
ceph-common.postinst
ceph-common.postrm
ceph-fuse.install
ceph-grafana-dashboards.install
ceph-immutable-object-cache.install
ceph-mds.dirs
ceph-mds.install
ceph-mds.postinst
ceph-mds.prerm
ceph-mgr-cephadm.install
ceph-mgr-cephadm.postinst
ceph-mgr-cephadm.prerm
ceph-mgr-cephadm.requires debian: add .requires for specifying python3 deps 2022-05-31 19:42:32 +08:00
ceph-mgr-dashboard.install
ceph-mgr-dashboard.postinst
ceph-mgr-dashboard.prerm
ceph-mgr-dashboard.requires debian: add .requires for specifying python3 deps 2022-05-31 19:42:32 +08:00
ceph-mgr-diskprediction-cloud.prerm
ceph-mgr-diskprediction-local.install
ceph-mgr-diskprediction-local.postinst
ceph-mgr-diskprediction-local.prerm
ceph-mgr-diskprediction-local.requires debian: add .requires for specifying python3 deps 2022-05-31 19:42:32 +08:00
ceph-mgr-k8sevents.requires debian: add .requires for specifying python3 deps 2022-05-31 19:42:32 +08:00
ceph-mgr-modules-core.install
ceph-mgr-modules-core.requires debian: add .requires for specifying python3 deps 2022-05-31 19:42:32 +08:00
ceph-mgr-rook.install
ceph-mgr-rook.postinst
ceph-mgr-rook.prerm
ceph-mgr-rook.requires debian: add .requires for specifying python3 deps 2022-05-31 19:42:32 +08:00
ceph-mgr.dirs
ceph-mgr.install debian: include the new object_format.py file 2022-05-26 10:56:44 -04:00
ceph-mgr.postinst
ceph-mgr.prerm
ceph-mgr.requires debian: add .requires for specifying python3 deps 2022-05-31 19:42:32 +08:00
ceph-mon.dirs
ceph-mon.install
ceph-mon.postinst
ceph-mon.prerm
ceph-osd.dirs
ceph-osd.install debian: split ceph-volume into a separated package 2021-09-14 23:19:54 +08:00
ceph-osd.postinst
ceph-osd.prerm
ceph-prometheus-alerts.install
ceph-resource-agents.install
ceph-test.install cmake: disable kvs rados cls by default 2021-08-04 10:21:10 +08:00
ceph-volume.install debian: split ceph-volume into a separated package 2021-09-14 23:19:54 +08:00
cephadm.install
cephadm.postinst
cephadm.postrm
cephfs-mirror.install
cephfs-shell.install
cephfs-top.install
changelog
compat
control debian: add .requires for specifying python3 deps 2022-05-31 19:42:32 +08:00
copyright
libcephfs2.install
libcephfs-dev.install
libcephfs-java.jlibs
libcephfs-jni.install
librados2.install
librados-dev.install
libradospp-dev.install
libradosstriper1.install
libradosstriper-dev.install
librbd1.install
librbd-dev.install
librgw2.install
librgw-dev.install
libsqlite3-mod-ceph-dev.install
libsqlite3-mod-ceph.install
libsqlite3-mod-ceph.symbols
py3dist-overrides debian: add .requires for specifying python3 deps 2022-05-31 19:42:32 +08:00
python3-ceph-argparse.install debian: install from site-packages to dist-packages 2022-04-01 13:14:23 +08:00
python3-ceph-common.install
python3-cephfs.install
python3-rados.install
python3-rbd.install
python3-rgw.install
rados-objclass-dev.install
radosgw.dirs
radosgw.install
radosgw.postinst
radosgw.prerm
rbd-fuse.install
rbd-mirror.install
rbd-nbd.install
rules debian: add .requires for specifying python3 deps 2022-05-31 19:42:32 +08:00
watch