[Cryptech Tech] Versioning

Rob Austein sra at hactrn.net
Thu Jul 14 05:41:16 UTC 2016


At Wed, 13 Jul 2016 21:02:46 +0000, Peter Stuge wrote:
> 
> Paul Selkirk wrote:
> > PACKAGE_VERSION  := 2.0.$(shell git show -s --format=%ct HEAD)
> 
> For later I'd suggest: git describe --dirty --tags --abbrev=6 --always
> 
> 
> > So that would be the timestamp (unix epoch) of the last commit on
> > user/sra/alpha-releng/omnibus.
> 
> I find the commit id itself a fair bit more useful than a timestamp,
> because I can look up exactly what repository state that commit
> represents, which is difficult with just the timestamp.

Can kick this around once the workshop is over (not changing it now).

Be warned that there are some constraints.  In particular, APT (at
least) has opinions about version number ordering and will not install
what it thinks is an older version on top of a new one.   The main
reason for using the timestamp is that it's a simple monotonically
increasing value which both APT and Homebrew are willing to accept as
a version number component.

We could of course go back to a variation on the scheme I was using on
the Novena (${STATIC_VERSION}.${TIMESTAMP}.${COMMIT_HASH} -- on the
Novena we also had some "~" characters in there, for reasons that
probably made less sense than I thought they did at the time), but I
was trying to take pity on human beings who might find themselves
having to type the wretched things.  Maybe nobody does that anymore
(on hardcopy consoles at 03:00 to the noise of machine room fans...).

More generally, most packaging systems seem to be OK with a series of
decimal integers separated by dots, but once one gets too far beyond
that, things may become more interesting than one really wants.

Last: the current packages record not just the super-repository commit
hash but of all the sub-repository commit hashes, buried in the JSON
manifest in the firmware tarball.


More information about the Tech mailing list