Rate This Document
Findability
Accuracy
Completeness
Readability

Generating the RPM Package of the Data Compaction Algorithm

CentOS 7.6

  1. Change the default build mode in do_cmake.sh to the high-performance mode.
    1
    vi do_cmake.sh
    

  2. 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
    
  3. Copy the ceph.spec file to the SPECS directory.
    1
    cp ceph-14.2.8/ceph.spec /home/rpmbuild/SPECS/
    
  4. Save the package file to the SOURCES directory.
    1
    cp ceph-14.2.8.tar.bz2 /home/rpmbuild/SOURCES/
    
  5. Add fields to the beginning of the ceph.spec file.
    1
    vi /home/rpmbuild/SPECS/ceph.spec
    
    Add the following fields:
    1
    %define _binaries_in_noarch_packages_terminate_build 0
    

  6. Build the RPM package.
    1
    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.

openEuler 20.03

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

  3. 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
    
  4. Copy the ceph.spec file to the SPECS directory.
    1
    cp ceph-14.2.8/ceph.spec /home/rpmbuild/SPECS/
    
  5. Save the package file to the SOURCES directory.
    1
    cp ceph-14.2.8.tar.bz2 /home/rpmbuild/SOURCES/
    
  6. Build the RPM package.
    1. Remove and back up /etc/profile.d/performance.sh to increase the compilation speed.
      1
      mv /etc/profile.d/performance.sh /home/
      
    2. 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.