About

The Open Build Service (OBS) is a really amazing tool to build packages for various Linux distributions. The only problem is that its documentation lies all over the place and you don't really find a good starting point. I think I understand the basic concept now after packaging the Gnome Encfs Manager for openSUSE, Fedora and Arch on OBS and I will give you a small guide if you want to try out the Open Build Service Appliance in a virtual machine (I prefer Virtualbox). The appliance consists of a self-installing SUSE Linux which comes with a pre-configured instance of OBS which allows you to build the packages locally.

Installing the appliance in Virtualbox

After you downloaded the OBS Appliance you have to configure the virtual machine.
I used the following configuration:

  • Name: OBS Appliance
  • Type: Linux
  • Version: openSUSE (64 bit)
  • Memory size: 2048 MB
  • Hard drive size: 20 GB

You should also change the network adapter attachment from "NAT" to "Bridged Adapter" in the "Network"-settings.

Now boot up the machine with the appliance iso and select "Install_OBS_Server" from the menu. If it asks to destroy all data on the disk, confirm with "YES". It will now install the appliance and after the virtual machine has rebooted the OBS is ready to be accessed via the web-interface.

Configuring the OBS

Open up your favorite web-browser and type in the address https://linux. You can savely ignore the certificate-warning and after you added an exception for the site, you will be greeted by the OBS web-ui. Note, that you should enable Javascript for the web-ui to work correctly.
Now click on "Log in" and use "Admin" and "opensuse" as Username and password.
Next open the address https://linux/configuration/connect_instance (or click on "Configuration" -> "Interconnect"). Click on the "build.openSUSE.org"-button and "Save changes".

About projects and packages

After you clicked on "Save changes", you will be presented with project-creation dialog. Simply click on "Create project" because as our "real" projects will be created as sub-projects.
So let's talk about projects and packages. First, what is a project? Each project can contain a set of packages which can depend on each other. If you e.g. want to build a package "hello-world", which needs gcc to compile, you need to satisfy the dependency by having a successful build of the package "gcc" in that project (or more precisely in the project's repository) . Of course it's not very practical to have all packages of a complete Linux-distribution inside your projects and that is were repositories come into play. There are already built packages in the repositories for the by OBS supported Linux-distributions on the servers at build.opensuse.org and because we set up the "Interconnect" pointing there, we are able to build our project by using the packages there.

Creating and building a test project

Let's say, you want to build the Gnome Encfs Manager for openSUSE 12.3.
First create a subproject inside your "home" project by clicking on "Subprojects" -> "Create subproject". As project-name, choose gencfsm (or something else, it doesn't really matter). Click on "Create Project". The bottom left box should now read "This project does not contain any packages".
Click on "Create package" and enter "gnome-encfs-manager" as its name. Click on "Save changes".
Now we need to add the files which are necessary to build the package for openSUSE.
Download the "tar.gz" archive and the ".spec" files from here and upload them by clicking on "Add file". After you uploaded both files you have to specify the so-called "build targets". While this might sound a little complicated at first, all you actually do is to set which repositories you want to build the package against. Click on "build targets" in the "Build Results"-box (or use this link), check the box next to openSUSE 12.3 and click on "Add selected repositories". The build will now start immediately as OBS does its job. You probably want to disable the "armv7l" architecture by clicking on "Edit repository", uncheck the corresponding checkbox and hit on "Update openSUSE_12.3" before you further explore OBS. If you followed the guide exactly until here you can view the build-progress on the package's overview.
The resulting packages can be found either by clicking in the distribution in the "Build Results"-box or by pointing your browser to http://linux:82/home:/Admin:/gencfsm/.

PS: This guide is based on OBS version 2.4


No comments yet.

Leave a Comment

I respect your privacy
I don't run any trackers on this site.

Your questionable browsing-history should remain between you and the NSA ;-)
Contact