Sascha Peilicke (speilicke@suse.com) wrote:
Hi guys,
I'd like to gather some input on versioning schemes used for packaging SCM snapshots.
[snipped]
1) X+git 2) X_20041122git 3) X+git20111213 4) X.a258.g003e7e3 5) X+git.1363873583.8dfab15
Albeit you can discuss the format differences, 2) and 3) are much better than 1) since they at least broadly state when the SCM snapshot was taken. 4) Does a better job by providing the commit number/hash but breaks RPM upgradeability. Random commit hashes aren't upgradeable right? So the best version is indeed number 5), where the first number is the commit date and the second one is the commit hash. The date assures upgradability, because it increments always linearly and the commit hash provides for reproducability.
You can of course argue about dots vs, any other separating paragraph. Also, instead of "+git", you may prefer sth. different (along as it won't break RPM's version comparison mechanism).
TL;DR =====
My recommendation would be to (at least loosely) follow pattern 5) versioning if you ever have to package from SCMs. While devel projects are rather free to do whatever they prefer, I'd say it's appropriate for Factory submissions.
+1 for number 5), although I'm somewhat biased, because IIRC it was me that originally proposed that scheme for OpenStack packages ;-) It seems to have worked well for us over the last 18 months. At the time I think there was also some discussion of also embedding git metadata within the rpm %description. It's interesting to see what the kernel guys are currently doing, e.g.: $ rpm -qi kernel-desktop-3.7.10-45.1.gff50a00 | tail -n4 Source Timestamp: 2013-07-26 15:39:00 +0200 GIT Revision: ff50a00e96dbde96e962b6cd9f871bb710efa9c3 GIT Branch: openSUSE-12.3 Distribution: Kernel:openSUSE-12.3 -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org