Build Service Jumps Application Installation Hurdles

Every open source project must deal with the same problem: how do you package your application so that it installs and runs properly on all the major distributions? Use a package manager to bundle the application, configuration scripts and any necessary libraries into a single file. The two most popular methods of accomplishing this are the RPM Package Manager (RPM) and the Advanced Packaging Tool (APT).

RPM has been around for quite a while and is a part of the Linux Standard Base. It was originally developed by Red Hat but has been adopted by a number of other distributions. (For a good history of RPM see the article “The Story of RPM” at Red Hat Magazine). openSUSE is one of the distributions that adopted RPM and has built their entire software update strategy around the use of RPM along with YAST (Yet another Setup Tool) and YUM (Yellow dog Updater, Modified).

For Debian-based distributions the preferred method is APT. Debian software packages typically come in the form of .deb files. Some of the familiar tools for dealing with APT distributions include dpkg, apt-get, aptitude, synaptic and others. Ubuntu uses an APT-based approach for their automatic update manager along with the Synaptic package manager as the preferred user interface.

While these two different approaches to package management solve the biggest problem of providing a way to bundle up all the files necessary to install your application, they don’t directly address the issue of versioning both from an operating system (OS) and an application perspective.

One of the biggest issues when trying to distribute software is library and OS dependencies. This frequently drives developers to restrict their application to a limited number of OS choices. That’s exactly the problem that the openSUSE Build Service (OBS) is attempting to solve.

What Is It?

From the website: “The openSUSE Build Service is an open and complete distribution development platform that provides a transparent infrastructure for development of the openSUSE distribution.” While primary support is for openSUSE distributions, it also supports other RPM-based distributions including CentOS, Fedora, Red Hat Enterprise Linux, and Mandriva. Debian-supported platforms include Debian Etch and the various flavors of Ubuntu (including Kubuntu, Xubuntu, and others) 6.06, 7.04, 7.10, and 8.04.

For the developer the hope is that OBS will take the pain out of building and distributing open source applications. Most projects of any size use one of the popular source code control systems, CVS, GIT, or SVN, to maintain their code. If you want to try out the latest and greatest, you typically have to build the application from source. While this isn’t a big deal for developers, it is way over the head of most typical users.  

As a user the biggest issue comes into play when you need a version of an application for an older OS release. While a typical casual user will keep their OS updated, it’s not uncommon for business users to stay with a specific release much longer. Large IT shops go to great lengths to test OS releases for compatibility with a long list of applications and are reluctant to upgrade very often. The OBS Web-based user interface makes finding an application for a specific distribution drop dead simple.

What Does It Involve?

The best place to start reading to get a feel for how the service works is the Build Service Tutorial. It assumes you have a general understanding of RPMs and how to create one. Basically, you start with creating a free account, as shown in Figure 1.

Creating a New Account

Figure 1: Creating a New Account

Next, you create and upload your packages (see Figure 2).

Adding a New Project

Figure 2: Adding a New Project.

Then you add the repositories from a list of available distributions and architectures, as displayed in Figure 3. From here you then have the option to build your package using the OBS build service. This process can take a while especially if you choose to build packages for a long list of distributions and processors. The last step is to check your log files and test.

Adding a New Repository

Figure 3: Adding a New Repository.

One of the basic design goals of OBS was to make using the tool both simple and scriptable. The OBS Web interface gives you a simple Web form-driven tool to create a new project. You can also edit your project details, see the status of a build, and browse other public projects. For more complex projects there are two additional options. First there is the command line client which makes it possible to create scripts that completely automate the process. There’s also a rest API available via curl should you chose to go that route.

If you don’t have experience with RPM and the intricacies of spec files, there are a number of good tutorials on the web. The OBS Tutorial page has a list of resources at the bottom of the page with links to a number of good sources of information for RPM. There are also a number of example spec files available from the Novell Forge repository. Starting with something simple is always the best way to get going with a new tool, and OBS is not different.

Novell Forge is a collaboration site for open source projects providing source code control, bug tracking, forums and documentation. You can use Forge in conjunction with OBS as a host for your source files. OBS also supports using SourceForge should you choose to. As an interesting aside, the web interface to OBS is written with Ruby on Rails. All source code is available from the OBS SVN repository. You can check out the entire tree with the command:

svn co https://forgesvn1.novell.com/svn/opensuse/trunk/buildservice

Why Use It?

The short answer is because it works. While it might not be the 100 percent solution, it does offer a strong capability that addresses the majority of the issues with building and distributing software for multiple Linux distros and processor architectures. Some might have an aversion to using anything from Novell because of their ties to Microsoft. If that’s your problem then you can download the source and host it on your own server and use SourceForge for your code repository.

Another good reason is that the roadmap for future capabilities includes a number of really cool features. Of particular note to the Linux Foundation is the option to create a LSB build environment which is limited to the defined interfaces in the LSB. This will make it possible to create a single RPM which would run on all OS platforms that support the LSB.

Novell has another tool in the works that builds on the concept of OBS to create virtual distribution images on the fly. This will make it a simple process to create a XEN or VMWare image with the OS and applications you need for a specific task. All of this is made possible through the work done with OBS. All of these ideas and more are tracked on the OBS wiki under the Build Service/Future ideas page.

The bottom line is that OBS works and provides a great capability for developers and users alike. It’s more than worthy of your consideration.

5
Average: 5 (1 vote)
Copyright © 2008 Linux Foundation. All rights reserved.
LSB is a trademark of the Linux Foundation. Linux is a registered trademark of Linus Torvalds