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.

  1. 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.
  2. Grab the latest percona MySQL SRPM. At the time of writing, that is MySQL-percona-highperf-5.0.87-b20.29.rhel5.src.rpm
  3. 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 have mysql.spec and mysql-percona.spec in your SPECS directory.
  4. Update the version, etc. in mysql.spec and merge the patches from percona.spec.
  5. Test with
    rpmbuild -bp SPECS/mysql.spec
    until you get a clean %prepare.
  6. Build the source RPM with:
    rpmbuild -bs SPECS/mysql.spec
  7. Build the binary RPMs with
    rpmbuild --rebuild SRPMS/mysql-5.0.87-0.1.el5.perconahighperf.src.rpm
  8. 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

Leave a reply

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>