Mer/Build
(added Standalone Project) |
(tweaking docs) |
||
Line 13: | Line 13: | ||
Assuming a debian or ubuntu development box locally: | Assuming a debian or ubuntu development box locally: | ||
- | Add osc repo | + | Add osc repo to apt. |
deb http://download.opensuse.org/repositories/openSUSE:/Tools/xUbuntu_8.10/ / | deb http://download.opensuse.org/repositories/openSUSE:/Tools/xUbuntu_8.10/ / | ||
or | or | ||
Line 22: | Line 22: | ||
Then | Then | ||
apt-get update | apt-get update | ||
- | apt-get install osc | + | apt-get install osc build qemu |
+ | |||
+ | (may have to use aptitude to install the right qemu - it's version 0.9.2svn6094-1 as of 12 Apr 2009) | ||
+ | (may have to ask on #mer to install the right build - it's version 02009.03.08.6740S as of 12 Apr 2009) | ||
run | run | ||
osc | osc | ||
- | and enter novell.com username/passwd | + | and enter novell.com username/passwd when prompted (note these are stored in cleartext in the config file...FYI) |
Go and login to https://build.opensuse.org | Go and login to https://build.opensuse.org | ||
Line 37: | Line 40: | ||
Now: | Now: | ||
- | osc ls home:lbt | + | osc ls home:lbt:Mer:0.11 |
will list | will list | ||
- | osc co home:lbt | + | osc co home:lbt:Mer:0.11 |
will checkout the project | will checkout the project | ||
+ | |||
+ | |||
+ | == To create a new package == | ||
now | now | ||
Line 67: | Line 73: | ||
This does something like a "tail -f" of the Xen builder. | This does something like a "tail -f" of the Xen builder. | ||
+ | |||
=== Standalone Project === | === Standalone Project === | ||
Revision as of 16:05, 12 April 2009
Contents |
Buiding Mer.
This page is a collection of ramblings about the ongoing experiment with OBS
Mer is based on Ubuntu Jaunty
http://cdimage.ubuntu.com/releases/jaunty/alpha-6/
Installing OBS tools locally
You'll need an account with Novell : http://is.gd/nzxP
Assuming a debian or ubuntu development box locally:
Add osc repo to apt.
deb http://download.opensuse.org/repositories/openSUSE:/Tools/xUbuntu_8.10/ /
or
deb http://download.opensuse.org/repositories/openSUSE:/Tools/Debian_5.0/ /
to
/etc/apt/sources.list.d/obs.list
Then
apt-get update apt-get install osc build qemu
(may have to use aptitude to install the right qemu - it's version 0.9.2svn6094-1 as of 12 Apr 2009) (may have to ask on #mer to install the right build - it's version 02009.03.08.6740S as of 12 Apr 2009)
run
osc
and enter novell.com username/passwd when prompted (note these are stored in cleartext in the config file...FYI)
Go and login to https://build.opensuse.org
Make sure you click the "let me build packages" button.
There is a link to 'Home Project' on the left I think. Follow this and enter a description.
From now on where I use "home:lbt" uses your own "home:username"
Now:
osc ls home:lbt:Mer:0.11
will list
osc co home:lbt:Mer:0.11
will checkout the project
To create a new package
now
osc meta pkg -e home:lbt epeg
edit the name/description run
osc up
This makes a package dir
cp package.tar.gz package.dsc homt:lbt/package cd package
Then add them to version control
osc addremove
and upload them
osc ci
Now we need to pick build targets:
https://build.opensuse.org/project/add_target_simple?project=home:lbt
And pick one or two ( I picked Debian Lenny and Ubuntu 8.10)
To watch what is going on:
osc buildlog <target>
so
osc buildlog Debian_5.0 i586
This does something like a "tail -f" of the Xen builder.
Standalone Project
This creates a standalone project and builds against another project
On the web, create the (sub)project maemopad.
In the repository section add a repository and from advanced select the Mer project: home:lbt:Mer:010
Goto your obs base (eg /scratch3/maemo/Mer/obs) and checkout the project:
osc co home:lbt:maemopad
Now create the package metadata:
osc meta pkg -e home:lbt:maemopad maemopad
and get a local copy (empty still):
cd home:lbt: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.
Linking
To link to a source create a _link file containing:
<link project="linked project name" package="linked package name">
optionally:
<patches> <apply name="name of the first patch" /> </patches>
Sadly these patches apply to the files in the source; so this means you need to apply the diff to the maemo-ised diff file.
Scenarios
In the following, Mer environment is defined as the sum of packages with Ubuntu packages, with Mer repository overlaid on top, not what is built in a 'Mer' project.
1. A lone developer sits down and decides to create a project. He assigns a package name to this and his name as maintainer. He builds it locally for Mer and tries it out as he develops it through dpkg-buildpackage'ing (or osc build?) locally and testing his package. He finishes his release, and dpkg-buildpackage -S -us -uc, generating a .dsc and tar.gz. He would like to build his package for the Mer environment, the X86 and ARMEL targets. He doesn't want to maintain a local toolchain beyond his x86 VMDK, so he submits the build job to the OpenSUSE Build Service (which he has registered with). He can then observe the build progress and he can subsequently download resulting .deb(s) and .changes file to upload to the Mer (Extras) repository.
2. Variation on the first but with OpenSUSE Build Service located on maemo.org
3. A company developer sits down and creates a project. He takes this source from a company source code repository, assigns a package name and setting his name as maintainer. He builds it locally for Mer and tries it out as he develops it through dpkg-buildpackage'ing (or osc build?) locally and testing his package. He generates a release (generating a .dsc and tar.gz) and he would like to target Mer environment, and Ubuntu, the X86 and ARMEL targets. He would like to build locally on his VMDK, as the source code should never leave the company premises. He can then watch the build progress and subsequently gets the resulting .deb(s) and .changes, to be able to upload. He should not need a login at all to build locally
4. Same as 3, but is okay to need a login, it is assumed there is a OBS Server appliance with build workers in the company.
Naming and Deltas
Mer is derived from Ubuntu with the intial releases being based on Jaunty.
This means that in general you get Ubuntu packages.
In OBS terms, Mer builds against Ubuntu Jaunty (ie build-dependencies are met from Jaunty)
However, Maemo provides some excellent libraries, UIs and applications that Mer will use.
So Mer is "linked to" the OBS Maemo project (which just contains an upload of the Maemo source)
mer=orig+delta(deb)+delta(maemo)+delta(mer) mer!=orig+delta(deb+maemo+mer)