Building Packages with git-buildpackage suite: Version: 0.7.0-tizen20151027 |
---|
Git-buildpackage is a Debian toolset for maintaining and building packages in/from git repositories. The still experimental RPM variants of the tool, extend the support from Debian-only to building and maintaining RPM packages, too. The documentation of git-buildpackage-rpm here reflects the the Debian git-buildpackage documentation
The RPM versions of the tools can in their current state do basically all the same tasks as the Debian versions, except for changelog generation. However, the philosophy is somewhat different in some parts. The RPM tools read the .spec file instead of changelog in determining packaging information (version number, name etc). Another clear difference is that gbp buildpackage-rpm will always build in a separate build directory whereas gbp buildpackage (the Debian) tool builds in the git working dir, by default. Third, conceptual, difference (for non-native packages) is that you may have packaging files in an orphan branch, without development sources: i.e. you develop code in 'patch-queue' branch that doesn't contain any packaging files, and, do 'pq-rpm export' to 'packaging' branch that only contains packaging files (.spec file, patches etc.) but no sources. The Debian/RPM tool equivalence is:
gbp buildpackage -> RPM: gbp buildpackage-rpm
gbp import-dsc -> RPM: gbp import-srpm
gbp import-orig -> RPM: gbp import-orig-rpm
gbp pq -> RPM: gbp pq-rpm
gbp clone -> RPM: gbp clone (the same tool)
gbp pull -> RPM: gbp pull (the same tool)
gbp dch -> RPM: not available
gbp import-dscs -> RPM: not available
The required repository layout is similar to Debian: basically the only requirement is that non-native packages must have clean upstream sources in a separate branch. Other branches are:
packaging-branch
contains packaging files (spec
and source files, e.g. patches, needed by rpmbuild, except for the orig
tarball). This branch may contain the development sources as well
(always true for native packages).
upstream-branch
contains upstream sources.
This can either be a branch you import to or a branch of an upstream
repository you pull from.
pristine-tar-branch
contains pristine-tar data to
recreate the original upstream tarball from the upstream-branch.
patch-queue-branch(es)
are related to
packaging-branch(es)
. These are also called the
development branhces in the RPM tools.
The development/patch-queue branch is the upstream
plus the patches from packaging branch applied. In RPM tools the
default branch name of the development/patch-queue branch is
development/<packaging-branch-name>
.
The basic workflow is very similar to Debian:
Import a package via gbp import-srpm OR clone from the distro git with gbp clone if the package is already maintained with gbp buildpackage-rpm.
Develop, test, commit changes.
Once satisfied you can build the final package with gbp buildpackage-rpm (optionally with --git-tag to create a tag in git) and push it to git server.
<<< Building RPM Packages with git-buildpackage-rpm | Development flow >>> |