You are browsing a read-only backup copy of Wikitech. The primary site can be found at


From Wikitech-static
Jump to navigation Jump to search

when creating a repo in salsa

notes to add debian packaging to an existing github repo. for this git repo ill use BGPalerter.

This guide is mostly just but apparently theses commands just don't stick, further i have very little confidence that this will work when i next come to it but perhaps it will be a better starting ground :P

Initial build

Fork the repo and create a debian branch

The first thing to do is fork the repo. Just do this via github in the normal way then clone it locally, add the original remote (this will help later) and create a debian branch. the dgit-maint-merge documents suggest doing everything in main but my preference is to do this in a separate branch (lets see if i change my mind here next time i look at this document)

$ git clone 
$ cd BGPalerter
$ # note to self i wonder if using upstream here will confuse other debian tooling
$ git remote add upstream
$ git checkout -b debian


Next add all the debian files that you need to add and commit them. Adding the Debian files is beyond the scope of this article but you can check this PR. however at the very least create the following files

  • debian/source/options
  • debian/source/format
(3.0) quilt

generate the latests tarball release

By default the following should create a tarball of the most recent release, this is required by dgit to compare source

$ git deborig

or on the build hosts use uscan

$ uscan --verbose --force-download

building the package

in theory the following command will build the package

$ dgit build

Building New versions

This section is untested and expected to need fixes when i actually come to test it. The first thing you should do is rebase upir debian branch on the upstream remote

$ cd BGPalerter
$ git fetch --all
$ git checkout debian
$ git rebase upstream/main

update the changelog and generate new source file

At this point you should create a new commit to the debian branch to update the change log with the new version. Once complete regenrate the tar ball and in theory you shuold be able to rebuild

$ git deborig
$ dgit build