Found: OBS service documentation

For some unknown reason, it is really hard to find good documentation on how to use the _service file for the Open Build Service.

The Open Build Service (OBS) is a project from the openSUSE team, and they run a public instance at This server application provides a build environment for many distributions’ package methods. I use it for my public Devuan packages (see my “OBS” link in the links section of this site, usually a sidebar on each page).

The _service file has some generic documentation in the main obs online man pages. I find this documentation extremely lacking in explaining how to use a service file fully. And I’ve learned by examples extant on the public OBS instance already.

So, just to be clear, a _service file is a file in an obs project, that defines a number of steps for the server to take. By default, each service runs for each commit, or whenever you select the “trigger services” button on the web page for a project.

I finally found a list of available service names to use! And the links take you to the projects on the Internet where they live and are fully documented. There are quite a few I plan on using in the future… like regex_replace.

Example _service file

With my service file set up to pull down the source debian/ directory as debian.tar.xz, and the entire source as a tar.gz, and extract out my .dsc file from that source, I can manage my OBS project way easier.

   <service name="tar_scm">
      <param name="scm">git</param>
      <param name="url"></param>
      <param name="subdir">debian</param>
      <param name="filename">debian</param>
      <param name="revision">local-dsc-file</param>
      <param name="version">_none_</param>
   <service name="recompress">
      <param name="file">*.tar</param>
      <param name="compression">xz</param>
   <service name="tar_scm">
      <param name="scm">git</param>
      <param name="url"></param>
      <param name="revision">local-dsc-file</param>
      <param name="version">_none_</param>
   <service name="recompress">
      <param name="file">*.tar</param>
      <param name="compression">gz</param>
   <service name="extract_file">
      <param name="archive">*.tar.gz</param>
      <param name="files">*/*.dsc</param>

The .dsc file is modified from the output from a proper debuild -us -uc locally. I learned the trick of zeroing out the checksums from another OBS project, waterfox-classic-kpe.

Format: 3.0 (quilt)
Source: fluxbox-themes-stackrpms
Binary: fluxbox-themes-stackrpms
Architecture: all
Version: 0.0.1-1+devuan
Maintainer: Ben Stack 
Standards-Version: 4.1.4
Build-Depends: debhelper (>= 12~)
 fluxbox-themes-stackrpms deb x11 optional arch=all
 00000000000000000000000000000000 1 fluxbox-themes-stackrpms_0.0.1.orig.tar.gz
 00000000000000000000000000000000 1 fluxbox-themes-stackrpms_0.0.1-1+devuan.debian.tar.xz

And since the filenames do not match, I think that section is not even necessary. Thankfully OBS figures out what tarballs to use where for the debuild. To quote my original distro (Korora): “Standing on the shoulders of giants.”


I can control my osc package with only one file in the obs source control: the _service file! This reduces the need to pass multiple assets, which can be large.


Internet searches

How I actually found the main weblink open build service services recompress


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.