The Mer Wiki now uses your Mer user account and password (create account on

Git pkg

From Mer Wiki
Revision as of 21:45, 5 March 2013 by Thp (Talk | contribs)

Jump to: navigation, search

Mer Project packaging in git project.


Upstream repository

Installing gitpkg

root@mer:~# zypper in gitpkg

Naming branches and tags

  • Upstream's master branch is still called that (obviously)
  • Upstream's releases are tagged in some way (e.g. X.Y.Z or PKGNAME-X.Y.Z)
  • gitpkg's orphan branch containing packaging files is called pkg-mer
  • Changes from an upstream release (e.g. X.Y.Z) are tagged mer-X.Y.Z-R (where R is the RPM release number)
  • Packaging files for a specific RPM release are tagged pkg-mer-X.Y.Z-R

Generic example

  • Branch master (upstream source code)
    • Tag X.Y.Z: Describes upstream's vanilla X.Y.Z release
      • Tag mer-X.Y.Z-R: Builds on top of X.Y.Z and (possibly) describes patches for the R release
  • Branch pkg-mer (packaging information)
    • Tag pkg-mer-X.Y.Z-R: Contains the 4 packaging files for the R release

Specific example: Packaging zsh


  • Branch master
    • Tag zsh-5.0.2: Upstream 5.0.2 release
      • Tag mer-5.0.2-2: Packaging-related patches against 5.0.2
  • Branch pkg-mer
    • Tag pkg-mer-5.0.2-2: Contains _src, zsh.changes, zsh.yaml and zsh.spec

Contents of the orphan branch (pkg-mer)

The trees in the pkg-mer branch usually contains 4 files:

  • _src
  • <packagename>.changes
  • <packagename>.yaml
  • <packagename>.spec

Specific example: Packaging zsh

Contents of the _src file:


This means:

  • The source tarball zsh-5.0.2.tar.bz2 is generated from Git commit zsh-5.0.2
  • The patches are generated from zsh-5.0.2 to mer-5.0.2-2
  • Therefore: Tarball + patches will end up representing the state of code in mer-5.0.2-2

The patches are generated by running gp_mkpkg - it takes the _src file as input and generates the tarball and patches (if any), and outputs the changes required to the .yaml file.

Personal tools