Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How can I check rpm configuration options used to build mysql-server? I want to include memcached support for mysql, therefor I've to reinstall mysql-server from source and I need to know the exact configurations rpm used to build mysql currently running on my system.

mysqlbug shows me the following, but I can't figure how I should use it to build mysql-server with cmake

>MySQL support: [none | licence | email support | extended email support ]
>Synopsis:      <synopsis of the problem (one line)>
>Severity:      <[ non-critical | serious | critical ] (one line)>
>Priority:      <[ low | medium | high ] (one line)>
>Category:      mysql
>Class:         <[ sw-bug | doc-bug | change-request | support ] (one line)>
>Release:       mysql-5.6.12-56 (Percona Server (GPL), Release rc60.4, Revision 393)

>C compiler:    gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)

>C++ compiler:  g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)

>Environment:
        <machine, os, target, libraries (multiple lines)>
System: Linux 1 3.0.0+ #1 SMP Fri Oct 26 07:55:47 EEST 2012 x86_64 x86_64 x86_64 GNU/Linux
Architecture: x86_64

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/lib64/ccache/gcc /usr/lib64/ccache/cc
GCC: Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)
Compilation info (call): CC='/usr/bin/gcc'  CFLAGS='-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer -DPERCONA_INNODB_VERSION=rc60.4    -fPIC -Wall -O3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG_OFF -DMY_PTHREAD_FASTMUTEX=1'  CXX='/usr/bin/g++'  CXXFLAGS='-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -DPERCONA_INNODB_VERSION=rc60.4    -fPIC -Wall -Wno-unused-parameter -O3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG_OFF -DMY_PTHREAD_FASTMUTEX=1'  LDFLAGS=''  ASFLAGS=''
Compilation info (used): CC='/usr/bin/gcc'  CFLAGS='-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer -DPERCONA_INNODB_VERSION=rc60.4    -fPIC -Wall -O3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG_OFF -DMY_PTHREAD_FASTMUTEX=1'  CXX='/usr/bin/g++'  CXXFLAGS='-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -DPERCONA_INNODB_VERSION=rc60.4    -fPIC -Wall -Wno-unused-parameter -O3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG_OFF -DMY_PTHREAD_FASTMUTEX=1'  LDFLAGS=''  ASFLAGS=''
LIBC:
lrwxrwxrwx. 1 root root 12 Jan  7  2013 /lib/libc.so.6 -> libc-2.12.so
-rwxr-xr-x. 1 root root 1898576 Nov  1  2012 /lib/libc-2.12.so
share|improve this question

1 Answer 1

up vote 2 down vote accepted

You download the source rpm, install it, and then check the spec file

yumdownloader --source mysql-server
rpm -i mysql-server*.src.rpm
cd ~/rpmbuild/SPECS/mysql-server*/

check the spec files in there. It contains all patches, compile options etc. If you are unfamiliar with rpm making, then you can also look into rpmbuild.

The basic process to get you started is outlined in this blogpost.

when you are done changing in the spec file, you can use for example rpmbuild to rpmbuild the rpm:

rpmbuild -ba mysql*.spec

I also would like to say something about signing packages

share|improve this answer
    
So basically I can enable memcached support, rebuild rpm and install it? –  rabotalius Aug 23 '13 at 22:18
    
yes. and increment the release number too (makes you able to upgrade if you've got the same version installed, and you can distinguish your release from the one provided). If this is a red hat box, you'll lose support for your custom made package though. Also, in yum config it can be a good idea for you to "exclude=mysql*" so it won't accidentally be replaced if you do a yum upgrade in the future... –  Petter H Aug 23 '13 at 22:22
    
ok. but what if i don't have rpm source? i got this Percona-Server-server-56-5.6.12-rc60.4.393.rhel6.x86_64.rpm percona.com/downloads/Percona-Server-5.6/… –  rabotalius Aug 23 '13 at 22:25
    
if you don't have it, it looks like it can be found here percona.com/downloads/Percona-Server-5.6/… –  Petter H Aug 23 '13 at 22:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.