Note on packaging workflows

  • I use git-buildpackage workflow.
  • I use quilt to manage patches.
  • I typically use pristine-tar.
  • When working with a packaging team, I try to adjust to match other packages that they maintain.

Initial setup

  1. Create ~/.gbp.conf.
  2. Add export DEBEMAIL=[email] and export DEBFULLNAME="[name]" to ~/.bashrc.

Starting a new Debian package

  1. Download the release tarball and rename to [packagename]-[version].tar.gz.
  2. mkdir [packagename]-[version]
  3. cd [packagename]-[version]
  4. git init
  5. gbp import-orig ../[packagename]-[version].tar.gz
  6. dh_make, press i then Enter.
    • Alternately, find a similar package, copy and adapt its debian/ files to the new package.
  7. At this point, the project folder can be renamed to just [packagename].
  8. Modify or delete files in debian/.
  9. git add debian
  10. git commit -m "Add Debian packaging"
  11. gbp buildpackage

Alternative: No upstream tarball

  1. Follow https://honk.sigxcpu.org/projects/git-buildpackage/manual-html/gbp.import.upstream-git.html#gbp.import.upstream.git.notarball.
    • The first gbp buildpackage command will also commit pristine tar.
  2. If you wish to use HEAD as upstream orig instead of tag, add --git-upstream-tree=SLOPPY to the gbp buildpackage command.
    • Example: You need to keep upstream tests, but drop .gitattributes file.

Best Practices

  • Include debian/salsa-ci.yml and set the Custom CI config path to point to it.
  • Use Build-Depends: debhelper-compat (= [compat-level]), and then you do not need the debian/compat file.
  • Run github-debian-upstream from pkg-js-tools to generate debian/upstream/metadata.