openSUSE build service automation

A few weeks ago I’ve hacked together some scripts to use the openSUSE build service as platform for nightly builds. The build is kicked off every hour when something new can be build.

Additionally I’ve created a small PHP client which queries the openSUSE RESTful API and shows packages, binaries, the build log of the last build and a build history.

The code for this is GPL’d and can be cloned via monotone:

$ mtn clone thomaskeller.biz biz.thomaskeller.monotone-nightly

All this could be polished and secured quite a bit more and its even arguable if its a good idea to “misuse” the openSUSE’s infrastructure
for nightly builds like this, but I see it more as a proof of concept. Since their build infrastructure code is open source as well, somebody
can always just setup a build server together with a service and a couple of predefined XEN images and should be good to go.

The concept can now be horizontally applied to other distros and versions as well, basically anything what can run within a Xen instance
(unfortunately this does not include Mac OS X or Windows, so there is still the need for some kind of alternative build infrastructure). I
eventually plan to add a couple of more Xen instances to my project and try to get them build – of course you can be my guest and play with it yourself and lend me a helping hand here 🙂

openSUSE madness

Just in case you wonder why a simple `sudo zypper install
` sometimes loads dozens or more unneeded, but possibly related packages, its not a bug, its a feature!

While Debian by default only hints you to these additional packages during the install phase, openSUSE installs them all by default. Try it with `git` and you’ll get everything here: `cvsps git git-core git-cvs git-email git-gui gitk git-svn git-web libpurple-tcl subversion-perl tcl tk xchat-tcl`.

There are two ways to get rid of this nasty behaviour:

1. Temporarily by adding the `–no-recommends` option to your call

2. Permanently by editing `/etc/zypp/zypper.conf` and configuring `installRecommends = no` in the `[solver]` section.

Hey, at least they have an option to disable it, though its completely beyond me why somebody wants to have this enabled by default. Maybe they get a cookie for every additional package download…?

openSUSE build service client ported

I used to create packages for a couple of open source projects for the openSUSE Linux distribution. They have this really nice build service running on build.opensuse.org, on which you can – despite of its name – also build packages for other Linux distributions like Fedora, Gentoo or Debian.

While the web-based interface of the service is nice, some configurations and local builds require their command line client osc though, which is python-based and works similar to subversion. This client however was only packaged for the main distros the build service itself supports, but was unavailable for others like f.e. Mac OS X, so I created a MacPort for it today (installable via sudo port install osc).

Of course local Linux builds are not possible with it, as we’re missing the complete environment, but I think its still useful for maintaining and managing remote builds on the service itself. Have fun with it!