So, my turn to describe workflows. I use gbp, pristine-tar, cowbuilder (but planning to move to sbuild), dch, debcommit as my main tools. I have not really used dh-make-golang much.
My global gbp configuration is as follows: [DEFAULT] pristine-tar = True sign-tags = True [buildpackage] export = WC postbuild = lintian $GBP_CHANGES_FILE && debsign $GBP_CHANGES_FILE export-dir = ../build-area/ tarball-dir = ../tarballs/ ignore-new = True pbuilder = True [import-orig] postimport = dch -v%(version)s New upstream release. In general, I try to keep existing structures in git, but for packages I prepare, I use DEP14 branches and tags: * HEAD is debian/sid, other dists are debian/<dist>. * upstream/<version> tag for unpacked upstream source. * debian/<version> tag for uploaded packages. * I keep an "upstream" branch for unpackaged upstream sources, which is tagged and then merged into the main packaging branch. Depending on upstream having releases or not, I either use gbp import-orig --uscan, or follow git history with an "upstream" remote. In both cases, the sources end in a git branch. For repackaging, I either use "excluded-files" in debian/changelog for released projects, or create a second upstream branch "repackaged", "unvendored", or somesuch, where I make changes and merge from "upstream" after every import. For the go ecosystem, I am feeling it is much more useful and productive to keep complete upstream history than using the releases, and for some packages with releases I started using this. It pays off every time I need to troubleshoot api changes, backport fixes, and the such.. When I am doing this, I add this gbp.conf snippet in the debian/ directory: [buildpackage] dist = DEP14 upstream-tag = upstream/%(version)s pristine-tar = True pristine-tar-commit = True For simplifying pushes, I also add this config: $ git config --add remote.debian.push 'refs/heads/debian/*' $ git config --add remote.debian.push 'refs/heads/upstream' $ git config --add remote.debian.push 'refs/heads/pristine-tar' $ git config --add remote.debian.push 'refs/tags/debian/*' $ git config --add remote.debian.push 'refs/tags/upstream/*' $ git config --add remote.debian.fetch 'refs/tags/*:refs/tags/*' My preference for debian/changelog is: * distribution=UNRELEASED until the package is ready to upload. * I use dch for every change, and debcommit to commit with that same message. * dch -r when package is ready for upload (changes dist). * debcommit -r after uploading (creates signed tag). My workflow with upstream history is as this: 1. Init (on alioth) $ /git/pkg-go/setup-repository foo $ git --git-dir=/git/pkg-go/packages/... symbolic-ref HEAD refs/heads/debian/sid (locally) $ git remote add upstream https://... $ git remote add debian ssh://git.debian.org/git/pkg-go/packages/... $ git fetch --all $ git checkout -b upstream upstream/master # or upstream tag $ git tag upstream/0.0+gitYYYYMMDD.NNNNNNN # optional, if repackaging is needed. $ git ckeckout -b repackaged $ git rm -rf vendor/; git commit -m repackage $ git tag upstream/0.0+gitYYYYMMDD.NNNNNNN-ds $ git checkout -b debian/sid # create debian/* stuff, with dh-make-golang, or (usually) copy from another package :-). Add gbp.conf snippet, git config, etc 2. Update $ git fetch --all $ git checkout debian/sid $ git tag upstream/0.0+gitYYYYMMDD.NNNNNNN NNNNNNN $ git merge upstream/0.0+gitYYYYMMDD.NNNNNNN $ dch -v 0.0+gitYYYYMMDD.NNNNNNN-1 'New upstream snapshot.' $ git add debian/changelog; debcommit $ gbp buildpackage # This also creates the pristine tar from the tag. 3. Work on the package # Fix stuff $ dch 'debian/foo: fix bar'; debcommit -a # When finished $ dch -r $ git add debian/changelog; debcommit $ gbp buildpackage $ dput <changes file> $ debcommit -r $ git push debian For backports is all the same, except that instead of using debian/sid, I fork a debian/stretch-backports and work from there. _______________________________________________ Pkg-go-maintainers mailing list Pkg-go-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-go-maintainers