Compiling Ceph
- Download the ceph-17.2.7 source code.
1wget https://download.ceph.com/tarballs/ceph-17.2.7.tar.gz --no-check-certificate
- Apply the UCX patch by placing ceph-17.2.7-ucx.patch in the corresponding directory.
1 2 3
tar -zxvf ceph-17.2.7.tar.gz cd ceph-17.2.7 patch -p1 < ceph-17.2.7-ucx.patch
- Modify the ceph.spec file (required if the OS is openEuler).
1 2 3 4 5 6
sed -i 's/redhat-rpm-config/openEuler-rpm-config/g' ceph.spec sed -i 's#%if 0%{?fedora} || 0%{?rhel}#%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}#' ceph.spec sed -i 's#%if 0%{?rhel} || 0%{?fedora}#%if 0%{?rhel} || 0%{?fedora} || 0%{?openEuler}#' ceph.spec sed -i '1a\%define _binaries_in_noarch_packages_terminate_build 0' ceph.spec sed -i '2a\%define _unpackaged_files_terminate_build 0' ceph.spec sed -i 's/DWITH_GRAFANA:BOOL=ON/DWITH_GRAFANA:BOOL=ON \\\n \-DWITH_UCX=\/usr/g' ceph.spec
- Compile Ceph.
1 2 3 4 5 6 7 8
cd .. tar cfv ceph-17.2.7.tar.bz2 ceph-17.2.7/ cp ceph-17.2.7/ceph.spec /root/rpmbuild/SPECS/ cp ceph-17.2.7.tar.bz2 /root/rpmbuild/SOURCES/ rpmbuild -bb /root/rpmbuild/SPECS/ceph.spec mv /root/rpmbuild/RPMS/aarch64/* /home/local_rpm/ mv /root/rpmbuild/RPMS/noarch/* /home/local_rpm/
- Import the generated RPM packages to the release container on the physical machine.
1podman cp openeuler2203sp3_build:/home/local_rpm openeuler2203sp3_release:/home/
If the Ceph source code src/osd/SnapMapper.cc conflicts with the fmt package version, a compilation error is reported. In this case, modify the fmt::format code lines in the src/osd/SnapMapper.cc file as follows:

Parent topic: Compiling the Ceph Software Package