Tue, 28 Aug 2012 18:28:45 +0200
Massively update from 5.1 to 5.5 release, completely changing from
autotools to cmake build configuration along with the corresponding
corrections. Correct some less important problems like typical german
english mistakes, as well as use parallel make for faster builds with
SMP and multicore architectures. Warning, the 5.5 releases of MySQL
seem to be equally bug ridden as the 5.1 are, for example building
the NDBCluster storage engine fails.
mysql/mysql.patch | file | annotate | diff | comparison | revisions | |
mysql/mysql.spec | file | annotate | diff | comparison | revisions |
1.1 --- a/mysql/mysql.patch Tue Aug 28 18:28:40 2012 +0200 1.2 +++ b/mysql/mysql.patch Tue Aug 28 18:28:45 2012 +0200 1.3 @@ -1,42 +1,7 @@ 1.4 -Index: configure 1.5 ---- configure.orig 2010-10-11 22:40:59.000000000 +0200 1.6 -+++ configure 2010-11-03 13:05:31.000000000 +0100 1.7 -@@ -19652,7 +19652,7 @@ 1.8 - 1.9 - # Enable the abi_check rule only if gcc is available 1.10 - 1.11 --if test "$GCC" != "yes" || expr "$CC" : ".*icc.*" 1.12 -+if true 1.13 - then 1.14 - ABI_CHECK="" 1.15 - else 1.16 -Index: include/Makefile.in 1.17 ---- include/Makefile.in.orig 2010-10-11 22:40:17.000000000 +0200 1.18 -+++ include/Makefile.in 2010-11-03 13:07:11.000000000 +0100 1.19 -@@ -405,7 +405,8 @@ 1.20 - decimal.h errmsg.h my_global.h my_net.h \ 1.21 - my_getopt.h sslopt-longopts.h my_dir.h \ 1.22 - sslopt-vars.h sslopt-case.h sql_common.h keycache.h \ 1.23 -- m_ctype.h my_attribute.h my_compiler.h \ 1.24 -+ m_ctype.h my_attribute.h my_compiler.h rijndael.h sha1.h \ 1.25 -+ my_aes.h \ 1.26 - $(HEADERS_GEN_CONFIGURE) \ 1.27 - $(HEADERS_GEN_MAKE) 1.28 - 1.29 -@@ -413,8 +414,7 @@ 1.30 - heap.h my_bitmap.h my_uctype.h \ 1.31 - myisam.h myisampack.h myisammrg.h ft_global.h\ 1.32 - mysys_err.h my_base.h help_start.h help_end.h \ 1.33 -- my_nosys.h my_alarm.h queues.h rijndael.h sha1.h \ 1.34 -- my_aes.h my_tree.h my_trie.h hash.h thr_alarm.h \ 1.35 -+ my_nosys.h my_alarm.h queues.h my_tree.h my_trie.h hash.h thr_alarm.h \ 1.36 - thr_lock.h t_ctype.h violite.h my_md5.h base64.h \ 1.37 - my_handler.h my_time.h my_vle.h my_user.h \ 1.38 - my_libwrap.h my_stacktrace.h 1.39 Index: mysys/default.c 1.40 ---- mysys/default.c.orig 2010-10-11 22:34:24.000000000 +0200 1.41 -+++ mysys/default.c 2010-11-03 13:05:31.000000000 +0100 1.42 -@@ -1123,8 +1123,7 @@ 1.43 +--- mysys/default.c.orig 2012-08-22 19:47:54.486251769 +0200 1.44 ++++ mysys/default.c 2012-08-22 19:48:07.379075804 +0200 1.45 +@@ -1222,8 +1222,7 @@ 1.46 1.47 #else 1.48 1.49 @@ -46,25 +11,10 @@ 1.50 1.51 #if defined(DEFAULT_SYSCONFDIR) 1.52 if (DEFAULT_SYSCONFDIR[0]) 1.53 -Index: scripts/mysql_config.sh 1.54 ---- scripts/mysql_config.sh.orig 2010-10-11 22:34:28.000000000 +0200 1.55 -+++ scripts/mysql_config.sh 2010-11-03 13:05:31.000000000 +0100 1.56 -@@ -104,9 +104,9 @@ 1.57 - 1.58 - # Create options 1.59 - # We intentionally add a space to the beginning and end of lib strings, simplifies replace later 1.60 --libs=" $ldflags -L$pkglibdir -lmysqlclient @ZLIB_DEPS@ @NON_THREADED_LIBS@" 1.61 -+libs=" $ldflags -L$pkglibdir -lmysqlclient -lmysys @ZLIB_DEPS@ @NON_THREADED_LIBS@" 1.62 - libs="$libs @openssl_libs@ @STATIC_NSS_FLAGS@ " 1.63 --libs_r=" $ldflags -L$pkglibdir -lmysqlclient_r @ZLIB_DEPS@ @LIBS@ @openssl_libs@ " 1.64 -+libs_r=" $ldflags -L$pkglibdir -lmysqlclient_r -lmysys @ZLIB_DEPS@ @LIBS@ @openssl_libs@ " 1.65 - embedded_libs=" $ldflags -L$pkglibdir -lmysqld @LIBDL@ @ZLIB_DEPS@ @LIBS@ @WRAPLIBS@ @innodb_system_libs@ @openssl_libs@ " 1.66 - 1.67 - if [ -r "$pkglibdir/libmygcc.a" ]; then 1.68 Index: scripts/mysql_system_tables_data.sql 1.69 ---- scripts/mysql_system_tables_data.sql.orig 2010-10-11 22:34:29.000000000 +0200 1.70 -+++ scripts/mysql_system_tables_data.sql 2010-11-03 13:05:31.000000000 +0100 1.71 -@@ -11,8 +11,6 @@ 1.72 +--- scripts/mysql_system_tables_data.sql.orig 2012-08-22 19:49:42.514877593 +0200 1.73 ++++ scripts/mysql_system_tables_data.sql 2012-08-22 19:49:52.671510387 +0200 1.74 +@@ -26,8 +26,6 @@ 1.75 -- Fill "db" table with default grants for anyone to 1.76 -- access database 'test' and 'test_%' if "db" table didn't exist 1.77 CREATE TEMPORARY TABLE tmp_db LIKE db; 1.78 @@ -73,15 +23,3 @@ 1.79 INSERT INTO db SELECT * FROM tmp_db WHERE @had_db_table=0; 1.80 DROP TABLE tmp_db; 1.81 1.82 -Index: sql/Makefile.in 1.83 ---- sql/Makefile.in.orig 2010-10-11 22:40:27.000000000 +0200 1.84 -+++ sql/Makefile.in 2010-11-03 13:05:31.000000000 +0100 1.85 -@@ -538,7 +538,7 @@ 1.86 - $(top_builddir)/strings/libmystrings.a 1.87 - 1.88 - mysqld_DEPENDENCIES = @mysql_plugin_libs@ $(SUPPORTING_LIBS) libndb.la 1.89 --LDADD = $(SUPPORTING_LIBS) @ZLIB_LIBS@ @NDB_SCI_LIBS@ 1.90 -+LDADD = $(SUPPORTING_LIBS) @NDB_SCI_LIBS@ 1.91 - mysqld_LDADD = libndb.la \ 1.92 - @MYSQLD_EXTRA_LDFLAGS@ \ 1.93 - @pstack_libs@ \
2.1 --- a/mysql/mysql.spec Tue Aug 28 18:28:40 2012 +0200 2.2 +++ b/mysql/mysql.spec Tue Aug 28 18:28:45 2012 +0200 2.3 @@ -22,8 +22,8 @@ 2.4 ## 2.5 2.6 # package version 2.7 -%define V_major 5.1 2.8 -%define V_minor 63 2.9 +%define V_major 5.5 2.10 +%define V_minor 27 2.11 %define V_mysql %{V_major}.%{V_minor} 2.12 %define V_opkg %{V_major}.%{V_minor} 2.13 %define V_jdbc 5.1.21 2.14 @@ -39,7 +39,7 @@ 2.15 Group: Database 2.16 License: GPL 2.17 Version: %{V_opkg} 2.18 -Release: 20120704 2.19 +Release: 20120800 2.20 2.21 # package options 2.22 %option with_server yes 2.23 @@ -49,20 +49,21 @@ 2.24 %option with_federated no 2.25 %option with_ndbcluster no 2.26 %option with_partition no 2.27 +%option with_perfschema no 2.28 %option with_ssl no 2.29 %option with_embedded no 2.30 %option with_charset utf8 2.31 %option with_collation utf8_unicode_ci 2.32 %option with_jdbc no 2.33 2.34 -# fixing implicit inter-plugin dependencies and correlations 2.35 +# fixing implicit interplugin dependencies and correlations 2.36 %if "%{with_ndbcluster}" == "yes" 2.37 %undefine with_partition 2.38 %define with_partition yes 2.39 %endif 2.40 2.41 # list of sources 2.42 -Source0: http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-%{V_major}/mysql-%{V_mysql}.tar.gz 2.43 +Source0: http://www.mysql.com/Downloads/MySQL-%{V_major}/mysql-%{V_mysql}.tar.gz 2.44 Source1: http://ftp.gwdg.de/pub/misc/mysql/Downloads/Connector-J/mysql-connector-java-%{V_jdbc}.tar.gz 2.45 Source2: my.cnf 2.46 Source3: my.pwd 2.47 @@ -83,9 +84,9 @@ 2.48 %endif 2.49 2.50 %description 2.51 - MySQL is a multi-user Relational Database Management System (RDBMS), 2.52 + MySQL is a multiuser Relational Database Management System (RDBMS), 2.53 which is controlled through Structured Query Language (SQL) 2.54 - operating in full multi-threading mode. The main goals of MySQL are 2.55 + operating in full multithreading mode. The main goals of MySQL are 2.56 speed, robustness and ease of use. MySQL was originally developed 2.57 because of the need for a SQL server that could handle very big 2.58 databases with magnitude higher speed than what any database vendor 2.59 @@ -110,7 +111,6 @@ 2.60 %endif 2.61 %patch -p0 2.62 2.63 -%build 2.64 # patch file search path 2.65 %{l_shtool} subst %{l_value -s -a} \ 2.66 mysys/default.c 2.67 @@ -121,119 +121,135 @@ 2.68 -e 's;^#!/usr/bin/perl;#!%{l_prefix}/bin/perl;' \ 2.69 scripts/* 2.70 2.71 - # determine additional configure options 2.72 - case "%{l_platform -t}" in 2.73 - *-freebsd* ) opt="--with-client-ldflags=-static --with-mysqld-ldflags=-static" ;; 2.74 - *-linux* ) opt="--with-client-ldflags=-static --with-mysqld-ldflags=-static" ;; 2.75 - *-sunos* ) opt="--with-client-ldflags=-static --with-mysqld-ldflags=-static" ;; 2.76 - esac 2.77 +%build 2.78 + # create build subdirectory 2.79 + %{l_shtool} mkdir -p objbld 2.80 + cd objbld 2.81 2.82 - # configure source tree 2.83 - CC="%{l_cc}" \ 2.84 - CXX="%{l_cxx}" \ 2.85 - CFLAGS="%{l_cflags -O}" \ 2.86 - CXXFLAGS="%{l_cxxflags -O}" \ 2.87 - CPPFLAGS="%{l_cppflags ncurses}" \ 2.88 - LDFLAGS="-L`pwd`/libmysql %{l_ldflags}" \ 2.89 - LIBS="-lz" \ 2.90 - ./configure \ 2.91 - --prefix=%{l_prefix} \ 2.92 - --mandir=%{l_prefix}/man \ 2.93 - --infodir=%{l_prefix}/info \ 2.94 - --sysconfdir=%{l_prefix}/etc/mysql \ 2.95 - --localstatedir=%{l_prefix}/var/mysql \ 2.96 - --libexecdir=%{l_prefix}/libexec/mysql \ 2.97 - --with-unix-socket-path=%{l_prefix}/var/mysql/mysql.sock \ 2.98 - --with-mysqld-user=%{l_musr} \ 2.99 - --enable-thread-safe-client \ 2.100 - --with-comment="%{l_openpkg_release}" \ 2.101 + # configure environment 2.102 + export CC="%{l_cc}" 2.103 + export CXX="%{l_cxx}" 2.104 + export CFLAGS="%{l_cflags -O}" 2.105 + export CXXFLAGS="%{l_cxxflags -O} -felide-constructors -fno-exceptions -fno-rtti" 2.106 + export CPPFLAGS="%{l_cppflags ncurses}" 2.107 + export LDFLAGS="-L`pwd`/libmysql %{l_ldflags}" 2.108 + export LIBS="-lz" 2.109 + 2.110 + # Configure source tree. 2.111 + # Tips are in mysql_release.cmake 2.112 + # or run cmake(1) -L for all opts 2.113 + # Disable dtrace(1) to avoid 'mysqld_dtrace_all.o: file not recognized: Bad value' 2.114 + %{l_prefix}/bin/cmake \ 2.115 + -DCMAKE_INSTALL_PREFIX="%{l_prefix}" \ 2.116 + -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ 2.117 + -DINSTALL_DOCDIR="share/mysql/doc" \ 2.118 + -DINSTALL_DOCREADMEDIR="share/mysql/doc" \ 2.119 + -DINSTALL_INCLUDEDIR="include/mysql" \ 2.120 + -DINSTALL_INFODIR:STRING="info" \ 2.121 + -DINSTALL_MYSQLSHAREDIR="share/mysql" \ 2.122 + -DINSTALL_SBINDIR="libexec/mysql" \ 2.123 + -DINSTALL_SHAREDIR="share/mysql" \ 2.124 + -DINSTALL_SCRIPTDIR="bin" \ 2.125 + -DINSTALL_SUPPORTFILESDIR="share/mysql" \ 2.126 + -DMYSQL_UNIX_ADDR="%{l_prefix}/var/mysql/mysql.sock" \ 2.127 + -DFEATURE_SET="community" \ 2.128 + -DCOMPILATION_COMMENT="%{l_openpkg_release}" \ 2.129 + -DMANUFACTURER="Built from OpenPKG sources" \ 2.130 + -DDEFAULT_CHARSET="%{with_charset}" \ 2.131 + -DDEFAULT_COLLATION="%{with_collation}" \ 2.132 + -DMYSQL_USER="%{l_musr}" \ 2.133 + -DWITH_ZLIB=system \ 2.134 + -DWITH_READLINE=YES \ 2.135 + -DWITH_LIBEDIT=NO \ 2.136 + -DWITH_LIBWRAP=NO \ 2.137 + -DDISABLE_SHARED=YES \ 2.138 + -DENABLE_DTRACE=NO \ 2.139 + -DZLIB_INCLUDE_DIR=%{l_cppflags zlib} \ 2.140 + -DPKG_CONFIG_EXECUTABLE="PKG_CONFIG_EXECUTABLE-NOTFOUND" \ 2.141 %if "%{with_server}" != "yes" 2.142 - --without-server \ 2.143 + -DWITHOUT_SERVER=YES \ 2.144 +%endif 2.145 +%if "%{with_ssl}" == "yes" 2.146 + -DWITH_SSL=system \ 2.147 + -DOPENSSL_INCLUDE_DIR="%{l_cppflags openssl}" \ 2.148 + -DOPENSSL_SSL_LIBRARY="%{l_prefix}/lib/libssl.a" \ 2.149 + -DOPENSSL_CRYPTO_LIBRARY="%{l_prefix}/lib/libcrypto.a" \ 2.150 + -DCRYPTO_LIBRARY="%{l_prefix}/lib/libcrypto.a" \ 2.151 %else 2.152 - --with-server \ 2.153 - --with-plugin-csv \ 2.154 - --with-plugin-heap \ 2.155 - --with-plugin-myisam \ 2.156 - --with-plugin-myisammrg \ 2.157 + -DWITH_SSL=NO \ 2.158 +%endif 2.159 %if "%{with_innobase}" == "yes" 2.160 - --with-plugin-innobase \ 2.161 + -DWITH_INNOBASE_STORAGE_ENGINE=YES \ 2.162 %else 2.163 - --without-plugin-innobase \ 2.164 + -DWITH_INNOBASE_STORAGE_ENGINE=NO \ 2.165 %endif 2.166 %if "%{with_archive}" == "yes" 2.167 - --with-plugin-archive \ 2.168 + -DWITH_ARCHIVE_STORAGE_ENGINE=YES \ 2.169 %else 2.170 - --without-plugin-archive \ 2.171 + -DWITH_ARCHIVE_STORAGE_ENGINE=NO \ 2.172 %endif 2.173 %if "%{with_blackhole}" == "yes" 2.174 - --with-plugin-blackhole \ 2.175 + -DWITH_BLACKHOLE_STORAGE_ENGINE=YES \ 2.176 %else 2.177 - --without-plugin-blackhole \ 2.178 + -DWITH_BLACKHOLE_STORAGE_ENGINE=NO \ 2.179 %endif 2.180 %if "%{with_federated}" == "yes" 2.181 - --with-plugin-federated \ 2.182 + -DWITH_FEDERATED_STORAGE_ENGINE=YES \ 2.183 %else 2.184 - --without-plugin-federated \ 2.185 + -DWITH_FEDERATED_STORAGE_ENGINE=NO \ 2.186 %endif 2.187 %if "%{with_ndbcluster}" == "yes" 2.188 - --with-plugin-ndbcluster \ 2.189 + -DWITH_NDBCLUSTER_STORAGE_ENGINE=YES \ 2.190 %else 2.191 - --without-plugin-ndbcluster \ 2.192 + -DWITH_NDBCLUSTER_STORAGE_ENGINE=NO \ 2.193 %endif 2.194 %if "%{with_partition}" == "yes" 2.195 - --with-plugin-partition \ 2.196 + -DWITH_PARTITION_STORAGE_ENGINE=YES \ 2.197 %else 2.198 - --without-plugin-partition \ 2.199 + -DWITH_PARTITION_STORAGE_ENGINE=NO \ 2.200 %endif 2.201 -%endif 2.202 - --with-zlib-dir=%{l_prefix} \ 2.203 -%if "%{with_ssl}" == "yes" 2.204 - --with-ssl=%{l_prefix} \ 2.205 +%if "%{with_perfschema}" == "yes" 2.206 + -DWITH_PERFSCHEMA_STORAGE_ENGINE=YES \ 2.207 +%else 2.208 + -DWITH_PERFSCHEMA_STORAGE_ENGINE=NO \ 2.209 %endif 2.210 %if "%{with_embedded}" == "yes" 2.211 - --with-embedded-server \ 2.212 + -DWITH_EMBEDDED_SERVER=YES \ 2.213 +%else 2.214 + -DWITH_EMBEDDED_SERVER=NO \ 2.215 %endif 2.216 - --with-charset=%{with_charset} \ 2.217 - --with-collation=%{with_collation} \ 2.218 - --without-readline \ 2.219 - --without-libedit \ 2.220 - --with-big-tables \ 2.221 - --with-low-memory \ 2.222 - --disable-shared \ 2.223 - $opt 2.224 + .. 2.225 2.226 - # build source tree 2.227 - %{l_make} %{l_mflags} 2.228 + # build source tree (VERBOSE=1) 2.229 + %{l_make} %{l_mflags -O} 2.230 2.231 %install 2.232 + # install from build subdirectory 2.233 + cd objbld 2.234 2.235 - # patch init script 2.236 - %{l_shtool} subst %{l_value -s -a} \ 2.237 - scripts/mysql_install_db.sh 2.238 + ## patch init script (this broken) 2.239 + #%{l_shtool} subst %{l_value -s -a} \ 2.240 + # bin/mysql_install_db.sh 2.241 2.242 # perform standard installation procedure 2.243 %{l_make} %{l_mflags} install \ 2.244 - AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" \ 2.245 DESTDIR=$RPM_BUILD_ROOT 2.246 2.247 - # cleanup mysql_config script 2.248 + # cleanup scripts 2.249 %{l_shtool} subst \ 2.250 -e 's;^\(ldflags=.\).*\(.\)$;\1%{l_ldflags}\2;' \ 2.251 $RPM_BUILD_ROOT%{l_prefix}/bin/mysql_config 2.252 2.253 - # move utility 'replace', msql2mysql is patched for new path 2.254 + # move utilities, patched for new paths 2.255 mv $RPM_BUILD_ROOT%{l_prefix}/bin/replace \ 2.256 $RPM_BUILD_ROOT%{l_prefix}/libexec/mysql/ 2.257 2.258 # strip installation area 2.259 + rm -rf $RPM_BUILD_ROOT%{l_prefix}/data 2.260 rm -rf $RPM_BUILD_ROOT%{l_prefix}/mysql-test 2.261 rm -rf $RPM_BUILD_ROOT%{l_prefix}/sql-bench 2.262 - rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir 2.263 - rm -f $RPM_BUILD_ROOT%{l_prefix}/share/mysql/mysql-%{V_mysql}.spec 2.264 rm -f $RPM_BUILD_ROOT%{l_prefix}/share/mysql/binary-configure 2.265 - rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/make_win_src_distribution 2.266 - rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/make_win_binary_distribution 2.267 - rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/comp_err 2.268 + rm -f $RPM_BUILD_ROOT%{l_prefix}/share/mysql/ndb-config-2-node.ini 2.269 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true 2.270 strip $RPM_BUILD_ROOT%{l_prefix}/libexec/mysql/* 2>/dev/null || true 2.271 %if "%{with_ndbcluster}" == "yes" 2.272 @@ -243,7 +259,6 @@ 2.273 rm -rf $RPM_BUILD_ROOT%{l_prefix}/include/mysql/storage/ndb 2.274 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/mysql/libndb* 2.275 rm -f $RPM_BUILD_ROOT%{l_prefix}/libexec/mysql/ndb* 2.276 - rm -f $RPM_BUILD_ROOT%{l_prefix}/share/mysql/ndb-config-2-node.ini 2.277 %endif 2.278 2.279 # install global configuration 2.280 @@ -261,11 +276,15 @@ 2.281 %{SOURCE my.pwd} \ 2.282 $RPM_BUILD_ROOT%{l_prefix}/etc/mysql/ 2.283 2.284 - # install run-command script 2.285 + # install runcommand script 2.286 %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d 2.287 %{l_shtool} install -c -m 755 %{l_value -s -a} \ 2.288 %{SOURCE rc.mysql} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ 2.289 2.290 + # mitigate complex buildconf 2.291 + %{l_shtool} install -c -m 644 \ 2.292 + INSTALL-SOURCE $RPM_BUILD_ROOT%{l_prefix}/share/mysql/doc/ 2.293 + 2.294 # make sure the database directory exists 2.295 %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/var/mysql 2.296 2.297 @@ -305,16 +324,14 @@ 2.298 # determine the package files 2.299 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ 2.300 %if "%{with_server}" == "yes" 2.301 - %{l_files_std} \ 2.302 '%config %attr(644,%{l_musr},%{l_mgrp}) %{l_prefix}/etc/mysql/my.cnf' \ 2.303 '%config %attr(600,%{l_susr},%{l_mgrp}) %{l_prefix}/etc/mysql/my.pwd' \ 2.304 '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/mysql' \ 2.305 - '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/mysql/tmp' 2.306 -%else 2.307 + '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/mysql/tmp' \ 2.308 +%endif 2.309 %{l_files_std} 2.310 -%endif 2.311 2.312 -%files -f files 2.313 +%files -f objbld/files 2.314 2.315 %clean 2.316