]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cephadm/build: Add Debian package support for bundled dependencies
authorKefu Chai <k.chai@proxmox.com>
Tue, 14 Oct 2025 13:04:42 +0000 (21:04 +0800)
committerKefu Chai <k.chai@proxmox.com>
Wed, 12 Nov 2025 03:59:14 +0000 (11:59 +0800)
commit3ff9b0c24e33debe95a0a0c6b42da30be788871c
tree8ecdb4ebd287e8ce1d01cbe60a81e0d762d18c72
parent2c68c1496dbb7cd01bf783e31510940445040a34
cephadm/build: Add Debian package support for bundled dependencies

Extends the cephadm build script to support bundling dependencies from
Debian packages in addition to pip and RPM packages. This allows building
cephadm on Debian-based distributions using system packages.

Key changes:
- Add 'deb' to DependencyMode enum to enable Debian package mode
- Implement _setup_deb() to configure Debian dependency requirements
- Add _install_deb_deps() to orchestrate Debian package installation
- Add _gather_deb_package_dirs() to parse Debian package file listings
  and locate Python package directories (handles both site-packages and
  dist-packages directories used by Debian)
- Add _deps_from_deb() to extract Python dependencies from installed
  Debian packages using dpkg/apt-cache tools
- Fix variable reference bug in _install_deps() (deps.mode -> config.deps_mode)

The Debian implementation follows a similar pattern to the existing RPM
support, using dpkg-query and dpkg -L to locate installed packages and
their files, with special handling for Debian naming conventions
(e.g., PyYAML -> python3-yaml).

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
src/cephadm/build.py