Re-compiling MySQL 5.0 with OpenSSL support under Debian

If you’ve ever required OpenSSL support enabled for MySQL Server 5.0 under debian, then you will need to recompile MySQL. Under Debian this is very easy.

If you’ve ever required OpenSSL support enabled for MySQL Server 5.0 under debian, then you will need to recompile MySQL. Under Debian this is very easy.

First you will need to download the package source, as root type the following:


cd /root
mkdir build
cd build
apt-get source mysql-source-5.0

The above commands will create a folder called ‘build’, enter the directory and then download the mysql-server-5.0 package source. The following are the results under an Ubuntu server:


[root@jager:/root/builds]# apt-get source mysql-server-5.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
Need to get 16.8MB of source archives.
Get:1 http://security.ubuntu.com feisty-security/main mysql-dfsg-5.0 5.0.38-0ubuntu1.1 (dsc) [1209B] Get:2 http://security.ubuntu.com feisty-security/main mysql-dfsg-5.0 5.0.38-0ubuntu1.1 (tar) [16.6MB] Get:3 http://security.ubuntu.com feisty-security/main mysql-dfsg-5.0 5.0.38-0ubuntu1.1 (diff) [149kB] Fetched 16.8MB in 17s (957kB/s)
dpkg-source: extracting mysql-dfsg-5.0 in mysql-dfsg-5.0-5.0.38
dpkg-source: unpacking mysql-dfsg-5.0_5.0.38.orig.tar.gz
dpkg-source: applying ./mysql-dfsg-5.0_5.0.38-0ubuntu1.1.diff.gz

If you list the directory contents you should have something like this:


[root@jager:/root/builds]# ls -al
total 16408K
drwxr-xr-x 3 root root 4096 2007-10-30 13:08 ./
drwxr-xr-x 15 root root 4096 2007-10-30 13:06 ../
drwxr-xr-x 39 root root 4096 2007-10-30 13:08 mysql-dfsg-5.0-5.0.38/
-rw-r--r-- 1 root root 148883 2007-10-10 14:11 mysql-dfsg-5.0_5.0.38-0ubuntu1.1.diff.gz
-rw-r--r-- 1 root root 1209 2007-10-10 14:11 mysql-dfsg-5.0_5.0.38-0ubuntu1.1.dsc
-rw-r--r-- 1 root root 16602385 2007-04-03 05:03 mysql-dfsg-5.0_5.0.38.orig.tar.gz

Before we proceed we need to make sure that we have all of the necessary tools to compile the new packages and create the .deb:


apt-get install devscripts build-essential fakeroot

You will also want to make sure that you have any dependencies that the package would require:


apt-get build-dep mysql-server-5.0

Now that we have everything we need, we just need to make a modification to the file “mysql-dfsg-5.0-5.0.38/debian/rules” with your favorite editor. Search for the following lines within the file:


--without-openssl
--with-yassl

And change the lines to the below:


--with-openssl
--without-yassl

Basically you’re enabling OpenSSL and disabling YaSSL, make sure that you have OpenSSL installed (apt-get install openssl). Once you’ve finished editing the file, save it and exit out of the editor.

You will then want to start the compiling and build of the Debian packages, run the following command within the “mysql-dfsg-5.0-5.0.3” directory like so:


[root@jager:/root/builds/mysql-dfsg-5.0-5.0.3]# debuild -us -uc

Everything should process properly, and you should end up with a handful of .deb packages within “/root/builds”:


[root@jager:/root/builds]# ls -al
total 57628K
drwxr-xr-x 3 root root 4096 2007-10-30 14:02 ./
drwxr-xr-x 15 root root 4096 2007-10-30 14:35 ../
-rw-r--r-- 1 root root 6411178 2007-10-30 14:02 libmysqlclient15-dev_5.0.38-0ubuntu1.1_i386.deb
-rw-r--r-- 1 root root 1426470 2007-10-30 14:01 libmysqlclient15off_5.0.38-0ubuntu1.1_i386.deb
-rw-r--r-- 1 root root 45756 2007-10-30 14:01 mysql-client_5.0.38-0ubuntu1.1_all.deb
-rw-r--r-- 1 root root 6794738 2007-10-30 14:02 mysql-client-5.0_5.0.38-0ubuntu1.1_i386.deb
-rw-r--r-- 1 root root 54466 2007-10-30 14:01 mysql-common_5.0.38-0ubuntu1.1_all.deb
drwxr-xr-x 40 root root 4096 2007-10-30 14:00 mysql-dfsg-5.0-5.0.38/
-rw-r--r-- 1 root root 148883 2007-10-30 13:34 mysql-dfsg-5.0_5.0.38-0ubuntu1.1.diff.gz
-rw-r--r-- 1 root root 972 2007-10-30 13:34 mysql-dfsg-5.0_5.0.38-0ubuntu1.1.dsc
-rw-r--r-- 1 root root 1761484 2007-10-30 14:02 mysql-dfsg-5.0_5.0.38-0ubuntu1.1_i386.build
-rw-r--r-- 1 root root 3136 2007-10-30 14:02 mysql-dfsg-5.0_5.0.38-0ubuntu1.1_i386.changes
-rw-r--r-- 1 root root 16602385 2007-04-03 05:03 mysql-dfsg-5.0_5.0.38.orig.tar.gz
-rw-r--r-- 1 root root 47854 2007-10-30 14:02 mysql-server-4.1_5.0.38-0ubuntu1.1_i386.deb
-rw-r--r-- 1 root root 47828 2007-10-30 14:01 mysql-server_5.0.38-0ubuntu1.1_all.deb
-rw-r--r-- 1 root root 25522626 2007-10-30 14:02 mysql-server-5.0_5.0.38-0ubuntu1.1_i386.deb

Just run dpkg -i *.deb and all should be good!


[root@jager:/root/builds]# dpkg -i *.deb
(Reading database ... 48209 files and directories currently installed.)
Preparing to replace libmysqlclient15-dev 5.0.38-0ubuntu1.1 (using libmysqlclient15-dev_5.0.38-0ubuntu1.1_i386.deb) ...
Unpacking replacement libmysqlclient15-dev ...
Preparing to replace libmysqlclient15off 5.0.38-0ubuntu1.1 (using libmysqlclient15off_5.0.38-0ubuntu1.1_i386.deb) ...
Unpacking replacement libmysqlclient15off ...
Preparing to replace mysql-client 5.0.38-0ubuntu1.1 (using mysql-client_5.0.38-0ubuntu1.1_all.deb) ...
Unpacking replacement mysql-client ...
Preparing to replace mysql-client-5.0 5.0.38-0ubuntu1.1 (using mysql-client-5.0_5.0.38-0ubuntu1.1_i386.deb) ...
Unpacking replacement mysql-client-5.0 ...
Preparing to replace mysql-common 5.0.38-0ubuntu1.1 (using mysql-common_5.0.38-0ubuntu1.1_all.deb) ...
Unpacking replacement mysql-common ...
Preparing to replace mysql-server-4.1 5.0.38-0ubuntu1.1 (using mysql-server-4.1_5.0.38-0ubuntu1.1_i386.deb) ...
* Stopping MySQL database server mysqld [ OK ] Unpacking replacement mysql-server-4.1 ...
Preparing to replace mysql-server 5.0.38-0ubuntu1.1 (using mysql-server_5.0.38-0ubuntu1.1_all.deb) ...
* Stopping MySQL database server mysqld [ OK ] Unpacking replacement mysql-server ...
Preparing to replace mysql-server-5.0 5.0.38-0ubuntu1.1 (using mysql-server-5.0_5.0.38-0ubuntu1.1_i386.deb) ...
* Stopping MySQL database server mysqld [ OK ] * Stopping MySQL database server mysqld [ OK ] Unpacking replacement mysql-server-5.0 ...
Setting up mysql-common (5.0.38-0ubuntu1.1) ...
Setting up libmysqlclient15off (5.0.38-0ubuntu1.1) ...
Setting up mysql-client-5.0 (5.0.38-0ubuntu1.1) ...
Setting up mysql-server-5.0 (5.0.38-0ubuntu1.1) ...
* Stopping MySQL database server mysqld [ OK ] * Starting MySQL database server mysqld [ OK ] * Checking for corrupt, not cleanly closed and upgrade needing tables.
Setting up libmysqlclient15-dev (5.0.38-0ubuntu1.1) ...
Setting up mysql-client (5.0.38-0ubuntu1.1) ...
Setting up mysql-server-4.1 (5.0.38-0ubuntu1.1) ...
Setting up mysql-server (5.0.38-0ubuntu1.1) ...


Did you like this article?


0 Shares:
You May Also Like

Bricks, apps, and warranties, oh my! Apple, AT&T hit with $800 million suit

Follow up on bricking, apps, and warranties as well as the $800 Million Dollar Suit brought upon Apple and AT&T.
Bricks, apps, and warranties, oh my! Apple, AT&T hit with $800 million suit - Another class action lawsuit has been filed against Apple and AT&T, which takes to task the companies' actions when it comes to locking the iPhone to a specific carrier, blocking out third-party applications, the "bricking" debacle, and the iPhone's warranty.
Read More

WoW Database Site Sells for $1 Million

WoW Database Site Sells for $1 Million - MattHock writes "Wowhead (a WoW information database) has to ZAM (Affinity Media) for the price of $1 Million. ZAM is the owner of several other WoW databases, including Thottbot and Allakhazam. Until recently Affinity was also the owner of IGE, a highly controversial company that sold in-game wealth for real life money. Affinity recently sold IGE, which Wowhead claims as the reason they allowed the sale to go through. But did ZAM really sell IGE? The blogger who put this story online doubts that IGE and ZAM have actually distanced themselves. He believes that the supposed sale was just actually a means of restructuring to hide the relationship, similar to how IGE's relationship to Thottbot was hidden for a number of months through a convoluted set of parent companies."

Read more of this story at Slashdot.

[Slasdot]
Read More

Swiftweasel 2.0.0.4.1 (Default branch)

Unfortunately there is no swiftweasel for debian etch/testing:
jordant:~# apt-cache search swift cakephp - MVC rapid application development framework for PHP libnet-dns-fingerprint-perl - library to determine DNS server vendor, product and version starfighter - 2D scrolling shooter game xwpe - Programming environment and editor for console and X11
I had to browse to the SourceForge project page, and download the appropriate version for my machine, which is a athlon64/32bit.
jordant:~# wget "http://downloads.sourceforge.net/swiftweasel/swiftweasel-2.0.0.4.1_06-21-07_athlon64-32bit.tar.gz?modtime=1182563426&big_mirror=0"
I just untar'd the file, and ran ./firefox from within the directory and it picked up all my settings and everything. Next I had to set it up so that I just had to type firefox within a console. So I created a symlink in my 'bin' folder with all my other custom perl scripts and other command line programs/scripts:
[jordant@jordant:/home/jordant/bin]> ln -s ../swiftweasel/firefox firefox [jordant@jordant:/home/jordant/bin]> rehash [jordant@jordant:/home/jordant/bin]> firefox &
I also had to setup my fluxbox keybinding like so:
Mod4 z :ExecCommand firefox &
I originally was using "iceweasel" which is the Debian fork of Firefox, you can read why Debian had to fork Firefox on WikiPedia I do notice a difference, pages load pretty fast and the FasterFox Plugin helps. However they packaged an extension called "AdBlocks" which I've never used and I don't really like. But for now I have just removed it.
Swiftweasel 2.0.0.4.1 (Default branch) - Swiftweasel is an optimized build of the Mozilla Firefox Web browser for Linux. It offers builds for both AMD and Intel processors. Swiftweasel is 100% compatible with all Firefox themes, plugins, and extensions. License: Mozilla Public License (MPL) Changes:
The update notifications feature that made its first appearance in 2.0.0.5pre is installed. When a new version is available, you will be notified so you can get it. Further font rendering improvements were done. Automatic detection of plugins is done in common directories in the file system. A few more build tweaks were made. The "Release Notes" option in the Help section brings up the release notes.
[FreshMeat]
Read More