From 0012fd8f486594966de070ca0dcb66be375bb3b5 Mon Sep 17 00:00:00 2001 From: CentOS Buildsys Date: Mar 06 2014 15:16:25 +0000 Subject: import mariadb-5.5.35-3.el7.src.rpm --- diff --git a/.mariadb.metadata b/.mariadb.metadata index 1d08cef..5a767d4 100644 --- a/.mariadb.metadata +++ b/.mariadb.metadata @@ -1 +1 @@ -49fb26cd08c56e1fda42d728eaae9e49ecd5c30d SOURCES/mariadb-5.5.33a.tar.gz +9b0c062c96edb07724ddf9b0235c7662065496a4 SOURCES/mariadb-5.5.35.tar.gz diff --git a/SOURCES/README.mysql-cnf b/SOURCES/README.mysql-cnf new file mode 100644 index 0000000..65bebb9 --- /dev/null +++ b/SOURCES/README.mysql-cnf @@ -0,0 +1,13 @@ +This directory contains prepared configuration files with .cnf extension, +which provide a configuration for some common MariaDB deployment scenarios. +These configuration files do not include the default configuration of datadir, +log-file and pid-file locations, as specified in the default my.cnf file, +provided in this distribution. + +Thus, it is recommended to use these configuration files as an addition to the +default my.cnf configuration file. + +Since default my.cnf contains `!includedir /etc/my.cnf.d` directive, it is +recommended to copy required configuration under /etc/my.cnf.d/ directory, +so the default my.cnf specifications will be extended. + diff --git a/SOURCES/mariadb-cmakehostname.patch b/SOURCES/mariadb-cmakehostname.patch deleted file mode 100644 index e3fba15..0000000 --- a/SOURCES/mariadb-cmakehostname.patch +++ /dev/null @@ -1,14 +0,0 @@ -Upstream bug report: https://mariadb.atlassian.net/browse/MDEV-5124 - -diff -up mariadb-5.5.33a/storage/tokudb/ft-index/cmake_modules/TokuSetupCTest.cmake.cmakehostname mariadb-5.5.33a/storage/tokudb/ft-index/cmake_modules/TokuSetupCTest.cmake ---- mariadb-5.5.33a/storage/tokudb/ft-index/cmake_modules/TokuSetupCTest.cmake.cmakehostname 2013-10-10 16:21:18.904236776 +0200 -+++ mariadb-5.5.33a/storage/tokudb/ft-index/cmake_modules/TokuSetupCTest.cmake 2013-10-10 16:21:29.718243555 +0200 -@@ -60,7 +60,7 @@ macro(hostname out) - COMMAND hostname - OUTPUT_VARIABLE fullhostname - OUTPUT_STRIP_TRAILING_WHITESPACE) -- string(REGEX REPLACE "\\.tokutek\\.com$" "" ${out} ${fullhostname}) -+ string(REGEX REPLACE "\\.tokutek\\.com$" "" ${out} "${fullhostname}") - endmacro(hostname) - - ## gather machine info diff --git a/SOURCES/mariadb-dubious-exports.patch b/SOURCES/mariadb-dubious-exports.patch deleted file mode 100644 index afefb7b..0000000 --- a/SOURCES/mariadb-dubious-exports.patch +++ /dev/null @@ -1,169 +0,0 @@ -Prefix mysql_ to the real names of several symbols that have to be exported -from libmysqlclient because mysql-connector-odbc and/or PHP depend on them. -This limits the intrusion on application namespace. - -Also, remove all traces of make_scrambled_password and -make_scrambled_password_323, so that references to these functions draw -compile-time warnings, per a suggestion from Paul Howarth in bug #690346. -It doesn't seem worth trying to get rid of all the internal symbols exposed -by mysql.h, but these two are relatively easy to get rid of. - - -diff -up mariadb-5.5.28a/client/mysqladmin.cc.p6 mariadb-5.5.28a/client/mysqladmin.cc ---- mariadb-5.5.28a/client/mysqladmin.cc.p6 2012-11-28 16:49:36.000000000 +0100 -+++ mariadb-5.5.28a/client/mysqladmin.cc 2013-01-30 16:30:55.047537674 +0100 -@@ -22,6 +22,7 @@ - #include /* because of signal() */ - #include - #include -+#include /* my_make_scrambled_password_323, my_make_scrambled_password */ - #include - #include /* ORACLE_WELCOME_COPYRIGHT_NOTICE */ - -@@ -1065,9 +1066,9 @@ static int execute_commands(MYSQL *mysql - } - } - if (old) -- make_scrambled_password_323(crypted_pw, typed_password); -+ my_make_scrambled_password_323(crypted_pw, typed_password, strlen(typed_password)); - else -- make_scrambled_password(crypted_pw, typed_password); -+ my_make_scrambled_password(crypted_pw, typed_password, strlen(typed_password)); - } - else - crypted_pw[0]=0; /* No password */ -diff -up mariadb-5.5.28a/include/errmsg.h.p6 mariadb-5.5.28a/include/errmsg.h ---- mariadb-5.5.28a/include/errmsg.h.p6 2012-11-28 16:49:43.000000000 +0100 -+++ mariadb-5.5.28a/include/errmsg.h 2013-01-30 16:30:55.047537674 +0100 -@@ -24,6 +24,7 @@ extern "C" { - #endif - void init_client_errs(void); - void finish_client_errs(void); -+#define client_errors mysql_client_errors /* namespace sanity */ - extern const char *client_errors[]; /* Error messages */ - #ifdef __cplusplus - } -diff -up mariadb-5.5.28a/include/mysql_com.h.p6 mariadb-5.5.28a/include/mysql_com.h ---- mariadb-5.5.28a/include/mysql_com.h.p6 2012-11-28 16:49:38.000000000 +0100 -+++ mariadb-5.5.28a/include/mysql_com.h 2013-01-30 16:30:55.047537674 +0100 -@@ -467,6 +467,7 @@ my_bool my_net_init(NET *net, Vio* vio); - void my_net_local_init(NET *net); - void net_end(NET *net); - void net_clear(NET *net, my_bool clear_buffer); -+#define net_realloc mysql_net_realloc /* namespace sanity */ - my_bool net_realloc(NET *net, size_t length); - my_bool net_flush(NET *net); - my_bool my_net_write(NET *net,const unsigned char *packet, size_t len); -@@ -545,14 +546,12 @@ void create_random_string(char *to, unsi - struct my_rnd_struct *rand_st); - - void hash_password(unsigned long *to, const char *password, unsigned int password_len); --void make_scrambled_password_323(char *to, const char *password); - void scramble_323(char *to, const char *message, const char *password); - my_bool check_scramble_323(const unsigned char *reply, const char *message, - unsigned long *salt); - void get_salt_from_password_323(unsigned long *res, const char *password); - void make_password_from_salt_323(char *to, const unsigned long *salt); - --void make_scrambled_password(char *to, const char *password); - void scramble(char *to, const char *message, const char *password); - my_bool check_scramble(const unsigned char *reply, const char *message, - const unsigned char *hash_stage2); -diff -up mariadb-5.5.28a/include/mysql.h.pp.p6 mariadb-5.5.28a/include/mysql.h.pp ---- mariadb-5.5.28a/include/mysql.h.pp.p6 2012-11-28 16:49:47.000000000 +0100 -+++ mariadb-5.5.28a/include/mysql.h.pp 2013-01-30 16:30:55.048537674 +0100 -@@ -84,7 +84,7 @@ my_bool my_net_init(NET *net, Vio* vio); - void my_net_local_init(NET *net); - void net_end(NET *net); - void net_clear(NET *net, my_bool clear_buffer); --my_bool net_realloc(NET *net, size_t length); -+my_bool mysql_net_realloc(NET *net, size_t length); - my_bool net_flush(NET *net); - my_bool my_net_write(NET *net,const unsigned char *packet, size_t len); - my_bool net_write_command(NET *net,unsigned char command, -@@ -124,13 +124,11 @@ typedef struct st_udf_init - void create_random_string(char *to, unsigned int length, - struct my_rnd_struct *rand_st); - void hash_password(unsigned long *to, const char *password, unsigned int password_len); --void make_scrambled_password_323(char *to, const char *password); - void scramble_323(char *to, const char *message, const char *password); - my_bool check_scramble_323(const unsigned char *reply, const char *message, - unsigned long *salt); - void get_salt_from_password_323(unsigned long *res, const char *password); - void make_password_from_salt_323(char *to, const unsigned long *salt); --void make_scrambled_password(char *to, const char *password); - void scramble(char *to, const char *message, const char *password); - my_bool check_scramble(const unsigned char *reply, const char *message, - const unsigned char *hash_stage2); -diff -up mariadb-5.5.28a/include/my_sys.h.p6 mariadb-5.5.28a/include/my_sys.h ---- mariadb-5.5.28a/include/my_sys.h.p6 2013-01-30 16:30:54.980537678 +0100 -+++ mariadb-5.5.28a/include/my_sys.h 2013-01-30 16:31:38.510534702 +0100 -@@ -211,6 +211,7 @@ extern uint my_large_page_size; - - /* charsets */ - #define MY_ALL_CHARSETS_SIZE 2048 -+#define default_charset_info mysql_default_charset_info /* namespace sanity */ - extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *default_charset_info; - extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *all_charsets[MY_ALL_CHARSETS_SIZE]; - extern struct charset_info_st compiled_charsets[]; -@@ -943,6 +944,9 @@ extern uint get_charset_number(const cha - extern uint get_collation_number(const char *name); - extern const char *get_charset_name(uint cs_number); - -+#define get_charset mysql_get_charset /* namespace sanity */ -+#define get_charset_by_csname mysql_get_charset_by_csname -+ - extern CHARSET_INFO *get_charset(uint cs_number, myf flags); - extern CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags); - extern CHARSET_INFO *get_charset_by_csname(const char *cs_name, -diff -up mariadb-5.5.28a/sql/password.c.p6 mariadb-5.5.28a/sql/password.c ---- mariadb-5.5.28a/sql/password.c.p6 2012-11-28 16:49:48.000000000 +0100 -+++ mariadb-5.5.28a/sql/password.c 2013-01-30 16:30:55.048537674 +0100 -@@ -127,23 +127,6 @@ void my_make_scrambled_password_323(char - - - /* -- Wrapper around my_make_scrambled_password_323() to maintain client lib ABI -- compatibility. -- In server code usage of my_make_scrambled_password_323() is preferred to -- avoid strlen(). -- SYNOPSIS -- make_scrambled_password_323() -- to OUT store scrambled password here -- password IN NULL-terminated string with user-supplied password --*/ -- --void make_scrambled_password_323(char *to, const char *password) --{ -- my_make_scrambled_password_323(to, password, strlen(password)); --} -- -- --/* - Scramble string with password. - Used in pre 4.1 authentication phase. - SYNOPSIS -@@ -407,23 +390,6 @@ void my_make_scrambled_password(char *to - - - /* -- Wrapper around my_make_scrambled_password() to maintain client lib ABI -- compatibility. -- In server code usage of my_make_scrambled_password() is preferred to -- avoid strlen(). -- SYNOPSIS -- make_scrambled_password() -- buf OUT buffer of size 2*SHA1_HASH_SIZE + 2 to store hex string -- password IN NULL-terminated password string --*/ -- --void make_scrambled_password(char *to, const char *password) --{ -- my_make_scrambled_password(to, password, strlen(password)); --} -- -- --/* - Produce an obscure octet sequence from password and random - string, recieved from the server. This sequence corresponds to the - password, but password can not be easily restored from it. The sequence diff --git a/SOURCES/mariadb-file-contents.patch b/SOURCES/mariadb-file-contents.patch index f96640f..8ad8c73 100644 --- a/SOURCES/mariadb-file-contents.patch +++ b/SOURCES/mariadb-file-contents.patch @@ -6,9 +6,9 @@ to know about this. Recommendation they change is at http://bugs.mysql.com/bug.php?id=61425 -diff -up mariadb-5.5.28a/mysql-test/t/file_contents.test.p19 mariadb-5.5.28a/mysql-test/t/file_contents.test ---- mariadb-5.5.28a/mysql-test/t/file_contents.test.p19 2012-11-28 16:49:38.000000000 +0100 -+++ mariadb-5.5.28a/mysql-test/t/file_contents.test 2012-12-17 17:44:26.802139136 +0100 +diff -up mariadb-5.5.34/mysql-test/t/file_contents.test.p10 mariadb-5.5.34/mysql-test/t/file_contents.test +--- mariadb-5.5.34/mysql-test/t/file_contents.test.p10 2013-11-20 13:28:56.000000000 +0100 ++++ mariadb-5.5.34/mysql-test/t/file_contents.test 2013-11-22 08:50:30.244702013 +0100 @@ -32,6 +32,15 @@ if ($dir_bin eq '/usr/') { # RedHat/Debian: version number in directory name $dir_docs = glob "$dir_docs/mariadb-server-*"; @@ -23,5 +23,5 @@ diff -up mariadb-5.5.28a/mysql-test/t/file_contents.test.p19 mariadb-5.5.28a/mys + $dir_docs = "/usr/lib/mysql"; + } } - } else { - # tar.gz package, Windows, or developer work (in BZR) + # Slackware + $dir_docs = glob "$dir_bin/doc/mariadb-[0-9]*" unless -d $dir_docs; diff --git a/SOURCES/mariadb-prepare-db-dir b/SOURCES/mariadb-prepare-db-dir index 8762ab7..8a7d3e1 100644 --- a/SOURCES/mariadb-prepare-db-dir +++ b/SOURCES/mariadb-prepare-db-dir @@ -21,6 +21,8 @@ get_mysql_option mysqld datadir "/var/lib/mysql" datadir="$result" get_mysql_option mysqld_safe log-error "/var/log/mariadb/mariadb.log" errlogfile="$result" +get_mysql_option mysqld socket "$datadir/mysql.sock" +socketfile="$result" # Absorb configuration settings from the specified systemd service file, # or the default "mysqld" service if not specified @@ -50,6 +52,16 @@ chown "$myuser:$mygroup" "$errlogfile" chmod 0640 "$errlogfile" [ -x /sbin/restorecon ] && /sbin/restorecon "$errlogfile" +# We check if there is already a process using the socket file, +# since otherwise this systemd service file could report false +# positive result when starting and mysqld_safe could remove +# a socket file, which actually uses a different daemon. +if fuser "$socketfile" &>/dev/null ; then + echo "Socket file $socketfile exists." >&2 + echo "Is another MySQL daemon already running with the same unix socket?" >&2 + exit 1 +fi + # Make the data directory if [ ! -d "$datadir/mysql" ] ; then # First, make sure $datadir is there with correct permissions diff --git a/SOURCES/mariadb-ssltest.patch b/SOURCES/mariadb-ssltest.patch new file mode 100644 index 0000000..6fdd271 --- /dev/null +++ b/SOURCES/mariadb-ssltest.patch @@ -0,0 +1,30 @@ +Don't test EDH-RSA-DES-CBC-SHA cipher, it seems to be removed from openssl +which now makes mariadb/mysql FTBFS because openssl_1 test fails + +Related: #1044565 + + +diff -up mariadb-5.5.34/mysql-test/r/openssl_1.result.p20 mariadb-5.5.34/mysql-test/r/openssl_1.result +--- mariadb-5.5.34/mysql-test/r/openssl_1.result.p20 2014-01-06 11:51:18.878640731 +0100 ++++ mariadb-5.5.34/mysql-test/r/openssl_1.result 2014-01-06 11:51:45.364678942 +0100 +@@ -196,8 +196,6 @@ Ssl_cipher DHE-RSA-AES256-SHA + Variable_name Value + Ssl_cipher EDH-RSA-DES-CBC3-SHA + Variable_name Value +-Ssl_cipher EDH-RSA-DES-CBC-SHA +-Variable_name Value + Ssl_cipher RC4-SHA + select 'is still running; no cipher request crashed the server' as result from dual; + result +diff -up mariadb-5.5.34/mysql-test/t/openssl_1.test.p20 mariadb-5.5.34/mysql-test/t/openssl_1.test +--- mariadb-5.5.34/mysql-test/t/openssl_1.test.p20 2014-01-06 11:51:18.830640662 +0100 ++++ mariadb-5.5.34/mysql-test/t/openssl_1.test 2014-01-06 11:51:18.879640733 +0100 +@@ -218,7 +218,7 @@ DROP TABLE t1; + # Common ciphers to openssl and yassl + --exec $MYSQL --host=localhost -e "SHOW STATUS LIKE 'Ssl_cipher';" --ssl-cipher=DHE-RSA-AES256-SHA + --exec $MYSQL --host=localhost -e "SHOW STATUS LIKE 'Ssl_cipher';" --ssl-cipher=EDH-RSA-DES-CBC3-SHA +---exec $MYSQL --host=localhost -e "SHOW STATUS LIKE 'Ssl_cipher';" --ssl-cipher=EDH-RSA-DES-CBC-SHA ++#--exec $MYSQL --host=localhost -e "SHOW STATUS LIKE 'Ssl_cipher';" --ssl-cipher=EDH-RSA-DES-CBC-SHA + --exec $MYSQL --host=localhost -e "SHOW STATUS LIKE 'Ssl_cipher';" --ssl-cipher=RC4-SHA + --disable_query_log + --disable_result_log diff --git a/SOURCES/mariadb-versioning-compat.patch b/SOURCES/mariadb-versioning-compat.patch new file mode 100644 index 0000000..84aae97 --- /dev/null +++ b/SOURCES/mariadb-versioning-compat.patch @@ -0,0 +1,925 @@ +The issue is Fedora has changed ABI of MySQL client library downstream since +MySQL-5.5 (in order to prevent upstream's ABI mistakes), which started to make +problems for people building on one distro and running their software on other +distro. Detailed info and whole story RHBZ#1045013 [1]. + +With collaboration of MariaDB upstream, Oracle developer and Fedora we came up +with a solution, that we'll use both libmysqlclient_16 and libmysqlclient_18 +versions for symbols, which were already in MySQL 5.1, while libmysqlclient_18 +will be default one. + +MariaDB/MySQL upstreams seem to be willing to use the same approach for RPM +packages they provide. + +[1] https://bugzilla.redhat.com/show_bug.cgi?id=1045013 +[2] https://mariadb.atlassian.net/browse/MDEV-5529 + +diff -up mariadb-5.5.34/CMakeLists.txt.versioning-compat mariadb-5.5.34/CMakeLists.txt +--- mariadb-5.5.34/CMakeLists.txt.versioning-compat 2013-11-20 13:28:54.000000000 +0100 ++++ mariadb-5.5.34/CMakeLists.txt 2014-01-14 18:47:04.335100345 +0100 +@@ -57,6 +57,13 @@ IF(UNIX AND NOT APPLE) + SET(WITH_PIC ${WITH_PIC_DEFAULT} CACHE BOOL "Compile with PIC.") + ENDIF() + ++SET(COMPAT_SYMBOL_VERSIONS_DEFAULT 0) ++IF(RPM MATCHES "(rhel|centos)7") ++ SET(COMPAT_SYMBOL_VERSIONS_DEFAULT 1) ++ENDIF() ++SET(COMPAT_SYMBOL_VERSIONS ${COMPAT_SYMBOL_VERSIONS_DEFAULT} CACHE BOOL ++ "Versions of libmysqlclient symbols in compat mode") ++ + # Optionally set project name, e.g. + # foo.xcodeproj (mac) or foo.sln (windows) + SET(MYSQL_PROJECT_NAME_DOCSTRING "MySQL project name") +diff -up mariadb-5.5.34/config.h.cmake.versioning-compat mariadb-5.5.34/config.h.cmake +--- mariadb-5.5.34/config.h.cmake.versioning-compat 2013-11-20 13:28:54.000000000 +0100 ++++ mariadb-5.5.34/config.h.cmake 2014-01-14 18:47:04.336100346 +0100 +@@ -641,4 +641,6 @@ + #cmakedefine SIZEOF_TIME_T @SIZEOF_TIME_T@ + #cmakedefine TIME_T_UNSIGNED @TIME_T_UNSIGNED@ + ++#cmakedefine COMPAT_SYMBOL_VERSIONS @COMPAT_SYMBOL_VERSIONS@ ++ + #endif +diff -up mariadb-5.5.34/libmysqld/libmysqld.def.versioning-compat mariadb-5.5.34/libmysqld/libmysqld.def +--- mariadb-5.5.34/libmysqld/libmysqld.def.versioning-compat 2013-11-20 13:29:03.000000000 +0100 ++++ mariadb-5.5.34/libmysqld/libmysqld.def 2014-01-14 18:47:04.336100346 +0100 +@@ -104,3 +104,7 @@ EXPORTS + mysql_stmt_attr_set + mysql_stmt_field_count + mysql_get_server_name ++ handle_options ++ free_defaults ++ load_defaults ++ my_print_help +diff -up mariadb-5.5.34/libmysql/libmysql.c.versioning-compat mariadb-5.5.34/libmysql/libmysql.c +--- mariadb-5.5.34/libmysql/libmysql.c.versioning-compat 2013-11-20 13:28:58.000000000 +0100 ++++ mariadb-5.5.34/libmysql/libmysql.c 2014-01-14 19:56:51.323538105 +0100 +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + #include "mysql.h" + #include "mysql_version.h" + #include "mysqld_error.h" +@@ -4892,3 +4893,642 @@ my_bool STDCALL mysql_read_query_result( + return (*mysql->methods->read_query_result)(mysql); + } + ++#ifndef EMBEDDED_LIBRARY ++#ifdef COMPAT_SYMBOL_VERSIONS ++ ++// Hack to provide both libmysqlclient_16 and libmysqlclient_18 symbol versions ++ ++#define SYM_16(_exportedsym) __asm__(".symver symver16_" #_exportedsym "," #_exportedsym "@libmysqlclient_16") ++ ++void STDCALL symver16_myodbc_remove_escape(MYSQL *mysql,char *name) ++{ ++ return myodbc_remove_escape(mysql, name); ++} ++SYM_16(myodbc_remove_escape); ++ ++ ++my_ulonglong STDCALL symver16_mysql_affected_rows(MYSQL *mysql) ++{ ++ return mysql_affected_rows(mysql); ++} ++SYM_16(mysql_affected_rows); ++ ++ ++my_bool STDCALL symver16_mysql_autocommit(MYSQL * mysql, my_bool auto_mode) ++{ ++ return mysql_autocommit(mysql, auto_mode); ++} ++SYM_16(mysql_autocommit); ++ ++ ++my_bool STDCALL symver16_mysql_change_user(MYSQL *mysql, const char *user, const char *passwd, const char *db) ++{ ++ return mysql_change_user(mysql, user, passwd, db); ++} ++SYM_16(mysql_change_user); ++ ++ ++const char * STDCALL symver16_mysql_character_set_name(MYSQL *mysql) ++{ ++ return mysql_character_set_name(mysql); ++} ++SYM_16(mysql_character_set_name); ++ ++ ++my_bool STDCALL symver16_mysql_commit(MYSQL * mysql) ++{ ++ return mysql_commit(mysql); ++} ++SYM_16(mysql_commit); ++ ++ ++void STDCALL symver16_mysql_data_seek(MYSQL_RES *result, my_ulonglong row) ++{ ++ return mysql_data_seek(result, row); ++} ++SYM_16(mysql_data_seek); ++ ++ ++void STDCALL symver16_mysql_debug(const char *debug __attribute__((unused))) ++{ ++ return mysql_debug(debug); ++} ++SYM_16(mysql_debug); ++ ++ ++int STDCALL symver16_mysql_dump_debug_info(MYSQL *mysql) ++{ ++ return mysql_dump_debug_info(mysql); ++} ++SYM_16(mysql_dump_debug_info); ++ ++ ++my_bool STDCALL symver16_mysql_embedded(void) ++{ ++ return mysql_embedded(); ++} ++SYM_16(mysql_embedded); ++ ++ ++my_bool STDCALL symver16_mysql_eof(MYSQL_RES *res) ++{ ++ return mysql_eof(res); ++} ++SYM_16(mysql_eof); ++ ++ ++ulong STDCALL symver16_mysql_escape_string(char *to,const char *from,ulong length) ++{ ++ return mysql_escape_string(to, from, length); ++} ++SYM_16(mysql_escape_string); ++ ++ ++MYSQL_FIELD * STDCALL symver16_mysql_fetch_field(MYSQL_RES *result) ++{ ++ return mysql_fetch_field(result); ++} ++SYM_16(mysql_fetch_field); ++ ++ ++MYSQL_FIELD * STDCALL symver16_mysql_fetch_field_direct(MYSQL_RES *res,uint fieldnr) ++{ ++ return mysql_fetch_field_direct(res, fieldnr); ++} ++SYM_16(mysql_fetch_field_direct); ++ ++ ++MYSQL_FIELD * STDCALL symver16_mysql_fetch_fields(MYSQL_RES *res) ++{ ++ return mysql_fetch_fields(res); ++} ++SYM_16(mysql_fetch_fields); ++ ++ ++unsigned int STDCALL symver16_mysql_field_count(MYSQL *mysql) ++{ ++ return mysql_field_count(mysql); ++} ++SYM_16(mysql_field_count); ++ ++ ++MYSQL_FIELD_OFFSET STDCALL symver16_mysql_field_seek(MYSQL_RES *result, MYSQL_FIELD_OFFSET field_offset) ++{ ++ return mysql_field_seek(result, field_offset); ++} ++SYM_16(mysql_field_seek); ++ ++ ++MYSQL_FIELD_OFFSET STDCALL symver16_mysql_field_tell(MYSQL_RES *res) ++{ ++ return mysql_field_tell(res); ++} ++SYM_16(mysql_field_tell); ++ ++ ++void STDCALL symver16_mysql_get_character_set_info(MYSQL *mysql, MY_CHARSET_INFO *csinfo) ++{ ++ return mysql_get_character_set_info(mysql, csinfo); ++} ++SYM_16(mysql_get_character_set_info); ++ ++ ++const char * STDCALL symver16_mysql_get_client_info(void) ++{ ++ return mysql_get_client_info(); ++} ++SYM_16(mysql_get_client_info); ++ ++ulong STDCALL symver16_mysql_get_client_version(void) ++{ ++ return mysql_get_client_version(); ++} ++SYM_16(mysql_get_client_version); ++ ++ ++const char * STDCALL symver16_mysql_get_host_info(MYSQL *mysql) ++{ ++ return mysql_get_host_info(mysql); ++} ++SYM_16(mysql_get_host_info); ++ ++ ++MYSQL_PARAMETERS *STDCALL symver16_mysql_get_parameters(void) ++{ ++ return mysql_get_parameters(); ++} ++SYM_16(mysql_get_parameters); ++ ++ ++uint STDCALL symver16_mysql_get_proto_info(MYSQL *mysql) ++{ ++ return mysql_get_proto_info(mysql); ++} ++SYM_16(mysql_get_proto_info); ++ ++ ++const char * STDCALL symver16_mysql_get_server_info(MYSQL *mysql) ++{ ++ return mysql_get_server_info(mysql); ++} ++SYM_16(mysql_get_server_info); ++ ++ ++ulong STDCALL symver16_mysql_hex_string(char *to, const char *from, ulong length) ++{ ++ return mysql_hex_string(to, from, length); ++} ++SYM_16(mysql_hex_string); ++ ++ ++const char *STDCALL symver16_mysql_info(MYSQL *mysql) ++{ ++ return mysql_info(mysql); ++} ++SYM_16(mysql_info); ++ ++ ++my_ulonglong STDCALL symver16_mysql_insert_id(MYSQL *mysql) ++{ ++ return mysql_insert_id(mysql); ++} ++SYM_16(mysql_insert_id); ++ ++ ++int STDCALL symver16_mysql_kill(MYSQL *mysql,ulong pid) ++{ ++ return mysql_kill(mysql, pid); ++} ++SYM_16(mysql_kill); ++ ++ ++MYSQL_RES * STDCALL symver16_mysql_list_dbs(MYSQL *mysql, const char *wild) ++{ ++ return mysql_list_dbs(mysql, wild); ++} ++SYM_16(mysql_list_dbs); ++ ++ ++MYSQL_RES * STDCALL symver16_mysql_list_fields(MYSQL *mysql, const char *table, const char *wild) ++{ ++ return mysql_list_fields(mysql, table, wild); ++} ++SYM_16(mysql_list_fields); ++ ++ ++MYSQL_RES * STDCALL symver16_mysql_list_processes(MYSQL *mysql) ++{ ++ return mysql_list_processes(mysql); ++} ++SYM_16(mysql_list_processes); ++ ++ ++MYSQL_RES * STDCALL symver16_mysql_list_tables(MYSQL *mysql, const char *wild) ++{ ++ return mysql_list_tables(mysql, wild); ++} ++SYM_16(mysql_list_tables); ++ ++ ++my_bool STDCALL symver16_mysql_more_results(MYSQL *mysql) ++{ ++ return mysql_more_results(mysql); ++} ++SYM_16(mysql_more_results); ++ ++ ++int STDCALL symver16_mysql_next_result(MYSQL *mysql) ++{ ++ return mysql_next_result(mysql); ++} ++SYM_16(mysql_next_result); ++ ++ ++int STDCALL symver16_mysql_ping(MYSQL *mysql) ++{ ++ return mysql_ping(mysql); ++} ++SYM_16(mysql_ping); ++ ++ ++int STDCALL symver16_mysql_query(MYSQL *mysql, const char *query) ++{ ++ return mysql_query(mysql, query); ++} ++SYM_16(mysql_query); ++ ++ ++my_bool STDCALL symver16_mysql_read_query_result(MYSQL *mysql) ++{ ++ return mysql_read_query_result(mysql); ++} ++SYM_16(mysql_read_query_result); ++ ++ ++ulong STDCALL symver16_mysql_real_escape_string(MYSQL *mysql, char *to,const char *from, ulong length) ++{ ++ return mysql_real_escape_string(mysql, to, from, length); ++} ++SYM_16(mysql_real_escape_string); ++ ++ ++int STDCALL symver16_mysql_refresh(MYSQL *mysql,uint options) ++{ ++ return mysql_refresh(mysql, options); ++} ++SYM_16(mysql_refresh); ++ ++ ++my_bool STDCALL symver16_mysql_rollback(MYSQL * mysql) ++{ ++ return mysql_rollback(mysql); ++} ++SYM_16(mysql_rollback); ++ ++ ++MYSQL_ROW_OFFSET STDCALL symver16_mysql_row_seek(MYSQL_RES *result, MYSQL_ROW_OFFSET row) ++{ ++ return mysql_row_seek(result, row); ++} ++SYM_16(mysql_row_seek); ++ ++ ++MYSQL_ROW_OFFSET STDCALL symver16_mysql_row_tell(MYSQL_RES *res) ++{ ++ return mysql_row_tell(res); ++} ++SYM_16(mysql_row_tell); ++ ++ ++void STDCALL symver16_mysql_server_end() ++{ ++ return mysql_server_end(); ++} ++SYM_16(mysql_server_end); ++ ++ ++int STDCALL symver16_mysql_server_init(int argc __attribute__((unused)), char **argv __attribute__((unused)), char **groups __attribute__((unused))) ++{ ++ return mysql_server_init(argc, argv, groups); ++} ++SYM_16(mysql_server_init); ++ ++ ++void symver16_mysql_set_local_infile_default(MYSQL *mysql) ++{ ++ return mysql_set_local_infile_default(mysql); ++} ++SYM_16(mysql_set_local_infile_default); ++ ++ ++void symver16_mysql_set_local_infile_handler(MYSQL *mysql, int (*local_infile_init)(void **, const char *, void *), int (*local_infile_read)(void *, char *, uint), void (*local_infile_end)(void *), int (*local_infile_error)(void *, char *, uint), void *userdata) ++{ ++ return mysql_set_local_infile_handler(mysql, local_infile_init, local_infile_read, local_infile_end, local_infile_error, userdata); ++} ++SYM_16(mysql_set_local_infile_handler); ++ ++ ++int STDCALL symver16_mysql_set_server_option(MYSQL *mysql, enum enum_mysql_set_option option) ++{ ++ return mysql_set_server_option(mysql, option); ++} ++SYM_16(mysql_set_server_option); ++ ++ ++int STDCALL symver16_mysql_shutdown(MYSQL *mysql, enum mysql_enum_shutdown_level shutdown_level) ++{ ++ return mysql_shutdown(mysql, shutdown_level); ++} ++SYM_16(mysql_shutdown); ++ ++ ++const char *STDCALL symver16_mysql_sqlstate(MYSQL *mysql) ++{ ++ return mysql_sqlstate(mysql); ++} ++SYM_16(mysql_sqlstate); ++ ++ ++const char * STDCALL symver16_mysql_stat(MYSQL *mysql) ++{ ++ return mysql_stat(mysql); ++} ++SYM_16(mysql_stat); ++ ++ ++my_ulonglong STDCALL symver16_mysql_stmt_affected_rows(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_affected_rows(stmt); ++} ++SYM_16(mysql_stmt_affected_rows); ++ ++ ++my_bool STDCALL symver16_mysql_stmt_attr_get(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, void *value) ++{ ++ return mysql_stmt_attr_get(stmt, attr_type, value); ++} ++SYM_16(mysql_stmt_attr_get); ++ ++ ++my_bool STDCALL symver16_mysql_stmt_attr_set(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, const void *value) ++{ ++ return mysql_stmt_attr_set(stmt, attr_type, value); ++} ++SYM_16(mysql_stmt_attr_set); ++ ++ ++my_bool STDCALL symver16_mysql_stmt_bind_param(MYSQL_STMT *stmt, MYSQL_BIND *my_bind) ++{ ++ return mysql_stmt_bind_param(stmt, my_bind); ++} ++SYM_16(mysql_stmt_bind_param); ++ ++ ++my_bool STDCALL symver16_mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *my_bind) ++{ ++ return mysql_stmt_bind_result(stmt, my_bind); ++} ++SYM_16(mysql_stmt_bind_result); ++ ++ ++my_bool STDCALL symver16_mysql_stmt_close(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_close(stmt); ++} ++SYM_16(mysql_stmt_close); ++ ++ ++void STDCALL symver16_mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong row) ++{ ++ return mysql_stmt_data_seek(stmt, row); ++} ++SYM_16(mysql_stmt_data_seek); ++ ++ ++uint STDCALL symver16_mysql_stmt_errno(MYSQL_STMT * stmt) ++{ ++ return mysql_stmt_errno(stmt); ++} ++SYM_16(mysql_stmt_errno); ++ ++ ++const char *STDCALL symver16_mysql_stmt_error(MYSQL_STMT * stmt) ++{ ++ return mysql_stmt_error(stmt); ++} ++SYM_16(mysql_stmt_error); ++ ++ ++int STDCALL symver16_mysql_stmt_execute(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_execute(stmt); ++} ++SYM_16(mysql_stmt_execute); ++ ++ ++int STDCALL symver16_mysql_stmt_fetch(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_fetch(stmt); ++} ++SYM_16(mysql_stmt_fetch); ++ ++ ++int STDCALL symver16_mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *my_bind, uint column, ulong offset) ++{ ++ return mysql_stmt_fetch_column(stmt, my_bind, column, offset); ++} ++SYM_16(mysql_stmt_fetch_column); ++ ++ ++unsigned int STDCALL symver16_mysql_stmt_field_count(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_field_count(stmt); ++} ++SYM_16(mysql_stmt_field_count); ++ ++ ++my_bool STDCALL symver16_mysql_stmt_free_result(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_free_result(stmt); ++} ++SYM_16(mysql_stmt_free_result); ++ ++ ++MYSQL_STMT * STDCALL symver16_mysql_stmt_init(MYSQL *mysql) ++{ ++ return mysql_stmt_init(mysql); ++} ++SYM_16(mysql_stmt_init); ++ ++ ++my_ulonglong STDCALL symver16_mysql_stmt_insert_id(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_insert_id(stmt); ++} ++SYM_16(mysql_stmt_insert_id); ++ ++ ++my_ulonglong STDCALL symver16_mysql_stmt_num_rows(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_num_rows(stmt); ++} ++SYM_16(mysql_stmt_num_rows); ++ ++ ++ulong STDCALL symver16_mysql_stmt_param_count(MYSQL_STMT * stmt) ++{ ++ return mysql_stmt_param_count(stmt); ++} ++SYM_16(mysql_stmt_param_count); ++ ++ ++MYSQL_RES * STDCALL symver16_mysql_stmt_param_metadata(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_param_metadata(stmt); ++} ++SYM_16(mysql_stmt_param_metadata); ++ ++ ++int STDCALL symver16_mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, ulong length) ++{ ++ return mysql_stmt_prepare(stmt, query, length); ++} ++SYM_16(mysql_stmt_prepare); ++ ++ ++my_bool STDCALL symver16_mysql_stmt_reset(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_reset(stmt); ++} ++SYM_16(mysql_stmt_reset); ++ ++ ++MYSQL_RES * STDCALL symver16_mysql_stmt_result_metadata(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_result_metadata(stmt); ++} ++SYM_16(mysql_stmt_result_metadata); ++ ++ ++MYSQL_ROW_OFFSET STDCALL symver16_mysql_stmt_row_seek(MYSQL_STMT *stmt, MYSQL_ROW_OFFSET row) ++{ ++ return mysql_stmt_row_seek(stmt, row); ++} ++SYM_16(mysql_stmt_row_seek); ++ ++ ++MYSQL_ROW_OFFSET STDCALL symver16_mysql_stmt_row_tell(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_row_tell(stmt); ++} ++SYM_16(mysql_stmt_row_tell); ++ ++ ++my_bool STDCALL symver16_mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number, const char *data, ulong length) ++{ ++ return mysql_stmt_send_long_data(stmt, param_number, data, length); ++} ++SYM_16(mysql_stmt_send_long_data); ++ ++ ++const char *STDCALL symver16_mysql_stmt_sqlstate(MYSQL_STMT * stmt) ++{ ++ return mysql_stmt_sqlstate(stmt); ++} ++SYM_16(mysql_stmt_sqlstate); ++ ++ ++int STDCALL symver16_mysql_stmt_store_result(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_store_result(stmt); ++} ++SYM_16(mysql_stmt_store_result); ++ ++ ++void STDCALL symver16_mysql_thread_end() ++{ ++ return mysql_thread_end(); ++} ++SYM_16(mysql_thread_end); ++ ++ ++ulong STDCALL symver16_mysql_thread_id(MYSQL *mysql) ++{ ++ return mysql_thread_id(mysql); ++} ++SYM_16(mysql_thread_id); ++ ++ ++my_bool STDCALL symver16_mysql_thread_init() ++{ ++ return mysql_thread_init(); ++} ++SYM_16(mysql_thread_init); ++ ++ ++uint STDCALL symver16_mysql_thread_safe(void) ++{ ++ return mysql_thread_safe(); ++} ++SYM_16(mysql_thread_safe); ++ ++ ++MYSQL_RES * STDCALL symver16_mysql_use_result(MYSQL *mysql) ++{ ++ return mysql_use_result(mysql); ++} ++SYM_16(mysql_use_result); ++ ++ ++uint STDCALL symver16_mysql_warning_count(MYSQL *mysql) ++{ ++ return mysql_warning_count(mysql); ++} ++SYM_16(mysql_warning_count); ++ ++/*****/ ++ ++MYSQL * STDCALL symver16_mysql_real_connect(MYSQL *mysql,const char *host, const char *user, const char *passwd, const char *db, uint port, const char *unix_socket,ulong client_flag) ++{ ++ return mysql_real_connect(mysql, host, user, passwd, db, port, unix_socket, client_flag); ++} ++SYM_16(mysql_real_connect); ++ ++/*****/ ++ ++my_bool symver16_my_init(void) ++{ ++ return my_init(); ++} ++SYM_16(my_init); ++ ++ ++void symver16_free_defaults(char **argv) ++{ ++ free_defaults(argv); ++} ++SYM_16(free_defaults); ++ ++int symver16_load_defaults(const char *conf_file, const char **groups, ++ int *argc, char ***argv) ++{ ++ return load_defaults(conf_file, groups, argc, argv); ++} ++SYM_16(load_defaults); ++ ++int symver16_handle_options(int *argc, char ***argv, ++ const struct my_option *longopts, ++ my_get_one_option get_one_option) ++{ ++ return handle_options(argc, argv, longopts, get_one_option); ++} ++SYM_16(handle_options); ++ ++void symver16_my_print_help(const struct my_option *options) ++{ ++ my_print_help(options); ++} ++SYM_16(my_print_help); ++ ++#endif ++#endif +diff -up mariadb-5.5.34/libmysql/libmysql_rpm_version.in.versioning-compat mariadb-5.5.34/libmysql/libmysql_rpm_version.in +--- mariadb-5.5.34/libmysql/libmysql_rpm_version.in.versioning-compat 2013-11-20 13:28:52.000000000 +0100 ++++ mariadb-5.5.34/libmysql/libmysql_rpm_version.in 2014-01-14 18:47:04.337100347 +0100 +@@ -1,9 +1,20 @@ + # This version script is heavily inspired by Fedora's and Mageia's version scripts for + # MySQL client shared library. It is used in MariaDB for building RPMs. ++# ++# There used to be issues that every distro handled versions of exported ++# symbols differently. Providing both versions for older symbols (from 5.1), ++# while libmysqlclient_18 is the default one, seems like compatible solution, ++# that can be adopted by all distros. ++ ++libmysqlclient_16 ++{ ++ local: ++ symver16_*; ++}; + +-libmysqlclient_16 { ++libmysqlclient_18 { + global: +-@CLIENT_API_5_1_LIST@ ++ @CLIENT_API_5_1_LIST@ + + # some stuff from Mageia, I have no idea why it is there + # But too afraid to throw anything away +@@ -27,12 +38,7 @@ libmysqlclient_16 { + scramble; + # DBD::mysql requires this + is_prefix; +- local: +- *; +-}; + +-libmysqlclient_18 { +- global: + @CLIENT_API_5_5_LIST@ + # + # Ideally the following symbols wouldn't be exported, but various applications +@@ -59,4 +65,7 @@ libmysqlclient_18 { + # PHP's mysqli.so requires this (via the ER() macro) + mysql_client_errors; + client_errors; +-}; ++ local: ++ *; ++} libmysqlclient_16; ++ +diff -up mariadb-5.5.34/mysys/default.c.versioning-compat mariadb-5.5.34/mysys/default.c +diff -up mariadb-5.5.34/mysys/my_getopt.c.versioning-compat mariadb-5.5.34/mysys/my_getopt.c +diff -up mariadb-5.5.34/sql-common/client.c.versioning-compat mariadb-5.5.34/sql-common/client.c +--- mariadb-5.5.34/sql-common/client.c.versioning-compat 2013-11-20 13:28:57.000000000 +0100 ++++ mariadb-5.5.34/sql-common/client.c 2014-01-14 18:47:04.339100350 +0100 +@@ -4485,3 +4485,139 @@ mysql_get_socket(const MYSQL *mysql) + return mysql->net.vio->sd; + return INVALID_SOCKET; + } ++ ++ ++#ifndef EMBEDDED_LIBRARY ++#ifdef COMPAT_SYMBOL_VERSIONS ++ ++// Hack to provide both libmysqlclient_16 and libmysqlclient_18 symbol versions ++ ++#define SYM_16(_exportedsym) __asm__(".symver symver16_" #_exportedsym "," #_exportedsym "@libmysqlclient_16") ++ ++void STDCALL symver16_mysql_close(MYSQL *mysql) ++{ ++ return mysql_close(mysql); ++} ++SYM_16(mysql_close); ++ ++ ++uint STDCALL symver16_mysql_errno(MYSQL *mysql) ++{ ++ return mysql_errno(mysql); ++} ++SYM_16(mysql_errno); ++ ++ ++const char * STDCALL symver16_mysql_error(MYSQL *mysql) ++{ ++ return mysql_error(mysql); ++} ++SYM_16(mysql_error); ++ ++ ++ulong * STDCALL symver16_mysql_fetch_lengths(MYSQL_RES *res) ++{ ++ return mysql_fetch_lengths(res); ++} ++SYM_16(mysql_fetch_lengths); ++ ++ ++MYSQL_ROW STDCALL symver16_mysql_fetch_row(MYSQL_RES *res) ++{ ++ return mysql_fetch_row(res); ++} ++SYM_16(mysql_fetch_row); ++ ++ ++void STDCALL symver16_mysql_free_result(MYSQL_RES *result) ++{ ++ return mysql_free_result(result); ++} ++SYM_16(mysql_free_result); ++ ++ ++ulong STDCALL symver16_mysql_get_server_version(MYSQL *mysql) ++{ ++ return mysql_get_server_version(mysql); ++} ++SYM_16(mysql_get_server_version); ++ ++ ++const char * STDCALL symver16_mysql_get_ssl_cipher(MYSQL *mysql __attribute__((unused))) ++{ ++ return mysql_get_ssl_cipher(mysql); ++} ++SYM_16(mysql_get_ssl_cipher); ++ ++ ++MYSQL * STDCALL symver16_mysql_init(MYSQL *mysql) ++{ ++ return mysql_init(mysql); ++} ++SYM_16(mysql_init); ++ ++ ++unsigned int STDCALL symver16_mysql_num_fields(MYSQL_RES *res) ++{ ++ return mysql_num_fields(res); ++} ++SYM_16(mysql_num_fields); ++ ++ ++my_ulonglong STDCALL symver16_mysql_num_rows(MYSQL_RES *res) ++{ ++ return mysql_num_rows(res); ++} ++SYM_16(mysql_num_rows); ++ ++ ++int STDCALL symver16_mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg) ++{ ++ return mysql_options(mysql, option, arg); ++} ++SYM_16(mysql_options); ++ ++ ++int STDCALL symver16_mysql_real_query(MYSQL *mysql, const char *query, ulong length) ++{ ++ return mysql_real_query(mysql, query, length); ++} ++SYM_16(mysql_real_query); ++ ++ ++int STDCALL symver16_mysql_select_db(MYSQL *mysql, const char *db) ++{ ++ return mysql_select_db(mysql, db); ++} ++SYM_16(mysql_select_db); ++ ++ ++int STDCALL symver16_mysql_send_query(MYSQL* mysql, const char* query, ulong length) ++{ ++ return mysql_send_query(mysql, query, length); ++} ++SYM_16(mysql_send_query); ++ ++ ++int STDCALL symver16_mysql_set_character_set(MYSQL *mysql, const char *cs_name) ++{ ++ return mysql_set_character_set(mysql, cs_name); ++} ++SYM_16(mysql_set_character_set); ++ ++ ++my_bool STDCALL symver16_mysql_ssl_set(MYSQL *mysql __attribute__((unused)), const char *key __attribute__((unused)), const char *cert __attribute__((unused)), const char *ca __attribute__((unused)), const char *capath __attribute__((unused)), const char *cipher __attribute__((unused))) ++{ ++ return mysql_ssl_set(mysql, key, cert, ca, capath, cipher); ++} ++SYM_16(mysql_ssl_set); ++ ++ ++MYSQL_RES * STDCALL symver16_mysql_store_result(MYSQL *mysql) ++{ ++ return mysql_store_result(mysql); ++} ++SYM_16(mysql_store_result); ++ ++#endif ++#endif +diff -up mariadb-5.5.34/sql/password.c.versioning-compat mariadb-5.5.34/sql/password.c +--- mariadb-5.5.34/sql/password.c.versioning-compat 2013-11-20 13:28:54.000000000 +0100 ++++ mariadb-5.5.34/sql/password.c 2014-01-14 18:47:04.340100351 +0100 +@@ -536,3 +536,20 @@ void make_password_from_salt(char *to, c + *to++= PVERSION41_CHAR; + octet2hex(to, (const char*) hash_stage2, SHA1_HASH_SIZE); + } ++ ++ ++#ifndef EMBEDDED_LIBRARY ++#ifdef COMPAT_SYMBOL_VERSIONS ++ ++// Hack to provide both libmysqlclient_16 and libmysqlclient_18 symbol versions ++ ++#define SYM_16(_exportedsym) __asm__(".symver symver16_" #_exportedsym "," #_exportedsym "@libmysqlclient_16") ++ ++void symver16_my_make_scrambled_password(char *to, const char *password, size_t pass_len) ++{ ++ my_make_scrambled_password(to, password, pass_len); ++} ++SYM_16(my_make_scrambled_password); ++ ++#endif ++#endif diff --git a/SOURCES/mariadb-versioning.patch b/SOURCES/mariadb-versioning.patch deleted file mode 100644 index 51ff1d7..0000000 --- a/SOURCES/mariadb-versioning.patch +++ /dev/null @@ -1,18 +0,0 @@ -The symbol versioning solution for libmysqlclient in mysql 5.1 was pretty -awful (export everything) and as of 5.5.8 the cmake build scripts have -forgotten the issue entirely. So we now maintain our own list of exported -symbols and jam it into the build with this hack. - - -diff -up mariadb-5.5.29/libmysql/CMakeLists.txt.p5 mariadb-5.5.29/libmysql/CMakeLists.txt ---- mariadb-5.5.29/libmysql/CMakeLists.txt.p5 2013-01-29 15:12:46.000000000 +0100 -+++ mariadb-5.5.29/libmysql/CMakeLists.txt 2013-02-01 10:44:28.449544405 +0100 -@@ -363,7 +363,7 @@ IF(NOT DISABLE_SHARED) - SET(libmysql_link_flags) - ENDIF() - SET_TARGET_PROPERTIES(libmysql PROPERTIES LINK_FLAGS -- "${libmysql_link_flags} ${LINK_FLAG_NO_UNDEFINED} ${VERSION_SCRIPT_LINK_FLAGS}") -+ "${libmysql_link_flags} -Wl,--version-script=libmysql.version ${LINK_FLAG_NO_UNDEFINED}") - ENDIF() - # clean direct output needs to be set several targets have the same name - #(mysqlclient in this case) diff --git a/SOURCES/mariadb-wait-ready b/SOURCES/mariadb-wait-ready index ead58e0..16f397c 100644 --- a/SOURCES/mariadb-wait-ready +++ b/SOURCES/mariadb-wait-ready @@ -27,22 +27,17 @@ get_mysql_option mysqld datadir "/var/lib/mysql" datadir="$result" get_mysql_option mysqld socket "/var/lib/mysql/mysql.sock" socketfile="$result" -get_mysql_option mysqld_safe pid-file "/var/run/mysqld/mysqld.pid" -mypidfile="$result" # Wait for the server to come up or for the mysqld process to disappear ret=0 while /bin/true; do - MYSQLDRUNNING=0 - if [ -f "$mypidfile" ]; then - MYSQLPID=`cat "$mypidfile" 2>/dev/null` - if [ -n "$MYSQLPID" ] && [ -d "/proc/$MYSQLPID" ] ; then - MYSQLDRUNNING=1 - fi + if ! [ -d "/proc/$daemon_pid" ] ; then + ret=1 + break fi RESPONSE=`/usr/bin/mysqladmin --no-defaults --socket="$socketfile" --user=UNKNOWN_MYSQL_USER ping 2>&1` mret=$? - if [ $mret -eq 0 ] && [ $MYSQLDRUNNING -eq 1 ]; then + if [ $mret -eq 0 ]; then break fi # exit codes 1, 11 (EXIT_CANNOT_CONNECT_TO_SERVICE) are expected, @@ -54,11 +49,6 @@ while /bin/true; do # "Access denied" also means the server is alive echo "$RESPONSE" | grep -q "Access denied for user" && break - # Check process still exists - if ! /bin/kill -0 $daemon_pid 2>/dev/null; then - ret=1 - break - fi sleep 1 done diff --git a/SPECS/mariadb.spec b/SPECS/mariadb.spec index 9ae7f1e..aa0b52e 100644 --- a/SPECS/mariadb.spec +++ b/SPECS/mariadb.spec @@ -3,7 +3,7 @@ %bcond_with tokudb Name: mariadb -Version: 5.5.33a +Version: 5.5.35 Release: 3%{?dist} Epoch: 1 @@ -16,6 +16,9 @@ URL: http://mariadb.org # Some code related to test-suite is under LGPLv2 License: GPLv2 with exceptions and LGPLv2 and BSD +# The evr of mysql we want to obsolete +%global obsoleted_mysql_evr 5.5-0 + # Regression tests take a long time, you can skip 'em with this %{!?runselftest:%global runselftest 1} @@ -32,6 +35,7 @@ Source12: mariadb-prepare-db-dir Source13: mariadb-wait-ready Source14: rh-skipped-tests-base.list Source15: rh-skipped-tests-arm.list +Source16: README.mysql-cnf # Working around perl dependency checking bug in rpm FTTB. Remove later. Source999: filter-requires-mysql.sh @@ -40,8 +44,6 @@ Patch1: mariadb-errno.patch Patch2: mariadb-strmov.patch Patch3: mariadb-install-test.patch Patch4: mariadb-expired-certs.patch -Patch5: mariadb-versioning.patch -Patch6: mariadb-dubious-exports.patch Patch7: mariadb-s390-tsc.patch Patch8: mariadb-logrotate.patch Patch9: mariadb-cipherspec.patch @@ -51,7 +53,8 @@ Patch12: mariadb-dh1024.patch Patch14: mariadb-basedir.patch Patch17: mariadb-covscan-signexpr.patch Patch18: mariadb-covscan-stroverflow.patch -Patch20: mariadb-cmakehostname.patch +Patch19: mariadb-ssltest.patch +Patch20: mariadb-versioning-compat.patch BuildRequires: perl, readline-devel, openssl-devel BuildRequires: cmake, ncurses-devel, zlib-devel, libaio-devel @@ -73,6 +76,7 @@ Requires(postun): %{_sbindir}/update-alternatives # MariaDB replaces mysql packages Provides: mysql = %{epoch}:%{version}-%{release} Provides: mysql%{?_isa} = %{epoch}:%{version}-%{release} +Obsoletes: mysql < %{obsoleted_mysql_evr} # When rpm 4.9 is universal, this could be cleaned up: %global __perl_requires %{SOURCE999} @@ -96,6 +100,7 @@ Group: Applications/Databases Requires: /sbin/ldconfig Provides: mysql-libs = %{epoch}:%{version}-%{release} Provides: mysql-libs%{?_isa} = %{epoch}:%{version}-%{release} +Obsoletes: mysql-libs < %{obsoleted_mysql_evr} %description libs The mariadb-libs package provides the essential shared libraries for any @@ -121,6 +126,7 @@ Requires(postun): systemd %{_sbindir}/update-alternatives Requires: perl-DBI, perl-DBD-MySQL Provides: mysql-compat-server = %{epoch}:%{version}-%{release} Provides: mysql-compat-server%{?_isa} = %{epoch}:%{version}-%{release} +Obsoletes: mysql-server < %{obsoleted_mysql_evr} %description server MariaDB is a multi-user, multi-threaded SQL database server. It is a @@ -133,11 +139,11 @@ MariaDB is a community developed branch of MySQL. Summary: Files for development of MariaDB/MySQL applications Group: Applications/Databases -Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} Requires: openssl-devel%{?_isa} Provides: mysql-devel = %{epoch}:%{version}-%{release} Provides: mysql-devel%{?_isa} = %{epoch}:%{version}-%{release} +Obsoletes: mysql-devel < %{obsoleted_mysql_evr} %description devel MariaDB is a multi-user, multi-threaded SQL database server. This @@ -150,6 +156,7 @@ MariaDB is a community developed branch of MySQL. Summary: MariaDB as an embeddable library Group: Applications/Databases Requires: /sbin/ldconfig +Obsoletes: mysql-embedded < %{obsoleted_mysql_evr} %description embedded MariaDB is a multi-user, multi-threaded SQL database server. This @@ -163,6 +170,7 @@ Summary: Development files for MariaDB as an embeddable library Group: Applications/Databases Requires: %{name}-embedded%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-devel%{?_isa} = %{epoch}:%{version}-%{release} +Obsoletes: mysql-embedded-devel < %{obsoleted_mysql_evr} %description embedded-devel MariaDB is a multi-user, multi-threaded SQL database server. This @@ -175,6 +183,7 @@ MariaDB is a community developed branch of MySQL. Summary: MariaDB benchmark scripts and data Group: Applications/Databases Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} +Obsoletes: mysql-bench < %{obsoleted_mysql_evr} %description bench MariaDB is a multi-user, multi-threaded SQL database server. This @@ -191,6 +200,7 @@ Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-server%{?_isa} = %{epoch}:%{version}-%{release} Requires: perl(Socket), perl(Time::HiRes) Requires: perl(Data::Dumper), perl(Test::More), perl(Env) +Obsoletes: mysql-test < %{obsoleted_mysql_evr} %description test MariaDB is a multi-user, multi-threaded SQL database server. This @@ -205,8 +215,6 @@ MariaDB is a community developed branch of MySQL. %patch2 -p1 %patch3 -p1 %patch4 -p1 -%patch5 -p1 -%patch6 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 @@ -216,22 +224,20 @@ MariaDB is a community developed branch of MySQL. %patch14 -p1 %patch17 -p1 %patch18 -p1 +%patch19 -p1 %patch20 -p1 # workaround for upstream bug #56342 rm -f mysql-test/t/ssl_8k_key-master.opt -# upstream has fallen down badly on symbol versioning, do it ourselves -cp -p %{SOURCE8} libmysql/libmysql.version - # generate a list of tests that fail, but are not disabled by upstream cat %{SOURCE14} > mysql-test/rh-skipped-tests.list # disable some tests failing on ARM architectures -%ifarch %{arm} +%ifarch %{arm} aarch64 cat %{SOURCE15} >> mysql-test/rh-skipped-tests.list %endif # disable some tests failing on ppc and s390 -%ifarch ppc ppc64 ppc64p7 s390 s390x +%ifarch ppc ppc64 ppc64p7 s390 s390x aarch64 echo "main.gis-precise : rhbz#906367" >> mysql-test/rh-skipped-tests.list %endif %ifarch i686 @@ -258,6 +264,11 @@ CFLAGS="$CFLAGS -fPIC" %ifarch sparc sparcv9 sparc64 CFLAGS=`echo $CFLAGS| sed -e "s|-O2|-O1|g" ` %endif +# significant performance gains can be achieved by compiling with -O3 optimization +# rhbz#1051069 +%ifarch ppc64 +CFLAGS=`echo $CFLAGS| sed -e "s|-O2|-O3|g" ` +%endif CXXFLAGS="$CFLAGS" export CFLAGS CXXFLAGS # building with PIE @@ -270,7 +281,10 @@ export LDFLAGS cmake . -DBUILD_CONFIG=mysql_release \ -DFEATURE_SET="community" \ -DINSTALL_LAYOUT=RPM \ + -DRPM="%{?rhel:rhel%{rhel}}%{!?rhel:fedora}" \ -DCMAKE_INSTALL_PREFIX="%{_prefix}" \ + -DINSTALL_DOCDIR=share/doc/%{name}-%{version} \ + -DINSTALL_DOCREADMEDIR=share/doc/%{name}-%{version} \ -DINSTALL_INCLUDEDIR=include/mysql \ -DINSTALL_INFODIR=share/info \ -DINSTALL_LIBDIR="%{_lib}/mysql" \ @@ -381,6 +395,7 @@ chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/mysql_config # but that's pretty wacko --- see also mariadb-file-contents.patch) install -p -m 644 Docs/INFO_SRC ${RPM_BUILD_ROOT}%{_libdir}/mysql/ install -p -m 644 Docs/INFO_BIN ${RPM_BUILD_ROOT}%{_libdir}/mysql/ +rm -rf ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}/MariaDB-server-%{version}/ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/mariadb chmod 0750 $RPM_BUILD_ROOT%{_localstatedir}/log/mariadb @@ -449,6 +464,8 @@ echo "%{_libdir}/mysql" > $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/%{name}-%{_ # copy additional docs into build tree so %%doc will find them cp -p %{SOURCE6} README.mysql-docs cp -p %{SOURCE7} README.mysql-license +cp -p %{SOURCE16} README.mysql-cnf +install -p -m 0644 README.mysql-cnf ${RPM_BUILD_ROOT}%{_datadir}/mysql/README.mysql-cnf # install the list of skipped tests to be available for user runs install -p -m 0644 mysql-test/rh-skipped-tests.list ${RPM_BUILD_ROOT}%{_datadir}/mysql-test @@ -478,7 +495,7 @@ rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/solaris/postinstall-solaris /usr/sbin/useradd -M -N -g mysql -o -r -d %{_localstatedir}/lib/mysql -s /sbin/nologin \ -c "MariaDB Server" -u 27 mysql >/dev/null 2>&1 || : -%post +%post devel %{_sbindir}/update-alternatives --install %{_bindir}/mysql_config \ mysql_config %{_libdir}/mysql/mysql_config %{__isa_bits} @@ -497,7 +514,7 @@ rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/solaris/postinstall-solaris %preun server %systemd_preun mariadb.service -%postun +%postun devel if [ $1 -eq 0 ] ; then %{_sbindir}/update-alternatives --remove mysql_config %{_libdir}/mysql/mysql_config fi @@ -519,7 +536,6 @@ fi %{_bindir}/msql2mysql %{_bindir}/mysql -%ghost %{_bindir}/mysql_config %{_bindir}/mysql_find_rows %{_bindir}/mysql_waitpid %{_bindir}/mysqlaccess @@ -539,7 +555,6 @@ fi %{_bindir}/aria_read_log %{_mandir}/man1/mysql.1* -%{_mandir}/man1/mysql_config.1* %{_mandir}/man1/mysql_find_rows.1* %{_mandir}/man1/mysql_waitpid.1* %{_mandir}/man1/mysqlaccess.1* @@ -551,7 +566,6 @@ fi %{_mandir}/man1/mysql_fix_privilege_tables.1* %{_mandir}/man8/mysqlmanager.8* -%{_libdir}/mysql/mysql_config %config(noreplace) %{_sysconfdir}/my.cnf.d/client.cnf %files libs @@ -593,8 +607,6 @@ fi %{_datadir}/mysql/charsets %files server -%doc support-files/*.cnf - %{_bindir}/myisamchk %{_bindir}/myisam_ftdump %{_bindir}/myisamlog @@ -670,7 +682,8 @@ fi %{_datadir}/mysql/mysql_system_tables_data.sql %{_datadir}/mysql/mysql_test_data_timezone.sql %{_datadir}/mysql/mysql_performance_tables.sql -%{_datadir}/mysql/my-*.cnf +%doc %{_datadir}/mysql/my-*.cnf +%doc %{_datadir}/mysql/README.mysql-cnf %{_datadir}/mysql/config.*.ini %{_unitdir}/mariadb.service @@ -685,10 +698,13 @@ fi %config(noreplace) %{_sysconfdir}/logrotate.d/mariadb %files devel +%ghost %{_bindir}/mysql_config %{_includedir}/mysql %{_datadir}/aclocal/mysql.m4 %{_libdir}/mysql/libmysqlclient.so %{_libdir}/mysql/libmysqlclient_r.so +%{_libdir}/mysql/mysql_config +%{_mandir}/man1/mysql_config.1* %files embedded %doc README COPYING COPYING.LESSER README.mysql-license @@ -713,6 +729,59 @@ fi %{_mandir}/man1/mysql_client_test.1* %changelog +* Thu Mar 06 2014 Honza Horak - 1:5.5.35-3 +- Fix a typo in last commit + Related: #1069586 + +* Wed Feb 26 2014 Honza Horak - 1:5.5.35-2 +- Remove unnecessary pid guessing and include README for included cnf files + Resolves: #1069586 + +* Thu Jan 30 2014 Honza Horak 5.5.35-1 +- Rebase to 5.5.35 + https://kb.askmonty.org/en/mariadb-5535-changelog/ + Also fixes: CVE-2014-0001, CVE-2014-0412, CVE-2014-0437, CVE-2013-5908, + CVE-2014-0420, CVE-2014-0393, CVE-2013-5891, CVE-2014-0386, CVE-2014-0401, + CVE-2014-0402 + Resolves: #1054041 + +* Fri Jan 24 2014 Daniel Mach - 1:5.5.34-6 +- Mass rebuild 2014-01-24 + +* Tue Jan 14 2014 Honza Horak - 1:5.5.34-5 +- Adopt compatible system versioning + Resolves: #1045013 + +* Mon Jan 13 2014 Honza Horak 1:5.5.34-4 +- Fix alternatives calls for mysql_config + Related: #1050920 + +* Fri Jan 10 2014 Honza Horak 1:5.5.34-3 +- Clean all non-needed doc files properly + Related: #1044532 +- Disable main.gis-precise test also for AArch64 + Disable perfschema.func_file_io and perfschema.func_mutex for AArch64 + (like it is done for 32-bit ARM) + Resolves: #1050988 +- Build with -O3 on ppc64 (disabling innodb_prefix_index_restart_server) + Related: #1051069 +- Move mysql_config to -devel sub-package and remove Require: mariadb + Resolves: #1050920 + +* Tue Jan 7 2014 Honza Horak 1:5.5.34-1 +- Rebase to 5.5.34 +- Obsolete mysql packages + Resolves: #1043971 +- Don't test EDH-RSA-DES-CBC-SHA cipher, it seems to be removed from openssl + which now makes mariadb/mysql FTBFS because openssl_1 test fails + Resolves: #1048881 +- Check if socket file is not being used by another process at a time + of starting the service + Resolves: #1045435 + +* Fri Dec 27 2013 Daniel Mach - 1:5.5.33a-4 +- Mass rebuild 2013-12-27 + * Mon Nov 4 2013 Honza Horak 1:5.5.33a-3 - Check if correct process is running in mysql-wait-ready script Resolves: #1026313