Meego Wiki
Views

OBS source services

From MeeGo wiki
Revision as of 11:49, 16 January 2012 by Fvennetier (Talk | contribs)
Jump to: navigation, search

Contents

How to build latest source from Git using OBS and source services

OBS provides source services which can download/compress/extract/verify files before actually building a package. There is only small documentation here.

You can find two interesting blog posts here and there.


Create an archive from your repository

A service called tar_scm is available to create a .tar archive from Subversion, Git, Mercurial and Bazaar source code management systems.

Here is a configuration example:

<service name="tar_scm">
  <param name="scm">git</param>
  <param name="url">git://gitorious.org/meego-developer-tools/obs-light.git</param>
  <param name="subdir">src</param>
  <param name="filename">obslight</param>
  <param name="versionprefix">0.4.git</param>
</service>

Tag significations:

  • scm : the type of source code management system you want to get source from. Available values are svn, git, hg, bzr.
  • url (required): the checkout URL of your repository.
  • subdir (optional): the name of the sub-directory of your repository you want to checkout.
  • filename (optional): the name of the tar file which will be created. If not specified, the last part of the URL will be used (without .git for Git repositories).
  • versionprefix (optional): the base version string that will be appended to the file name.
  • version (optional): the version string that will be appended to the file name. If not specified, the timestamp of the last commit is used (number of seconds since the epoch) for Git or the revision number for Subversion.
  • exclude (optional): name of a file to exclude when creating the archive. Can be used multiple times.


Extract build-control files

<service name="extract_file">
  <param name="archive">*.tar</param>
  <param name="files">*/deb/* */rpm/obslight.changes */rpm/obslight.spec */rpm/obslight.yaml</param>
</service>

Change archive compression

<service name="recompress">
  <param name="file">*git*.tar</param>
  <param name="compression">gz</param>
</service>

Update build-control files

<service name="set_version"/>

Personal tools