rpm 的配置选项

rpm 的配置选项

我如何检查用于构建 mysql-server 的 rpm 配置选项?我想为 mysql 包含 memcached 支持,因此我必须从源代码重新安装 mysql-server,并且我需要知道当前在系统上运行的用于构建 mysql 的 rpm 的确切配置。

mysqlbug 向我显示了以下内容,但我不知道如何使用它通过 cmake 构建 mysql-server

>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

答案1

下载源 rpm,安装它,然后检查 spec 文件

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

检查规格文件。它包含所有补丁、编译选项等。如果你不熟悉 rpm 制作,那么你也可以查看rpm构建

入门的基本流程概述如下这篇博文

当你在 spec 文件中完成更改后,你可以使用例如 rpmbuild 来 rpmbuild rpm:

rpmbuild -ba mysql*.spec

我还想说一下签署包

相关内容