Table of Contents
- Introduction
- What We Have
- What We Need to Address
3.1 Issues with “quilt” Git packaging repositories
3.1.1 Issues with upgrading a package
3.1.2 Issues with publishing a package for a new eLxr release or due to addition/deprecation
3.2 Issues with “native” Git packaging repositories
1. Introduction
We need a new workflow for contributing to the eLxr Git packaging repositories. The current contribution workflow (explained in section 2) for the eLxr GitLab projects does not work well with the eLxr Git packaging repositories.
An eLxr Git packaging repository is a GitLab project from which eLxr maintained packages are built and published. One example is the cri-o package offered by eLxr: eLxr / Cloud / packages / cri-o · GitLab.
To understand why we need a new workflow, we need to look at what eLxr already has for the workflow of contribution and the gap introduced by the distinct characteristics of Git packaging repositories.
2. What We Have
Currently, for all GitLab projects under eLxr, we use a “merge request from fork” workflow for contribution:
- The contributor forks the GitLab project they wishes to contribute to (including the branch which they wishes to contribute to). We shall call the branch they wishes to contribute to the target branch.
- The contributor creates a development branch from the branch they wishes to contribute to.
- The contributor commits their work to the development branch.
- The contributor submits a merge request from their development branch in their fork into the target branch.
- The contributor iterates on their development branch in their fork based on the comments from the merge request.
- The merge request eventually gets merged or closed.
3. What We Need to Address
The “merge request from fork” does not work well with the Git packaging repositories. One can categorize Git packaging repositories into two types - “quilt” or “native” - based on whether there is an upstream for the software being packaged. Here, I shall point out the issues of this “merge request from fork” workflow has with “quilt” and “native” Git packaging repositories separately.
3.1 Issues with “quilt” Git packaging repositories
For “quilt” Git packaging repositories, they are meant for software that has an upstream.
In these packaging repositories, the Git history from the software upstream is mixed with all the packaging work. All packaging work are on release branches and upstream branches. An upstream branch contains commits that merge the targeted new release from software upstream we wish to package plus any repackaging. A release branch contains commits that modify the debian/* for packaging instructions. For details of the structure of such a packaging repository, please refer to DEP-14: Recommended layout for Git packaging repositories.
Some explanation about repackaging commits on an upstream branch is provided here, since it may be confusing when debian/patches/* already provides a way to modify the source tree. Typically, only functional changes to the source tree are captured by debian/patches/*, while non-functional modifications to the source tree are typically done directly as commits to the source tree. These commits on the upstream branch cause the “upstream version” part of the version string to be suffixed with “+dfsg.N” or “+ds.N” suffixes (see PackagingFAQ - What does “dfsg” or “ds” in the version string mean?). The Debian Policy Manual also gives some examples of reasons of upstream source tree repackaging.
Unlike most GitLab projects where the contribution is almost always done to a single target branch, upgrading a package or publishing a package for a new eLxr release requires contribution to two target branches - the aforementioned upstream branch and release branch.
3.1.1 Issues with upgrading a package
The upstream branches are used to pull in target versions for packaging from the commits belonging to the software upstream. The upstream branches are also responsible for doing source tree repackaging. As a result, if eLxr ever needs an upgrade to a package, the upstream branch needs updating, and a merge request against that upstream branch will bring in hundreds or thousands of all the software upstream commits into the merge request.
A similar issue happens with merge requests into the release branch. After the repackage on the upstream branch is done, we tag the target commit that contains the finalized repackaged source tree and merge that commit into the release branch. This merge will cause the merge request to the release branch to have hundreds or thousands of all the software upstream commits.
3.1.2 Issues with publishing a package for a new eLxr release or due to addition/deprecation
Every time we have a new eLxr release, or every time we are doing addition/deprecation of a package, we need to create brand new pairs of upstream branch and release branch. Merge requests cannot be used for the creation of branches.
3.2 Issues with “native” Git packaging repositories
“Native” packages are packages which upstream is eLxr. Since eLxr is the upstream of these packages, there are no upstream branches. There is only release branch. However, the issue with publishing a package for a new eLxr release or due to addition/deprecation in the “quilt” case still applies here.