On my dev machine (which is windows-based), I’ve been running mySQL 4.1.12. I like it. I like the new character encoding that 4.1 brings.
Then I went to send an updated version of the software I’m working on to the live server – which runs an older 4.0.x version. I lost all of the nice latin encodings in there.
So I said, ok. Maybe its time to upgrade to 4.1.
Being a cautious guy, I do it on my non-live gentoo machine. Just to see how it goes.
Turns out portage (the nice easy to use software distribution engine for gentoo) has 4.1 masked. All of it.
Masked? Well, some build flags are saying 4.1.x has not yet been proven stable for x86 processors. It’s not ‘hard mask’ (which would mean it had been proven unstable). It’s just not ‘stable’.
I don’t know how their testing process works, but I figure 4.1 has been there for awhile. There should have been a stable build somwhere. How about 4.1.12 ? Nope. All I can see is 4.1.14, masked for my CPU.
Personnally, I like to run it simple. I don’t like unmasking things. I like stable.
But I really dig mySQL 4.1
So I unmasked it and got it installed (making sure I put up the right flags for getting the cool innodb tables).
Here’s how to unmask things, the safe and portage-friendly way.
In /etc/portage (which you should create if you don’t have it), there’s a file called package.keywords (which you might now want to create, because you most likely don’t have it yet)
In it, you can write rules. So, I wrote one which would enable me to build the version of mySQL I want.
When I emerge mysql-ed, I my cool new mysql database.
Neat things : while the stuff was compiling and building, my old mysql was still running and available – no downtime.
In fact, I had to restart the mysql daemon for the engine update to show up. That was pretty neat. Limited downtime is neat.
Less neat thing : I most likely need to update php. It does not like that I switched mysql on it. It keeps telling me weird things like:
Cannot load /usr/lib/apache2/extramodules/libphp4.so into server: libmysqlclient.so.12: cannot open shared object file: No such file or directory
I don’t have a libmysqlclient.so.12. I have a libmysqlclient.so.14. By mod_php really wants libmysqlclient.so.12.
So let’s update.
Turns out all I knew about apache, php and stuff has changed.
Before, I just emerged mod_php and it was neat enough to go and grab me the apache and php it needs (and whatever they need).
Now the packages I knew and used are not ‘it’ anymore. All this stuff is now under dev-lang/php and everything is masked.
Seems like my old dev-php/php doesn’t know how to handle my new sql. I’m lost. I want my mommy.
Well, this is a test box, so let’s test.
I stard by unmerging mod_php and php. Let’s start fresh.
Let’s emerge -v php-lang/php.
Of course, as far as I’m concerned all php packages are masked
- dev-lang/php-4.4.0 (masked by: ~x86 keyword)
- dev-lang/php-5.0.4 (masked by: ~x86 keyword)
- dev-lang/php-4.3.11 (masked by: ~x86 keyword)
- dev-lang/php-5.0.5 (masked by: package.mask, ~x86 keyword)
So, I unmasked 4.4.0 (that’s the one I want)
Then I got to meet another masked buddy (the gimp?),
- net-www/apache-2.0.54-r30 (masked by: ~x86 keyword)
Why r30? I’m not really up to date (2.0.52-r1). Portage has 2.0.54-r15 unmasked. It seems swell. Why fuss over the darn r30?
I though about using php 4.3.11 instead. That one wants the masked apache. Great. Well, I’ll unmask it, then.
Looks like apache wants some friends:
- net-www/gentoo-webroot-default-0.1 (masked by: ~x86 keyword)
- net-www/gentoo-webroot-default-0.2 (masked by: ~x86 keyword)
What’s that??? Superb package description at gentoo-portage.com:
This is the default Gentoo WebServer content
These version numbers are making me anxious. I don’t think I’d do that upgrade if I were on a production server.
Man, I only wanted to upgrade to mysql 4.1.x!! I didn’t expect it’d need me to install some obscure beta package.
Well, let’s unmask this and see what this one will want me to unmask.
Turns out PHP wants me to unmask some redundants-sounding friends
And it seems to be all. Great.
When unmasking, I tend to like to run a tight version control. That’s because I hating unmasking packages. And I don’t want to eventually get a beta mysql5 build without my knowledge. I don’t know if I’m doing this the smartest way.
Here’s what my /etc/portage/package.keywords file looks like now:
I let gentoo-webroot-default run free because, well, I don’t see how it can get any worst. I don’t even see what it is.
I’ll now really start emerge dev-lang/php and see what the new thing look like.
My server (and old 400mhz machine with not enough memory) will probably compile php for a whole day 😛