Linaro Open Build Service

To build packages for generic Linux distributions (Debian, Ubuntu, Fedora, CentOS, OpenSUSE) Linaro is now moving to Open Build Service created by SuSE. Typically it's known as OBS.

Building to overlays from ci.linaro.org

In case you have used ci.linaro.org for building Debian or rpm packages, using the build-package and build-rpm jobs, similar OBS jobs have been added. For DEB packages use:

https://ci.linaro.org/job/build-package-obs/

Similar to the existing build-package job. Previously you would use parameters "linaro-overlay" and "stretch". In OBS you would target "linaro-overlay-stretch" to get your packages to https://obs.linaro.org/project/show/linaro-overlay-stretch.

And for RPM packages use:

https://ci.linaro.org/job/build-rpm-obs/

To observe and follow the build results, you can go to https://obs.linaro.org/ and select your recently submitted package from the "latest updates tag". Alternatively you can construct the URL to your build with https://obs.linaro.org/package/show/REPOSITORY/PACKAGE

Using OBS directly

If you want PPA style personal or project specific repositories, you will need to create a OBS account.

1.png

  • Choose the project to build packages against in your home project:
    1. Select "home project" from top right

2.png

  1. Select repositories and click on "add repository"

3.png

  1. Type linaro-overlay-stretch into project
  2. Select only the architectures you need from Armv7hl, aarch64 and x64_64.

4.png

  1. Click on add repository
  2. Observe the builds getting scheduled
  • Install "Open Build Service commander", aka "osc"
    • apt install osc
  • set skeleton $HOME/.oscrc:

[general]
apiurl = https://obs.linaro.org
use_keyring = 1
  • run "osc ls" and enter same firstname.lastname and your Linaro password.
    • Notice that if you don't use use gnome or kde, you will need to remove the "use_keyring" bit or find your own way to provide a safe keyring for your password.
  • check out your home project:

osc co home:firstname.lastname
  • Include your first package:

cd home:firstname.lastname
mkdir hello
cd hello
apt-get source -d hello
osc add .
osc ci -m "initial import"
  • Now back in the web browser, observe the package hello being scheduled for builds

5.png

  • If you want submit packages to OBS via jenkins, you need to add user "jenkins" to the maintainers of your project.
  • You can create subprojects under your home project to have multiple repos for different uses
  • If you need new toplevel project, submit a ticket at https://projects.linaro.org/servicedesk/CTT/

Building software locally with OSC

Sometimes it's more convinient to run builds locally before uploading to obs builders. The osc tool allows with with "osc build" command. In a typical workflow, you have an unpacked source tree. Update debian/changelog if needed and store source package

dpkg-buildpackage -rfakeroot -S -d
cd ..

If you changed package version, remove the old .dsc file, and add the new one

osc rm packagename_oldversion.dsc
osc add packagename_newversion.dsc
osc build -j`nproc`

Once you pass a successful build, you commit the changes to push them to server

osc commit

Using repositories created by OBS

The built packages get uploaded to http://obs.linaro.org/PROJECT/REPOSITORY/

Install the Linaro repository key from:

wget -O -  http://obs.linaro.org/linaro-overlay-stretch/Debian_9.0/Release.key|sudo apt-key add - 

To add an Debian repository, create /etc/apt/sources.list.d/linaro-obs.list

deb http://obs.linaro.org/linaro-overlay-stretch/Debian_9.0/ ./

Home projects are under:

http://obs.linaro.org/home:/

OBS (last modified 2018-10-08 08:13:28)