On Tue, 18 Feb 2020 at 15:47:17 -0500, Antoine Beaupré wrote: > The tricky part here is generating a new version without mangling > debian/changelog all the time. I haven't found a great story for that > that works with git, but maybe you can generate syntetic commits to fake > a new Debian package version in CI.
I think the way to do this is to have an uncommitted change to d/changelog when you do your build, and choose your CI version numbers carefully so that they interleave correctly with "real" version numbers. https://gitlab.collabora.com/smcv/deb-build-snapshot/ (currently on my employer's infrastructure, but I'll probably move it to Salsa at some point) is designed for this workflow. The version-number-generating part, deb-git-version-gen, implements the careful choice of version numbers and has been split out into a separate script which I might propose for inclusion in devscripts at some point - it should be feasible to run as a git-buildpackage hook or similar, and can either run dch itself, or output a simple version number or a blob of JSON describing the package's versioning (the latter includes some suggested arguments for dch). > Also, this is not for everyone: it makes it hard for Debian folks to > send updates to the git repository (because it might not be on > debian.org infra) This seems particularly weird for native packages, which are supposedly "written specifically to be a Debian package" (Policy §5.6.12). When maintaining upstream packages that include their own Debian-compatible packaging, I sometimes make them non-native with versions like 1.2.3-0upstream1, which makes it trivial to repackage them as non-native elsewhere. > and inversely it makes it hard for "upstream" to make > a release if they're not Debian developers. This was a practical problem when Joey Hess left Debian: ikiwiki was a native package, with no release procedure other than uploading it to Debian, and I became a single point of failure for security releases because I was suddenly the only person with both ikiwiki commit access and Debian upload rights. (I later disentangled it so that upstream releases are just git tags pointing to a native package, and the Debian packaging is non-native.) smcv