[Maria-developers] Using tilde in the version for debs?
![](https://secure.gravatar.com/avatar/769f0fd707751e8755eb9b5dd837ab63.jpg?s=120&d=mm&r=g)
Hi Kristian I've been a bit invisible for a few months now, as I had to spend time on job interviews, family and luckily also some coding! By March life is turning back to normal with a new job and everything. As you know by now, I have in the past months fulfilled my desire to spend some hands on time with the MariaDB build system. I intend to blog about it in the coming week, after which I'll email some MariaDB specific details about what improvements you may want to consider incorporating, and what I think are great improvements but probably not worth focusing on for you in the short term. But just as a quickie, I noticed you are changing the versioning of debs to include the distribution codename (lucid, maverick, etc..): http://bazaar.launchpad.net/~maria-captains/ourdelta/ourdelta-knielsen/revis... What caught my eye was the usage of tilde character for punctuation. In dpkg tilde is a special character with superpowers, it is sorted as greater than anything else: http://man.he.net/man5/deb-version You probably know that, of course, and have a good reason to use it (related to getting upgrades right, perhaps?). I just wanted to comment on it "just in case". "In case" there is no particular reason to use tilde, then of course using a dot would have been more natural. Percona uses a dot http://www.percona.com/downloads/Percona-Server-5.1/Percona-Server-5.1.54-12... ...and I use that with the MepSQL packages too. As a final observation - apart from the different puntuation, the version string seems to be similar in all three of percona, mepsql and ourdelta-knielsen. (So it is kind of a pity if you are forced to use the tilde for some reason - otoh MariaDB versioning is a bit different anyway as it doesn't follow the <mysql-base-ver>-<my-release-ver> approach.) cheers and I'll get back later with more interesting comments. henrik -- henrik.ingo@avoinelama.fi +358-40-5697354 skype: henrik.ingo irc: hingo www.openlife.cc My LinkedIn profile: http://www.linkedin.com/profile/view?id=9522559
![](https://secure.gravatar.com/avatar/99fde0c1dfd216326aae0aff30d493f1.jpg?s=120&d=mm&r=g)
Henrik Ingo
Hi Kristian
Hi Henrik, nice to hear from you again!
But just as a quickie, I noticed you are changing the versioning of debs to include the distribution codename (lucid, maverick, etc..):
Right. I basically copied this from the bzr packages on launchpad without really checking docs ...
In dpkg tilde is a special character with superpowers, it is sorted as greater than anything else:
You probably know that, of course,
... so I didn't know this. Do you think it is important?
and have a good reason to use it (related to getting upgrades right, perhaps?).
The reason is just to make package file names unique between different distributions. And the reason for this is to be able to get repositories working. I recently made a script that creates a repository for Ubuntu: lp:mariadb-tools/buildbot/mkrepo-ubuntu.sh This uses `reprepro`, and when I tried to create a repository for multiple version of Ubuntu, I kept getting errors about duplicate files. Appending the ~<distro> solved this, I think Kurt suggested to do this the same as bzr.
I just wanted to comment on it "just in case". "In case" there is no particular reason to use tilde, then of course using a dot would have been more natural.
Percona uses a dot http://www.percona.com/downloads/Percona-Server-5.1/Percona-Server-5.1.54-12... ...and I use that with the MepSQL packages too.
Aha, so same solution, just with dot instead of tilde. Right, so maybe it should be changed. Do you know of any technical reason to prefer one over the other?
cheers and I'll get back later with more interesting comments.
Yes, please do, and good luck! Let me know if you need help with accessing/finding some of the MariaDB stuff. I suppose you have most already as we tried to make it open and public, eg. lp:mariadb-tools/buildbot/. Do you want a copy of all the VM images for the different distros? (I think it is around 50GB or so total, not 100% sure). - Kristian.
![](https://secure.gravatar.com/avatar/769f0fd707751e8755eb9b5dd837ab63.jpg?s=120&d=mm&r=g)
On Mon, Feb 21, 2011 at 9:47 AM, Kristian Nielsen
Henrik Ingo
writes: Hi Kristian
Hi Henrik, nice to hear from you again!
I miss you too :-) It's nice to be active again, in fact I enjoy what I'm doing now, it is much more hands on with the code than anything I did previously related to MySQL. (Except using MySQL from PHP, of course.)
In dpkg tilde is a special character with superpowers, it is sorted as greater than anything else:
You probably know that, of course,
... so I didn't know this. Do you think it is important?
Yes. If you don't need to, don't use it. Use the dot.
The reason is just to make package file names unique between different distributions. And the reason for this is to be able to get repositories working.
I recently made a script that creates a repository for Ubuntu:
lp:mariadb-tools/buildbot/mkrepo-ubuntu.sh
This uses `reprepro`, and when I tried to create a repository for multiple version of Ubuntu, I kept getting errors about duplicate files. Appending the ~<distro> solved this, I think Kurt suggested to do this the same as bzr.
Yes, I hit the same thing :-)
Percona uses a dot http://www.percona.com/downloads/Percona-Server-5.1/Percona-Server-5.1.54-12... ...and I use that with the MepSQL packages too.
Aha, so same solution, just with dot instead of tilde.
Right, so maybe it should be changed. Do you know of any technical reason to prefer one over the other?
Yes. It seems the tilde is reserved for special meaning so it is probably wise not to use it before you really have to, since you can only use it once. Well, apparently you can then append 2 or more tilde after each other, but still... I'm just guessing the special sort order for tilde exists to solve this problem: * Suppose you have released mariadb-server-5.2_5.2.2-mariadb86_i386.deb ie package version is "5.2.2-mariadb86". * You now realize that you need to append "lucid" (etc) due to how reprepro works. So you want to release a new version "5.2.2-mariadb86.lucid" (the dot could be a dash, anything, or nothing). * The problem now is that for some reason dpkg compares version numbers such that, the latter version is considered smaller (earlier) than the first. Ie "a" > "ab" > "aa". So anything you append to "a" is always smaller than "a" alone. (This is unlike alphatebical order, so very confusing.) * As a result, people that have 5.2.2-mariadb86 installed will not get 5.2.2-mariadb86.lucid, as it is not considered an upgrade. * This is why tilde is given special meaning, as a workaround, 5.2.2-mariadb86~lucid is considered to be a higher version than either of the previous alternatives. * For you this is not a problem, since you will just introduce the new version format in the next version, so (in this example) 5.2.3-mariadbNN.lucid will be considered as an update to 5.2.2-anything. So you can, and should, use the dot. And then we'll have the same format between the three of us. (And if I ever create an apt repository for vanilla MySQL, that too.)
cheers and I'll get back later with more interesting comments.
Yes, please do, and good luck!
Thanks. I think I'm 2 blog posts and one new website away from that. (The Loitsut bootstrap script I created needs a website of its own, it is useful outside MepSQL.)
Let me know if you need help with accessing/finding some of the MariaDB stuff. I suppose you have most already as we tried to make it open and public, eg. lp:mariadb-tools/buildbot/. Do you want a copy of all the VM images for the different distros? (I think it is around 50GB or so total, not 100% sure).
The scripts are public, well documented and I was familiar with them while working with you, so I've found everything, thank you. I think the only gotcha was to look for the ourdelta scripts not in lp:ourdelta but in lp:~maria-captains, this came up in some IRC conversation with you just before I left, nice coincidence that I actually needed that info shortly afterwards. Since I've done a lot of less technical work in the past years, it was also a good feeling to prove to myself I can still do something without asking too many questions :-) Going forward I intend to be more interactive again. I was actually wondering if I should ask for the VM's, but since I went to use Amazon EC2 I didn't/couldn't need them. I know how strongly you feel about making sure everything is open source, available and even documented. Just as an idea, it could be a nice touch to document in the KB buidlbot articles that you can make the VM's available if anyone asks. (Keeping 50GB downloadable when nobody probably needs them is kind of going too far, some bot will end up downloading them and clogging the bandwidth. And there is the burden of keeping them up to date when you tweak them.) henrik -- henrik.ingo@avoinelama.fi +358-40-5697354 skype: henrik.ingo irc: hingo www.openlife.cc My LinkedIn profile: http://www.linkedin.com/profile/view?id=9522559
participants (2)
-
Henrik Ingo
-
Kristian Nielsen