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

User:Jbond/dgit: Difference between revisions

From Wikitech-static
Jump to navigation Jump to search
imported>Quiddity
(syntax lang fixes)
imported>Jbond
No edit summary
 
Line 1: Line 1:
[https://wiki.debian.org/Clojure/PackagingTutorial when creating a repo in salsa]
notes to add debian packaging to an existing github repo.  for this git repo ill use BGPalerter.
notes to add debian packaging to an existing github repo.  for this git repo ill use BGPalerter.



Latest revision as of 11:23, 15 August 2022

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 https://manpages.debian.org/testing/dgit/dgit-maint-merge.7.en.html 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 https://github.com/b4ldr/BGPalerter 
$ cd BGPalerter
$ # note to self i wonder if using upstream here will confuse other debian tooling
$ git remote add upstream https://github.com/nttgin/BGPalerter
$ git checkout -b debian

debiannise

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
single-debian-patch
auto-commit
  • 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