Mer/Build

(tweaking docs)
(Undo revision 50502 by 94.23.1.28 (Talk) due to vandalism)
 
(72 intermediate revisions not shown)
Line 1: Line 1:
-
=Buiding Mer.=
+
{{Mer}}
-
This page is a collection of ramblings about the ongoing experiment with OBS
+
This section documents how to use the [http://build.opensuse.org openSUSE Build Service] with Mer. More on the openSUSE Buildservice [http://en.opensuse.org/Build_Service here].
-
https://build.opensuse.org
+
A simple way to think of OBS is as a version control system for source tarballs and .dsc files and whenever you commit a tarball the build farm compiles it for you.
-
Mer is based on Ubuntu Jaunty
+
Over and above this OBS provides a local tool called osc that lets you do clean builds not only for your own OS and architecture but also for other distros and even other architectures (armel).
-
  http://cdimage.ubuntu.com/releases/jaunty/alpha-6/
+
-
== Installing OBS tools locally ==
+
==Getting Started==
-
You'll need an account with Novell : http://is.gd/nzxP
+
-
Assuming a debian or ubuntu development box locally:
+
Approaching OBS can look overwhelming... but it is perfectly possible to get an existing package built for Mer just using a web browser.
-
Add osc repo to apt.
+
The first thing to do is to [[/Install OBS|install OBS]]. This will provide access to the tools and source used to build Mer.
-
  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
+
Then you should become familiar with building an application using OBS but outside the Mer repository. This is explained in detail in [[/Application Building|Application Building]] which takes you through an example application.
-
  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
+
==Mer Internals==
-
  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
+
When you are comfortable building your own applications for Mer then you can look at the [[Mer/Packages|Mer Packages]] and start helping to improve Mer itself.
-
Make sure you click the "let me build packages" button.
+
There are [[/Processes|processes]] used to manage the Mer packages which may include [[/UsingGitorious|Using Gitorious]].
-
There is a link to 'Home Project' on the left I think. Follow this and enter a description.
+
The OBS [[/Cross Build|cross build]] page describes how the OBS has been accelerated.
-
From now on where I use "home:lbt" uses your own "home:username"
+
== OBS Build Farm ==
-
Now:
+
http://wiki.maemo.org/Mer/Documentation/Build/Common_Problems
-
  osc ls home:lbt:Mer:0.11
+
-
will list
+
-
  osc co home:lbt:Mer:0.11
 
-
will checkout the project
 
 +
== QEMU armel image ==
-
== To create a new package ==
+
An Ubuntu armel image for QEMU is available from here:<br>
 +
http://gitorious.org/mer-toggles/qemu-armel-image (login: qemu/qemu)
 +
<br>
 +
Based on these instructions:<br>
 +
https://wiki.ubuntu.com/ARM/RootfsFromScratch<br>
-
now
+
This is NOT a Mer development image like Mer VMDK is.
-
  osc meta pkg -e home:lbt epeg
+
-
edit the name/description
+
== Mer Source ==
-
run
+
Currently you cannot <code>apt-get source</code> for Mer.
-
  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:
+
Our approach requires you to get a Novell account and is similar to the one in HHGTTG:
-
  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:
+
<blockquote>
-
  osc buildlog <target>
+
"`...You hadn't exactly gone out of your way to call attention to them had you? I mean like actually telling anyone or anything.'<br>
-
so
+
`But the plans were on display...'<br>
-
  osc buildlog Debian_5.0 i586
+
`On display? I eventually had to go down to the cellar to find them.'<br>
 +
`That's the display department.'<br>
 +
`With a torch.'<br>
 +
`Ah, well the lights had probably gone.'<br>
 +
`So had the stairs.'<br>
 +
`But look you found the notice didn't you?'<br>
 +
`Yes,' said Arthur, `yes I did. It was on display in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign on the door saying "Beware of The Leopard".'"
 +
</blockquote>
 +
<br>
 +
But slightly simpler...
-
This does something like a "tail -f" of the Xen builder.
+
Nb... the fix is trivial and simply requires you to modify the GPL licensed OBS system to publish debian style source distros ... patches accepted.
-
 
+
-
=== 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)
+

Latest revision as of 12:03, 9 February 2013

Image:Mer infobox icon.png
Mer is back : Please visit http://www.merproject.org to learn more about this news.


This section documents how to use the openSUSE Build Service with Mer. More on the openSUSE Buildservice here.

A simple way to think of OBS is as a version control system for source tarballs and .dsc files and whenever you commit a tarball the build farm compiles it for you.

Over and above this OBS provides a local tool called osc that lets you do clean builds not only for your own OS and architecture but also for other distros and even other architectures (armel).

Contents

[edit] Getting Started

Approaching OBS can look overwhelming... but it is perfectly possible to get an existing package built for Mer just using a web browser.

The first thing to do is to install OBS. This will provide access to the tools and source used to build Mer.

Then you should become familiar with building an application using OBS but outside the Mer repository. This is explained in detail in Application Building which takes you through an example application.


[edit] Mer Internals

When you are comfortable building your own applications for Mer then you can look at the Mer Packages and start helping to improve Mer itself.

There are processes used to manage the Mer packages which may include Using Gitorious.

The OBS cross build page describes how the OBS has been accelerated.

[edit] OBS Build Farm

http://wiki.maemo.org/Mer/Documentation/Build/Common_Problems


[edit] QEMU armel image

An Ubuntu armel image for QEMU is available from here:
http://gitorious.org/mer-toggles/qemu-armel-image (login: qemu/qemu)
Based on these instructions:
https://wiki.ubuntu.com/ARM/RootfsFromScratch

This is NOT a Mer development image like Mer VMDK is.

[edit] Mer Source

Currently you cannot apt-get source for Mer.

Our approach requires you to get a Novell account and is similar to the one in HHGTTG:

"`...You hadn't exactly gone out of your way to call attention to them had you? I mean like actually telling anyone or anything.'
`But the plans were on display...'
`On display? I eventually had to go down to the cellar to find them.'
`That's the display department.'
`With a torch.'
`Ah, well the lights had probably gone.'
`So had the stairs.'
`But look you found the notice didn't you?'
`Yes,' said Arthur, `yes I did. It was on display in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign on the door saying "Beware of The Leopard".'"


But slightly simpler...

Nb... the fix is trivial and simply requires you to modify the GPL licensed OBS system to publish debian style source distros ... patches accepted.