the Robot Construction Kit

Supporting new OSes

This involves changing autoproj itself …

There is a bit of a chicken and egg problem, as you will need to have the autoproj dependencies installed. In other words, you will need to install a proper Ruby/RubyGems environment by yourself. Sorry … Once you’ve got that, run

gem dependency autoproj

and install the Gems it lists.

Adding support in autoproj

  1. get the autoproj source code. It is on Github

    Also, add autoproj_source_dir/lib to RUBYLIB

  2. you will have to find out how your OS is detected by autoproj. To do so, run

    autoproj --os-version

    On Debian, the result is:

    name: debian

    The interesting field is the ‘name’ field. If the result of the above command is “no information about that OS”, then you will need to modify the operating_system method in lib/autoproj/osdeps.rb with custom detection code.

  3. update the OS_AUTO_PACKAGE_INSTALL mapping in lib/autoproj/osdeps.rb. Add a line of the form ‘os_name’ => ‘stanza needed to install a package’ In the stanza, %s is replaced by a space-separated list of packages to install. This placeholder must be quoted with single quotes (see other OSes as examples). The command line must not expect any user intervention.

  4. update lib/autoproj/default.osdeps to define the autoproj dependencies for your newly supported OS


To test the new support, you will have to regenerate an autoproj gem and the bootstrap script. In the autoproj source directory, run

rake dist:package
rake dist:bootstrap

The package is generated in pkg/ and the bootstrap script in bin/autoproj_bootstrap

You can now go into a fresh directory and run

ruby _path_to_autoproj_/bin/autoproj_bootstrap
gem install _path_to_autoproj_/pkg/*.gem
autoproj bootstrap

If the last line went fine, then everything is probably OK. You can now try a bigger install by bootstrapping an existing installation, as for instance

autoproj bootstrap git git://

And don’t forget to send us your patches !

Since you just added a new OS, none of the existing osdeps files will have your OS in them. So you will need to edit the osdeps files from the package sets and add the relevant packages.