As I mentioned in a previous post, the MySQL RPMs provided for RHEL/CentOS by percona are not actually compatible with RHEL/CentOS. They use the same package layout as the MySQL-provided RPMs.
Here's how I create my own RPMs having the same package layout as the RHEL/CentOS packages but with the percona highperf patchset applied.
The following instructions assume you have an appropriate rpmbuild environment setup.
- Grab the latest CentOS MySQL SRPM. At the time of writing, that is mysql-5.0.77-3.el5.src.rpm from the 5.4 release.
- Grab the latest percona MySQL SRPM. At the time of writing, that is MySQL-percona-highperf-5.0.87-b20.29.rhel5.src.rpm
- Install both SRPMs:
rpm -ivh mysql-5.0.77-3.el5.src.rpm MySQL-percona-highperf-5.0.87-b20.29.rhel5.src.rpm
You should now havemysql.spec
andmysql-percona.spec
in yourSPECS
directory. - Update the version, etc. in
mysql.spec
and merge the patches frompercona.spec
. - Test with
rpmbuild -bp SPECS/mysql.spec
until you get a clean%prepare
. - Build the source RPM with:
rpmbuild -bs SPECS/mysql.spec
- Build the binary RPMs with
rpmbuild --rebuild SRPMS/mysql-5.0.87-0.1.el5.perconahighperf.src.rpm
- To build the binaries and perform the self-tests, use:
rpmbuild --rebuild --define 'runselftest 1'
SRPMS/mysql-5.0.87-0.1.el5.perconahighperf.src.rpm
My .spec file for MySQL 5.0.87 is here