#(ie. use with rpm --rebuild): # # --with debug Compile with debugging code # # enable build with debugging code: will _not_ strip away any debugging code, # will _add_ -g3 to CFLAGS, will _add_ --enable-maintainer-mode to # configure. # "fix" underlinking: %define _disable_ld_no_undefined 1 %define build_debug 0 %define build_test 0 %define build_oqgraph 0 # command-line overrides: # rpm -ba|--rebuild --with 'xxx' %{?_with_debug: %{expand: %%define build_debug 1}} %{?_with_test: %{expand: %%define build_test 1}} %{?_without_test: %global build_test 0} %{?_with_oqgraph: %{expand: %%define build_oqgraph 1}} %{?_without_oqgraph: %global build_oqgraph 0} #if defined,don't extract debug info, which will speedup the built process. Not commenting does not help. It has to be deactivated. Via removing percent. #global __debug_install_post /bin/true %if %{build_debug} # disable build root strip policy %define __spec_install_post %{_libdir}/rpm/brp-compress || : # This gives extra debuggin and huge binaries %{expand:%%define optflags %{optflags} %([ ! $DEBUG ] && echo '-g3')} %endif %if %{build_debug} %define build_debug 1 %endif %if %{build_test} %define build_test 1 %endif %if %{build_oqgraph} %define build_oqgraph 1 %endif %define major 3 %define libname %mklibname mariadb %{major} %define develname %mklibname -d mariadb %define mariadbdmajor 19 %define libmariadbembedded %mklibname mariadbd %{mariadbdmajor} %define libmariadbembedded_devel %mklibname -d mariadb-embedded %define muser mysql # rule out some useless autodeps in the test suite %global __requires_exclude perl\\(th|perl\\(lib|perl\\(mtr|perl\\(My %global __provides_exclude perl\\(th|perl\\(lib|perl\\(mtr|perl\\(My Summary: A very fast and reliable SQL database engine Name: mariadb Version: 11.3.2 Release: %mkrel 1 Group: Databases License: GPLv2 with exceptions URL: https://mariadb.org/ Source0: https://downloads.mariadb.org/rest-api/mariadb/%{version}/mariadb-%{version}.tar.gz Source3: my.cnf Source4: server.cnf Source5: client.cnf Source6: mysql-clients.cnf Source10: mysql.tmpfiles.d Source11: mysqld.service Source12: mysqld-prepare-db-dir # Skip some tests failing on BS Source40: mga-skipped-tests-base.list # config files to load plugins, note these files are processed by expand, line 678 Source50: auth_pam.cnf Source51: auth_socket.cnf Source52: ha_archive.cnf Source53: ha_blackhole.cnf Source54: ha_connect.cnf Source55: ha_federatedx.cnf Source56: handlersocket.cnf Source57: ha_oqgraph.cnf Source58: ha_sequence.cnf Source59: ha_sphinx.cnf Source60: ha_spider.cnf Source61: locales.cnf Source62: metadata_lock_info.cnf Source63: query_cache_info.cnf Source64: query_response_time.cnf Source65: disks.cnf Source66: ha_mroonga.cnf Source67: sql_errlog.cnf Source68: feedback.cnf Source69: ha_innodb.cnf Source70: server_audit.cnf Source71: auth_gssapi.cnf # the following patches are rediffed from the mysql-5.5 src.rpm to mariadb-5.5 # fedora patches # mandriva patches Patch101: mariadb-5.5-logrotate.patch Patch106: mariadb-5.5-hotcopy.patch Patch107: mariadb-5.5-mysql_install_db-quiet.patch #remove setting ownership of system install files Patch108: mysql_install_db.patch Requires(post): systemd >= %{systemd_required_version} Requires(post): rpm-helper >= 0.24.8-1 Requires(preun): rpm-helper >= 0.24.8-1 Requires(post): %{name}-common = %{version}-%{release} Requires(preun): %{name}-common = %{version}-%{release} Requires(post): %{name}-client = %{version}-%{release} Requires(preun): %{name}-client = %{version}-%{release} Requires(postun): %{name}-common = %{version}-%{release} Requires(postun): %{name}-client = %{version}-%{release} Requires: %{name}-common = %{version}-%{release} Requires: %{name}-core = %{version}-%{release} Requires: %{name}-client = %{version}-%{release} Provides: mysql = %{version}-%{release} Conflicts: %{name}-bench < 10.4.11-2 Conflicts: %{name}-extra < %{version}-%{release} Conflicts: %{name}-feedback < %{version}-%{release} Conflicts: %{name}-obsolete < %{version}-%{release} Recommends: %{name}-extra BuildConflicts: edit-devel BuildRequires: bison BuildRequires: bzip2-devel BuildRequires: cmake BuildRequires: cmake(msgpack-c) BuildRequires: doxygen BuildRequires: glibc-devel BuildRequires: glibc-devel BuildRequires: icu-devel BuildRequires: libaio-devel BuildRequires: libaio-devel BuildRequires: libcrack-devel BuildRequires: liblzo-devel BuildRequires: libstdc++-devel BuildRequires: libtermcap-devel BuildRequires: lzma-devel BuildRequires: mercurial BuildRequires: pam-devel BuildRequires: pkgconfig(fmt) BuildRequires: pkgconfig(krb5) BuildRequires: pkgconfig(libarchive) BuildRequires: pkgconfig(libevent) BuildRequires: pkgconfig(liblz4) BuildRequires: pkgconfig(libpcre2-8) BuildRequires: pkgconfig(libpcre2-posix) BuildRequires: pkgconfig(libsystemd) BuildRequires: pkgconfig(libzmq) BuildRequires: pkgconfig(libzstd) BuildRequires: pkgconfig(ncurses) BuildRequires: pkgconfig(odbc) BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(python3) BuildRequires: pkgconfig(snappy) BuildRequires: pkgconfig(zlib) BuildRequires: systemtap BuildRequires: systemtap-sdt-devel BuildRequires: texinfo BuildRequires: wrap-devel BuildRequires: xfs-devel # use system jemalloc libs instead of bundled ones BuildRequires: pkgconfig(jemalloc) %if %{build_oqgraph} # required by oqgraph v3 BuildRequires: boost-devel BuildRequires: judy-devel %endif %description The MariaDB software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. The mariadb server is compiled with the following storage engines: - Aria Storage Engine - Archive Storage Engine - Blackhole Storage Engine - CSV Storage Engine - FederatedX Storage Engine (Federated replacement) - Heap Storage Engine - MyISAM Storage Engine - MyISAMMRG Storage Engine - Partition Storage Engine - Perfschema Storage Engine - Percona XtraDB Storage Engine (InnoDB replacement) A multitude of storage engines and handlers are being provided in separate sub packages such as: mariadb-feedback - Feedback Storage Engine mariadb-oqgraph - Open Query GRAPH computation engine mariadb-connect - CONNECT handler mariadb-sphinx - Sphinx Storage Engine mariadb-sequence - Sequence Storage Engine mariadb-spider - Spider Storage Engine mariadb-rocks - RocksDB Storage Engine The following extra storage engines are provided by the mariadb-extra package - handlersocket - query_cache_info The following storage engines are provided in the mariadb-obsolete package - Federated Storage Engine %package -n mysql-MariaDB Summary: A MySQL drop-in replacement Group: System/Servers Requires: %{name} %description -n mysql-MariaDB MariaDB is a complete MySQL drop-in replacement with additional fixes and storage engines. This package is used as a transitional virtual package, which requires MariaDB so that people who used to use mysql can find it nicely. %package feedback Summary: Feedback storage engine Group: System/Servers Requires: %{name}-common-core >= %{version}-%{release} Conflicts: %{name}-common-core < %{version}-%{release} %description feedback MariaDB feedback storage engine submits feedback about your mariadb server. Results can be seen on https://mariadb.org/feedback_plugin/ . %if %{build_oqgraph} %package oqgraph Summary: Open Query GRAPH computation engine Group: System/Servers Requires: %{name}-common-core >= %{version}-%{release} Conflicts: %{name}-common-core < %{version}-%{release} Conflicts: mariadb-extra < 10.0.7 %description oqgraph The Open Query GRAPH computation engine allows you to handle hierarchies (tree structures) and complex graphs (nodes having many connections in several directions). %endif %package connect Summary: CONNECT handler Group: System/Servers Requires: %{name}-common-core >= %{version}-%{release} Conflicts: %{name}-common-core < %{version}-%{release} %description connect The CONNECT handler enables MariaDB to access external local or remote data. This is done by defining tables based on different data types, in particular files of various format, data extracted from other products (such as Excel), or data retrieved from the environment (for example DIR, WMI, and MAC tables). This handler supports MariaDB virtual columns and also permits to define “special” columns such as ROWID and FILEID. %package sphinx Summary: Sphinx Storage Engine Group: System/Servers Requires: %{name}-common-core >= %{version}-%{release} Conflicts: %{name}-common-core < %{version}-%{release} Conflicts: mariadb-extra < 10.0.7 Recommends: sphinx >= 2.1.5 %description sphinx SphinxSE is a storage engine that talks to searchd (Sphinx daemon) to enable full text searching. %package s3-engine Summary: The S3 storage engine for MariaDB Requires: %{name}-common-core >= %{version}-%{release} BuildRequires: curl-devel %description s3-engine The S3 read only storage engine allows archiving MariaDB tables in Amazon S3, or any third-party public or private cloud that implements S3 API, but still have them accessible for reading in MariaDB. %package mroonga Summary: Mroonga Storage Engine Group: System/Servers Requires: %{name}-common-core >= %{version}-%{release} Conflicts: %{name}-common-core < %{version}-%{release} %description mroonga Mroonga is a storage engine for MySQL. It provides fast fulltext search feature to all MySQL users. Mroonga was called Groonga storage engine. %package sequence Summary: Sequence Storage Engine Group: System/Servers Requires: %{name}-common-core >= %{version}-%{release} Conflicts: %{name}-common-core < %{version}-%{release} %description sequence A Sequence engine allows the creation of ascending or descending sequences of numbers with a given starting value, ending value and increment. It creates completely virtual, ephemeral tables automatically when you need them. There is no way to create a Sequence table explicitly. Nor are they ever written to disk or create .frm files. They are read-only, transactional, and support XA. %package spider Summary: Spider Storage Engine Group: System/Servers Requires: %{name}-common-core >= %{version}-%{release} Conflicts: %{name}-common-core < %{version}-%{release} %description spider The Spider storage engine supports partitioning and xa transactions, and allows tables of different MariaDB instances to be handled as if they were on the same instance. %ifarch %arm x86_64 aarch64 %package rocks Summary: Rocks Storage Engine Group: System/Servers Requires: %{name}-common-core >= %{version}-%{release} Conflicts: %{name}-common-core < %{version}-%{release} %description rocks MyRocks is an open source storage engine that was originally developed by Facebook. MyRocks has been extended by the MariaDB engineering team to be a pluggable storage engine that you use in your MariaDB solutions. It works seamlessly with MariaDB features. This openness in the storage layer allows you to use the right storage engine to optimize your usage requirements, which provides optimum performance. Community contributions are one of MariaDB’s greatest advantages over other databases. Under the lead of our developer Sergey Petrunia, MyRocks in MariaDB is constantly being merged with upstream MyRocks from Facebook. %endif %package extra Summary: MariaDB extra storage engines Group: System/Servers Requires: %{name}-common-core >= %{version}-%{release} Conflicts: %{name}-common-core < %{version}-%{release} %description extra This package provides various storage engines/handlers such as: - handlersocket - query_cache_info %package obsolete Summary: MariaDB obsolete storage engines Group: System/Servers Requires: %{name}-common-core >= %{version}-%{release} Conflicts: %{name}-common-core < %{version}-%{release} Conflicts: mysql-core < 5.5.18 %description obsolete MariaDB obsolete storage engines. Federated are being replaced by XtraDB and FederatedX storage engines. These obsolete storage engines are provided in case you need the vanilla mysql storage engines. %package core Summary: Server core binary Group: System/Servers Requires: %{name}-common-core >= %{version}-%{release} Provides: mysql-core = %{version}-%{release} %description core Core mysqld server binary. For a full MariaDB database server, install package 'mariadb'. %package common-core Summary: Common files required by core binary Group: System/Servers Requires: %{name}-common >= %{version}-%{release} Provides: mysql-common-core = %{version}-%{release} %description common-core Common files minimally required by mysqld server binary. %package common Summary: Common files Group: System/Servers Requires(post): rpm-helper Requires(preun): rpm-helper Requires(pre): rpm-helper Requires(postun): rpm-helper Requires(post): %{name}-client >= %{version}-%{release} Requires(preun): %{name}-client >= %{version}-%{release} Requires: %{name}-client >= %{version}-%{release} Requires: perl(Term::ReadKey) Requires: perl(DBD::MariaDB) Provides: mysql-common = %{version}-%{release} %description common Common files for the MariaDB database server. %package client Summary: Client Group: Databases Requires(post): %{libname} >= %{version}-%{release} Requires(preun): %{libname} >= %{version}-%{release} Requires: %{libname} >= %{version}-%{release} Requires: %{name}-common >= %{version}-%{release} Provides: mysql-client = %{version}-%{release} %description client This package contains the standard MariaDB clients. %package bench Summary: Benchmarks and test system Group: System/Servers Requires(post): %{name}-client >= %{version}-%{release} Requires(preun): %{name}-client >= %{version}-%{release} Requires: %{name}-client >= %{version}-%{release} Recommends: %{name} >= %{version}-%{release} Provides: mysql-bench = %{version}-%{release} Conflicts: mariadb < 10.0.7 %description bench This package contains MariaDB benchmark scripts and data. %package pam Summary: PAM authentication plugin Group: System/Servers URL: https://mariadb.com/kb/en/authentication-plugin-pam/ Requires: %{name} %description pam The pam authentication plugin allows MariaDB to offload user authentication to the system's Pluggable Authentication Module (PAM) framework. %package -n %{libname} Summary: Shared libraries Group: System/Libraries Provides: %{name}-shared-libs = %{version}-%{release} Provides: %{name}-shared = %{version}-%{release} Conflicts: %{_lib}mariadb-devel < 10.2.11-9 Obsoletes: mariadb-connector-c < 3.3.3-2 %description -n %{libname} This package contains the shared libraries (*.so*) which certain languages and applications need to dynamically load and use MariaDB. %package -n %{develname} Summary: Development header files and libraries Group: Development/Other Requires: %{libname} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} Provides: mysql-devel = %{version}-%{release} Obsoletes: mariadb-connector-c-devel < 3.3.3-2 Obsoletes: mariadb-connector-c-doc < 3.3.3-2 %description -n %{develname} This package contains the development header files and libraries necessary to develop MariaDB client applications. %package -n %{libmariadbembedded} Summary: MariaDB as an embeddable library Group: System/Libraries Provides: %{name}-embedded = %{version}-%{release} Obsoletes: %{_lib}mariadb-embedded19 < 10.2.11-9 Obsoletes: %{_lib}mariadb19 < 10.2.11-9 Conflicts: %{_lib}mariadb3 < 10.3.8-3 %description -n %{libmariadbembedded} MariaDB is a multi-user, multi-threaded SQL database server. This package contains a version of the MariaDB server that can be embedded into a client application instead of running as a separate process. The API is identical for the embedded MariaDB version and the client/server version. %package -n %{libmariadbembedded_devel} Summary: Development files for MySQL as an embeddable library Group: Development/Other Requires: %{libmariadbembedded} = %{version}-%{release} Requires: %{develname} = %{version}-%{release} Provides: %{name}-embedded-devel = %{version}-%{release} Provides: mysql-embedded-devel = %{version}-%{release} Conflicts: mariadb-bench < %{version}-%{release} Conflicts: %{_lib}mysqld19 >= 10.3.8-1 Conflicts: %{_lib}mariadb-devel < 10.3.8-3 %description -n %{libmariadbembedded_devel} MariaDB is a multi-user, multi-threaded SQL database server. This package contains files needed for developing and testing with the embedded version of the MariaDB server. The API is identical for the embedded MariaDB version and the client/server version. %prep %autosetup -S hg # no bundled pcre rm -rf pcre mkdir -p Mageia cp %{SOURCE3} Mageia/my.cnf cp %{SOURCE4} Mageia/ cp %{SOURCE5} Mageia/ cp %{SOURCE6} Mageia/ # remove the sql_yacc.cc file so that bison will regenerate it properly, even if it's patched rm -f sql/sql_yacc.cc #no macos rm -rf support-files/MacOSX # lib64 fix perl -pi -e "s|/usr/lib/|%{_libdir}/|g" Mageia/server.cnf # antiborker perl -pi -e "s|\@bindir\@|%{_bindir}|g" support-files/* scripts/* perl -pi -e "s|\@sbindir\@|%{_sbindir}|g" support-files/* scripts/* perl -pi -e "s|\@libexecdir\@|%{_sbindir}|g" support-files/* scripts/* perl -pi -e "s|\@localstatedir\@|/var/lib/mysql|g" support-files/* scripts/* perl -pi -e "s|^basedir=.*|basedir=%{_prefix}|g" support-files/* scripts/mysql_install_db* # workaround for upstream bug #56342 rm -f mysql-test/t/ssl_8k_key-master.opt rm -f mysql-test/t/file_contents.test # skip some tests failing on BS cat %{_sourcedir}/mga-skipped-tests-base.list | tee -a mysql-test/unstable-tests %build ## MariaDB %serverbuild %ifarch %arm # workaround from https://bugzilla.redhat.com/show_bug.cgi?id=2026858 export CPPFLAGS="-DSTAP_SDT_ARG_CONSTRAINT=g" %endif export CFLAGS="${CFLAGS:-%{optflags}} -O3 -fno-delete-null-pointer-checks" export CXXFLAGS="${CXXFLAGS:-%{optflags}} -O3 -fno-delete-null-pointer-checks" export LDFLAGS="%{ldflags} -O3 -lz" export FFLAGS="${FFLAGS:-%{optflags}}" export LC_ALL=C #-DPLUGIN_INNOBASE=DYNAMIC \ %cmake \ -DINSTALL_SBINDIR=sbin \ -DMYSQL_DATADIR=/var/lib/mysql \ -DINSTALL_SYSCONFDIR=%{_sysconfdir} \ -DINSTALL_PLUGINDIR=%{_lib}/mysql/plugin \ -DINSTALL_MANDIR=share/man \ -DINSTALL_SHAREDIR=share/mysql \ -DINSTALL_LIBDIR=%{_lib} \ -DINSTALL_INCLUDEDIR=include/mysql \ -DINSTALL_INFODIR=share/info \ -DINSTALL_MYSQLDATADIR=/var/lib/mysql \ -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test \ -DINSTALL_SQLBENCHDIR=share/mysql \ -DINSTALL_SUPPORTFILESDIR=share/mysql \ -DINSTALL_MYSQLSHAREDIR=share/mysql \ -DLZ4_LIBS=%{_libdir} \ -Wno-deprecated \ -DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock \ -DWITH_READLINE=system \ -DWITH_LIBEDIT=0 \ -DWITH_LIBWRAP=1 \ -DWITH_SSL=system \ -DWITH_ZLIB=system \ -DWITH_PCRE=system \ -DWITH_PIC=1 \ -DMYSQL_TCP_PORT=3306 \ -DEXTRA_CHARSETS=all \ -DENABLED_LOCAL_INFILE=1 \ -DENABLE_DTRACE=1 \ -DWITH_EMBEDDED_SERVER=1 \ -DMYSQL_USER=%{muser} \ %if %{build_debug} -DWITH_DEBUG=1 \ %else -DWITH_DEBUG=0 \ %endif -DFEATURE_SET="community" \ -DRPM=1 \ -DCOMPILATION_COMMENT="%{_vendor} MariaDB Server" \ -DPLUGIN_ARIA=STATIC \ -DPLUGIN_PARTITION=STATIC \ -DPLUGIN_PERFSCHEMA=STATIC \ -DPLUGIN_XTRADB=STATIC \ -DPLUGIN_ARCHIVE=DYNAMIC \ -DPLUGIN_AUDIT_NULL=DYNAMIC \ -DPLUGIN_AUTH_0X0100=DYNAMIC \ -DPLUGIN_AUTH_PAM=DYNAMIC \ -DPLUGIN_AUTH_SOCKET=DYNAMIC \ -DPLUGIN_AUTH_TEST_PLUGIN=DYNAMIC \ -DPLUGIN_BLACKHOLE=DYNAMIC \ -DPLUGIN_CASSANDRA=NO \ -DPLUGIN_CONNECT=DYNAMIC \ -DPLUGIN_S3=DYNAMIC \ -DPLUGIN_DEBUG_KEY_MANAGEMENT=DYNAMIC \ -DPLUGIN_DIALOG=DYNAMIC \ -DPLUGIN_DIALOG_EXAMPLES=DYNAMIC \ -DPLUGIN_FEDERATED=DYNAMIC \ -DPLUGIN_FEDERATEDX=DYNAMIC \ -DPLUGIN_FEEDBACK=DYNAMIC \ -DPLUGIN_FILE_KEY_MANAGEMENT=DYNAMIC \ -DPLUGIN_FTEXAMPLE=DYNAMIC \ -DPLUGIN_HANDLERSOCKET=DYNAMIC \ -DPLUGIN_LOCALES=DYNAMIC \ -DPLUGIN_METADATA_LOCK_INFO=DYNAMIC \ -DPLUGIN_MROONGA=DYNAMIC \ -DPLUGIN_MYSQL_CLEAR_PASSWORD=DYNAMIC \ %if %{build_oqgraph} -DPLUGIN_OQGRAPH=DYNAMIC \ %else -DPLUGIN_OQGRAPH=NO \ %endif -DPLUGIN_QA_AUTH_CLIENT=DYNAMIC \ -DPLUGIN_QA_AUTH_INTERFACE=DYNAMIC \ -DPLUGIN_QA_AUTH_SERVER=DYNAMIC \ -DPLUGIN_QUERY_CACHE_INFO=DYNAMIC \ -DPLUGIN_QUERY_RESPONSE_TIME=DYNAMIC \ -DPLUGIN_SEMISYNC_MASTER=DYNAMIC \ -DPLUGIN_SEMISYNC_SLAVE=DYNAMIC \ -DPLUGIN_SEQUENCE=DYNAMIC \ -DPLUGIN_SERVER_AUDIT=DYNAMIC \ -DPLUGIN_SIMPLE_PASSWORD_CHECK=DYNAMIC \ -DPLUGIN_SPHINX=DYNAMIC \ -DPLUGIN_SPIDER=DYNAMIC \ -DPLUGIN_SQL_ERRLOG=DYNAMIC \ -DPLUGIN_TEST_SQL_DISCOVERY=DYNAMIC \ -DPLUGIN_WSREP_INFO=DYNAMIC \ -DPLUGIN_DAEMON_EXAMPLE=NO \ -DPLUGIN_EXAMPLE=NO \ -DPLUGIN_EXAMPLE_KEY_MANAGEMENT=NO \ -DPLUGIN_TOKUDB=NO \ -DPYTHON_SHEBANG=%{__python3} %cmake_build %install install -d %{buildroot}%{_sysconfdir}/sysconfig install -d %{buildroot}%{_var}/log/mysqld install -d %{buildroot}/var/lib/mysql/{mysql,test} %cmake_install # exclude loaddata7 from being converted export EXCLUDE_FROM_EOL_CONVERSION="std_data/loaddata7.dat" # install configuration files install -m0644 Mageia/my.cnf %{buildroot}%{_sysconfdir}/my.cnf install -m0644 Mageia/server.cnf %{buildroot}%{_sysconfdir}/my.cnf.d/server.cnf install -m0644 Mageia/client.cnf %{buildroot}%{_sysconfdir}/my.cnf.d/client.cnf install -m0644 Mageia/mysql-clients.cnf %{buildroot}%{_sysconfdir}/my.cnf.d/mysql-clients.cnf # clean installed files first rm -rf %{buildroot}%{_unitdir} # don't use systemd way to create mysql user rm -rf %{buildroot}%{_sysusersdir}/sysusers.conf install -m 0644 -D %{SOURCE10} %{buildroot}%{_tmpfilesdir}/mysql.conf rm -rf %{buildroot}%{_tmpfilesdir}/tmpfiles.conf install -m 0644 -D %{SOURCE11} %{buildroot}%{_unitdir}/mysqld.service install -m 0755 %{SOURCE12} %{buildroot}%{_sbindir}/mysqld-prepare-db-dir # cleanup some config files rm -f %{buildroot}%{_sysconfdir}/my.cnf.d/connect.cnf \ %{buildroot}%{_sysconfdir}/my.cnf.d/oqgraph.cnf # magic by anssi pushd %{buildroot}%{_sysconfdir}/my.cnf.d %{expand:%(for i in {50..71}; do echo "install -m 644 %%SOURCE$i ."; done)} popd %if ! %{build_oqgraph} rm -f %{buildroot}%{_sysconfdir}/my.cnf.d/ha_oqgraph.cnf %endif #groonga rm -f %{buildroot}%{_datadir}/groonga-normalizer-mysql/lgpl-2.0.txt mv %{buildroot}%{_datadir}/groonga-normalizer-mysql %{buildroot}%{_datadir}/mysql mv %{buildroot}%{_datadir}/groonga %{buildroot}%{_datadir}/mysql # bork mv %{buildroot}%{_datadir}/mysql/aclocal %{buildroot}%{_datadir}/aclocal #pam mv %{buildroot}/%{_lib}/security %{buildroot}/%{_libdir}/ pushd %{buildroot}%{_bindir} ln -sf mysqlcheck mysqlrepair ln -sf mysqlcheck mysqlanalyze ln -sf mysqlcheck mysqloptimize popd # nuke -Wl,--as-needed from the mysql_config file perl -pi -e "s|^ldflags=.*|ldflags=\'-rdynamic\'|g" %{buildroot}%{_bindir}/mysql_config # cmake generates some completely wacko references to -lprobes_mysql when # building with dtrace support. Haven't found where to shut that off, # so resort to this blunt instrument. While at it, let's not reference # libmysqlclient_r anymore either. sed -e 's/-lprobes_mysql//' -e 's/-lmysqlclient_r/-lmysqlclient/' \ %{buildroot}%{_bindir}/mysql_config >mysql_config.tmp cp -f mysql_config.tmp %{buildroot}%{_bindir}/mysql_config chmod 755 %{buildroot}%{_bindir}/mysql_config install -m 0755 -d %{buildroot}/var/lib/mysql # missing header install -m0644 build/include/probes_mysql_dtrace.h %{buildroot}%{_includedir}/mysql/ # libmysqlclient_r is no more. Upstream tries to replace it with symlinks # but that really doesn't work (wrong soname in particular). We'll keep # just the devel libmysqlclient_r.so link, so that rebuilding without any # source change is enough to get rid of dependency on libmysqlclient_r. rm -f %{buildroot}%{_libdir}/libmysqlclient_r.so* ln -s libmariadb.so %{buildroot}%{_libdir}/libmysqlclient_r.so # remove static libs rm -f %{buildroot}%{_libdir}/libmariadbclient.a rm -f %{buildroot}%{_libdir}/libmysqlclient.a rm -f %{buildroot}%{_libdir}/libmysqlclient_r.a rm -f %{buildroot}%{_libdir}/libmysqld.a rm -f %{buildroot}%{_libdir}/libmariadb.a rm -f %{buildroot}%{_libdir}/libmariadbd.a # mysql-test includes one executable that doesn't belong under /usr/share, # so move it and provide a symlink mv %{buildroot}%{_datadir}/mysql/mysql-test/lib/My/SafeProcess/my_safe_process %{buildroot}%{_bindir} ln -s %{_bindir}/my_safe_process %{buildroot}%{_datadir}/mysql/mysql-test/lib/My/SafeProcess/my_safe_process # mysql client statically built against a local embedded library, pretty useless rm -f %{buildroot}%{_bindir}/mariadb-embedded rm -f %{buildroot}%{_bindir}/mysql_embedded rm -f %{buildroot}%{_mandir}/man1/mariadb-embedded.1* rm -f %{buildroot}%{_mandir}/man1/mysql_embedded.1* # this command enables plugins, but needs ini file + configuration in my.cnf # before executing... and oh yeah, mysql must be stopped... => useless # however, apparently tests seem to want it, even thought they don't use it. #rm -f %{buildroot}%{_bindir}/mysql_plugin rm -f %{buildroot}%{_libdir}/mysql/plugin/daemon_example.ini # no RHEL4 selinux files for us rm -rf %{buildroot}%{_datadir}/mysql/SELinux # no solaris files for us rm -rf %{buildroot}%{_datadir}/mysql/solaris # no init script for us rm -f %{buildroot}%{_initrddir}/mysql rm -f %{buildroot}%{_initrddir}/mysqld # house cleaning rm -rf %{buildroot}%{_datadir}/info rm -f %{buildroot}%{_bindir}/client_test rm -f %{buildroot}%{_bindir}/maria_add_gis_sp.sql rm -f %{buildroot}%{_bindir}/make_win_binary_distribution rm -f %{buildroot}%{_bindir}/make_win_src_distribution rm -f %{buildroot}%{_bindir}/test-connect-t rm -f %{buildroot}%{_datadir}/mysql/binary-configure rm -f %{buildroot}%{_datadir}/mysql/config.huge.ini rm -f %{buildroot}%{_datadir}/mysql/config.medium.ini rm -f %{buildroot}%{_datadir}/mysql/config.small.ini rm -f %{buildroot}%{_datadir}/mysql/mysqld_multi.server rm -f %{buildroot}%{_datadir}/mysql/mysql-log-rotate rm -f %{buildroot}%{_datadir}/mysql/mysql.server rm -f %{buildroot}%{_datadir}/mysql/ndb-config-2-node.ini rm -f %{buildroot}%{_datadir}/mysql/binary-configure rm -f %{buildroot}%{_mandir}/man1/galera_new_cluster.1* rm -f %{buildroot}%{_mandir}/man1/galera_recovery.1* rm -f %{buildroot}%{_mandir}/man1/make_win_bin_dist.1* rm -f %{buildroot}%{_mandir}/man1/make_win_src_distribution.1* rm -f %{buildroot}%{_mandir}/man1/mariadb-service-convert.1* rm -rf %{buildroot}%{_mandir}/man3 rm -f %{buildroot}%{_datadir}/mysql/magic rm -f %{buildroot}%{_sbindir}/rcmysql rm -rf %{buildroot}%{_datadir}/mysql/policy rm -rf %{buildroot}%{_datadir}/mysql/systemd rm -rf %{buildroot}%{_datadir}/mysql/mini-benchmark rm -f %{buildroot}%{_bindir}/mariadb-service-convert rm -f %{buildroot}%{_bindir}/galera_new_cluster rm -f %{buildroot}%{_bindir}/galera_recovery rm -f %{buildroot}%{_datadir}/mysql/wsrep_notify rm -f %{buildroot}%{_datadir}/mysql/mysql_test_db.sql touch %{buildroot}%{_datadir}/mysql/mysql_test_db.sql cp %{SOURCE71} %{buildroot}%{_sysconfdir}/my.cnf.d/auth_gssapi.cnf #rocksdb is not available for i586 %ifarch %arm x86_64 aarch64 %else rm -f %{buildroot}%{_sysconfdir}/my.cnf.d/rocksdb.cnf rm -f %{buildroot}%{_libdir}/mysql/plugin/ha_rocksdb.so rm -f %{buildroot}%{_bindir}/myrocks_hotbackup rm -f %{buildroot}%{_bindir}/mariadb-ldb rm -f %{buildroot}%{_bindir}/mysql_ldb rm -f %{buildroot}%{_bindir}/sst_dump rm -f %{buildroot}%{_mandir}/man1/mariadb-ldb.1* rm -f %{buildroot}%{_mandir}/man1/mysql_ldb.1* %endif # no idea how to fix this rm -rf %{buildroot}%{_prefix}/data rm -rf %{buildroot}%{_prefix}/docs rm -rf %{buildroot}%{_prefix}/scripts rm -rf %{buildroot}%{_datadir}/doc rm -rf %{buildroot}%{_sysconfdir}/init.d/mysql cat > README.urpmi <