Hi, I've been reviewing the packaging guidelines and I found a problem with the advice on versioning. I attach a patch here to fix that -- essentially, you can't use underscores in Debian package versions.
Based on looking at the scheme used by existing pkg-go packages, I reworded it to suggest using ~ instead. However, you then have the caveat that you can't use _ in git tag names -- which is where I imagine the advice about _ in the version originated. So I documented that caveat too. Some pkg-go packages use + rather than ~ which *can* be used in package names. Perhaps we should just advise using + for new packages? I also fixed a few other minor issues. I did this before I got my pkg-go membership confirmation so I didn't just commit direct; I could do now, I suppose, but I thought it best to raise the versioning issue and get consensus first. Thanks, -- Jonathan Dowland
From 845a6253b01cd898582842e802610a84baa3d723 Mon Sep 17 00:00:00 2001 From: Jonathan Dowland <j...@debian.org> Date: Wed, 28 Sep 2016 15:56:56 +0100 Subject: [PATCH] fixes for versioning section The version section recommended using _ in the package version which is not legal for Debian package versions. Use ~ instead (based on existing pkg-go packages, most seem to use ~, some use +). Add a sub-section explaining that git tags can't have ~, so to substitute for _ in that case. Fix emboldening of a number in the example of suffixing a clone number after date in the version. Indent an earlier example of a version string so it is styled better. --- packaging.asciidoc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packaging.asciidoc b/packaging.asciidoc index e473079..aea20b3 100644 --- a/packaging.asciidoc +++ b/packaging.asciidoc @@ -55,7 +55,7 @@ kind. In case your upstream does not use version numbers, the Debian package version will look like this: -0.0_git20130606-1 + 0.0~git20130606-1 The 0.0 in the beginning is used to allow upstream to adopt version numbers at any point in time and also to make it clear that no traditional version number @@ -64,9 +64,17 @@ git, hg, svn. Afterwards, a date follows in the format YYYYMMDD. The last part after the dash is the Debian version number. In case you make more than one snapshot per day, you can append a snapshot -number after the date, e.g. 0.0_git20130606*2*-1. This should rarely be +number after the date, e.g. 0.0~git20130606**2**-1. This should rarely be necessary. +==== git tags + +Git does not support using tilde in tag names. Therefore, a Debian package +version 0.0~git20130606-1 should be tagged using underscores in place of +the tilde, e.g. + + 0.0_git20130606-1 + === changelog: UNRELEASED During the time when you still work on a package, i.e. before it is ready to -- 2.7.4 (Apple Git-66)
signature.asc
Description: Digital signature
_______________________________________________ Pkg-go-maintainers mailing list Pkg-go-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-go-maintainers