Debian Sarge and mysqlclient 4.1

Posts from previous Beta sessions

Debian Sarge and mysqlclient 4.1

Postby Diska » Tue Aug 14, 2007 2:22 am

Absolutely not a Wowroster bug, but rather something awkward of Debian Sarge. People are bound to encounter this problem so I thought I'd write it down.

The php4-mysql package in Debian Sarge is compiled against libmysqlclient12, which is the 4.0.x version of the client libraries and is not good enough for roster 2.0.
Debian Sarge *does* include libmysqlclient14 (equals the 4.1 versions) and mysql-server-4.1 but that doesn't matter because php4-mysql is compiled against the older libraries.

At this moment I'm trying to recompile the php4 package against libmysqlclient14, I'll let you guys know my results of that and provide the updated .deb file as well as instructions on how to recompile the package yourself (in case you don't trust my .deb file)
User avatar
Diska
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 179
Joined: Tue Jul 04, 2006 2:05 pm

Debian Sarge and mysqlclient 4.1

Postby zanix » Tue Aug 14, 2007 2:40 am

Thanks Diska
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Debian Sarge and mysqlclient 4.1

Postby Diska » Tue Aug 14, 2007 5:08 am

Yep, it worked :D

DISCLAIMER:

I have no idea what impact this has. The package was originally compiled against libmysqlclient12 while libmysqlclient14 was in the repository already. Knowing Debian there probably was a good reason for it. This might break stuff, but nothing has broken for me so far.


The .deb can be downloaded from this location:
http://server.unbridled.eu/php4-mysql_4.3.10-22_i386.deb

It's a recompile of the latest version available for sarge (including it's security updates). It has the exact same version number as the original package so if another security updates gets released it will get upgraded just fine (but it will again be linked against the old mysql-client libraries)

Instructions to recompile the package yourself:

First make sure you have the source repositories added in /etc/apt/sources.list
My lines look like this:

Code: Select all
deb-src ftp://ftp.debian.nl/debian/ sarge main
deb-src http://security.debian.org/ sarge/updates main


Make sure to run an apt-get update if you did not have those lines in your sources.list already.

Next, we'll be installing the dependencies needed for the recompile, and next to that we'll install fakeroot so we won't need root access to compile the packages.

Code: Select all
apt-get build-dep php4-mysql
apt-get install fakeroot
apt-get install libmysqlclient14-dev


The last line will remove the libmysqlclient12-dev because it conflicts. That's good and supposed to happen.

Switch back to a regular user now, we're going to download the sources of php4-mysql, do this by executing the following:

Code: Select all
apt-get source php4-mysql


The sources should be downloaded and unpacked automatically. Now we'll make an small change. Edit the file php4-4.3.10/debian/control and replace libmysqlclient12-dev by libmysqlclient14-dev on the 6th line.

Code: Select all
cd php4-4.3.10/debian/
sed -e s/libmysqlclient12-dev/libmysqlclient14-dev/ control > control.new
mv control.new control


Now we're ready to start compiling:

Code: Select all
cd ..
fakeroot dpkg-buildpackage


If this gives errors about missing dependencies, switch to root and use apt-get to install them. Shouldn't be needed though as we already should have to needed packages.
If all goes well your pc will be busy for quite a while. Don't get scared if you see warnings scrolling by, that's normal. When the compiling is finished you should find the resulting packages in the directory one level up. Install the php4-mysql package like this:

Code: Select all
cd ..
dpkg -i php4-mysql_4.3.10-22_i386.deb


I think this is it, if I forgot a step let me know ;)
Last edited by Diska on Tue Aug 14, 2007 6:29 am, edited 2 times in total.
User avatar
Diska
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 179
Joined: Tue Jul 04, 2006 2:05 pm

Debian Sarge and mysqlclient 4.1

Postby ds » Tue Aug 14, 2007 5:47 am

Great Info! Thanks Diska!
Image
ds
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 297
Joined: Sat Jul 08, 2006 9:58 am

Debian Sarge and mysqlclient 4.1

Postby joehail » Tue Aug 14, 2007 6:50 am

:( I can't use the deb on the hosted server I use, and they won't change it. is there any way that the roster can work under the current Debian install?
Image
User avatar
joehail
WR.net Journeyman
WR.net Journeyman
 
Posts: 103
Joined: Tue Jul 04, 2006 4:54 pm
Location: Cincinnati, Ohio USA

Debian Sarge and mysqlclient 4.1

Postby zeryl » Tue Aug 14, 2007 7:43 am

Unfortunately not. We use quite a bit of functionality that has been introduced in 4.1

It may be time to start looking in to a new host, as anyone using less than 4.1 in MySQL is probably using quite an old version of PHP as well, which is of course, a security risk.
User avatar
zeryl
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 194
Joined: Tue Jul 04, 2006 12:59 pm
Location: Saint Louis

Debian Sarge and mysqlclient 4.1

Postby Diska » Tue Aug 14, 2007 7:51 am

I've been following SVN for a while, and only upgraded the libmysqlclient to version 4.1 today because the version check is enforced now.
I tried Roster after the conversion to UTF-8 and it still seemed to work fine although I didn't look at it too well, the memberlist seemed to have a problem with alts but I didn't look into it.

And Debian Sarge ships php 4.3.10 with uptodate security features. I believe Sarge will be receiving security updates until somewhere end of this year, then you'll be forced to upgrade to Etch, but for now, you're safe and sound.
User avatar
Diska
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 179
Joined: Tue Jul 04, 2006 2:05 pm

Debian Sarge and mysqlclient 4.1

Postby joehail » Tue Aug 14, 2007 8:22 am

thank you Zeryl.. can you recommend, in a PM, a free host that I can just host my roster on, I will linkt it from the rest of my site.. thanks
Image
User avatar
joehail
WR.net Journeyman
WR.net Journeyman
 
Posts: 103
Joined: Tue Jul 04, 2006 4:54 pm
Location: Cincinnati, Ohio USA

Debian Sarge and mysqlclient 4.1

Postby PleegWat » Tue Aug 14, 2007 2:36 pm

The main memberslist uses subqueries, and has done so since back in the adminpanel branch. Subqueries do not work prior to 4.1. It could be that this requirement is for server version only, and that a lower client version works. But we chose to enforce both server and client version above 4.1, just to make sure we don't get errors from it.

It is possible to hack roster to circumvent the check, but I'm not gonna tell you how to, especially while we're still in beta.
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm


Return to Archived

Who is online

Users browsing this forum: No registered users and 1 guest

cron