all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Kefu Chai <k.chai@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH ceph 2/3 v2] cherry-pick changes to buiild crimson package
Date: Thu, 22 Jan 2026 18:14:52 +0800	[thread overview]
Message-ID: <20260122101452.1789104-2-k.chai@proxmox.com> (raw)
In-Reply-To: <DFUZ6FOPC7QH.ZJF854WPORYV@proxmox.com>

Backport changes to enable building both classic and crimson OSD packages
from the same source tree while maintaining upgrade compatibility.

Previously, crimson could only be built with the ceph.pkg.crimson profile,
which replaced the classic OSD entirely since both components shared the
same executable name. This made it impossible to provide both variants
simultaneously.

These changes introduce separate packages for classic and crimson OSD
components:
- ceph-osd-classic: Traditional OSD implementation
- ceph-osd-crimson: New crimson OSD implementation
- ceph-osd: Meta-package that depends on ceph-osd-classic by default

Users can switch between implementations using update-alternatives.

Rationale for downstream backport:
While these changes introduce breaking changes and were not backported to
the tentacle branch upstream, we are backporting them to allow users to
experiment with crimson. The package structure ensures safe upgrades:
existing installations automatically get ceph-osd-classic through the
ceph-osd dependency, preventing system breakage.

Backported PRs:
- https://github.com/ceph/ceph/pull/65782: Split ceph-osd into shared
  base and implementation packages
- https://github.com/ceph/ceph/pull/66568: Fix ceph-osd upgrade
  conflicts in debian/ceph.spec

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
---
 ....in-install-crimson-objectstore-tool.patch |  49 ++
 ...-split-ceph-osd-into-shared-base-and.patch | 464 ++++++++++++++++++
 ...ble-WITH_CRIMSON-when-pkg.ceph.crims.patch |  46 ++
 ....spec-fix-ceph-osd-upgrade-conflicts.patch | 108 ++++
 patches/series                                |   5 +-
 5 files changed, 671 insertions(+), 1 deletion(-)
 create mode 100644 patches/0049-ceph.spec.in-install-crimson-objectstore-tool.patch
 create mode 100644 patches/0050-debian-ceph.spec-split-ceph-osd-into-shared-base-and.patch
 create mode 100644 patches/0051-debian-rules-enable-WITH_CRIMSON-when-pkg.ceph.crims.patch
 create mode 100644 patches/0052-debian-ceph.spec-fix-ceph-osd-upgrade-conflicts.patch

diff --git a/patches/0049-ceph.spec.in-install-crimson-objectstore-tool.patch b/patches/0049-ceph.spec.in-install-crimson-objectstore-tool.patch
new file mode 100644
index 00000000000..8ce412f6ac2
--- /dev/null
+++ b/patches/0049-ceph.spec.in-install-crimson-objectstore-tool.patch
@@ -0,0 +1,49 @@
+From 152537074b2725d86c14744670925d55ea845d3d Mon Sep 17 00:00:00 2001
+From: Matan Breizman <mbreizma@redhat.com>
+Date: Wed, 23 Jul 2025 13:17:51 +0000
+Subject: [PATCH 49/52] ceph.spec.in: install crimson-objectstore-tool
+
+Include the tool when packaging for deb/rpm.
+
+Signed-off-by: Matan Breizman <mbreizma@redhat.com>
+(cherry picked from commit 47a15af8ddbf2276e1bbf4b68c88114d003357b1)
+---
+ ceph.spec.in            | 2 ++
+ debian/ceph-osd.install | 1 +
+ 2 files changed, 3 insertions(+)
+
+diff --git a/ceph.spec.in b/ceph.spec.in
+index 226fe72192b..659dbade0dc 100644
+--- a/ceph.spec.in
++++ b/ceph.spec.in
+@@ -1565,6 +1565,7 @@ popd
+ %if 0%{with crimson}
+ # package crimson-osd with the name of ceph-osd
+ install -m 0755 %{buildroot}%{_bindir}/crimson-osd %{buildroot}%{_bindir}/ceph-osd
++install -m 0755 %{buildroot}%{_bindir}/crimson-objectstore-tool %{buildroot}%{_bindir}/ceph-objectstore-tool
+ %endif
+ 
+ install -m 0644 -D src/etc-rbdmap %{buildroot}%{_sysconfdir}/ceph/rbdmap
+@@ -2337,6 +2338,7 @@ fi
+ %if 0%{with crimson}
+ %files crimson-osd
+ %{_bindir}/crimson-osd
++%{_bindir}/crimson-objectstore-tool
+ %endif
+ 
+ %files volume
+diff --git a/debian/ceph-osd.install b/debian/ceph-osd.install
+index 217c9bea719..f45e407f4b5 100755
+--- a/debian/ceph-osd.install
++++ b/debian/ceph-osd.install
+@@ -6,6 +6,7 @@ usr/bin/ceph-clsinfo
+ usr/bin/ceph-erasure-code-tool
+ usr/bin/ceph-objectstore-tool
+ <pkg.ceph.crimson> usr/bin/crimson-store-nbd
++<pkg.ceph.crimson> usr/bin/crimson-objectstore-tool
+ usr/bin/${CEPH_OSD_BASENAME} => /usr/bin/ceph-osd
+ usr/bin/ceph_objectstore_bench
+ usr/libexec/ceph/ceph-osd-prestart.sh
+-- 
+2.47.3
+
diff --git a/patches/0050-debian-ceph.spec-split-ceph-osd-into-shared-base-and.patch b/patches/0050-debian-ceph.spec-split-ceph-osd-into-shared-base-and.patch
new file mode 100644
index 00000000000..2a858961de9
--- /dev/null
+++ b/patches/0050-debian-ceph.spec-split-ceph-osd-into-shared-base-and.patch
@@ -0,0 +1,464 @@
+From 3fcd25c26a9b6c6438a72bed98e577ed9749a65c Mon Sep 17 00:00:00 2001
+From: Kefu Chai <k.chai@proxmox.com>
+Date: Tue, 30 Sep 2025 21:04:46 +0800
+Subject: [PATCH 50/52] debian,ceph.spec: split ceph-osd into shared base and
+ implementation packages
+
+Previously, ceph-osd packaging had two mutually exclusive flavors that
+could only be built one at a time: one with classic OSD and another
+with crimson OSD. Both provided /usr/bin/ceph-osd, making them
+impossible to coexist and confusing from a user perspective.
+This commit restructures the packaging to enable both implementations
+to coexist on the same system:
+
+- ceph-osd: Contains shared components (systemd units, sysctl configs,
+  common executables like ceph-erasure-code-tool) and depends on exactly
+  one OSD implementation
+- ceph-osd-classic: Contains the classic OSD implementation binary and
+  classic-specific tools
+- ceph-osd-crimson: Contains the crimson OSD implementation binary and
+  crimson-specific tools
+
+The two implementation packages install different sets of file, so they
+don't conflict with each other anymore, and both depend on ceph-osd for
+shared resources.
+
+Changes:
+
+Debian packaging:
+
+- Revert e5f00d2f
+- Add ceph-osd-crimson package
+- Add Recommends: ceph-osd-classic to prefer classic on upgrades
+- Add Replaces/Breaks for smooth upgrades from old monolithic package
+- Create separate .install files for crimson and classic osd packages
+  Enforce exact version matching using ${binary:Version}
+
+RPM packaging:
+
+- Use rich dependencies for OR requirement (classic or crimson)
+- Add Recommends: ceph-osd-classic for upgrade preference
+
+Upgrade behavior:
+
+Users upgrading from older versions will automatically get
+ceph-osd-classic due to the Recommends directive, maintaining
+backward compatibility. Users can explicitly choose crimson by
+installing ceph-osd-crimson, which will coexist with classic.
+Switching between implementations is supported via standard package
+operations, with the alternatives system ensuring /usr/bin/ceph-osd
+always points to the active implementation.
+
+Signed-off-by: Kefu Chai <k.chai@proxmox.com>
+(cherry picked from commit a37b5b5bde8c2e8d6890f16b31046119ed55f25d)
+---
+ ceph.spec.in                     | 60 +++++++++++++++------
+ debian/ceph-osd-classic.install  |  9 ++++
+ debian/ceph-osd-classic.postinst | 13 +++++
+ debian/ceph-osd-classic.prerm    | 12 +++++
+ debian/ceph-osd-crimson.install  |  5 ++
+ debian/ceph-osd-crimson.postinst | 13 +++++
+ debian/ceph-osd-crimson.prerm    | 12 +++++
+ debian/ceph-osd.install          | 11 ----
+ debian/control                   | 93 +++++++++++++++++++++++++++-----
+ debian/rules                     |  5 --
+ 10 files changed, 189 insertions(+), 44 deletions(-)
+ create mode 100755 debian/ceph-osd-classic.install
+ create mode 100644 debian/ceph-osd-classic.postinst
+ create mode 100644 debian/ceph-osd-classic.prerm
+ create mode 100755 debian/ceph-osd-crimson.install
+ create mode 100644 debian/ceph-osd-crimson.postinst
+ create mode 100644 debian/ceph-osd-crimson.prerm
+ mode change 100755 => 100644 debian/ceph-osd.install
+
+diff --git a/ceph.spec.in b/ceph.spec.in
+index 659dbade0dc..00de179d417 100644
+--- a/ceph.spec.in
++++ b/ceph.spec.in
+@@ -912,28 +912,39 @@ Summary:	Ceph Object Storage Daemon
+ Group:		System/Filesystems
+ %endif
+ Requires:	ceph-base = %{_epoch_prefix}%{version}-%{release}
++Requires:	(ceph-osd-classic = %{_epoch_prefix}%{version}-%{release} or ceph-osd-crimson = %{_epoch_prefix}%{version}-%{release})
+ Requires:	sudo
+ Requires:	libstoragemgmt
+-%if 0%{with crimson}
+-Requires:	protobuf
+-%endif
+ %if 0%{?weak_deps}
+ Recommends:	ceph-volume = %{_epoch_prefix}%{version}-%{release}
+ %endif
+ %description osd
+ ceph-osd is the object storage daemon for the Ceph distributed file
++system.  It provides components shared between classic and crimson OSD
++implementations. It requires either the classic or crimson OSD
++to provide the core OSD daemon.
++
++%package osd-classic
++Summary:	Ceph Object Storage Daemon (classic)
++%if 0%{?suse_version}
++Group:		System/Filesystems
++%endif
++Requires:   ceph-osd = %{_epoch_prefix}%{version}-%{release}
++%description osd-classic
++classic-osd is the object storage daemon for the Ceph distributed file
+ system.  It is responsible for storing objects on a local file system
+ and providing access to them over the network.
+ 
+ %if 0%{with crimson}
+-%package crimson-osd
++%package osd-crimson
+ Summary:	Ceph Object Storage Daemon (crimson)
+ %if 0%{?suse_version}
+ Group:		System/Filesystems
+ %endif
+ Requires:	ceph-osd = %{_epoch_prefix}%{version}-%{release}
+ Requires:	binutils
+-%description crimson-osd
++Requires:	protobuf
++%description osd-crimson
+ crimson-osd is the object storage daemon for the Ceph distributed file
+ system.  It is responsible for storing objects on a local file system
+ and providing access to them over the network.
+@@ -1563,10 +1574,9 @@ rm -f %{buildroot}/%{_sysconfdir}/init.d/ceph
+ popd
+ 
+ %if 0%{with crimson}
+-# package crimson-osd with the name of ceph-osd
+-install -m 0755 %{buildroot}%{_bindir}/crimson-osd %{buildroot}%{_bindir}/ceph-osd
+-install -m 0755 %{buildroot}%{_bindir}/crimson-objectstore-tool %{buildroot}%{_bindir}/ceph-objectstore-tool
++mv %{buildroot}%{_bindir}/crimson-osd %{buildroot}%{_bindir}/ceph-osd-crimson
+ %endif
++mv %{buildroot}%{_bindir}/ceph-osd %{buildroot}%{_bindir}/ceph-osd-classic
+ 
+ install -m 0644 -D src/etc-rbdmap %{buildroot}%{_sysconfdir}/ceph/rbdmap
+ %if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
+@@ -2286,17 +2296,12 @@ fi
+ 
+ %files osd
+ %{_bindir}/ceph-clsinfo
+-%{_bindir}/ceph-bluestore-tool
+ %{_bindir}/ceph-erasure-code-tool
+-%{_bindir}/ceph-objectstore-tool
+-%{_bindir}/ceph-osd
+ %{_libexecdir}/ceph/ceph-osd-prestart.sh
+ %{_mandir}/man8/ceph-clsinfo.8*
+ %{_mandir}/man8/ceph-osd.8*
+-%{_mandir}/man8/ceph-bluestore-tool.8*
+ %{_unitdir}/ceph-osd@.service
+ %{_unitdir}/ceph-osd.target
+-%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/osd
+ %config(noreplace) %{_sysctldir}/90-ceph-osd.conf
+ 
+ %post osd
+@@ -2335,12 +2340,37 @@ if [ $1 -ge 1 ] ; then
+   fi
+ fi
+ 
++%files osd-classic
++%{_bindir}/ceph-bluestore-tool
++%{_bindir}/ceph-objectstore-tool
++%{_bindir}/ceph-osd-classic
++%{_mandir}/man8/ceph-bluestore-tool.8*
++%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/osd
++
+ %if 0%{with crimson}
+-%files crimson-osd
+-%{_bindir}/crimson-osd
++%files osd-crimson
++%{_bindir}/ceph-osd-crimson
+ %{_bindir}/crimson-objectstore-tool
++
++%post osd-crimson
++%{_sbindir}/update-alternatives --install %{_bindir}/ceph-osd ceph-osd \
++    %{_bindir}/ceph-osd-crimson 50
++
++%preun osd-crimson
++if [ $1 -eq 0 ]; then
++    ${_sbindir}/update-alternatives --remove ceph-osd %{_bindir}/ceph-osd-crimson
++fi
+ %endif
+ 
++%post osd-classic
++%{_sbindir}/update-alternatives --install %{_bindir}/ceph-osd ceph-osd \
++    %{_bindir}/ceph-osd-classic 100
++
++%preun osd-classic
++if [ $1 -eq 0 ]; then
++    ${_sbindir}/update-alternatives --remove ceph-osd %{_bindir}/ceph-osd-classic
++fi
++
+ %files volume
+ %{_sbindir}/ceph-volume
+ %{_sbindir}/ceph-volume-systemd
+diff --git a/debian/ceph-osd-classic.install b/debian/ceph-osd-classic.install
+new file mode 100755
+index 00000000000..2f1f6281821
+--- /dev/null
++++ b/debian/ceph-osd-classic.install
+@@ -0,0 +1,9 @@
++#! /usr/bin/dh-exec
++
++usr/bin/ceph-bluestore-tool
++usr/bin/ceph-objectstore-tool
++usr/bin/ceph-osd => /usr/bin/ceph-osd-classic
++usr/bin/ceph_objectstore_bench
++usr/lib/libos_tp.so*
++usr/lib/libosd_tp.so*
++usr/share/man/man8/ceph-bluestore-tool.8
+diff --git a/debian/ceph-osd-classic.postinst b/debian/ceph-osd-classic.postinst
+new file mode 100644
+index 00000000000..e475e7e38ca
+--- /dev/null
++++ b/debian/ceph-osd-classic.postinst
+@@ -0,0 +1,13 @@
++#!/bin/sh
++set -e
++
++case "$1" in
++    configure)
++        update-alternatives --install /usr/bin/ceph-osd ceph-osd \
++            /usr/bin/ceph-osd-classic 100
++        ;;
++esac
++
++#DEBHELPER#
++
++exit 0
+diff --git a/debian/ceph-osd-classic.prerm b/debian/ceph-osd-classic.prerm
+new file mode 100644
+index 00000000000..1b3e65b6d70
+--- /dev/null
++++ b/debian/ceph-osd-classic.prerm
+@@ -0,0 +1,12 @@
++#!/bin/sh
++set -e
++
++case "$1" in
++    remove)
++        update-alternatives --remove ceph-osd /usr/bin/ceph-osd-classic
++        ;;
++esac
++
++#DEBHELPER#
++
++exit 0
+diff --git a/debian/ceph-osd-crimson.install b/debian/ceph-osd-crimson.install
+new file mode 100755
+index 00000000000..4c206865960
+--- /dev/null
++++ b/debian/ceph-osd-crimson.install
+@@ -0,0 +1,5 @@
++#! /usr/bin/dh-exec
++
++usr/bin/crimson-objectstore-tool
++usr/bin/crimson-osd => /usr/bin/ceph-osd-crimson
++usr/bin/crimson-store-nbd
+diff --git a/debian/ceph-osd-crimson.postinst b/debian/ceph-osd-crimson.postinst
+new file mode 100644
+index 00000000000..49fc8b3c9a6
+--- /dev/null
++++ b/debian/ceph-osd-crimson.postinst
+@@ -0,0 +1,13 @@
++#!/bin/sh
++set -e
++
++case "$1" in
++    configure)
++        update-alternatives --install /usr/bin/ceph-osd ceph-osd \
++            /usr/bin/ceph-osd-crimson 50
++        ;;
++esac
++
++#DEBHELPER#
++
++exit 0
+diff --git a/debian/ceph-osd-crimson.prerm b/debian/ceph-osd-crimson.prerm
+new file mode 100644
+index 00000000000..6acbecb375e
+--- /dev/null
++++ b/debian/ceph-osd-crimson.prerm
+@@ -0,0 +1,12 @@
++#!/bin/sh
++set -e
++
++case "$1" in
++    remove)
++        update-alternatives --remove ceph-osd /usr/bin/ceph-osd-crimson
++        ;;
++esac
++
++#DEBHELPER#
++
++exit 0
+diff --git a/debian/ceph-osd.install b/debian/ceph-osd.install
+old mode 100755
+new mode 100644
+index f45e407f4b5..19e1d5055b8
+--- a/debian/ceph-osd.install
++++ b/debian/ceph-osd.install
+@@ -1,18 +1,7 @@
+-#! /usr/bin/dh-exec
+-
+ {usr/,}lib/systemd/system/ceph-osd*
+-usr/bin/ceph-bluestore-tool
+ usr/bin/ceph-clsinfo
+ usr/bin/ceph-erasure-code-tool
+-usr/bin/ceph-objectstore-tool
+-<pkg.ceph.crimson> usr/bin/crimson-store-nbd
+-<pkg.ceph.crimson> usr/bin/crimson-objectstore-tool
+-usr/bin/${CEPH_OSD_BASENAME} => /usr/bin/ceph-osd
+-usr/bin/ceph_objectstore_bench
+ usr/libexec/ceph/ceph-osd-prestart.sh
+-usr/lib/libos_tp.so*
+-usr/lib/libosd_tp.so*
+ usr/share/man/man8/ceph-clsinfo.8
+ usr/share/man/man8/ceph-osd.8
+-usr/share/man/man8/ceph-bluestore-tool.8
+ etc/sysctl.d/30-ceph-osd.conf
+diff --git a/debian/control b/debian/control
+index 7d30e1faa70..9b4ade7e336 100644
+--- a/debian/control
++++ b/debian/control
+@@ -416,42 +416,109 @@ Description: debugging symbols for ceph-mon
+ 
+ Package: ceph-osd
+ Architecture: linux-any
+-Depends: ceph-base (= ${binary:Version}),
++Depends: ceph-osd-classic (= ${binary:Version}) | ceph-osd-crimson (= ${binary:Version}),
+          sudo,
+-         ${misc:Depends},
+          ${python3:Depends},
++         ${misc:Depends},
++         ${shlibs:Depends},
++Recommends: ceph-osd-classic (= ${binary:Version})
++Description: OSD server for the ceph storage system - shared components
++ 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 components shared between classic and crimson OSD implementations.
++ It ensures a Ceph OSD implementation is installed. By default,
++ it installs the classic OSD implementation (ceph-osd-classic). Users can
++ substitute with the experimental Crimson implementation (ceph-osd-crimson)
++ for improved performance and scalability.
++
++Package: ceph-osd-dbg
++Architecture: linux-any
++Section: debug
++Priority: extra
++Depends: ceph-osd (= ${binary:Version}),
++         ${misc:Depends},
++Description: debugging symbols for ceph-osd
++ 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 the debugging symbols for ceph-osd.
++
++Package: ceph-osd-classic
++Architecture: linux-any
++Depends: ceph-base (= ${binary:Version}),
++         ${misc:Depends},
+          ${shlibs:Depends},
+-         libprotobuf23 <pkg.ceph.crimson>,
+ Replaces: ceph (<< 10),
+           ceph-test (<< 12.2.2-14),
+-          ceph-osd (<< 17.0.0)
++          ceph-osd (<< 20.1.1)
+ Breaks: ceph (<< 10),
+         ceph-test (<< 12.2.2-14),
+-        ceph-osd (<< 17.0.0)
++        ceph-osd (<< 20.1.1)
+ Recommends: ceph-volume (= ${binary:Version}),
+             nvme-cli,
+             smartmontools,
+-Description: OSD server for the ceph storage system
++Description: Classic OSD server for the ceph storage system
+  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 the Object Storage Daemon for the Ceph storage system.
+- It is responsible for storing objects on a local file system
+- and providing access to them over the network.
++ This package contains the classic Object Storage Daemon and
++ classic-specific components for the Ceph storage system. It is
++ responsible for storing objects on a local file system and providing
++ access to them over the network.
+ 
+-Package: ceph-osd-dbg
++Package: ceph-osd-classic-dbg
+ Architecture: linux-any
+ Section: debug
+ Priority: extra
+-Depends: ceph-osd (= ${binary:Version}),
++Depends: ceph-osd-classic (= ${binary:Version}),
+          ${misc:Depends},
+-Description: debugging symbols for ceph-osd
++Description: debugging symbols for ceph-osd-classic
+  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 the debugging symbols for ceph-osd.
++ This package contains the debugging symbols for ceph-osd-classic.
++
++Package: ceph-osd-crimson
++Build-Profiles: <pkg.ceph.crimson>
++Architecture: any
++Depends: ceph-base (= ${binary:Version}),
++         ${misc:Depends},
++         ${shlibs:Depends},
++         libprotobuf23,
++Recommends: ceph-volume (= ${binary:Version}),
++            nvme-cli,
++            smartmontools,
++Description: Crimson OSD server for the ceph storage system
++ Ceph is a massively scalable, open-source, distributed
++ storage system that runs on commodity hardware and delivers object,
++ block and file system storage.
++ .
++ Crimson is the next generation of ceph-osd daemon featuring enhanced
++ performance on fast network and storage devices.
++ .
++ This package contains the Crimson Object Storage Daemon and
++ crimson-specific components for the Ceph storage system. It is
++ responsible for storing objects on a local file system and providing
++ access to them over the network.
++
++Package: ceph-osd-crimson-dbg
++Build-Profiles: <pkg.ceph.crimson>
++Architecture: linux-any
++Section: debug
++Priority: extra
++Depends: ceph-osd-crimson (= ${binary:Version}),
++         ${misc:Depends},
++Description: debugging symbols for ceph-osd-crimson
++ 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 the debugging symbols for ceph-osd-crimson.
+ 
+ Package: ceph-volume
+ Architecture: all
+diff --git a/debian/rules b/debian/rules
+index ee4eff2bdc5..bbd2f5ed2e7 100755
+--- a/debian/rules
++++ b/debian/rules
+@@ -12,11 +12,6 @@ ifneq (,$(findstring WITH_STATIC_LIBSTDCXX,$(CEPH_EXTRA_CMAKE_ARGS)))
+   # see http://tracker.ceph.com/issues/25209
+   export DEB_LDFLAGS_MAINT_STRIP = -Wl,-Bsymbolic-functions
+ endif
+-ifeq (,$(findstring WITH_CRIMSON,$(CEPH_EXTRA_CMAKE_ARGS)))
+-  export CEPH_OSD_BASENAME = ceph-osd
+-else
+-  export CEPH_OSD_BASENAME = crimson-osd
+-endif
+ ifneq ($(filter pkg.ceph.arrow,$(DEB_BUILD_PROFILES)),)
+   extraopts += -DWITH_SYSTEM_ARROW=ON
+ endif
+-- 
+2.47.3
+
diff --git a/patches/0051-debian-rules-enable-WITH_CRIMSON-when-pkg.ceph.crims.patch b/patches/0051-debian-rules-enable-WITH_CRIMSON-when-pkg.ceph.crims.patch
new file mode 100644
index 00000000000..98fd272d367
--- /dev/null
+++ b/patches/0051-debian-rules-enable-WITH_CRIMSON-when-pkg.ceph.crims.patch
@@ -0,0 +1,46 @@
+From 505b28d84f504e58c40d65ee7d403f77626507a0 Mon Sep 17 00:00:00 2001
+From: Kefu Chai <k.chai@proxmox.com>
+Date: Sat, 18 Oct 2025 22:23:56 +0800
+Subject: [PATCH 51/52] debian/rules: enable WITH_CRIMSON when pkg.ceph.crimson
+ profile is set
+
+Since commit 9b1d524839 ("debian: mark "crimson" specific deps with
+"pkg.ceph.crimson""), crimson-specific build dependencies have been
+gated by the Build-Profiles: <pkg.ceph.crimson> tag. However,
+debian/rules was never updated to pass -DWITH_CRIMSON=ON when this
+build profile is active.
+
+This causes builds with the crimson profile enabled to fail during
+dh_install, as the crimson-osd binary is never built but the install
+file tries to package it:
+
+  Failed to copy 'usr/bin/crimson-osd': No such file or directory
+  dh_install: error: debian/ceph-crimson-osd.install returned exit code 127
+
+Fix this by checking for pkg.ceph.crimson in DEB_BUILD_PROFILES and
+enabling the CMake option accordingly, following the same pattern used
+for pkg.ceph.arrow.
+
+Signed-off-by: Kefu Chai <k.chai@proxmox.com>
+(cherry picked from commit ceb3272fdae035d2a7376c423c69e5770f8e2fb1)
+---
+ debian/rules | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/debian/rules b/debian/rules
+index bbd2f5ed2e7..4d31ffd069f 100755
+--- a/debian/rules
++++ b/debian/rules
+@@ -15,6 +15,9 @@ endif
+ ifneq ($(filter pkg.ceph.arrow,$(DEB_BUILD_PROFILES)),)
+   extraopts += -DWITH_SYSTEM_ARROW=ON
+ endif
++ifneq ($(filter pkg.ceph.crimson,$(DEB_BUILD_PROFILES)),)
++  extraopts += -DWITH_CRIMSON=ON
++endif
+ 
+ extraopts += -DWITH_JAEGER=ON
+ extraopts += -DWITH_SYSTEM_UTF8PROC=ON
+-- 
+2.47.3
+
diff --git a/patches/0052-debian-ceph.spec-fix-ceph-osd-upgrade-conflicts.patch b/patches/0052-debian-ceph.spec-fix-ceph-osd-upgrade-conflicts.patch
new file mode 100644
index 00000000000..bd854f9e08b
--- /dev/null
+++ b/patches/0052-debian-ceph.spec-fix-ceph-osd-upgrade-conflicts.patch
@@ -0,0 +1,108 @@
+From 164c74b6d1cdb0017d3a4d043d402c7dbffb417b Mon Sep 17 00:00:00 2001
+From: Matan Breizman <mbreizma@redhat.com>
+Date: Tue, 9 Dec 2025 09:52:08 +0000
+Subject: [PATCH 52/52] debian,ceph.spec: fix ceph-osd upgrade conflicts
+
+With https://github.com/ceph/ceph/pull/65782 merged, upgrading ceph-osd
+would need to replace the previous ceph-osd existing on the machine.
+Otherwise, we won't be able to symlink the newly installed package:
+```
+2025-12-05T21:09:20.472 INFO:teuthology.orchestra.run.smithi077.stdout:
+Installing       : ceph-osd-classic-2:20.3.0-4434.g8611241d.el9.x86_6
+24/87
+2025-12-05T21:09:20.478 INFO:teuthology.orchestra.run.smithi077.stdout:
+Running scriptlet: ceph-osd-classic-2:20.3.0-4434.g8611241d.el9.x86_6
+24/87
+2025-12-05T21:09:20.479
+INFO:teuthology.orchestra.run.smithi077.stdout:failed to link
+/usr/bin/ceph-osd -> /etc/alternatives/ceph-osd: /usr/bin/ceph-osd
+exists and it is not a symlink
+```
+
+Note: debian/control ceph-osd-classic already had Replace and Breaks:
+      - Breaks is replaced with Conflicts to not allow coexistence.
+      - Release version is bumped up to be relevant for latest main
+
+Signed-off-by: Matan Breizman <mbreizma@redhat.com>
+(cherry picked from commit 9f1c8f9447026f5ef4965a96d1aaaae7ee59dad4)
+---
+ ceph.spec.in   |  6 ++++--
+ debian/control | 12 +++++++-----
+ 2 files changed, 11 insertions(+), 7 deletions(-)
+
+diff --git a/ceph.spec.in b/ceph.spec.in
+index 00de179d417..2880899af18 100644
+--- a/ceph.spec.in
++++ b/ceph.spec.in
+@@ -930,6 +930,7 @@ Summary:	Ceph Object Storage Daemon (classic)
+ Group:		System/Filesystems
+ %endif
+ Requires:   ceph-osd = %{_epoch_prefix}%{version}-%{release}
++Obsoletes:  ceph-osd < %{_epoch_prefix}%{version}-%{release}
+ %description osd-classic
+ classic-osd is the object storage daemon for the Ceph distributed file
+ system.  It is responsible for storing objects on a local file system
+@@ -942,6 +943,7 @@ Summary:	Ceph Object Storage Daemon (crimson)
+ Group:		System/Filesystems
+ %endif
+ Requires:	ceph-osd = %{_epoch_prefix}%{version}-%{release}
++Obsoletes:	ceph-osd < %{_epoch_prefix}%{version}-%{release}
+ Requires:	binutils
+ Requires:	protobuf
+ %description osd-crimson
+@@ -2352,7 +2354,7 @@ fi
+ %{_bindir}/ceph-osd-crimson
+ %{_bindir}/crimson-objectstore-tool
+ 
+-%post osd-crimson
++%posttrans osd-crimson
+ %{_sbindir}/update-alternatives --install %{_bindir}/ceph-osd ceph-osd \
+     %{_bindir}/ceph-osd-crimson 50
+ 
+@@ -2362,7 +2364,7 @@ if [ $1 -eq 0 ]; then
+ fi
+ %endif
+ 
+-%post osd-classic
++%posttrans osd-classic
+ %{_sbindir}/update-alternatives --install %{_bindir}/ceph-osd ceph-osd \
+     %{_bindir}/ceph-osd-classic 100
+ 
+diff --git a/debian/control b/debian/control
+index 9b4ade7e336..01008f38e2c 100644
+--- a/debian/control
++++ b/debian/control
+@@ -450,16 +450,16 @@ Package: ceph-osd-classic
+ Architecture: linux-any
+ Depends: ceph-base (= ${binary:Version}),
+          ${misc:Depends},
+-         ${shlibs:Depends},
++         ${shlibs:Depends}
++Conflicts: ceph-osd (<< 20.3)
+ Replaces: ceph (<< 10),
+           ceph-test (<< 12.2.2-14),
+-          ceph-osd (<< 20.1.1)
++          ceph-osd (<< 20.3)
+ Breaks: ceph (<< 10),
+-        ceph-test (<< 12.2.2-14),
+-        ceph-osd (<< 20.1.1)
++        ceph-test (<< 12.2.2-14)
+ Recommends: ceph-volume (= ${binary:Version}),
+             nvme-cli,
+-            smartmontools,
++            smartmontools
+ Description: Classic OSD server for the ceph storage system
+  Ceph is a massively scalable, open-source, distributed
+  storage system that runs on commodity hardware and delivers object,
+@@ -493,6 +493,8 @@ Depends: ceph-base (= ${binary:Version}),
+ Recommends: ceph-volume (= ${binary:Version}),
+             nvme-cli,
+             smartmontools,
++Conflicts: ceph-osd (<< 20.3)
++Replaces:  ceph-osd (<< 20.3)
+ Description: Crimson OSD server for the ceph storage system
+  Ceph is a massively scalable, open-source, distributed
+  storage system that runs on commodity hardware and delivers object,
+-- 
+2.47.3
+
diff --git a/patches/series b/patches/series
index f2bfed1b939..5ba4192b1db 100644
--- a/patches/series
+++ b/patches/series
@@ -46,4 +46,7 @@
 0046-debian-Use-system-packages-for-cephadm-bundled-depen.patch
 0047-cmake-BuildArrow-Use-AUTO-mode-for-xsimd-dependency-.patch
 0048-debian-control-Add-libxsimd-dev-build-dependency-for.patch
-  
+0049-ceph.spec.in-install-crimson-objectstore-tool.patch
+0050-debian-ceph.spec-split-ceph-osd-into-shared-base-and.patch
+0051-debian-rules-enable-WITH_CRIMSON-when-pkg.ceph.crims.patch
+0052-debian-ceph.spec-fix-ceph-osd-upgrade-conflicts.patch
-- 
2.47.3



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  reply	other threads:[~2026-01-22 10:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-21 15:12 [pve-devel] [PATCH ceph] cherry-pick changes to use system packages for bundled deps Kefu Chai
2026-01-22  8:29 ` [pve-devel] [PATCH ceph] cherry-pick changes to buiild crimson package Kefu Chai
2026-01-22 10:14   ` Kefu Chai [this message]
2026-01-22 10:14   ` [pve-devel] [PATCH ceph 3/3] make: build with pkg.ceph.crimson build profile Kefu Chai
2026-01-22 10:56   ` [pve-devel] [PATCH ceph 2/3 v3] cherry-pick changes to build crimson package Kefu Chai
2026-01-22 11:43   ` [pve-devel] [PATCH ceph 2/3 v4] " Kefu Chai
2026-01-23  7:56   ` [pve-devel] [PATCH ceph 1/4 v5] cherry-pick changes to use system packages for bundled deps Kefu Chai
2026-01-23  8:18     ` Kefu Chai
2026-01-23  7:56   ` [pve-devel] [PATCH ceph 2/4 v5] cherry-pick changes to build crimson package Kefu Chai
2026-01-23  7:56   ` [pve-devel] [PATCH ceph 3/4 v5] exclude ceph-osd-crimson when running dwz Kefu Chai
2026-01-23  7:56   ` [pve-devel] [PATCH ceph 4/4 v5] make: build with pkg.ceph.crimson build profile Kefu Chai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260122101452.1789104-2-k.chai@proxmox.com \
    --to=k.chai@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal