Hello Thomas Koch! On Mon, Sep 14, 2015 at 07:51:09AM +0200, Thomas Koch wrote: > Hi, > > my upstream tagged 0.4 a year ago and I want to package the current master > commit a5e5f9e that is 24 commits after 0.4. Please assume that this makes > sense... > > How would you format the upstream part of the packages version number? How > about 0.4+24+git+a5e5f9e? > > The git describe output is v0.4-24-ga5e5f9e. > > Is there any established best practice?
I see there are already multiple suggestions, so here's yet another color suggestion for the bikeshed... The below mentioned format is understood by /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk which will download (or in this case generate) the orig tarball on fakeroot debian/rules get-orig-source for all pkg-gnome packages. (But ofcourse, even though there are alot of packages supporting this format we rarely do git snapshots so you won't find many of them in the archive currently.) # search for a GIT revision in the version of the changelog # accepted formats: foo+git20090430.42ad43 (or ~ instead of +) DEB_UPSTREAM_GIT_REV ?= $(shell echo $(DEB_UPSTREAM_VERSION) | sed -rn 's/^.*[\.~+\d]+git[0-9]+\.([0-9a-f]+)$$/\1/p') In my opinion this formatting is good, simple and reasonably short (compared to similar suggestions). Regards, Andreas Henriksson