From c80ae3ea7b70b1e9556323028a058d553e88d888 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 11 Mar 2013 12:17:03 -0400 Subject: [PATCH] mysql is being replaced by mariadb and/or MySQL. this commit is squash of: last commit(s) of 'mysql' repo 'rawhide' branch and first commit(s) of 'community-mysql' repo 'rawhide' branch --- .gitignore | 1 - mysql.tmpfiles.d => MySQL.tmpfiles.d | 0 ...patch => community-mysql-chain-certs.patch | 0 ....patch => community-mysql-cipherspec.patch | 0 ...1024.patch => community-mysql-dh1024.patch | 0 ...h => community-mysql-dubious-exports.patch | 0 ...errno.patch => community-mysql-errno.patch | 0 ...tch => community-mysql-expired-certs.patch | 0 ...tch => community-mysql-file-contents.patch | 0 ...atch => community-mysql-install-test.patch | 0 ...e.patch => community-mysql-logrotate.patch | 0 community-mysql-major.patch | 12 + ....patch => community-mysql-netdevname.patch | 0 ...patch => community-mysql-plugin-bool.patch | 0 ...patch => community-mysql-plugin-test.patch | 6 +- ...sc.patch => community-mysql-s390-tsc.patch | 0 ...patch => community-mysql-stack-guard.patch | 0 ...h => community-mysql-string-overflow.patch | 0 ...rmov.patch => community-mysql-strmov.patch | 0 ...ist.patch => community-mysql-va-list.patch | 0 ....patch => community-mysql-versioning.patch | 0 mysql.spec => community-mysql.spec | 328 +++++++++--------- my.cnf | 6 + mysql-stack.patch | 27 -- rh-skipped-tests-base.list | 1 + scriptstub.c | 32 -- 26 files changed, 180 insertions(+), 233 deletions(-) rename mysql.tmpfiles.d => MySQL.tmpfiles.d (100%) rename mysql-chain-certs.patch => community-mysql-chain-certs.patch (100%) rename mysql-cipherspec.patch => community-mysql-cipherspec.patch (100%) rename mysql-dh1024.patch => community-mysql-dh1024.patch (100%) rename mysql-dubious-exports.patch => community-mysql-dubious-exports.patch (100%) rename mysql-errno.patch => community-mysql-errno.patch (100%) rename mysql-expired-certs.patch => community-mysql-expired-certs.patch (100%) rename mysql-file-contents.patch => community-mysql-file-contents.patch (100%) rename mysql-install-test.patch => community-mysql-install-test.patch (100%) rename mysql-logrotate.patch => community-mysql-logrotate.patch (100%) create mode 100644 community-mysql-major.patch rename mysql-netdevname.patch => community-mysql-netdevname.patch (100%) rename mysql-plugin-bool.patch => community-mysql-plugin-bool.patch (100%) rename mysql-plugin-test.patch => community-mysql-plugin-test.patch (96%) rename mysql-s390-tsc.patch => community-mysql-s390-tsc.patch (100%) rename mysql-stack-guard.patch => community-mysql-stack-guard.patch (100%) rename mysql-string-overflow.patch => community-mysql-string-overflow.patch (100%) rename mysql-strmov.patch => community-mysql-strmov.patch (100%) rename mysql-va-list.patch => community-mysql-va-list.patch (100%) rename mysql-versioning.patch => community-mysql-versioning.patch (100%) rename mysql.spec => community-mysql.spec (90%) delete mode 100644 mysql-stack.patch delete mode 100644 scriptstub.c diff --git a/.gitignore b/.gitignore index d15a15f..84390da 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -/mysql-5.5.29-nodocs.tar.gz /mysql-5.5.30-nodocs.tar.gz diff --git a/mysql.tmpfiles.d b/MySQL.tmpfiles.d similarity index 100% rename from mysql.tmpfiles.d rename to MySQL.tmpfiles.d diff --git a/mysql-chain-certs.patch b/community-mysql-chain-certs.patch similarity index 100% rename from mysql-chain-certs.patch rename to community-mysql-chain-certs.patch diff --git a/mysql-cipherspec.patch b/community-mysql-cipherspec.patch similarity index 100% rename from mysql-cipherspec.patch rename to community-mysql-cipherspec.patch diff --git a/mysql-dh1024.patch b/community-mysql-dh1024.patch similarity index 100% rename from mysql-dh1024.patch rename to community-mysql-dh1024.patch diff --git a/mysql-dubious-exports.patch b/community-mysql-dubious-exports.patch similarity index 100% rename from mysql-dubious-exports.patch rename to community-mysql-dubious-exports.patch diff --git a/mysql-errno.patch b/community-mysql-errno.patch similarity index 100% rename from mysql-errno.patch rename to community-mysql-errno.patch diff --git a/mysql-expired-certs.patch b/community-mysql-expired-certs.patch similarity index 100% rename from mysql-expired-certs.patch rename to community-mysql-expired-certs.patch diff --git a/mysql-file-contents.patch b/community-mysql-file-contents.patch similarity index 100% rename from mysql-file-contents.patch rename to community-mysql-file-contents.patch diff --git a/mysql-install-test.patch b/community-mysql-install-test.patch similarity index 100% rename from mysql-install-test.patch rename to community-mysql-install-test.patch diff --git a/mysql-logrotate.patch b/community-mysql-logrotate.patch similarity index 100% rename from mysql-logrotate.patch rename to community-mysql-logrotate.patch diff --git a/community-mysql-major.patch b/community-mysql-major.patch new file mode 100644 index 0000000..1b1071e --- /dev/null +++ b/community-mysql-major.patch @@ -0,0 +1,12 @@ +diff -up mysql-5.5.30/cmake/mysql_version.cmake.major mysql-5.5.30/cmake/mysql_version.cmake +--- mysql-5.5.30/cmake/mysql_version.cmake.major 2013-03-11 18:32:45.326473598 +0100 ++++ mysql-5.5.30/cmake/mysql_version.cmake 2013-03-11 18:33:10.634472902 +0100 +@@ -17,7 +17,7 @@ + # Global constants, only to be changed between major releases. + # + +-SET(SHARED_LIB_MAJOR_VERSION "18") ++SET(SHARED_LIB_MAJOR_VERSION "1018") + SET(PROTOCOL_VERSION "10") + SET(DOT_FRM_VERSION "6") + diff --git a/mysql-netdevname.patch b/community-mysql-netdevname.patch similarity index 100% rename from mysql-netdevname.patch rename to community-mysql-netdevname.patch diff --git a/mysql-plugin-bool.patch b/community-mysql-plugin-bool.patch similarity index 100% rename from mysql-plugin-bool.patch rename to community-mysql-plugin-bool.patch diff --git a/mysql-plugin-test.patch b/community-mysql-plugin-test.patch similarity index 96% rename from mysql-plugin-test.patch rename to community-mysql-plugin-test.patch index 5d08c32..8ffb46b 100644 --- a/mysql-plugin-test.patch +++ b/community-mysql-plugin-test.patch @@ -51,10 +51,10 @@ diff -up mysql-5.5.21/mysql-test/t/mysql_plugin.test.plugin mysql-5.5.21/mysql-t ---copy_file $MYSQL_ERRMSG_BASEDIR/english/errmsg.sys $MYSQLD_BASEDIR/share/errmsg.sys ---copy_file $MYSQL_ERRMSG_BASEDIR/english/errmsg.sys $MYSQLD_BASEDIR/share/mysql/errmsg.sys +--mkdir $MYSQLD_TMP_BASEDIR/share -+--mkdir $MYSQLD_TMP_BASEDIR/share/mysql ++--mkdir $MYSQLD_TMP_BASEDIR/share/community-mysql +--mkdir $PLUGIN_DIR +--copy_file $MYSQL_ERRMSG_BASEDIR/english/errmsg.sys $MYSQLD_TMP_BASEDIR/share/errmsg.sys -+--copy_file $MYSQL_ERRMSG_BASEDIR/english/errmsg.sys $MYSQLD_TMP_BASEDIR/share/mysql/errmsg.sys ++--copy_file $MYSQL_ERRMSG_BASEDIR/english/errmsg.sys $MYSQLD_TMP_BASEDIR/share/community-mysql/errmsg.sys +--copy_file $PLUGIN_BASEDIR/libdaemon_example.so $PLUGIN_DIR/libdaemon_example.so +--copy_file $PLUGIN_BASEDIR/daemon_example.ini $PLUGIN_DIR/daemon_example.ini + @@ -90,7 +90,7 @@ diff -up mysql-5.5.21/mysql-test/t/mysql_plugin.test.plugin mysql-5.5.21/mysql-t +--remove_file $PLUGIN_DIR/libdaemon_example.so +--rmdir $PLUGIN_DIR +--remove_file $MYSQLD_TMP_BASEDIR/share/errmsg.sys -+--rmdir $MYSQLD_TMP_BASEDIR/share/mysql ++--rmdir $MYSQLD_TMP_BASEDIR/share/community-mysql +--rmdir $MYSQLD_TMP_BASEDIR/share --enable_abort_on_error diff --git a/mysql-s390-tsc.patch b/community-mysql-s390-tsc.patch similarity index 100% rename from mysql-s390-tsc.patch rename to community-mysql-s390-tsc.patch diff --git a/mysql-stack-guard.patch b/community-mysql-stack-guard.patch similarity index 100% rename from mysql-stack-guard.patch rename to community-mysql-stack-guard.patch diff --git a/mysql-string-overflow.patch b/community-mysql-string-overflow.patch similarity index 100% rename from mysql-string-overflow.patch rename to community-mysql-string-overflow.patch diff --git a/mysql-strmov.patch b/community-mysql-strmov.patch similarity index 100% rename from mysql-strmov.patch rename to community-mysql-strmov.patch diff --git a/mysql-va-list.patch b/community-mysql-va-list.patch similarity index 100% rename from mysql-va-list.patch rename to community-mysql-va-list.patch diff --git a/mysql-versioning.patch b/community-mysql-versioning.patch similarity index 100% rename from mysql-versioning.patch rename to community-mysql-versioning.patch diff --git a/mysql.spec b/community-mysql.spec similarity index 90% rename from mysql.spec rename to community-mysql.spec index a62d06b..0877f06 100644 --- a/mysql.spec +++ b/community-mysql.spec @@ -1,16 +1,18 @@ -Name: mysql +Name: community-mysql Version: 5.5.30 -Release: 1%{?dist} +Release: 5%{?dist} Summary: MySQL client programs and shared libraries Group: Applications/Databases URL: http://www.mysql.com # exceptions allow client libraries to be linked with most open source SW, # not only GPL code. See README.mysql-license -License: GPLv2 with exceptions +# Some innobase code from Percona and Google is under BSD license +# Some code related to test-suite is under LGPLv2 +License: GPLv2 with exceptions and LGPLv2 and BSD # Regression tests take a long time, you can skip 'em with this -%{!?runselftest:%global runselftest 1} +%{!?runselftest:%global runselftest 0} # Upstream has a mirror redirector for downloads, so the URL is hard to # represent statically. You can get the tarball by following a link from @@ -22,13 +24,12 @@ Source0: mysql-%{version}-nodocs.tar.gz # ./generate-tarball.sh $VERSION Source1: generate-tarball.sh Source3: my.cnf -Source4: scriptstub.c Source5: my_config.h Source6: README.mysql-docs Source7: README.mysql-license Source8: libmysql.version Source9: mysql-embedded-check.c -Source10: mysql.tmpfiles.d +Source10: MySQL.tmpfiles.d Source11: mysqld.service Source12: mysqld-prepare-db-dir Source13: mysqld-wait-ready @@ -38,48 +39,43 @@ Source15: rh-skipped-tests-arm.list Source999: filter-requires-mysql.sh # Comments for these patches are in the patch files. -Patch1: mysql-errno.patch -Patch2: mysql-strmov.patch -Patch3: mysql-install-test.patch -Patch4: mysql-expired-certs.patch -Patch5: mysql-stack-guard.patch -Patch6: mysql-chain-certs.patch -Patch7: mysql-versioning.patch -Patch8: mysql-dubious-exports.patch -Patch10: mysql-plugin-bool.patch -Patch11: mysql-s390-tsc.patch -Patch14: mysql-va-list.patch -Patch15: mysql-netdevname.patch -Patch16: mysql-logrotate.patch -Patch17: mysql-plugin-test.patch -Patch18: mysql-cipherspec.patch -Patch19: mysql-file-contents.patch -Patch20: mysql-string-overflow.patch -Patch21: mysql-dh1024.patch +Patch1: community-mysql-errno.patch +Patch2: community-mysql-strmov.patch +Patch3: community-mysql-install-test.patch +Patch4: community-mysql-expired-certs.patch +Patch5: community-mysql-stack-guard.patch +Patch6: community-mysql-chain-certs.patch +Patch7: community-mysql-versioning.patch +Patch8: community-mysql-dubious-exports.patch +Patch10: community-mysql-plugin-bool.patch +Patch11: community-mysql-s390-tsc.patch +Patch14: community-mysql-va-list.patch +Patch15: community-mysql-netdevname.patch +Patch16: community-mysql-logrotate.patch +Patch17: community-mysql-plugin-test.patch +Patch18: community-mysql-cipherspec.patch +Patch19: community-mysql-file-contents.patch +Patch20: community-mysql-string-overflow.patch +Patch21: community-mysql-dh1024.patch +Patch22: community-mysql-major.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: perl, readline-devel, openssl-devel -BuildRequires: gcc-c++, cmake, ncurses-devel, zlib-devel, libaio-devel -BuildRequires: systemtap-sdt-devel +BuildRequires: cmake, ncurses-devel, zlib-devel, libaio-devel +BuildRequires: systemd-units, systemtap-sdt-devel # make test requires time and ps BuildRequires: time procps -# Socket and Time::HiRes are needed to run regression tests +# perl modules needed to run regression tests BuildRequires: perl(Socket), perl(Time::HiRes) -BuildRequires: systemd-units -Requires: grep, fileutils -Requires: real-%{name}-libs%{?_isa} = %{version}-%{release} -Requires: bash +Requires: grep, fileutils, bash +Requires: %{name}-common%{?_isa} = %{version}-%{release} +%{?systemd_requires: %systemd_requires} -# We can use real- prefix to distinguish from other MySQL implementations -# like MariaDB unambiguously -Provides: real-%{name} = %{version}-%{release} -Provides: real-%{name}%{?_isa} = %{version}-%{release} - -# MySQL (with caps) is upstream's spelling of their own RPMs for mysql -Conflicts: MySQL -# mysql-cluster used to be built from this SRPM, but no more -Obsoletes: mysql-cluster < 5.1.44 +# mariadb is MySQL replacement that is used in Fedora as a default +# MySQL implementation +Conflicts: mariadb +Provides: mysql = %{version}-%{release} +Provides: mysql%{?_isa} = %{version}-%{release} # When rpm 4.9 is universal, this could be cleaned up: %global __perl_requires %{SOURCE999} @@ -100,8 +96,9 @@ contains the standard MySQL client programs and generic MySQL files. Summary: The shared libraries required for MySQL clients Group: Applications/Databases Requires: /sbin/ldconfig -Provides: real-%{name}-libs = %{version}-%{release} -Provides: real-%{name}-libs%{?_isa} = %{version}-%{release} +Requires: %{name}-common%{?_isa} = %{version}-%{release} +Provides: mysql-libs = %{version}-%{release} +Provides: mysql-libs%{?_isa} = %{version}-%{release} %description libs The mysql-libs package provides the essential shared libraries for any @@ -109,16 +106,24 @@ MySQL client program or interface. You will need to install this package to use any other MySQL package or any clients that need to connect to a MySQL server. +%package common + +Summary: The shared files required for MySQL server and client +Group: Applications/Databases + +%description common +The mysql-common package provides the essential shared files for any +MySQL program. You will need to install this package to use any other +MySQL package. + %package server Summary: The MySQL server and related files Group: Applications/Databases -Requires: real-%{name}%{?_isa} = %{version}-%{release} -Requires: real-%{name}-libs%{?_isa} = %{version}-%{release} +Requires: mysql%{?_isa} +Requires: %{name}-common%{?_isa} = %{version}-%{release} Requires: sh-utils Requires(pre): /usr/sbin/useradd -Requires(post): chkconfig -Requires(preun): chkconfig # We require this to be present for %%{_prefix}/lib/tmpfiles.d Requires: systemd-units # Make sure it's there when scriptlets run, too @@ -131,9 +136,9 @@ Requires(postun): systemd-units Requires(post): systemd-sysv # mysqlhotcopy needs DBI/DBD support Requires: perl-DBI, perl-DBD-MySQL -Conflicts: MySQL-server -Provides: real-%{name}-server = %{version}-%{release} -Provides: real-%{name}-server%{?_isa} = %{version}-%{release} +Conflicts: mariadb-server +Provides: mysql-server = %{version}-%{release} +Provides: mysql-server%{?_isa} = %{version}-%{release} %description server MySQL is a multi-user, multi-threaded SQL database server. MySQL is a @@ -145,12 +150,12 @@ the MySQL server and some accompanying files and directories. Summary: Files for development of MySQL applications Group: Applications/Databases -Requires: real-%{name}%{?_isa} = %{version}-%{release} -Requires: real-%{name}-libs%{?_isa} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: openssl-devel%{?_isa} -Conflicts: MySQL-devel -Provides: real-%{name}-devel = %{version}-%{release} -Provides: real-%{name}-devel%{?_isa} = %{version}-%{release} +Conflicts: mariadb-devel +Provides: mysql-devel = %{version}-%{release} +Provides: mysql-devel%{?_isa} = %{version}-%{release} %description devel MySQL is a multi-user, multi-threaded SQL database server. This @@ -161,8 +166,8 @@ developing MySQL client applications. Summary: MySQL as an embeddable library Group: Applications/Databases -Provides: real-%{name}-embedded = %{version}-%{release} -Provides: real-%{name}-embedded%{?_isa} = %{version}-%{release} +Provides: mysql-embedded = %{version}-%{release} +Provides: mysql-embedded%{?_isa} = %{version}-%{release} %description embedded MySQL is a multi-user, multi-threaded SQL database server. This @@ -173,10 +178,11 @@ into a client application instead of running as a separate process. Summary: Development files for MySQL as an embeddable library Group: Applications/Databases -Requires: real-%{name}-embedded%{?_isa} = %{version}-%{release} -Requires: real-%{name}-devel%{?_isa} = %{version}-%{release} -Provides: real-%{name}-embedded-devel = %{version}-%{release} -Provides: real-%{name}-embedded-devel%{?_isa} = %{version}-%{release} +Requires: %{name}-embedded%{?_isa} = %{version}-%{release} +Requires: %{name}-devel%{?_isa} = %{version}-%{release} +Conflicts: mariadb-embedded-devel +Provides: mysql-embedded-devel = %{version}-%{release} +Provides: mysql-embedded-devel%{?_isa} = %{version}-%{release} %description embedded-devel MySQL is a multi-user, multi-threaded SQL database server. This @@ -187,10 +193,10 @@ the embedded version of the MySQL server. Summary: MySQL benchmark scripts and data Group: Applications/Databases -Requires: real-%{name}%{?_isa} = %{version}-%{release} -Conflicts: MySQL-bench -Provides: real-%{name}-bench = %{version}-%{release} -Provides: real-%{name}-bench%{?_isa} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} +Conflicts: mariadb-bench +Provides: mysql-bench = %{version}-%{release} +Provides: mysql-bench%{?_isa} = %{version}-%{release} %description bench MySQL is a multi-user, multi-threaded SQL database server. This @@ -201,12 +207,12 @@ MySQL. Summary: The test suite distributed with MySQL Group: Applications/Databases -Requires: real-%{name}%{?_isa} = %{version}-%{release} -Requires: real-%{name}-libs%{?_isa} = %{version}-%{release} -Requires: real-%{name}-server%{?_isa} = %{version}-%{release} -Conflicts: MySQL-test -Provides: real-%{name}-test = %{version}-%{release} -Provides: real-%{name}-test%{?_isa} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-common%{?_isa} = %{version}-%{release} +Requires: %{name}-server%{?_isa} = %{version}-%{release} +Conflicts: mariadb-test +Provides: mysql-test = %{version}-%{release} +Provides: mysql-test%{?_isa} = %{version}-%{release} %description test MySQL is a multi-user, multi-threaded SQL database server. This @@ -234,6 +240,7 @@ the MySQL sources. %patch19 -p1 %patch20 -p1 %patch21 -p1 +%patch22 -p1 # workaround for upstream bug #56342 rm -f mysql-test/t/ssl_8k_key-master.opt @@ -285,7 +292,7 @@ cmake . -DBUILD_CONFIG=mysql_release \ -DINSTALL_INFODIR=share/info \ -DINSTALL_LIBDIR="%{_lib}/mysql" \ -DINSTALL_MANDIR=share/man \ - -DINSTALL_MYSQLSHAREDIR=share/mysql \ + -DINSTALL_MYSQLSHAREDIR=share/%{name} \ -DINSTALL_MYSQLTESTDIR=share/mysql-test \ -DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \ -DINSTALL_SBINDIR=libexec \ @@ -301,8 +308,6 @@ cmake . -DBUILD_CONFIG=mysql_release \ -DWITH_SSL=system \ -DWITH_ZLIB=system -gcc $CFLAGS $LDFLAGS -o scriptstub "-DLIBDIR=\"%{_libdir}/mysql\"" %{SOURCE4} - make %{?_smp_mflags} VERBOSE=1 # regular build will make libmysqld.a but not libmysqld.so :-( @@ -321,10 +326,11 @@ gcc -I../../include $CFLAGS mysql-embedded-check.c libmysqld.so.0 LD_LIBRARY_PATH=. ldd ./a.out cd ../.. +%check %if %runselftest # hack to let 32- and 64-bit tests run concurrently on same build machine case `uname -m` in - ppc64 | s390x | x86_64 | sparc64 ) + ppc64 | ppc64p7 | s390x | x86_64 | sparc64 ) MTR_BUILD_THREAD=7 ;; *) @@ -333,7 +339,7 @@ cd ../.. esac export MTR_BUILD_THREAD - make test + make test VERBOSE=1 # The cmake build scripts don't provide any simple way to control the # options for mysql-test-run, so ignore the make target and just call it @@ -356,8 +362,6 @@ cd ../.. %endif %install -rm -rf $RPM_BUILD_ROOT - make DESTDIR=$RPM_BUILD_ROOT install # List the installed tree for RPM package maintenance purposes. @@ -366,9 +370,9 @@ find $RPM_BUILD_ROOT -print | sed "s|^$RPM_BUILD_ROOT||" | sort > ROOTFILES # multilib header hacks # we only apply this to known Red Hat multilib arches, per bug #181335 case `uname -i` in - i386 | x86_64 | ppc | ppc64 | s390 | s390x | sparc | sparc64 ) - mv $RPM_BUILD_ROOT/usr/include/mysql/my_config.h $RPM_BUILD_ROOT/usr/include/mysql/my_config_`uname -i`.h - install -m 644 %{SOURCE5} $RPM_BUILD_ROOT/usr/include/mysql/ + i386 | x86_64 | ppc | ppc64 | ppc64p7 | s390 | s390x | sparc | sparc64 ) + mv $RPM_BUILD_ROOT%{_includedir}/mysql/my_config.h $RPM_BUILD_ROOT%{_includedir}/mysql/my_config_`uname -i`.h + install -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_includedir}/mysql/ ;; *) ;; @@ -394,8 +398,8 @@ touch $RPM_BUILD_ROOT/var/log/mysqld.log mkdir -p $RPM_BUILD_ROOT/var/run/mysqld install -m 0755 -d $RPM_BUILD_ROOT/var/lib/mysql -mkdir -p $RPM_BUILD_ROOT/etc -install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT/etc/my.cnf +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir} +install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/my.cnf # install systemd unit files and scripts for handling server startup mkdir -p ${RPM_BUILD_ROOT}%{_unitdir} @@ -404,16 +408,16 @@ install -m 755 %{SOURCE12} ${RPM_BUILD_ROOT}%{_libexecdir}/ install -m 755 %{SOURCE13} ${RPM_BUILD_ROOT}%{_libexecdir}/ mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d -install -m 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/mysql.conf +install -m 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/%{name}.conf # Fix funny permissions that cmake build scripts apply to config files chmod 644 ${RPM_BUILD_ROOT}%{_datadir}/mysql/config.*.ini # Fix scripts for multilib safety -mv ${RPM_BUILD_ROOT}%{_bindir}/mysqlbug ${RPM_BUILD_ROOT}%{_libdir}/mysql/mysqlbug -install -m 0755 scriptstub ${RPM_BUILD_ROOT}%{_bindir}/mysqlbug mv ${RPM_BUILD_ROOT}%{_bindir}/mysql_config ${RPM_BUILD_ROOT}%{_libdir}/mysql/mysql_config -install -m 0755 scriptstub ${RPM_BUILD_ROOT}%{_bindir}/mysql_config +ln -sf %{_libdir}/mysql/mysql_config ${RPM_BUILD_ROOT}%{_bindir}/mysql_config +mv ${RPM_BUILD_ROOT}%{_bindir}/mysqlbug ${RPM_BUILD_ROOT}%{_libdir}/mysql/mysqlbug +ln -sf %{_libdir}/mysql/mysqlbug ${RPM_BUILD_ROOT}%{_bindir}/mysqlbug # Remove libmysqld.a, install libmysqld.so rm -f ${RPM_BUILD_ROOT}%{_libdir}/mysql/libmysqld.a @@ -433,6 +437,13 @@ ln -s libmysqlclient.so ${RPM_BUILD_ROOT}%{_libdir}/mysql/libmysqlclient_r.so mv ${RPM_BUILD_ROOT}%{_datadir}/mysql-test/lib/My/SafeProcess/my_safe_process ${RPM_BUILD_ROOT}%{_bindir} ln -s ../../../../../bin/my_safe_process ${RPM_BUILD_ROOT}%{_datadir}/mysql-test/lib/My/SafeProcess/my_safe_process +# We specified a different share dir, but the test suite expects some +# data files under /usr/share/mysql, so we create symlinks to compatibility +for f in errmsg-utf8.txt fill_help_tables.sql mysql_system_tables.sql mysql_system_tables_data.sql mysql_test_data_timezone.sql + do + ln -sf "../MySQL/$f" "${RPM_BUILD_ROOT}/usr/share/mysql/$f" + done + # Remove files that %%doc will install in preferred location rm -f ${RPM_BUILD_ROOT}/usr/COPYING rm -f ${RPM_BUILD_ROOT}/usr/README @@ -470,75 +481,33 @@ cp %{SOURCE7} README.mysql-license # install the list of skipped tests to be available for user runs install -m 0644 mysql-test/rh-skipped-tests.list ${RPM_BUILD_ROOT}%{_datadir}/mysql-test -%clean -rm -rf $RPM_BUILD_ROOT - %pre server /usr/sbin/groupadd -g 27 -o -r mysql >/dev/null 2>&1 || : /usr/sbin/useradd -M -N -g mysql -o -r -d /var/lib/mysql -s /bin/bash \ -c "MySQL Server" -u 27 mysql >/dev/null 2>&1 || : -%post libs -/sbin/ldconfig +%post libs -p /sbin/ldconfig %post server -%if 0%{?systemd_post:1} %systemd_post mysqld.service -%else -if [ $1 = 1 ]; then - # Initial installation - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi -%endif /bin/chmod 0755 /var/lib/mysql /bin/touch /var/log/mysqld.log -# Handle upgrading from SysV initscript to native systemd unit. -# We can tell if a SysV version of mysql was previously installed by -# checking to see if the initscript is present. -%triggerun server -- mysql-server -if [ -f /etc/rc.d/init.d/mysqld ]; then - # Save the current service runlevel info - # User must manually run systemd-sysv-convert --apply mysqld - # to migrate them to systemd targets - /usr/bin/systemd-sysv-convert --save mysqld >/dev/null 2>&1 || : - - # Run these because the SysV package being removed won't do them - /sbin/chkconfig --del mysqld >/dev/null 2>&1 || : - /bin/systemctl try-restart mysqld.service >/dev/null 2>&1 || : -fi +%post embedded -p /sbin/ldconfig %preun server -%if 0%{?systemd_preun:1} %systemd_preun mysqld.service -%else -if [ $1 = 0 ]; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable mysqld.service >/dev/null 2>&1 || : - /bin/systemctl stop mysqld.service >/dev/null 2>&1 || : -fi -%endif -%postun libs -if [ $1 = 0 ] ; then - /sbin/ldconfig -fi +%postun libs -p /sbin/ldconfig %postun server -%if 0%{?systemd_postun_with_restart:1} %systemd_postun_with_restart mysqld.service -%else -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ]; then - # Package upgrade, not uninstall - /bin/systemctl try-restart mysqld.service >/dev/null 2>&1 || : -fi -%endif +%postun embedded -p /sbin/ldconfig %files -%defattr(-,root,root) %doc README COPYING README.mysql-license +%doc storage/innobase/COPYING.Percona storage/innobase/COPYING.Google %doc README.mysql-docs %{_bindir}/msql2mysql @@ -570,8 +539,8 @@ fi %{_libdir}/mysql/mysql_config %files libs -%defattr(-,root,root) %doc README COPYING README.mysql-license +%doc storage/innobase/COPYING.Percona storage/innobase/COPYING.Google # although the default my.cnf contains only server settings, we put it in the # libs package because it can be used for client settings too. %config(noreplace) /etc/my.cnf @@ -579,34 +548,34 @@ fi %{_libdir}/mysql/libmysqlclient.so.* /etc/ld.so.conf.d/* -%dir %{_datadir}/mysql -%{_datadir}/mysql/english -%lang(cs) %{_datadir}/mysql/czech -%lang(da) %{_datadir}/mysql/danish -%lang(nl) %{_datadir}/mysql/dutch -%lang(et) %{_datadir}/mysql/estonian -%lang(fr) %{_datadir}/mysql/french -%lang(de) %{_datadir}/mysql/german -%lang(el) %{_datadir}/mysql/greek -%lang(hu) %{_datadir}/mysql/hungarian -%lang(it) %{_datadir}/mysql/italian -%lang(ja) %{_datadir}/mysql/japanese -%lang(ko) %{_datadir}/mysql/korean -%lang(no) %{_datadir}/mysql/norwegian -%lang(no) %{_datadir}/mysql/norwegian-ny -%lang(pl) %{_datadir}/mysql/polish -%lang(pt) %{_datadir}/mysql/portuguese -%lang(ro) %{_datadir}/mysql/romanian -%lang(ru) %{_datadir}/mysql/russian -%lang(sr) %{_datadir}/mysql/serbian -%lang(sk) %{_datadir}/mysql/slovak -%lang(es) %{_datadir}/mysql/spanish -%lang(sv) %{_datadir}/mysql/swedish -%lang(uk) %{_datadir}/mysql/ukrainian -%{_datadir}/mysql/charsets +%files common +%dir %{_datadir}/%{name} +%{_datadir}/%{name}/english +%lang(cs) %{_datadir}/%{name}/czech +%lang(da) %{_datadir}/%{name}/danish +%lang(nl) %{_datadir}/%{name}/dutch +%lang(et) %{_datadir}/%{name}/estonian +%lang(fr) %{_datadir}/%{name}/french +%lang(de) %{_datadir}/%{name}/german +%lang(el) %{_datadir}/%{name}/greek +%lang(hu) %{_datadir}/%{name}/hungarian +%lang(it) %{_datadir}/%{name}/italian +%lang(ja) %{_datadir}/%{name}/japanese +%lang(ko) %{_datadir}/%{name}/korean +%lang(no) %{_datadir}/%{name}/norwegian +%lang(no) %{_datadir}/%{name}/norwegian-ny +%lang(pl) %{_datadir}/%{name}/polish +%lang(pt) %{_datadir}/%{name}/portuguese +%lang(ro) %{_datadir}/%{name}/romanian +%lang(ru) %{_datadir}/%{name}/russian +%lang(sr) %{_datadir}/%{name}/serbian +%lang(sk) %{_datadir}/%{name}/slovak +%lang(es) %{_datadir}/%{name}/spanish +%lang(sv) %{_datadir}/%{name}/swedish +%lang(uk) %{_datadir}/%{name}/ukrainian +%{_datadir}/%{name}/charsets %files server -%defattr(-,root,root) %doc support-files/*.cnf %{_bindir}/myisamchk @@ -634,7 +603,7 @@ fi %{_bindir}/resolve_stack_dump %{_bindir}/resolveip -/usr/libexec/mysqld +%{_libexecdir}/mysqld %{_libdir}/mysql/INFO_SRC %{_libdir}/mysql/INFO_BIN @@ -675,6 +644,11 @@ fi %{_mandir}/man1/mysql_tzinfo_to_sql.1* %{_mandir}/man8/mysqld.8* +%{_datadir}/%{name}/errmsg-utf8.txt +%{_datadir}/%{name}/fill_help_tables.sql +%{_datadir}/%{name}/mysql_system_tables.sql +%{_datadir}/%{name}/mysql_system_tables_data.sql +%{_datadir}/%{name}/mysql_test_data_timezone.sql %{_datadir}/mysql/errmsg-utf8.txt %{_datadir}/mysql/fill_help_tables.sql %{_datadir}/mysql/mysql_system_tables.sql @@ -687,26 +661,24 @@ fi %{_libexecdir}/mysqld-prepare-db-dir %{_libexecdir}/mysqld-wait-ready -%{_prefix}/lib/tmpfiles.d/mysql.conf +%{_prefix}/lib/tmpfiles.d/%{name}.conf %attr(0755,mysql,mysql) %dir /var/run/mysqld %attr(0755,mysql,mysql) %dir /var/lib/mysql %attr(0640,mysql,mysql) %config(noreplace) %verify(not md5 size mtime) /var/log/mysqld.log %config(noreplace) %{_sysconfdir}/logrotate.d/mysqld %files devel -%defattr(-,root,root) -/usr/include/mysql -/usr/share/aclocal/mysql.m4 +%{_includedir}/mysql +%{_datadir}/aclocal/mysql.m4 %{_libdir}/mysql/libmysqlclient.so %{_libdir}/mysql/libmysqlclient_r.so %files embedded -%defattr(-,root,root) %doc README COPYING README.mysql-license +%doc storage/innobase/COPYING.Percona storage/innobase/COPYING.Google %{_libdir}/mysql/libmysqld.so.* %files embedded-devel -%defattr(-,root,root) %{_libdir}/mysql/libmysqld.so %{_bindir}/mysql_client_test_embedded %{_bindir}/mysqltest_embedded @@ -714,11 +686,9 @@ fi %{_mandir}/man1/mysqltest_embedded.1* %files bench -%defattr(-,root,root) %{_datadir}/sql-bench %files test -%defattr(-,root,root) %{_bindir}/mysql_client_test %{_bindir}/my_safe_process %attr(-,mysql,mysql) %{_datadir}/mysql-test @@ -726,6 +696,24 @@ fi %{_mandir}/man1/mysql_client_test.1* %changelog +* Wed Mar 20 2013 Honza Horak 5.5.30-5 +- Renaming package MySQL to community-mysql to handle issues + introduced by case-insensitive operations of yum and for proper + prioritizing mariadb over community-mysql + +* Tue Mar 12 2013 Honza Horak 5.5.30-4 +- Allow server to be installed without client side +- Separate -lib and -common sub-packages +- Fix some path issues in tests + +* Mon Mar 11 2013 Honza Horak 5.5.30-3 +- Adjusting major soname number of libmysqlclient to avoid + library name conflicts with mariadb + +* Mon Mar 4 2013 Honza Horak 5.5.30-2 +- Renaming package mysql to MySQL to handle conflicting issues + with mariadb, which became default + * Tue Feb 12 2013 Honza Horak 5.5.30-1 - Update to MySQL 5.5.30, for various fixes described at http://dev.mysql.com/doc/relnotes/mysql/5.5/en/news-5-5-30.html diff --git a/my.cnf b/my.cnf index 96282ea..1df1f70 100644 --- a/my.cnf +++ b/my.cnf @@ -11,3 +11,9 @@ symbolic-links=0 [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid + +# +# include all files from the config directory +# +!includedir /etc/my.cnf.d + diff --git a/mysql-stack.patch b/mysql-stack.patch deleted file mode 100644 index c4fd437..0000000 --- a/mysql-stack.patch +++ /dev/null @@ -1,27 +0,0 @@ -Talk about silly byte-shaving ... the "stock" value of STACK_MIN_SIZE -does not work on s390x, and probably not on some other platforms either. -Knock it up to twice the pre-5.0.33 value to have some margin for future -changes in compiler, glibc, etc. Suspect this number if -"execution_constants" regression test fails. - -Note: STACK_MIN_SIZE has to be enough less than DEFAULT_THREAD_STACK / 8 -to provide some headroom, which means that its value can't be raised too much -further without increasing the latter as well. - -As of 5.1.33 the stock value is 16000, which might be enough ... or maybe -not. For the moment, we keep this patch around for reference, but it's -not being applied. - - -diff -Naur mysql-5.1.30.orig/sql/mysql_priv.h mysql-5.1.30/sql/mysql_priv.h ---- mysql-5.1.30.orig/sql/mysql_priv.h 2008-11-14 11:37:13.000000000 -0500 -+++ mysql-5.1.30/sql/mysql_priv.h 2009-01-13 11:07:35.000000000 -0500 -@@ -286,7 +286,7 @@ - Feel free to raise this by the smallest amount you can to get the - "execution_constants" test to pass. - */ --#define STACK_MIN_SIZE 12000 ///< Abort if less stack during eval. -+#define STACK_MIN_SIZE 16384 ///< Abort if less stack during eval. - - #define STACK_MIN_SIZE_FOR_OPEN 1024*80 - #define STACK_BUFF_ALLOC 352 ///< For stack overrun checks diff --git a/rh-skipped-tests-base.list b/rh-skipped-tests-base.list index 8d92952..32f477c 100644 --- a/rh-skipped-tests-base.list +++ b/rh-skipped-tests-base.list @@ -11,3 +11,4 @@ outfile_loaddata : bug#46895 code wrong, expected results wrong too # as of 5.5.9. Upstream at http://bugs.mysql.com/bug.php?id=60155 innodb.innodb : bug#60155 has platform-dependent results + diff --git a/scriptstub.c b/scriptstub.c deleted file mode 100644 index de942c1..0000000 --- a/scriptstub.c +++ /dev/null @@ -1,32 +0,0 @@ -#include -#include -#include -#include - -/* Translate call of myself into call of same-named script in LIBDIR */ -/* The macro LIBDIR must be defined as a double-quoted string */ - -int main (int argc, char **argv) -{ - char *basename; - char *fullname; - char **newargs; - int i; - - basename = strrchr(argv[0], '/'); - if (basename) - basename++; - else - basename = argv[0]; - fullname = malloc(strlen(LIBDIR) + strlen(basename) + 2); - sprintf(fullname, "%s/%s", LIBDIR, basename); - newargs = malloc((argc+1) * sizeof(char *)); - newargs[0] = fullname; - for (i = 1; i < argc; i++) - newargs[i] = argv[i]; - newargs[argc] = NULL; - - execvp(fullname, newargs); - - return 1; -}