Editing Mer/Build/Application Building
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
- | |||
- | |||
This page assumes you have [[../Install OBS|installed OBS]] and setup an account. | This page assumes you have [[../Install OBS|installed OBS]] and setup an account. | ||
Line 11: | Line 9: | ||
== To create a new package == | == To create a new package == | ||
- | These osc commands are done in your own area - use your username after "home:" or make sure you are at your | + | These osc commands are done in your own area - use your username after "home:" or make sure you are at your "Home Project" on OBS. |
Before you can create projects in your home project, you have to create it. | Before you can create projects in your home project, you have to create it. | ||
Line 17: | Line 15: | ||
We will use | We will use | ||
* a name of "merpad" (lowercase); this is the ''package'' name | * a name of "merpad" (lowercase); this is the ''package'' name | ||
- | * a title of "MerPad Example"; this is the human | + | * a title of "MerPad Example"; this is the human title |
* a description of: "A Mer version of Maemopad. Built on OBS by <yourname>"; this is seen upon installation | * a description of: "A Mer version of Maemopad. Built on OBS by <yourname>"; this is seen upon installation | ||
If you use the CLI interface you can also enter a url. | If you use the CLI interface you can also enter a url. | ||
- | |||
- | |||
==Configure your Home Project to Build against Mer== | ==Configure your Home Project to Build against Mer== | ||
- | |||
When you upload some source the build-dependencies need to be resolved. OBS does this by looking at a build target repository; if the dependency isn't there and that repository has its own build target repository then it looks there... and so on. | When you upload some source the build-dependencies need to be resolved. OBS does this by looking at a build target repository; if the dependency isn't there and that repository has its own build target repository then it looks there... and so on. | ||
Line 33: | Line 28: | ||
This means that build dependencies will be looked for in: | This means that build dependencies will be looked for in: | ||
- | + | 1. Maemo:Mer:Extras:Stable | |
- | + | 1. Maemo:Mer:Stable | |
- | + | 1. Ubuntu_9.04 | |
- | + | ||
- | + | ||
===Setting up Build Repositories : WWW=== | ===Setting up Build Repositories : WWW=== | ||
- | |||
* Click on "Home project" in the left navigation bar in the OBS website | * Click on "Home project" in the left navigation bar in the OBS website | ||
* On the right click on "Add Repository" | * On the right click on "Add Repository" | ||
Line 52: | Line 44: | ||
===Setting up Build Repositories : CLI=== | ===Setting up Build Repositories : CLI=== | ||
- | |||
To change the build target repositories (part of the project metadata): | To change the build target repositories (part of the project metadata): | ||
- | osc meta prj home: | + | osc meta prj home:lbt -e |
The XML should look like this (make sure you use your own "name=" value) paying special attention to the <code><repository></code> tags: | The XML should look like this (make sure you use your own "name=" value) paying special attention to the <code><repository></code> tags: | ||
- | < | + | <pre> |
<project name="home:yourname"> | <project name="home:yourname"> | ||
<title>yourname's Home Project</title> | <title>yourname's Home Project</title> | ||
Line 69: | Line 60: | ||
</repository> | </repository> | ||
</project> | </project> | ||
- | </ | + | </pre> |
Here is a full set of [[/XML_Build_Targets|XML Build targets]] for Ubuntu; they aren't needed unless you're doing something clever. | Here is a full set of [[/XML_Build_Targets|XML Build targets]] for Ubuntu; they aren't needed unless you're doing something clever. | ||
- | |||
- | |||
- | |||
- | |||
===Creating Package : WWW=== | ===Creating Package : WWW=== | ||
- | |||
* Click on "Home project" in the left navigation bar in the OBS website | * Click on "Home project" in the left navigation bar in the OBS website | ||
- | * Click on " | + | * Click on "[Create Subproject]" |
- | + | Fill in the values in the boxes and Create Project. | |
- | + | ||
- | + | ||
- | + | ||
- | Fill in the values in the boxes and | + | |
- | + | ||
- | + | ||
- | + | ||
===Creating Package : CLI=== | ===Creating Package : CLI=== | ||
- | |||
Run | Run | ||
osc meta pkg -e home:<username> <package> | osc meta pkg -e home:<username> <package> | ||
This will tell the OBS server about the package. It pops up an editor where you can edit the name/description in XML format and then save. The XML appears like this: | This will tell the OBS server about the package. It pops up an editor where you can edit the name/description in XML format and then save. The XML appears like this: | ||
- | < | + | <pre> |
<package name="merpad"> | <package name="merpad"> | ||
<title>Title of New Package</title> | <title>Title of New Package</title> | ||
Line 104: | Line 82: | ||
HERE | HERE | ||
</description> | </description> | ||
- | <person role="maintainer" userid=" | + | <person role="maintainer" userid="lbt"/> |
- | <person role="bugowner" userid=" | + | <person role="bugowner" userid="lbt"/> |
<url>PUT_UPSTREAM_URL_HERE</url> | <url>PUT_UPSTREAM_URL_HERE</url> | ||
</package> | </package> | ||
Line 120: | Line 98: | ||
</description> | </description> | ||
- | <person role="maintainer" userid=" | + | <person role="maintainer" userid="lbt"/> |
- | <person role="bugowner" userid=" | + | <person role="bugowner" userid="lbt"/> |
<url>PUT_UPSTREAM_URL_HERE</url> | <url>PUT_UPSTREAM_URL_HERE</url> | ||
</package> | </package> | ||
- | </ | + | </pre> |
- | + | ||
- | + | ||
- | |||
+ | ==Uploading Source : WWW== | ||
From your Home Project, you should see a "merpad" entry under Packages. | From your Home Project, you should see a "merpad" entry under Packages. | ||
Select merpad to go to the Package page (you may already be there if you just created it). | Select merpad to go to the Package page (you may already be there if you just created it). | ||
- | Now | + | Now |
- | |||
- | |||
- | |||
- | + | ==Uploading Source : CLI== | |
To get a local (empty) copy make sure you're at your obs root (eg <code>~/maemo/Mer/obs</code>) | To get a local (empty) copy make sure you're at your obs root (eg <code>~/maemo/Mer/obs</code>) | ||
Line 152: | Line 125: | ||
Once there you can copy in the tarball and dsc file from your application... or in this tutorial we'll get them from the web. | Once there you can copy in the tarball and dsc file from your application... or in this tutorial we'll get them from the web. | ||
- | wget | + | wget |
- | + | ||
Then add them to version control | Then add them to version control | ||
Line 165: | Line 137: | ||
This will send the source and dsc to the builder and trigger a build. | This will send the source and dsc to the builder and trigger a build. | ||
- | + | To watch what is going on: | |
- | + | osc buildlog <target> | |
- | + | so | |
- | + | osc buildlog Debian_5.0 i586 | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | To watch what is going on | + | |
- | osc buildlog | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | This does something like a "tail -f" of the Xen builder. | |
- | == | + | === Standalone Project === |
- | + | ||
- | + | On the web, create the (sub)project maemopad. | |
- | + | ||
- | and | + | In the repository section add a repository and from advanced select the Mer project: Maemo:Mer:Devel |
- | + | ||
- | + | ||
- | + | Now we need to pick build targets: | |
+ | <nowiki>https://build.opensuse.org/project/add_target_simple?project=home:<username></nowiki> | ||
- | + | 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:<username>:maemopad | |
- | + | ||
- | + | Now create the package metadata: | |
- | + | osc meta pkg -e home:<username>:maemopad maemopad | |
- | + | and get a local copy (empty still): | |
+ | cd home:<username>:maemopad/ | ||
+ | osc up | ||
- | + | the 'osc up' created a directory so go into it and get the source: | |
+ | cd maemopad/ | ||
+ | wget <nowiki>http://repository.maemo.org/pool/maemo4.1.2/free/m/maemopad/maemopad_2.4.dsc</nowiki> | ||
+ | wget <nowiki>http://repository.maemo.org/pool/maemo4.1.2/free/m/maemopad/maemopad_2.4.tar.gz</nowiki> | ||
- | + | 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. | |
- | + | ||
- | and | + | |
- | + | == 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. | 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. | ||
Line 265: | Line 203: | ||
to register qemu to handle arm binaries | to register qemu to handle arm binaries | ||
- | + | [[Category:Mer]] | |
- | + | ||
- | + |
Learn more about Contributing to the wiki.