Skip to content

Commit

Permalink
Merge pull request ceph#46416 from tchaikov/wip-debian-dh-python3
Browse files Browse the repository at this point in the history
debian: python3 related cleanups

Reviewed-by: Redouane Kachach <[email protected]>
Reviewed-by: Ernesto Puerta <[email protected]>
  • Loading branch information
tchaikov authored Jun 5, 2022
2 parents 2a2340d + 42f5465 commit 6726fe7
Show file tree
Hide file tree
Showing 10 changed files with 63 additions and 43 deletions.
4 changes: 4 additions & 0 deletions debian/ceph-mgr-cephadm.requires
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CherryPy
asyncssh
cryptography
Jinja2
11 changes: 11 additions & 0 deletions debian/ceph-mgr-dashboard.requires
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
bcrypt
CherryPy
more-itertools
PyJWT
pyopenssl
requests
Routes
prettytable
pytest
pyyaml
ceph-common
3 changes: 3 additions & 0 deletions debian/ceph-mgr-diskprediction-local.requires
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
numpy
scipy
scikit-learn
2 changes: 2 additions & 0 deletions debian/ceph-mgr-k8sevents.requires
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pyyaml
kubernetes
6 changes: 6 additions & 0 deletions debian/ceph-mgr-modules-core.requires
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
natsort
CherryPy
pecan
werkzeug
requests
python-dateutil
2 changes: 2 additions & 0 deletions debian/ceph-mgr-rook.requires
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
kubernetes
jsonpatch
5 changes: 5 additions & 0 deletions debian/ceph-mgr.requires
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pyOpenSSL
cephfs
ceph-argparse
pyyaml
distutils
47 changes: 11 additions & 36 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ Depends: binutils,
parted,
psmisc,
${misc:Depends},
${python:Depends},
${shlibs:Depends},
${python3:Depends}
Recommends: btrfs-tools,
ceph-mds (= ${binary:Version}),
librados2 (= ${binary:Version}),
Expand Down Expand Up @@ -183,7 +183,7 @@ Package: cephadm
Architecture: linux-any
Recommends: podman (>= 2.0.2) | docker.io
Depends: lvm2,
${python:Depends},
${python3:Depends},
Description: cephadm utility to bootstrap ceph daemons with systemd and containers
Ceph is a massively scalable, open-source, distributed
storage system that runs on commodity hardware and delivers object,
Expand Down Expand Up @@ -226,17 +226,8 @@ Package: ceph-mgr
Architecture: linux-any
Depends: ceph-base (= ${binary:Version}),
ceph-mgr-modules-core (= ${binary:Version}),
python3-bcrypt,
python3-cherrypy3,
python3-natsort,
python3-distutils,
python3-jwt,
python3-openssl,
python3-pecan,
python3-requests,
python3-werkzeug,
${misc:Depends},
${python:Depends},
${python3:Depends},
${shlibs:Depends},
Recommends: ceph-mgr-dashboard,
ceph-mgr-diskprediction-local,
Expand All @@ -256,14 +247,7 @@ Description: manager for the ceph distributed storage system
Package: ceph-mgr-dashboard
Architecture: all
Depends: ceph-mgr (= ${binary:Version}),
python3-cherrypy3,
python3-jwt,
python3-bcrypt,
python3-werkzeug,
python3-routes,
${misc:Depends},
${python:Depends},
${shlibs:Depends},
${python3:Depends}
Description: dashboard module for ceph-mgr
Ceph is a massively scalable, open-source, distributed
storage system that runs on commodity hardware and delivers object,
Expand All @@ -279,12 +263,7 @@ Description: dashboard module for ceph-mgr
Package: ceph-mgr-diskprediction-local
Architecture: all
Depends: ceph-mgr (= ${binary:Version}),
python3-numpy,
python3-scipy,
python3-sklearn,
${misc:Depends},
${python:Depends},
${shlibs:Depends},
${python3:Depends}
Description: diskprediction-local module for ceph-mgr
Ceph is a massively scalable, open-source, distributed
storage system that runs on commodity hardware and delivers object,
Expand All @@ -296,10 +275,7 @@ Description: diskprediction-local module for ceph-mgr
Package: ceph-mgr-modules-core
Architecture: all
Depends: ${misc:Depends},
${python:Depends},
${shlibs:Depends},
python3-dateutil,
python3-openssl,
${python3:Depends},
Replaces: ceph-mgr (<< 15.1.0)
Breaks: ceph-mgr (<< 15.1.0)
Description: ceph manager modules which are always enabled
Expand All @@ -313,9 +289,8 @@ Description: ceph manager modules which are always enabled
Package: ceph-mgr-rook
Architecture: all
Depends: ceph-mgr (= ${binary:Version}),
python3-jsonpatch
${misc:Depends},
${python:Depends},
${python3:Depends},
${shlibs:Depends},
Description: rook module for ceph-mgr
Ceph is a massively scalable, open-source, distributed
Expand All @@ -331,7 +306,7 @@ Architecture: all
Depends: ceph-mgr (= ${binary:Version}),
python3-kubernetes,
${misc:Depends},
${python:Depends},
${python3:Depends},
Description: kubernetes events module for ceph-mgr
Ceph is a massively scalable, open-source, distributed
storage system that runs on commodity hardware and delivers object,
Expand All @@ -346,7 +321,7 @@ Architecture: all
Depends: ceph-mgr (= ${binary:Version}),
cephadm,
${misc:Depends},
${python:Depends},
${python3:Depends},
openssh-client,
python3-jinja2,
python3-cherrypy3
Expand Down Expand Up @@ -407,7 +382,7 @@ Architecture: linux-any
Depends: ceph-base (= ${binary:Version}),
sudo,
${misc:Depends},
${python:Depends},
${python3:Depends},
${shlibs:Depends},
Replaces: ceph (<< 10),
ceph-test (<< 12.2.2-14),
Expand Down Expand Up @@ -640,7 +615,7 @@ Depends: librbd1 (= ${binary:Version}),
python3-rbd (= ${binary:Version}),
python3-rgw (= ${binary:Version}),
${misc:Depends},
${python:Depends},
${python3:Depends},
${shlibs:Depends},
Conflicts: ceph-client-tools,
Replaces: ceph (<< 10),
Expand Down
3 changes: 3 additions & 0 deletions debian/py3dist-overrides
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
cephfs python3-cephfs; PEP386
ceph_argparse python3-ceph-argparse
ceph_common python3-ceph-common
distutils python3-distutils
23 changes: 16 additions & 7 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ ifneq (,$(filter with_system_libs,$(DEB_BUILD_OPTIONS)))
extraopts += -DWITH_SYSTEM_PMDK=ON
endif

# for python3-${pkg} packages
py3_bindings := rados cephfs rbd rgw ceph-argparse ceph-common
# for packages with its own py3dist-overrides files, those file should be named
# like ${pkg}.requires
py3_overrides_packages := $(basename $(notdir $(wildcard debian/*.requires)))
# for python3 applications, the package name is used as it is
py3_packages := cephfs-shell cephfs-top cephadm

%:
dh $@ --buildsystem=cmake --with javahelper,python3,systemd --parallel

Expand Down Expand Up @@ -135,14 +143,15 @@ override_dh_shlibdeps:
dh_shlibdeps -a --exclude=erasure-code --exclude=rados-classes --exclude=compressor --exclude=ceph_crypto

override_dh_python3:
for binding in rados cephfs rbd rgw; do \
dh_python3 -p python3-$$binding; \
@for binding in $(py3_bindings); do \
dh_python3 -p python3-$$binding; \
done
@for pkg in $(py3_overrides_packages); do \
dh_python3 -p $$pkg --requires=debian/$$pkg.requires; \
done
@for pkg in $(py3_packages); do \
dh_python3 -p $$pkg; \
done
dh_python3 -p python3-ceph-argparse
dh_python3 -p python3-ceph-common
dh_python3 -p cephfs-shell
dh_python3 -p cephfs-top
dh_python3 -p cephadm

# do not run tests
override_dh_auto_test:
Expand Down

0 comments on commit 6726fe7

Please sign in to comment.