The Mer Wiki now uses your Mer user account and password (create account on https://bugs.merproject.org/)


Git pkg

From Mer Wiki
(Difference between revisions)
Jump to: navigation, search
(Documentation of branch and tag naming, example packages and _src file example)
(Contents of the orphan branch (pkg-mer))
Line 39: Line 39:
 
=== Contents of the orphan branch (pkg-mer) ===
 
=== Contents of the orphan branch (pkg-mer) ===
  
The '''pkg-mer''' usually contains 4 files:
+
The trees in the '''pkg-mer''' branch usually contains 4 files:
  
 
* _src
 
* _src

Revision as of 21:45, 5 March 2013

Mer Project packaging in git project.

Contents

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

See https://github.com/thp/mer-tools-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:

git:zsh-5.0.2.tar.bz2:zsh-5.0.2:mer-5.0.2-2

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