From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 363771FF145 for ; Thu, 22 Jan 2026 11:57:00 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 43D8D1394C; Thu, 22 Jan 2026 11:57:19 +0100 (CET) From: Kefu Chai To: pve-devel@lists.proxmox.com Date: Thu, 22 Jan 2026 18:56:12 +0800 Message-ID: <20260122105611.1968726-2-k.chai@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1769079344429 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.031 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_LOTSOFHASH 0.25 Emails with lots of hash-like gibberish SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH ceph 2/3 v3] cherry-pick changes to build crimson package X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" 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 crimson-objectstore-tool was dropped from from ceph-osd-crimson package when backport the related change. As this tool was not backported to upstream's tentacle branch. Signed-off-by: Kefu Chai --- ...-split-ceph-osd-into-shared-base-and.patch | 460 ++++++++++++++++++ ...ble-WITH_CRIMSON-when-pkg.ceph.crims.patch | 46 ++ ....spec-fix-ceph-osd-upgrade-conflicts.patch | 108 ++++ patches/series | 4 +- 4 files changed, 617 insertions(+), 1 deletion(-) create mode 100644 patches/0049-debian-ceph.spec-split-ceph-osd-into-shared-base-and.patch create mode 100644 patches/0050-debian-rules-enable-WITH_CRIMSON-when-pkg.ceph.crims.patch create mode 100644 patches/0051-debian-ceph.spec-fix-ceph-osd-upgrade-conflicts.patch diff --git a/patches/0049-debian-ceph.spec-split-ceph-osd-into-shared-base-and.patch b/patches/0049-debian-ceph.spec-split-ceph-osd-into-shared-base-and.patch new file mode 100644 index 00000000000..838f02dbced --- /dev/null +++ b/patches/0049-debian-ceph.spec-split-ceph-osd-into-shared-base-and.patch @@ -0,0 +1,460 @@ +From 69888b0f6575b41fca2509e1399c2642664d8e47 Mon Sep 17 00:00:00 2001 +From: Kefu Chai +Date: Tue, 30 Sep 2025 21:04:46 +0800 +Subject: [PATCH 49/51] 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 +(cherry picked from commit a37b5b5bde8c2e8d6890f16b31046119ed55f25d) +--- + ceph.spec.in | 59 +++++++++++++++----- + debian/ceph-osd-classic.install | 9 ++++ + debian/ceph-osd-classic.postinst | 13 +++++ + debian/ceph-osd-classic.prerm | 12 +++++ + debian/ceph-osd-crimson.install | 4 ++ + debian/ceph-osd-crimson.postinst | 13 +++++ + debian/ceph-osd-crimson.prerm | 12 +++++ + debian/ceph-osd.install | 10 ---- + debian/control | 93 +++++++++++++++++++++++++++----- + debian/rules | 5 -- + 10 files changed, 188 insertions(+), 42 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 226fe72192b..e3fc7ff6952 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,9 +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 ++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} +@@ -2285,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 +@@ -2334,11 +2340,36 @@ 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 ++ ++%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..6f3b4b75770 +--- /dev/null ++++ b/debian/ceph-osd-crimson.install +@@ -0,0 +1,4 @@ ++#! /usr/bin/dh-exec ++ ++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 217c9bea719..19e1d5055b8 +--- a/debian/ceph-osd.install ++++ b/debian/ceph-osd.install +@@ -1,17 +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 +- usr/bin/crimson-store-nbd +-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 , + 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: ++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: ++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/0050-debian-rules-enable-WITH_CRIMSON-when-pkg.ceph.crims.patch b/patches/0050-debian-rules-enable-WITH_CRIMSON-when-pkg.ceph.crims.patch new file mode 100644 index 00000000000..72641bc96f0 --- /dev/null +++ b/patches/0050-debian-rules-enable-WITH_CRIMSON-when-pkg.ceph.crims.patch @@ -0,0 +1,46 @@ +From c39545c5464a84b705b2c765bed2ac198f7d5959 Mon Sep 17 00:00:00 2001 +From: Kefu Chai +Date: Sat, 18 Oct 2025 22:23:56 +0800 +Subject: [PATCH 50/51] 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: 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 +(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/0051-debian-ceph.spec-fix-ceph-osd-upgrade-conflicts.patch b/patches/0051-debian-ceph.spec-fix-ceph-osd-upgrade-conflicts.patch new file mode 100644 index 00000000000..c553f7554db --- /dev/null +++ b/patches/0051-debian-ceph.spec-fix-ceph-osd-upgrade-conflicts.patch @@ -0,0 +1,108 @@ +From 9da967184da17dbcddb86befddbe7d084f3f66be Mon Sep 17 00:00:00 2001 +From: Matan Breizman +Date: Tue, 9 Dec 2025 09:52:08 +0000 +Subject: [PATCH 51/51] 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 +(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 e3fc7ff6952..6ae79fbb1b3 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 +@@ -2351,7 +2353,7 @@ fi + %files osd-crimson + %{_bindir}/ceph-osd-crimson + +-%post osd-crimson ++%posttrans osd-crimson + %{_sbindir}/update-alternatives --install %{_bindir}/ceph-osd ceph-osd \ + %{_bindir}/ceph-osd-crimson 50 + +@@ -2361,7 +2363,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..fb9ac6031fa 100644 --- a/patches/series +++ b/patches/series @@ -46,4 +46,6 @@ 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-debian-ceph.spec-split-ceph-osd-into-shared-base-and.patch +0050-debian-rules-enable-WITH_CRIMSON-when-pkg.ceph.crims.patch +0051-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