Page MenuHomePureOS Tracker

Building Packages With Git-buildpackage
Updated 1,108 Days AgoPublic

Version 4 of 22: You are viewing an older version of this document, as it appeared on Apr 20 2021, 19:57.

Building PureOS packages with git-buildpackage (gbp)

The goal is to have a standardized, repeatable way to build packages via the git distributed version source control tool. Inspired by DEP-14

Description

Git buildpackage, or gbp for short, is a tool to maintain Debian packages via git. Using git as the distributed version control system to store the data as well as packaging meta-data means that packages can be built directly from a git repository.

This page is dedicated to the use of gbp in PureOS but it should be applicable in any Debian-based distro.

Installation

On PureOS, gbp is installed via this command;

sudo apt install git-buildpackage

Terminology

If you're not familiar with Debian packaging it's likely a good idea to mention some terms we use in this document. Gbp builds packages from git branches. The branches used refer to specific artifacts, like the upstream tarball. The terms we'll refer to are;

TermMeaning
pristine tarballthe untouched source code stored as a binary tar archive.

Packaging workflow

Pristine tar

In our example, we'll use tar to create a pristine tarball. One can use git archive as well;

tar cvfJ stream-0.1.0.orig.tar.xz --exclude-vcs Stream/

Build package

Push to repo

gitlab-ci example

Last Author
jeremiah.foster
Last Edited
Apr 20 2021, 19:57

Event Timeline

jeremiah.foster edited the content of this document. (Show Details)Feb 26 2021, 10:24
jeremiah.foster edited the content of this document. (Show Details)Apr 18 2021, 16:57
jeremiah.foster edited the content of this document. (Show Details)Apr 20 2021, 19:57
jeremiah.foster edited the content of this document. (Show Details)
jeremiah.foster edited the content of this document. (Show Details)Apr 26 2021, 11:41
jeremiah.foster edited the content of this document. (Show Details)
jeremiah.foster edited the content of this document. (Show Details)Apr 26 2021, 11:45
jeremiah.foster published a new version of this document.
jeremiah.foster edited the content of this document. (Show Details)May 14 2021, 12:40
jeremiah.foster added a project: Restricted Project.
jeremiah.foster edited the content of this document. (Show Details)May 21 2021, 07:51
jeremiah.foster edited the content of this document. (Show Details)Sep 7 2021, 08:47
jeremiah.foster edited the content of this document. (Show Details)Sep 10 2021, 07:47
jeremiah.foster edited the content of this document. (Show Details)Sep 10 2021, 07:51
jeremiah.foster edited the content of this document. (Show Details)Sep 10 2021, 07:58
jeremiah.foster edited the content of this document. (Show Details)
jeremiah.foster edited the content of this document. (Show Details)Sep 10 2021, 08:27
jeremiah.foster changed the title from Building Packages With Git-buildpackage to Building Packages with git-buildpackage.Sep 10 2021, 09:37
jeremiah.foster edited the content of this document. (Show Details)
jeremiah.foster edited the content of this document. (Show Details)
jeremiah.foster edited the content of this document. (Show Details)Sep 10 2021, 17:43
jeremiah.foster edited the content of this document. (Show Details)Jan 20 2022, 08:53
jeremiah.foster edited the content of this document. (Show Details)Jan 20 2022, 08:56