Re: Git Package Versioning
Hi, On Mon, 21 Mar 2011 06:36:19 +0100, Julien Valroff wrote: > > or 1.2.1~gitMMDD.-1, which could be read as "the 1.2.1 > > release currently being prepared, as of git hash <...> on MMDD". > > Though it is perfectly correct, I try and avoid using this scheme: what > happens if upstream releases eg. 1.2.1 Beta1 which I would normally version > as 1.2.1~b1? > > Even if contact with upstream are good, the may change their mind. Take > Firefox 4 which should have been released after the 1st RC… before they > decide to release a 2nd RC. Indeed, using 1.2.1~ only makes sense when it is absolutely certain that the next version will indeed be 1.2.1! > I think there's no universal answer to the original question, but just > common sense and good use of `dpkg --compare-versions'. That's an excellent summary, thanks. Regards, Stephen -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110321220314.688d5...@sk2.org
Re: Git Package Versioning
Hi, Le dimanche 20 mars 2011 à 23:16:47 (+0100 CET), Stephen Kitt a écrit : > On Sun, 20 Mar 2011 22:25:38 +0100, Joachim Wiedorn > wrote: > In this example, the Debian package version could be either > 1.2.0+gitMMDD.-1, which could be read as "everything in the > 1.2.0 release plus all changes since, up to git hash <...> on MMDD", It is indeed what I meant. > or 1.2.1~gitMMDD.-1, which could be read as "the 1.2.1 release > currently being prepared, as of git hash <...> on MMDD". Though it is perfectly correct, I try and avoid using this scheme: what happens if upstream releases eg. 1.2.1 Beta1 which I would normally version as 1.2.1~b1? Even if contact with upstream are good, the may change their mind. Take Firefox 4 which should have been released after the 1st RC… before they decide to release a 2nd RC. I think there's no universal answer to the original question, but just common sense and good use of `dpkg --compare-versions'. Cheers, Julien -- .''`. Julien Valroff ~ ~ : :' : Debian Developer & Free software contributor `. `'` http://www.kirya.net/ `- 4096R/ E1D8 5796 8214 4687 E416 948C 859F EF67 258E 26B1 -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110321053618.ga12...@kirya.net
Re: Git Package Versioning
On Sun, Mar 20, 2011 at 10:25:38PM +0100, Joachim Wiedorn wrote: > Julien Valroff wrote on 2011-03-20 21:48: > > > The best I have found is to use something like: > > +gitMMDD. > > Please be aware, that "+" is not the optimal connector. > Try dpkg --compare-versions and see: > > a) 1.2.0 is less than 1.2.0+git2011 > > b) 1.2.0 is greater than 1.2.0~git2011 > > The version b) is the better way. So please use "~" > as connector. From what you write, my understanding is: * if upstream is working on master *after* 1.2.0 has been released, you should use +git; * if upstream is working *towards* 1.2.0, ~git is the one for you. By the way, +git seems safer to me, because upstream might change his mind (remember when GNOME folks thought 2.30 would be 3.0?). -- Andrea Bolognani Resistance is futile, you will be garbage collected. signature.asc Description: Digital signature
Re: Git Package Versioning
On Sun, 20 Mar 2011 22:25:38 +0100, Joachim Wiedorn wrote: > > Please be aware, that "+" is not the optimal connector. > Try dpkg --compare-versions and see: [snip] > The version b) is the better way. So please use "~" > as connector. That rather depends on your goal. If the version number is before the current snapshot, then + is appropriate. I like to use the output of git-describe, along with sed, something like the following: , | SOURCEPKG=$(shell dpkg-parsechangelog | sed -n 's/^Source: \(.*\)/\1/p') | UPSTREAM=$(shell dpkg-parsechangelog | sed -n 's/^Version: \(.*\)-[^-]*/\1/p') | SHA1=$(lastword $(subst ~g, ,$(UPSTREAM))) | ORIG=${SOURCEPKG}_${UPSTREAM}.orig.tar.gz | | describe-current-version: | git describe --tags upstream | sed 's,^release-,,;s,-,+,;s,-,~,;' | | get-orig-source: | git archive --format=tar $(SHA1) | gzip -9 > ../$(ORIG) ` The output from ./debian/rules describe-current-version is pasted into debian/changelog, and it makes things like 0.7.1+706~g1157b91-1 So here + really makes sense because it is 706 commits after tag release-0.7.1 The second ~ could be a + as well, doesn't matter. Your mileage, may, as they say, vary. d -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/878vw9mopa.fsf@zancas.localnet
Re: Git Package Versioning
On Sun, 20 Mar 2011 22:25:38 +0100, Joachim Wiedorn wrote: > Julien Valroff wrote on 2011-03-20 21:48: > > > The best I have found is to use something like: > > +gitMMDD. > > Please be aware, that "+" is not the optimal connector. > Try dpkg --compare-versions and see: > > a) 1.2.0 is less than 1.2.0+git2011 > > b) 1.2.0 is greater than 1.2.0~git2011 > > The version b) is the better way. So please use "~" > as connector. Except that Julien did mention using the latest upstream release version, which implies that the git hash is later than the upstream release, so '+' is correct... Here's an example with a timeline: | | 1.2.0 is released (if packaged, version 1.2.0-1 or whatever) | | new Debian package version, including git changes since 1.2.0 | | 1.2.1 is released | V In this example, the Debian package version could be either 1.2.0+gitMMDD.-1, which could be read as "everything in the 1.2.0 release plus all changes since, up to git hash <...> on MMDD", or 1.2.1~gitMMDD.-1, which could be read as "the 1.2.1 release currently being prepared, as of git hash <...> on MMDD". Which you choose would depend on whether you're packaging the release plus some fixes, or you're packaging a preview of the next release... Regards, Stephen -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110320231647.13dc6...@sk2.org
Re: Git Package Versioning
Julien Valroff wrote on 2011-03-20 21:48: > The best I have found is to use something like: > +gitMMDD. Please be aware, that "+" is not the optimal connector. Try dpkg --compare-versions and see: a) 1.2.0 is less than 1.2.0+git2011 b) 1.2.0 is greater than 1.2.0~git2011 The version b) is the better way. So please use "~" as connector. --- Have a nice day. Joachim (Germany) -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110320222538.00c87...@jupiter.home
Re: Git Package Versioning
Hi, Le dimanche 20 mars 2011 à 21:18:43 (+0100 CET), Chris a écrit : > Can anyone point me in the direction of a appropriate package versioning > scheme when packaging software taken directly from a git vcs? The best I have found is to use something like: +gitMMDD. You need the date as the git hash are not sorted, and the date alone doesn't make sense in case you need to package 2 snapshots at the same date. I use the abbreviated hash and get the last commit as follows: git log -1 --format='%cd.%h' --date=short | sed 's/-//g' Cheers, Julien -- .''`. Julien Valroff ~ ~ : :' : Debian Developer & Free software contributor `. `'` http://www.kirya.net/ `- 4096R/ E1D8 5796 8214 4687 E416 948C 859F EF67 258E 26B1 -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110320204826.ga22...@kirya.net