]> git.apps.os.sepia.ceph.com Git - ceph-ci.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>
Tue, 14 Oct 2025 14:18:58 +0000 (22:18 +0800)
commitf2eb86ea0c4a96099fecc3951f5d880a2bc2271d
tree57a1fd15bb0185865dce5df7de733ba128eb5192
parentf6af498cfbaefdb4ef64004457769eedb967719a
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