MySQL Forums
Forum List  »  Source, Builds, Binaries

How to build a binary rpm from source with patches
Posted by: Duncan Berriman
Date: August 31, 2005 07:18AM

Hi All,

I have found a problem with mysql which means I need to patch the standard distribution. Fortunately someone has already posted a patch for the problem although its to be included in the standard distribution.

The patch I required is to support READ and WRITE timeouts on linux.

I've downloaded the latest source code and made the required changes and managed to build it and test it and it works.

This was done by installing the source from rpm (which appears to just create a tar.gz file in /usr/src/redhat/SOURCES). I untarred this file, edited the code I wanted to change, did a configure, make, make install etc. and ran some test code which works fine.

My problem is I now want to build a binary rpm distribituon so that I can install it safely on a number of servers and keep an rpm kit for future use.

I've tried a few things with rpmbuild but none of them have been successful so was wondering if anyone out there has knowledge of how to produce an rpm kit from a source tree.

I tried

rpmbuild --rebuild --clean MySQL-4.1.14-0.src.rpm but this just creates the binaries from the rpm and not the installed source on the server.

I also tried rpmbuild -bb mysql-4.1.14/support-files/mysql-4.1.14.spec having first tar'd all the files up but this failed with

Removing Stale Files
Installing Master Databases
mysql-test-run: *** ERROR: Error executing mysqld --bootstrap
Could not install master test DBs
make: *** [test] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.84096 (%build)

RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.84096 (%build)

Not quite sure how to go about this so any help appreciated.

Thanks
Duncan

Options: ReplyQuote


Subject
Views
Written By
Posted
How to build a binary rpm from source with patches
3662
August 31, 2005 07:18AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.