From 7ea7b52dc0c6be4996becc38d609d1c075740cbf Mon Sep 17 00:00:00 2001 From: Victor LABORIE Date: Wed, 19 Dec 2018 11:03:05 +0100 Subject: [PATCH] Add doc for Debian packaging --- docs/debian.md | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 docs/debian.md diff --git a/docs/debian.md b/docs/debian.md new file mode 100644 index 0000000..278967a --- /dev/null +++ b/docs/debian.md @@ -0,0 +1,64 @@ +# Debian Package + +**kvm-tools** package can be build from the **debian** branch of this Git repository with **git-buildpackage** and **sbuild**. + +## Dependencies + +Install Debian dependencies : + +~~~ +apt install git-buildpackage sbuild +~~~ + +Add your user to sbuild : + +~~~ +sbuild-adduser +~~~ + +*You must logout and re-login or use `newgrp sbuild` in your current shell* + +You need a schroot definition in */etc/schroot/schroot.conf*, eg : + +~~~ +[sid] +description=Debian sid (unstable) +directory=/srv/chroot/sid +groups=root,sbuild +root-groups=root,sbuild +aliases=unstable,default +~~~ + +Build the sbuild chroot : + +~~~ +sbuild-createchroot --include=eatmydata,ccache,gnupg unstable /srv/chroot/sid http://deb.debian.org/debian +~~~ + +## Build + +Tag your changes respecting [Semantic Versioning](https://semver.org/). + +~~~ +git tag X.Y.Z +~~~ + +Go to **debian** branch and merge your current work : + +~~~ +git checkout debian +git merge master +~~~ + +Update Debian changelog with **dch** and commit your change : + +~~~ +dch -v X.Y.Z-1 +git commit -m "New upstream release (X.Y.Z)" +~~~ + +You can now build the Debian package : + +~~~ +gbp buildpackage +~~~