This is a quick tutorial how to branch packages on OBS (hosted by Kolab Systems), for improving the Debian packages.

Please see also the step by step instructions in the Kolab documentation.

My steps show how to fix the bug 2404:

  1. Register a user
  2. Create a home project by clicking “Home Project” in the upper right corner.
  3. Go to project “Kolab Winterfell”:
  4. Since the problem is a missing file ( in package pykolab, go to package
  5. Branch the package by clicking “Branch package”. Confirm with “OK”
  6. Now you are redirected to your branched version of the package, in my example:
  7. Go back to your project,; click on Repositories, and remove all distributions that are of no interest to you. That way there are no unnecessary builds on the server. I keep only Debian 7.0. If the 64 bit version is what you want, you can also disable the 32 bit build, by hovering over the green icon, and selecting “Explicitly disable”.
    Also make sure that the “publish” flag is set for the distribution that you want to use.
  8. Now go back to “Overview”, and click on package “pykolab”. You could actually edit files directly in the web interface, and that would trigger a new build. But for the issue regarding the missing file, we need to edit a file inside the debian.tar.gz, and it is easier to use the osc command line tool for that.
  9. Install osc on your own local machine. It is a bit like a git client. It is availabe for many distributions.
  10. Checkout your project to your local machine:
    osc -A checkout home:timotheus:branches:Kolab:Winterfell
    cd home:timotheus:branches:Kolab:Winterfell/pykolab
  11. Now you untar the file debian.tar.gz, and edit the file
    tar xzf debian.tar.g
    cd debian
    vi pykolab.install
  12. check for the missing files, and add new lines, and save:
  13. tar the file again, and delete the debian directory:
    tar czf debian.tar.gz debian
    rm -Rf debian
  14. In order for the package to be actually installed when you want to test it, and because it is good practise anyway, you have to update the files debian.changelog and pykolab.dsc as well:
    pykolab.dsc: modify the line with Version, eg. Version: 0.6.8-0~kolab1 to Version: 0.6.8-0~kolab1.1
    debian.changelog: copy the top lines, change the version number the same way as in pykolab.dsc, modify the description, and your author name
  15. Before you can commit, make sure you add the following lines to your file ~/.oscrc:
  16. Now commit your changes with the osc tool:
    osc commit -m “adding missing files and, fixing bug 2404”
  17. This will upload your changes to the OBS server, and immediately trigger a rebuild of the package pykolab.
  18. You can now install your packages, similar to installing the nightly packages, just replace the username in /etc/apt/sources.list.d/kolab.list
    Edit: you should add the development packages too, since currently 3.1 is not stable for Debian yet:

    cat > /etc/apt/sources.list.d/kolab.list <<FINISH
    deb ./
    deb ./
    deb ./
    deb$username:/branches:/Kolab:/Winterfell/Debian_7.0/ ./
    apt-key add Release.key; rm -rf Release.key
    apt-key add Release.key; rm -rf Release.key
    apt-key add Release.key; rm -rf Release.key
    apt-key add Release.key; rm -rf Release.key
    cat > /etc/apt/preferences.d/kolab <<FINISH
    Package: *
    Pin: origin
    Pin-Priority: 501
    apt-get update
    apt-get install kolab
  19. When you have tested your packages, you can click “Submit package” on your pykolab project page: to allow your fixes to go upstream again!
    You can see the submit request here:


  • To reinstall the Debian server for testing, I am using this script:
  • For compiling Debian locally with osc, first you need to install the osc and the build package:
    apt-key add - &lt; Release.key echo 'deb /' &gt;&gt; /etc/apt/sources.list.d/osc.list 
    apt-get update
    apt-get install osc build

    Otherwise you would get this error:

    Error: you need build.rpm with version 2007.3.12 or newer.

    The command for the local build looks like this:

    osc build Debian_7.0 x86_64 roundcubemail-plugins-kolab.dsc
Tags: , ,
Posted in Software Development | Comments Closed

The nightly builds for Kolab have been running nicely for a while, and they are now compiled on the Kolab Systems OBS server.

Now I have added Debian packages too.

This might help other people interested in packages for Debian as an example, how to branch packages on OBS.

I have extended the documentation, and you can see a preview here:

This includes documentation how to create a nightly build for CentOS or Debian, and how to install from a nightly build, for both distributions.

Unfortunately, there is still some work left to make the Debian Kolab 3.1 packages more stable. But one problem (setup-kolab not running) has been solved in this nightly build already.

Tags: ,
Posted in Software Development | Comments Closed

The default port for the Open Build Service for the published repositories is 82.

If you are using the Internet through an http proxy, this can cause trouble, as it did for me when I wanted to install from the OBS run by KolabSystems, for installing Kolab from OBS: Downloading from the URL does not work.

The solution is to setup a small php script on a server somewhere on the Internet, that does not have the restrictions of port 82.

In my sample configuration, I use a Debian server with Lighttpd and PHP.


apt-get install lighttpd spawn-fcgi php5-curl php5-cgi

changes to /etc/lighttpd/lighttpd.conf:

server.modules = (
fastcgi.server = ( ".php" =&gt; ((
                     "bin-path" =&gt; "/usr/bin/php5-cgi",
                     "socket" =&gt; "/tmp/php.socket",
                     "max-procs" =&gt; 2,
                     "bin-environment" =&gt; (
                       "PHP_FCGI_CHILDREN" =&gt; "16",
                       "PHP_FCGI_MAX_REQUESTS" =&gt; "10000"
                     "bin-copy-environment" =&gt; (
                       "PATH", "SHELL", "USER"
                     "broken-scriptfilename" =&gt; "enable"
url.rewrite-once = (
    "^/obs\.kolabsys\.com/index.php" =&gt; "$0",
    "^/obs\.kolabsys\.com/(.*)" =&gt; "/$1"

and in /var/www/

// it seems file_get_contents does not return the full page
function curl_get_file_contents($URL)
    $c = curl_init();
    curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($c, CURLOPT_URL, str_replace('&#038;', '&#038;', $URL));
    $contents = curl_exec($c);
    if ($contents) return $contents;
    else return FALSE;
$page = $_GET['page'];
$filename = basename($page);
$content = curl_get_file_contents("".$page);
if (substr($page, -strlen("/")) === "/")
        # print directory listing
        $content = str_replace("", "", $content);
        $content = str_replace('href="/', 'href="', $content);
        echo $content;
else if (substr($filename, -strlen(".repo")) === ".repo")
        header("Content-Type: plain/text");
        echo str_replace("", "", $content);
        header("Content-Type: application/octet-stream");
        header('Content-Disposition: attachment; filename="'.$filename.'"');
        header("Content-Transfer-Encoding: binary\n");
        echo curl_get_file_contents("".$page);

Now it is possible to download the repo files like this:

cd /etc/yum.repos.d/
yum install kolab

This works for all other projects and distributions on too.

Feel free to use my “mirror”, but also consider to set it up for yourself, if you are using it extensively!

Tags: , ,
Posted in Software Development | Comments Closed