Mer/Build/Application Building

This page assumes you have installed OBS and setup an account.

The objective is to walk through creating a package on OBS that you can download to your Mer device using the package manager.

To create a new package
These osc commands are done in your own area - use your username after "home:"

Before you can create projects in your home project, you have to create it using the web interface:


 * Click on "Home project" in the left navigation bar in the OBS website
 * Click on "Create Project"

Run osc meta pkg -e home: This pops up an editor where you can edit the name/description and then save. This will tell the OBS server about the package.

To get a local (empty) copy run osc up You might need to checkout your home project first: osc co home: This makes a package directory so now you can: cp /path/to/ .tar.gz /path/to/ .dsc home: / cd home: / Then add them to version control osc addremove and upload them osc commit

To watch what is going on: osc buildlog so osc buildlog Debian_5.0 i586

This does something like a "tail -f" of the Xen builder.

Standalone Project
On the web, create the (sub)project maemopad.

In the repository section add a repository and from advanced select the Mer project: Maemo:Mer:Devel

Now we need to pick build targets: https://build.opensuse.org/project/add_target_simple?project=home:

And pick one or two ( I picked Debian Lenny and Ubuntu 8.10) This creates a standalone project and builds against another project

Goto your obs base (eg /scratch3/maemo/Mer/obs) and checkout the project: osc co home: :maemopad

Now create the package metadata: osc meta pkg -e home: :maemopad maemopad

and get a local copy (empty still): cd home: :maemopad/ osc up

the 'osc up' created a directory so go into it and get the source: cd maemopad/ wget http://repository.maemo.org/pool/maemo4.1.2/free/m/maemopad/maemopad_2.4.dsc wget http://repository.maemo.org/pool/maemo4.1.2/free/m/maemopad/maemopad_2.4.tar.gz

Use the cheap'n'cheerful 'register all file adds and removes with vc'-command: osc addremove

and then commit the source which uploads it to the OBS osc commit -m "added source"

This will trigger a rebuild and you can access the logs.

Co-existing with Scratchbox
If you use the OBS local build facility and the scratchbox-1 local builder then you need to know how to teach the two emulators how to co-exist.

Both OBS and Scratchbox use binfmt_misc to cause the kernel to invoke (in our case) qemu when it comes across an armel binary.

To disable qemu and enable sbox echo 0 > /proc/sys/fs/binfmt_misc/arm echo 0 > /proc/sys/fs/binfmt_misc/armeb echo 1 > /proc/sys/fs/binfmt_misc/sbox-arm echo 1 > /proc/sys/fs/binfmt_misc/sbox-armeb

To disable sbox and enable arm echo 1 > /proc/sys/fs/binfmt_misc/arm echo 1 > /proc/sys/fs/binfmt_misc/armeb echo 0 > /proc/sys/fs/binfmt_misc/sbox-arm echo 0 > /proc/sys/fs/binfmt_misc/sbox-armeb

Don't do this whilst a build is in progress!

Note that you may need to run : qemu-binfmt-conf.sh to register qemu to handle arm binaries