public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH ceph 2/4 v5] cherry-pick changes to build crimson package
Date: Fri, 23 Jan 2026 14:03:03 +0100	[thread overview]
Message-ID: <1769170820.3juwranxbm.astroid@yuna.none> (raw)
In-Reply-To: <20260123075619.2731724-5-k.chai@proxmox.com>

On January 23, 2026 8:56 am, Kefu Chai wrote:
> 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.

I am not 100% sure yet this is actually the correct approach, as opposed
to shipping the ceph-osd binary in both ceph-osd-XX variants (dropping
the symlink) and making them conflict with eachother (so that switching
over is done by installing the "right" package, which will automatically
remove the other one).

I will get back to you on that point when I managed actually building
and testing things :)

> 
> 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
> https://github.com/ceph/ceph/pull/66682: build static seastar for
>   release builds
> 
> 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 <k.chai@proxmox.com>
> ---
>  ...-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 ++++
>  ...ld-static-seastar-for-release-builds.patch |  71 +++
>  patches/series                                |   5 +-
>  5 files changed, 689 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
>  create mode 100644 patches/0052-cmake-build-static-seastar-for-release-builds.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 <k.chai@proxmox.com>
> +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 <k.chai@proxmox.com>
> +(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
> +-<pkg.ceph.crimson> 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 <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/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 <k.chai@proxmox.com>
> +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: <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/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 <mbreizma@redhat.com>
> +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 <mbreizma@redhat.com>
> +(cherry picked from commit 9f1c8f9447026f5ef4965a96d1aaaae7ee59dad4)

I think that Breaks+Replaces should be fine here, if the version
constraints are correct (i.e., it needs to be coupled with a version
bump to work as expected).

right now, with these patches applied ceph-osd and ceph-osd-classic
cannot be co-installed anymore, but that is required for Ceph to work?

i.e., I think the following (for us downstream, upstream the 20.3 would
be correct if combined with bumping to that version..):

diff -Nru ceph-20.2.0/debian/changelog ceph-20.2.0/debian/changelog
--- ceph-20.2.0/debian/changelog        2025-12-17 17:31:55.000000000 +0100
+++ ceph-20.2.0/debian/changelog        2026-01-23 13:26:46.000000000 +0100
@@ -1,3 +1,11 @@
+ceph (20.2.0-pve2) trixie; urgency=medium
+
+  * fix building against system dependencies
+
+  * build (experimental) crimson packages
+
+ -- Proxmox Support Team <support@proxmox.com>  Fri, 23 Jan 2026 13:26:46 +0100
+
 ceph (20.2.0-pve1) trixie; urgency=medium

   * update ceph to the first stable release from the Tentacle 20.2 series.
diff -Nru ceph-20.2.0/debian/control ceph-20.2.0/debian/control
--- ceph-20.2.0/debian/control  2025-12-17 17:31:55.000000000 +0100
+++ ceph-20.2.0/debian/control  2026-01-23 13:26:46.000000000 +0100
@@ -453,10 +453,10 @@
          ${shlibs:Depends},
 Replaces: ceph (<< 10),
           ceph-test (<< 12.2.2-14),
-          ceph-osd (<< 20.1.1)
+          ceph-osd (<< 20.2.0-pve2)
 Breaks: ceph (<< 10),
         ceph-test (<< 12.2.2-14),
-        ceph-osd (<< 20.1.1)
+        ceph-osd (<< 20.2.0-pve2)
 Recommends: ceph-volume (= ${binary:Version}),
             nvme-cli,
             smartmontools,

instead of this patch (but I still need to do some actual build and
install and upgrade testing to confirm!)

> +---
> + 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/0052-cmake-build-static-seastar-for-release-builds.patch b/patches/0052-cmake-build-static-seastar-for-release-builds.patch
> new file mode 100644
> index 00000000000..9847eaa6790
> --- /dev/null
> +++ b/patches/0052-cmake-build-static-seastar-for-release-builds.patch
> @@ -0,0 +1,71 @@
> +From 3388c81a09c2eeaf6f6a11504b53ff39d275e603 Mon Sep 17 00:00:00 2001
> +From: Kefu Chai <k.chai@proxmox.com>
> +Date: Thu, 18 Dec 2025 16:41:49 +0800
> +Subject: [PATCH] cmake: build static seastar for release builds
> +
> +When BUILD_SHARED_LIBS is set, seastar inherits this setting from the
> +parent CMake project, causing crimson to link against libseastar.so.
> +While this works in development environments, it breaks package
> +installation because libseastar.so is not included in the distribution:
> +
> +```
> +  can't install ceph-crimson-osd:
> +    - nothing provides libseastar.so()(64bit) needed by
> +      ceph-crimson-osd-2:20.2.0-2.fc44.x86_64
> +
> +  can't install ceph-osd:
> +    - nothing provides libseastar.so()(64bit) needed by
> +      ceph-osd-2:20.2.0-2.fc44.x86_64
> +
> +  can't install ceph-test:
> +    - nothing provides libseastar.so()(64bit) needed by
> +      ceph-test-2:20.2.0-2.fc44.x86_64
> +```
> +
> +Force seastar to build as a static library regardless of the parent
> +project's BUILD_SHARED_LIBS setting. This fixes the packaging issue
> +and provides a modest performance improvement by eliminating PLT/GOT
> +indirection overhead for seastar function calls.
> +
> +Fixes: https://tracker.ceph.com/issues/74138

should we allow *shipping* libseastar so that regular linking works?

> +
> +Signed-off-by: Kefu Chai <k.chai@proxmox.com>
> +(cherry picked from commit 2cf8e4b095c8cdc3d583bcd570f8a5a5a27e459a)
> +---
> + src/CMakeLists.txt | 13 +++++++++++++
> + 1 file changed, 13 insertions(+)
> +
> +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
> +index a0e8c583ab5..5739e4108c8 100644
> +--- a/src/CMakeLists.txt
> ++++ b/src/CMakeLists.txt
> +@@ -406,6 +406,17 @@ if(WITH_CRIMSON)
> +       build_dpdk(${CMAKE_BINARY_DIR}/src/dpdk)
> +     endif()
> +   endif()
> ++  set(old_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
> ++  if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
> ++    # - Debug: shared seastar for faster development iteration
> ++    #   shared seastar is allowed for faster linking and smaller executables during
> ++    #   development.
> ++    #   Note: shared seastar won't be packaged, so this is for developers only
> ++    # - RelWithDebInfo/Release/MinSizeRel: static seastar for production packages
> ++    #   This ensures packages don't depend on libseastar.so, and avoids the performance penalty
> ++    #   of calling functions in shared library.
> ++    set(BUILD_SHARED_LIBS FALSE)
> ++  endif()
> +   list(APPEND Seastar_CXX_FLAGS
> +     "-DSEASTAR_NO_EXCEPTION_HACK"
> +     "-Wno-error"
> +@@ -416,6 +427,8 @@ if(WITH_CRIMSON)
> +     "-Wno-non-virtual-dtor")
> +   set(Seastar_CXX_FLAGS "${Seastar_CXX_FLAGS}" CACHE STRING "" FORCE)
> +   add_subdirectory(seastar)
> ++  set(BUILD_SHARED_LIBS ${old_BUILD_SHARED_LIBS})
> ++  unset(old_BUILD_SHARED_LIBS)
> +   # create the directory so cmake won't complain when looking at the imported
> +   # target: Seastar exports this directory created at build-time
> +   file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/seastar/gen/include")
> +-- 
> +2.47.3
> +
> diff --git a/patches/series b/patches/series
> index f2bfed1b939..53e0e6b83ca 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-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
> +0052-cmake-build-static-seastar-for-release-builds.patch
> -- 
> 2.47.3
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 
> 


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


  reply	other threads:[~2026-01-23 13:02 UTC|newest]

Thread overview: 19+ 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   ` [pve-devel] [PATCH ceph 2/3 v2] " Kefu Chai
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 13:03     ` Fabian Grünbichler
2026-01-24  4:13       ` 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 13:03     ` Fabian Grünbichler [this message]
2026-01-24  4:45       ` 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 13:03     ` Fabian Grünbichler
2026-01-24  4:54       ` Kefu Chai
2026-01-23  7:56   ` [pve-devel] [PATCH ceph 4/4 v5] make: build with pkg.ceph.crimson build profile Kefu Chai
2026-01-23 13:03     ` Fabian Grünbichler
2026-01-24  4:58       ` 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=1769170820.3juwranxbm.astroid@yuna.none \
    --to=f.gruenbichler@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal