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
HowTo improve Debian packages using OBS
Tagged on: