Search Posts:



August 2010

1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31

Some background: I've deployed a central syslog-ng server at work, and I'm looking to use the nifty frontend, Logzilla (formerly known as php-syslog-ng). Unfortunately, Logzilla now requires MySQL 5.1, which isn't provided by RHEL/CentOS 5. This means I have to go rogue and run a non-standard MySQL build.

There are several ways to approach this problem (install from source, install the upstream RPMs), but from my perspective the "rightest" way is to track the current Fedora MySQL RPM and rebuild it for RHEL. This provides a proper RHEL-style name and dependency tree, and it packages all the fixes that Red Hat is going to put into their version.

So, here's how to do it.

Building MySQL 5.1

1) Ensure you can build RPMs as a normal user, since building as root is bad mmk. Dag explains how to go about this.

2) Download the latest SRPM from the latest Fedora source repo. As of the time of this writing, that means mysql-5.1.45-2.fc13.src.rpm from Fedora 13.

3) Grab the build requirements. This is going to heavily depend on what you've already got installed, but I needed to do:

yum install rpm-build autoconf automake gperf imake libtermcap-devel libtool ncurses-devel readline-devel

4) Install the RPM (note - the md5 signature signature mechanism seems to have changed, you must use the --nomd5 flag here, and you cannot directly rpmbuild the f13 srpm):

rpm --nomd5 -ivh mysql-5.1.45-2.fc13.src.rpm

5) Build the RPMs:

rpmbuild -ba [yourhomedir]/redhat/SPECS/mysql.spec

Hopefully, it'll build successfully. The RPMs will be in your [yourhomedir]/redhat/RPMS/ directory. But there's one little problem...

What about libmysqlclient.so.15?

If you tried to yum up to the RPM you just built, depending on what you've got installed you might get some nasty errors about a missing libmysqlclient.so.15. Looks like that library version has been deprecated in 5.1, oh noes!

You've got a couple of options here. You could just copy that library from your old install and do some ugly --force hacky stuff to install the new RPMs. It'll work, but it's nasty. You could also rip out those RPMs that require that library and rebuild *them*, but that's time consuming and means you've got even more stuff that's diverging from upstream. Of course, if you don't actually *use* any of those packages, you could ditch them entirely.

The approach I took was to build a shim RPM that provides *just* this library. I can't take credit for the idea, it turns out somebody had already come before me.

1) Download the spec file for this library from Remi Collet, the original creator.

2) Patch it for RHEL using my patch file, or just download my spec file directly.

3) Get the CentOS or RHEL mysql source rpm from the current repository (which is at the time of this writing CentOS 5.5).

4) Install the srpm (no need to --nomd5 this time!)

rpm -ivh mysql-5.0.77-4.el5_5.3.src.rpm

5) Build the new RPM:

rpmbuild -ba mysqlclient15-remi.spec

This should spit out a sweet new RPM.

Yum it up

Now you just have to install:

yum --nogpg install mysqlclient15-5.0.77-1.x86_64.rpm mysql-libs-5.1.48-2.x86_64.rpm mysql-5.1.48-2.x86_64.rpm mysql-devel-5.1.48-2.x86_64.rpm mysql-server-5.1.48-2.x86_64.rpm

And, voila! MySQL 5.1 with no dependency issues! You could even write a little shell script to pull updates and build the RPMs automatically.

(Side note - be sure to back up your database before upgrading! My upgrade went smoothly, but that's no guarantee that yours will!)

I've been a long time fan of Solaris the technology, and I've been running OpenSolaris for personal use for several years now. I've tried hard to explain to people the merits of what I view as an exceptional but lesser known OS, with minimal success. The OpenSolaris community never really took off the way I (or Sun, probably) had hoped; Sun never really treated community members as first class citizens, and the "real" work on OpenSolaris all came from inside of Sun.

Well, I guess Oracle had enough of all this mess, and they've shot the OpenSolaris project right in the head. OpenSolaris as a product is completely dead, and the nightly builds and code repositories are closing up shop. The CDDL will be used (to some extent) for bits of Solaris code, but that code won't be released until *after* Solaris releases ship, which is a stark contrast to the more open approach Sun took with OpenSolaris.

As a pre-emptive strike against this potentiality, key community members have already spooled up the Illumos project, a fork of OpenSolaris with the proprietary bits replaced by open source software.

Oracle's decision to keep the repositories closed until after release forces Illumos's hand a bit; they no longer have the luxury of simply rebuilding a free Solaris derivative and keeping it up to date with the latest efforts from inside Oracle. Now, they have to choose: do they accept a huge lag and spool up a post-release open source derivative, or do they fork proper and kiss Oracle goodbye forever?

I have to say, the latter option is much more attractive, and it's not entirely out of the realm of possibility either; the Illumos main page now shows a brief response which seems to imply they're moving in this direction. Illumos is a real community project; if OpenSolaris's woes were really, as many of us felt, due mainly to Sun's handling of the community, this represents a tremendous opportunity to address those issues and build a healthier and more vibrant community than OpenSolaris ever had. Oracle is even helping out by scattering former Sun engineers to the wind; how many of those engineers will want to keep working on the OpenSolaris code base as a labor of love? Are there enough of them interested in continuing the work that they started at Sun as a community project? Will they ultimately make Illumos even *better* than Solaris?

Solaris proper is rapidly dying to me. I'm not the customer Oracle wants, and they've made it abundantly clear that they have no interest in having me. They want big enterprise customers with big Oracle database deployments, and screw you open source and startup hippies, your pockets aren't deep enough to even think of playing that game. Well, so be it. But Illumos is providing an opportunity for all of us hippies and startups to rally around a new project, with a new community, that we may finally be a real part of. I think the possibility really is there, and Illumos could become the open source success that OpenSolaris only dreamed of becoming.

Am I sad to see things go this way? A bit, yes, but it's also a huge burden lifted: now we know the real score. There's no more begging Oracle for table scraps that may never come, it's either do or die by the efforts of the community alone. Whichever way that goes, at least there's nobody left to blame.

I won't lie, I've mostly lurked in the shadows of the OpenSolaris community, justifying my lack of participation with an observation that participation was pointless anyway. Why would I even bother when the community was really just an afterthought to Sun? Well, I (and people like me) are being called on that bluff; if we don't step up and contribute now, it's all over for real.