Generating the RPM Package of the Data Compaction Algorithm
CentOS 7.6
- Change the default build mode in do_cmake.sh to the high-performance mode.
1vi do_cmake.sh
- Compress the ceph-14.2.8 directory into a tar.bz2 package.
1 2
cd /home tar -cjvf ceph-14.2.8.tar.bz2 ceph-14.2.8
- Copy the ceph.spec file to the SPECS directory.
1cp ceph-14.2.8/ceph.spec /home/rpmbuild/SPECS/
- Save the package file to the SOURCES directory.
1cp ceph-14.2.8.tar.bz2 /home/rpmbuild/SOURCES/
- Add fields to the beginning of the ceph.spec file.
1vi /home/rpmbuild/SPECS/ceph.specAdd the following fields:1%define _binaries_in_noarch_packages_terminate_build 0

- Build the RPM package.
1rpmbuild -bb /home/rpmbuild/SPECS/ceph.spec

The build task takes 20 to 30 minutes. After the build is complete, the aarch64 and noarch directories are generated in the /home/rpmbuild/RPMS/ directory, which contain Ceph-related RPM packages.

openEuler 20.03
- Delete the build directory.
1 2
cd /home/ceph-14.2.8/ rm -rf build
- Change the default build mode in do_cmake.sh to the high-performance mode.
vi do_cmake.sh

- Go back to the parent directory and compress the ceph-14.2.8 directory into a tar.bz2 package.
1 2
cd /home tar -cjvf ceph-14.2.8.tar.bz2 ceph-14.2.8
- Copy the ceph.spec file to the SPECS directory.
1cp ceph-14.2.8/ceph.spec /home/rpmbuild/SPECS/
- Save the package file to the SOURCES directory.
1cp ceph-14.2.8.tar.bz2 /home/rpmbuild/SOURCES/
- Build the RPM package.
- Remove and back up /etc/profile.d/performance.sh to increase the compilation speed.
1mv /etc/profile.d/performance.sh /home/
- Start a new terminal and run the rpmbuild command.
1 2
unset GOMP_CPU_AFFINITY rpmbuild -bb /home/rpmbuild/SPECS/ceph.spec

The build task takes 20 to 30 minutes. After the build is complete, the aarch64 and noarch directories are generated in the /home/rpmbuild/RPMS/ directory, which contain Ceph-related RPM packages.

- Remove and back up /etc/profile.d/performance.sh to increase the compilation speed.
Parent topic: Compiling and Deploying Ceph