Git Build Package was something that I always struggled with during my initial days with Debian and with some teams mandating the use of pristine-tars and Git Build Package’s documentation being all over the place, I had to learn a few things by doing it myself and finally learned how to use gbp and generate pristine-tar.
This guide assumes that you are a complete noob to gbp and are struggling with getting pristine-tar set up.
Firstly, create the debian packaging for your package and ensure that you aren’t getting any more lintian errors or warnings.
Steps
- Create a Blank repository on Salsa
- Create a gbp.conf in your debian folder and add the following config into it
[DEFAULT]
debian-branch = debian/master
upstream-branch = upstream
pristine-tar = True
sign-tags = True
3. Create the branches
debian/master and upstream using git branch
4. Run the following command and replace the version with the version of your package
$ gbp import-orig --pristine-tar ../python-uhi_1.0.0.orig.tar.gz --upstream-branch=upstream --debian-branch=debian/master
5. Create a tag for debian release using
gbp tag debian/1.0.0-1
6. Push the branches to Salsa using
gbp push
and this will create pristine-tars and a tagged debian and upstream branches
I made this guide only for myself to follow in the future but if its of some help to you, feel free to follow it.
