Meego Wiki
Views

Getting started with OBS

From MeeGo wiki
(Difference between revisions)
Jump to: navigation, search
(Into Harmattan: How to install from your PPA!)
(From the terminal)
Line 55: Line 55:
At this point the OBS will try to build your project remotely. You can also build locally by doing <code>osc build</code>
At this point the OBS will try to build your project remotely. You can also build locally by doing <code>osc build</code>
 +
 +
If you add new packages later on or commit changes from another computer you can update your local copy by doing
 +
osc update
===Using the webinterface===
===Using the webinterface===

Revision as of 16:55, 5 July 2011

The MeeGo Open Build System (OBS) seems rather complicated, this page will attempt to make it nice and easy to get started. See also the Mer project's documentation on application building with OBS.

It's a work in progress, feel free to add and modify!


Contents

Pre-requisites

  • You need a meego.com login to be able to access the OBS
  • You need to be running one of the supported OSes
  • Install osc (for example, apt-get install osc may work out-of-the-box on recent versions of Ubuntu & Debian, other repositories are available on openSUSE tools)

Setting up your home project

Your home project is like a home directory in which you can create sub-projects, repositories, etc.

Overview

OBS is based around projects, packages and repositories. Packages have a set of files (source code, packaging meta-data, etc.) which are compiled by build servers against particular distributions. Each distribution results in your code being available in a repository.

Setting up a sub-project

A sub-project allows you to group related activities together.

  • In the "Overview" tab for your home project, select "Actions > Create subproject".

Creating a project

A project is required before anything can be built.

  • Go to the "Projects" tab for the project in which you wish to create it
  • Select "Add a new package"
  • Enter a UNIX-style (all lower case) "Name"
  • Enter a title-case, with appropriate spacing, "Title"
  • Enter a brief "Description"
  • Click "Save Changes"

Adding repositories

  • Go to the "Repositories" tab for the project in question
  • Click "Add Repository"

Adding files to a package and building them

From the terminal

  • Checkout (like SVN) your home project, which will contain all your sub-projects and packages
 osc -A https://api.pub.meego.com co home:[username]
  • Add files to your local copy
    • For MeeGo this will be a .spec file and a tarball containing your source code, etc.
    • For Harmattan this will be a .dsc file, source tarball and debian.tar.gz (this allows one to keep the debian directory out of the source)
 osc add [filename]
  • Commit the files
 osc commit

At this point the OBS will try to build your project remotely. You can also build locally by doing osc build

If you add new packages later on or commit changes from another computer you can update your local copy by doing

osc update

Using the webinterface

  • Add the correct files as listed above and they will be automatically built for you

Installing packages

Into your MeeGo system

Main article: Zypper#Adding_a_repository

  • Once packages are built, You can include them in your MeeGo installation.
  • The general method is:
  zypper ar -f http://repo.pub.meego.com/home:/username/repository/ title
  zypper in <package>
    • Where:
    • username is your user
    • repository is the repository branch name
    • title is the name zypper will use for the repository

Into Harmattan

  1. Find the repository address:
    1. Go to the appropriate project's Overview page (e.g. your home project, or sub-project)
    2. Click on the MeeGo 1.2 Harmattan repository on the Build Status
    3. Copy the link for the Download Repository
  • Create /etc/apt/sources.list.d/project.list (where project is a memorable name, e.g. your username for your home project), containing the download link, prefixed with deb and suffixed by ./. For example:
 deb http://repo.pub.meego.com/home:/jaffa/Harmattan/ ./
  • Run:
 apt-get update
 apt-get install package
...where package is, of course, your package name.

Updates to the installed applications will appear at Settings > Applications > Manage Applications > Updates

Into Maemo 5

Enable Extras-devel.

Personal tools