Sustaining ported Debian packages¶
If Debian packages needs more attention than a simple patch to upstream sources, they need to be ported, and changes should be tracked in Git. After experimenting some time the best approach has been found.
What's wrong with Debian VCS repositories¶
1. Some Debian packages aren't tracked in Git at all. Subversion, Bazaar are still quite popular. This affects essential and the most hard to port and maintain packages like Binutils, GCC, OpenJDK, etc.
2. Debian repositories can stale, that is new packages are uploaded to APT repositories, but VCS repositories aren't updated. It is especially painful when a new version is required to fulfill build dependencies.
3. Most of Debian's Git repositories are bloated with upstream sources, pristine tarballs, branches, etc. We don't need them all. It all needs a lot of storage.
As some of Debian packages do, we should track only the
./debian directory without upstream sources or tarballs. After all, we take them from Debian. We completely ignore Debian's VCS be it Git, Subversion or Bazaar. Instead
we start a git repository by importing the
./debian directory of some Debian version, and then we make and track our changes in the
master branch. Vanilla Debian's version is tracked in the
debian branch. When a new version
lands in Debian and need to be ported, we import it into the
debian branch first (with no conflicts, etc.) and then merge the
debian branch into the
master branch, resolve conflicts, update Dyson specific parts etc.
See for example Binutils
.git directory is not friendly to dpkg format version 1.0. It can be moved away before building packages or
dpkg-source can be told to ignore it.