CentOS Build Requirements
- MariaDB sources
- bzr. The bzr version of CentOS is too old to use it with MariaDB. You have to install Bazaar from source.
- The following rpm packages:
- gperf
- rpm-devel
- rpm-build
- rpmdevtools
- libdbi
Building MariaDB 5.3 and below
To build MariaDB of a version below 5.5 you need additionally
- Packaging scripts
- For a fully automated build — a sudo without password. This is NOT recommended on production systems! You have been warned!
visudo- and uncomment the line
%wheel ALL=(ALL) NOPASSWD: ALL usermod -a -G wheel {your_system_username}
.rpm Build Steps
First setup your build environment.
Then create packages:
cd $PACKAGING_WORK bakery/preheat.sh cd bakery_{number} bakery/tarbake51.sh last:1 $MARIA_WORK bakery/autobake51-centos.sh mariadb-{version_num}-maria-beta-ourdelta{number}.tar.gz
Update your Repositories
On subsequent packaging builds, you just update your repositories and run the packaging scripts:
rm -rf $MARIA_WORK rm -rf $PACKAGING_WORK cd $MARIA_MASTER $BZR pull $BZR branch $MARIA_MASTER $MARIA_WORK cd $PACKAGING_MASTER $BZR pull $BZR branch $PACKAGING_MASTER $PACKAGING_WORK
Now you can create packages again.
Building MariaDB 5.5 and above
To build MariaDB of a version 5.5 and about you need to install cmake. If you want to build .rpm packages, you need at least cmake 2.8.7. Otherwise cmake 2.6 will do.
Note that you will not need any packaging scripts and the build process will never need root access.
.rpm Build Steps
First setup your build environment. Ignore the part about packaging scripts.
If you want to build .rpm's:
cmake -DRPM=centos .
make packageInstead of "centos" you may want to specify "centos5" or "centos6". This affects the name of the generated rpm packages. You may also specify any other cmake arguments to configure the binaries any way you want. For example, to build our releases on CentOS 5 we use
cmake . -DBUILD_CONFIG=mysql_release -DRPM=centos5 make package