wiki:WikiStart/OngoingWork/BinaryPackaging

This page deals with native binary packaging (mostly for linux distributions)

Some proof-of-concept work has already been done, using the open build service as a target distributed package build system.

The osc works by having a SVN-like workflow locally. Packages tarballs and/or control files (the obs can checkout repositories by itself) are added in a package folder and then checked in to the OSC. On checkin, the osc queues the build.

For now, we focus on ubuntu packages, but we need to keep an eye on the possibility to package for non-deb targets (e.g. RPM) since the obs supports them.

Current state

Scripts are in base/admin_scripts:

  • the main script is osb_package. Started in an autoproj installation, it generates a set of osc-ready debian packages and imports them into an OSC checkout (if the --osc option is given).

Open issues:

  • packaging of 'import_packages'

Resolved issues:

  • packaging for ruby packages:
    • done by first creating a gem and then creating a debian package from it -- requires to use gem2tgz to allow for patching
    • some gems we depend on are not available as debian packages, these gems are fetched and converted using gem2deb
  • ubuntu universe packages are automatically included if available and required. This relies on the functionality of
        obs_ubuntu_universe_package <package-name>
    

Separation in https://build.opensuse.org/project/subprojects/home:sylvainjoyeux base on the following intuition:

  • ubuntu:12.04:universe - the ubuntu universe packages that we depend on
  • gems - the gems manually packaged with gem2deb
  • rockrobotics - the rock packages

Remaining questions

  • scheme on integration of the built packages into autoproj installations. There are two ways:
    • have each binary package should install an osdeps file for themselves, and have a way for autoproj to pick those (e.g. AUTOPROJ_ADDITIONAL_OSDEPS envvar). Issue: they don't get installed automatically by autoproj (i.e. users need to install a package manually)
    • make the build generator updates osdeps files that then get added to each package set. Users will then have to manually create osdeps overrides if they do not want to use binary packages and we can have flags allowing to disable these osdeps for whole package sets. Additionally, we will probably have to extend the osdeps overrides to be able to catch more than one package.
  • where to install (/opt/rock to follow the /opt/ros ?)
  • how to version ? (master/, next/ and date tags for the stable, with a symlink from stable to the "current" date tag)

OpenBuildService

Current status at:

Project configuration

Prefer: ruby
Prefer: -ruby1.8
Preinstall: ruby1.9.1
Preinstall: ruby1.9.1-dev
Preinstall: rake
Preinstall: ri1.9.1

Metainformation of project, e.g. see repository on how to embed existing Ubuntu respositories

<project name="home:roehr:rock-robotics">
  <title>rock-robotics test field</title>
  <description>Testing the binary package generation workflow of rock</description>
  <person userid="roehr" role="bugowner"/>
  <person userid="cclausen" role="maintainer"/>
  <person userid="roehr" role="maintainer"/>
  <person userid="sylvainjoyeux" role="maintainer"/>
  <publish>
    <enable/>
  </publish>
  <repository name="xUbuntu_12.04">
    <path project="Ubuntu:12.04" repository="standard"/>
    <path project="home:sylvainjoyeux:ubuntu:12.04:universe" repository="xUbuntu_12.04"/>
    <arch>i586</arch>
    <arch>x86_64</arch>
  </repository>
</project>

How to: packaging

  • perform a local checkout of the openbuild service, i.e.
        osc checkout <osc-checkout-dir>
    
  • clone the obs_patches from git@…:rock/obs_patches.git
  • example utilrb (assuming a rock installation in /opt/workspace/rock):
    obs_package --patch-dir obs_patches --src-dir /opt/workspace/rock/tools/utilrb --obs <osc-checkout-dir>/home:roehr:rock-robotics/ -c --rebuild utilrb
    
  • The previous commands rebuilds and commits (-c), i.e. uploads the generated files
  • Debug information is provided after exporting the environment variable BASE_LOG_LEVEL, e.g. set to DEBUG, INFO or WARN

How to: use

There is a general description on how to use the build system here:

However, most easily you just trying adding the following repository:

deb http://download.opensuse.org/repositories/home:/roehr:/rock-robotics/xUbuntu_12.04 ./

Note, that in case you add a mirror site you might suffer from a sync delay.

Download and install the key:

wget http://download.opensuse.org/repositories/home:/roehr:/rock-robotics/xUbuntu_12.04/Release.key
sudo apt-key add Release.key

Perform update and install as usual, i.e.:

sudo apt-get update
sudo apt-cache search rock-base-cmake
sudo apt-get install rock-base-cmake

The following env.sh should be tried -- pls report errors --, i.e. the main installation directory is (at the moment) /opt/rock:

ROCK_ROOT=/opt/rock
PATH=$ROCK_ROOT/bin:$PATH
CMAKE_PREFIX_PATH=$ROCK_ROOT:$CMAKE_PREFIX_PATH
PKG_CONFIG_PATH=$ROCK_ROOT/lib/pkgconfig:$ROCK_ROOT/lib64/pkgconfig:$ROCK_ROOT/share/pkgconfig:$PKG_CONFIG_PATH
RUBYLIB=$ROCK_ROOT/lib/ruby/1.9.1/:$ROCK_ROOT/lib/ruby/1.9.1/x86_64-linux:$RUBYLIB
export PATH
export CMAKE_PREFIX_PATH
export PKG_CONFIG_PATH
export RUBYLIB 
Last modified 6 years ago Last modified on 03/06/14 16:17:03