Cross-Distribution Packaging Made Easy OSDC 2011, Canberra Tim Serong Senior Clustering Engineer SUSE tserong@suse.com
Why Am I Talking About Software Packaging? A tarball is not a product – Arjen Lentz Show of hands: - Who primarily develops software? - Who also packages it? For some distro or other? If you hack on GIMP (etc.) not your problem, but... I have a source code repo & tarballs Casual/new users don't want these things Like takeaway Chinese food without a plasic box
Problems for Developers Multiple Distributions Multiple Versions Multiple Architectures Minimal time, hardware, etc. I basically hack on one distro, one arch Maybe one other, sometimes, in a VM
Solution: The Open Build Service Builds packages for various Linuces build.opensuse.org (or run your own) Give it a tarball and spec/dsc It does the rest - show of hands - who's heard of it? - who's used it? - platform for building packages and ISOs – web ui - nee openSUSE build service - openSUSE - SLES - isos, vms - openSUSE, SLES, RHEL, CentOS, Fedora, Mandriva, Debian, Ubuntu - describe worker, etc. running build kvm - gonna try make this a bit of a rambling show & tell
Packages and Projects All packages are part of a project Multiple developers can work on a project / package Projects define the target distros Packages can be built for all or a subset of distros
Entertainment Over Dinner The story here is about openastro, which I packaged using the web UI only, whist at a friend's place for dinner
Pull from URL Can also pull from git, svn etc.
Can't get around writing a spec Generators for some things (rubygems) Some things are easier than others (python, perl)
A Little More Complexification
Behind Every Great GUI...
We Have a Command Line Interface osc co - checkout package osc add - add files to package osc build - build on local machine osc diff - diff local copy with OBS server osc vc - edit changelog osc ci - checkin changes Osc itself Is, of course, packaged using obs
Playing Well With Others
Collaboration Projects can depend on each other Anyone can branch packages... ...and submit changes back to the main project Maintainers review and (hopefully!) accept
Enough With the Screenshots!
At this point in the presentation, a live demo ensued, where a small “hello world” style C program was packaged for Centos, Debian, Fedora, RHEL, SLES, openSUSE and Ubuntu. OBS project is at: https://build.opensuse.org/package/show?package=osdc2011&proj ect=home:tserong Resultant packages are at: http://software.opensuse.org/search?q=osdc2011&include_home=t rue
So, Was That Easy?
What Did I Miss? OBS under GPL, you can hack it. Used by MeeGo, VLC, GNOME 3, Dell, Cray... Android client, various APIs More distros ISO / VM creation
References http://openbuildservice.org/ http://en.opensuse.org/openSUSE:Build_Service https://build.opensuse.org/ opensuse-buildservice@opensuse.org #opensuse-buildservice on Freenode