On Tuesday 2013-09-10 17:12, Adam Spiers wrote:
you, as the packager, should have been smart enough to recognize this and _NOT_ transplant the v*/rel-* into the RPM Version: field, just like it is done for the Linux kernel (has tag like "v3.11" but our RPM packages have 3.11 naturally). In fact, blindly transplanting whatever `git describe` tells you into Version: is almost
... almost what?
almost stupid :) Tags may be used for things other than releases (though thankfully that's rare). Think git://git.gitorious.org/opensuse/kernel-source which not only has "rpm-3.7.10-1.1" tags, but also "SLES11_RC2" and whatnot. If you don't watch out, it may happen that `git describe` outputs SLES11_RC2-1-g1234567 instead of the rpm-3.7.10-1.1-8-g9abcdef that you sought.
But it sounds like you are making the same point I already made - git describe output is not a remotely reliable source for version ordering.
It is, if you pay attention or trusting the tags.
The timestamp + SHA combination is deterministic and unique, sorts chronologically
Deterministic and unique, yes, but %ct is not strictly guaranteed to be strictly monotonically increasing. That is to say, you can construct a case where %ct is useless. Simiarly, one can construct cases where a tag offset becomes useless. But excluding the cases where {either %ct or tag offset is uselees}, a tag offset is shorter than %ct. The longer this discussion goes on, the more I think hashes in Version: should be abolished completely. They do not sort well, and trying to work around it with either %ct or tag offsets is just a bandaid. If the hash is gone from Version, so is the need for the sorting bandaid. Just call the f'ng Version: 1.5+git and spell out everything else in the %description. The Release: will automatically increase everytime you commit and ensure that people get the latest version your hands produced, even if there was branch-hopping or shipping an older git snapshot (a revert in essence). -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org