Rate This Document
Findability
Accuracy
Completeness
Readability

Installing Dependencies

Install the dependency packages required for compiling Ceph in the compilation container.

  1. Access the compilation container.
    1
    podman exec -it openeuler2203sp4_build /bin/bash
    
  2. Configure environment variables such as proxies in the container. You are not advised to configure the environment variables in bashrc.
    1
    2
    3
    export TMOUT=0
    export http_proxy=http://xxx// Set it as required.
    export https_proxy=http://xxx // Set it as required.
    
  3. Install common components.
    1
    yum install CUnit-devel boost-random checkpolicy cmake cryptsetup-devel expat-devel fmt-devel fuse-devel gperf java-devel junit keyutils-libs-devel libaio-devel libbabeltrace-devel libblkid-devel libcap-ng-devel libcurl-devel numactl-devel libicu-devel libnl3-devel liboath-devel librabbitmq-devel librdkafka-devel librdmacm-devel libtool libxml2-devel lttng-ust-devel lua-devel luarocks lz4-devel make nasm ncurses-devel ninja-build nss-devel openldap-devel openssl-devel libudev-devel python3-Cython python3-devel python3-prettytable python3-pyyaml python3-setuptools python3-sphinx re2-devel selinux-policy-devel sharutils snappy-devel sqlite-devel sudo thrift-devel valgrind-devel xfsprogs-devel xmlstarlet doxygen meson python3-pyelftools libatomic gperftools-devel -y
    
  4. Set the directory for building RPM packages.
    1. Open the /root/.rpmmacros file.
      1
      vi /root/.rpmmacros
      
    2. Press i to enter the insert mode, set %_topdir to the RPM package build directory (/root/rpmbuild for example), and comment out other lines.
      1
      %_topdir /root/rpmbuild
      
    3. Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
    4. Create a build directory in the rpmbuild directory.
      1
      rpmdev-setuptree
      
  5. Compile the ceph-mgr-cephadm dependency package.
    1. Configure Git.
      1
      2
      3
      4
      5
      git config --global http.proxy http://***** // Change ***** as required.
      git config --global http.sslVerify "false"
      git config --global https.proxy http://***** // Change ***** as required.
      git config --global https.sslVerify "false"
      git config --global http.postBuffer 1048576000 // Increase the Git buffer size to the maximum size (1 GB) of a single Repo file.
      
    2. Compile the python-asyncssh dependency (python-asyncssh 2.7 is recommended).
      1
      2
      3
      4
      git clone https://gitee.com/src-oepkgs/python-asyncssh.git
      cp python-asyncssh/* /root/rpmbuild/SOURCES/
      cp python-asyncssh/* /root/rpmbuild/SPECS/
      rpmbuild -bb /root/rpmbuild/SPECS/python-asyncssh.spec
      
    3. Compile the python-natsort dependency.
      1
      2
      3
      4
      5
      git clone https://gitee.com/src-openeuler/python-natsort.git
      yum install python3-coverage python3-hypothesis python3-pytest python3-pytest-cov python3-pytest-mock -y
      cp python-natsort/* /root/rpmbuild/SOURCES/
      cp python-natsort/* /root/rpmbuild/SPECS/
      rpmbuild -bb /root/rpmbuild/SPECS/python-natsort.spec
      
    4. Install the RPM packages.
      1
      2
      3
      4
      mkdir -p /home/local_rpm/
      mv /root/rpmbuild/RPMS/noarch/* /home/local_rpm/
      cd /home/local_rpm/
      yum install python-asyncssh-help-2.7.0-2.noarch.rpm python3-asyncssh-2.7.0-2.noarch.rpm python3-natsort-8.4.0-3.noarch.rpm -y