Installing the OBS Tool

Description

Open Build Service (OBS) is a general tool for building source packages into RPM packages or Linux images. obs-server is the software package of OBS.

Supported Architectures

OBS supports x86_64 and AArch64 architectures.

OBS Installation

openEuler 22.03 LTS SP4 for the AArch64 architecture is used as an example to demonstrate how to install the multi-architecture obs-server packages.

  1. Check whether the OS is openEuler 22.03 LTS SP4.

    shell
    $ cat /etc/openEuler-release
    openEuler release 22.03 LTS SP4
  2. Configure the Yum source. The repo source for the multi-architecture obs-server must be placed before the everything repo source. An example Yum source configuration is as follows:

    shell
    [everything]
    name=everything
    baseurl=https://repo.openeuler.org/openEuler-22.03-LTS-SP4/everything/aarch64/
    enabled=1
    gpgcheck=0

    RUn the following command to open the repo source file and add the preceding content.

    shell
    sudo vi /etc/yum.repos.d/xxx.repo
  3. Enable the Yum source.

    shell
    sudo yum clean all
    sudo yum makecache
  4. Check whether OBS packages of other versions exist.

    shell
    sudo rpm -qa obs-server obs-common obs-api mod_passenger obs-api-deps obs-bundled-gems passenger ruby ruby-help ruby-irb rubygem-bundler rubygem-io-console rubygem-json rubygem-openssl rubygem-psych rubygem-rake rubygem-rdoc rubygems rubygem-bigdecimal rubygem-did_you_mean
  5. (Optional) To prevent conflicts, uninstall OBS packages of other versions.

    shell
    sudo yum remove -y obs-server obs-common obs-api mod_passenger obs-api-deps obs-bundled-gems passenger ruby ruby-help ruby-irb rubygem-bundler rubygem-io-console rubygem-json rubygem-openssl rubygem-psych rubygem-rake rubygem-rdoc rubygems rubygem-bigdecimal rubygem-did_you_mean

    Note

    • The example repo source is the multi-architecture version of obs-server released with openEuler 22.03 LTS SP4.
    • Installation dependency packages of different versions may conflict, causing installation failure. You are advised to uninstall the preceding software packages before installation.
  6. Install obs-server packages.

    shell
    sudo yum install -y obs-api obs-server
  7. Check whether obs-server packages are successfully installed.

    shell
    $ rpm -qa | grep obs-server
    obs-server-2.10.11-6.oe2203.noarch
    $ rpm -qa | grep obs-api
    obs-api-2.10.11-6.oe2203.noarch

OBS Deployment

  1. Obtain the deployment script at https://atomgit.com/openeuler/infrastructure/tree/master/obs/tf/startup.

  2. Run the restart_service.sh script to deploy the OBS tool.

Usage Instructions

You can build RPM packages using the OBS web UI or the osc CLI tool. For details, see Building an RPM Package.