Rate This Document
Findability
Accuracy
Completeness
Readability

Building the liboath-devel Package

This section applies only to openEuler 20.03. Skip this section for CentOS 7.6.

The openEuler software repository does not include the liboath-devel package. You need to build one.

  1. Download related code and patches.
    1
    2
    3
    4
    cd /home/oath  
    wget --no-check-certificate https://gitee.com/src-openeuler/oath-toolkit/repository/archive/openEuler-21.03-20210330.zip  
    unzip openEuler-21.03-20210330.zip    
    cd oath-toolkit   
    
  2. Install related dependencies.
    1
    2
    yum install gtk-doc pam-devel rpmdevtools  
    rpmdev-setuptree  
    
  3. Save related files to the /root/rpmbuild/SOURCES directory.
    1
    mv /home/oath-toolkit/0001-oath-toolkit-2.6.5-lockfile.patch oath-toolkit-2.6.5.tar.gz /root/rpmbuild/SOURCES/
    
  4. Build an RPM package.
    1
    2
    cd /root/oath-toolkit
    rpmbuild -bb oath-toolkit.spec
    
  5. Use the RPM package as the local Yum repository.
    1
    2
    3
    4
    5
    mkdir -p /home/rpm/oath
    cp -r /root/rpmbuild/RPMS/*  /home/rpm/oath/
    yum install -y createrepo
    cd  /home/rpm/oath
    createrepo ./
    
  6. Configure the Repo file.
    1. Open the local.repo file.
      1
      vi /etc/yum.repos.d/local.repo
      
    2. Press i to enter the insert mode and add the following content to the file:
      1
      2
      3
      4
      5
      6
      [local-oath]
      name=local-oath
      baseurl=file:///home/rpm/oath
      enabled=1
      gpgcheck=0
      priority=1
      
    3. Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
  7. Install liboath dependencies.
    1
    yum install liboath liboath-devel -y