From b714a0cec4da4372151422348bae47ad9d2fcc66 Mon Sep 17 00:00:00 2001 From: "kent@mysql.com" <> Date: Sat, 29 Apr 2006 01:28:04 +0200 Subject: [PATCH 1/4] mysql.spec.sh: Backport of changes in 5.0 (bug#18294) --- support-files/mysql.spec.sh | 72 +++++++++++++++++++++++++++++-------- 1 file changed, 57 insertions(+), 15 deletions(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index b161ec13073..ab2319fa2bb 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -28,7 +28,7 @@ Release: %{release} License: %{license} Source: http://www.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/mysql-%{mysql_version}.tar.gz URL: http://www.mysql.com/ -Packager: Lenz Grimmer +Packager: MySQL Production Engineering Team Vendor: MySQL AB Provides: msqlormysql MySQL-server mysql BuildRequires: ncurses-devel @@ -297,7 +297,6 @@ then fi BuildMySQL "--enable-shared \ - --without-openssl \ --with-berkeley-db \ --with-innodb \ --with-ndbcluster \ @@ -307,13 +306,25 @@ BuildMySQL "--enable-shared \ --with-example-storage-engine \ --with-blackhole-storage-engine \ --with-embedded-server \ - --with-comment=\"MySQL Community Edition - Max (GPL)\" \ - --with-server-suffix='-Max'" + --with-comment=\"MySQL Community Edition - Experimental (GPL)\" \ + --with-server-suffix='-max'" + +# We might want to save the config log file +if test -n "$MYSQL_MAXCONFLOG_DEST" +then + cp -fp config.log "$MYSQL_MAXCONFLOG_DEST" +fi make -i test-force || true # Save mysqld-max -mv sql/mysqld sql/mysqld-max +# check if mysqld was installed in .libs/ +if test -f sql/.libs/mysqld +then + cp sql/.libs/mysqld sql/mysqld-max +else + cp sql/mysqld sql/mysqld-max +fi nm --numeric-sort sql/mysqld-max > sql/mysqld-max.sym # Save the perror binary so it supports the NDB error codes (BUG#13740) mv extra/perror extra/perror.ndb @@ -362,7 +373,18 @@ BuildMySQL "--disable-shared \ --with-innodb \ --without-vio \ --without-openssl" -nm --numeric-sort sql/mysqld > sql/mysqld.sym +if test -f sql/.libs/mysqld +then + nm --numeric-sort sql/.libs/mysqld > sql/mysqld.sym +else + nm --numeric-sort sql/mysqld > sql/mysqld.sym +fi + +# We might want to save the config log file +if test -n "$MYSQL_CONFLOG_DEST" +then + cp -fp config.log "$MYSQL_CONFLOG_DEST" +fi make -i test-force || true @@ -456,7 +478,7 @@ usermod -g %{mysqld_group} %{mysqld_user} 2> /dev/null || true # owns all database files. chown -R %{mysqld_user}:%{mysqld_group} $mysql_datadir -# Initiate databases +# Initiate databases if needed %{_bindir}/mysql_install_db --rpm --user=%{mysqld_user} # Change permissions again to fix any new files. @@ -543,31 +565,31 @@ fi %attr(755, root, root) %{_bindir}/isamchk %attr(755, root, root) %{_bindir}/isamlog -%attr(755, root, root) %{_bindir}/myisamchk +%attr(755, root, root) %{_bindir}/my_print_defaults %attr(755, root, root) %{_bindir}/myisam_ftdump +%attr(755, root, root) %{_bindir}/myisamchk %attr(755, root, root) %{_bindir}/myisamlog %attr(755, root, root) %{_bindir}/myisampack -%attr(755, root, root) %{_bindir}/my_print_defaults -%attr(755, root, root) %{_bindir}/mysqlbug %attr(755, root, root) %{_bindir}/mysql_convert_table_format %attr(755, root, root) %{_bindir}/mysql_create_system_tables -%attr(755, root, root) %{_bindir}/mysqld_multi -%attr(755, root, root) %{_bindir}/mysqld_safe %attr(755, root, root) %{_bindir}/mysql_explain_log %attr(755, root, root) %{_bindir}/mysql_fix_extensions %attr(755, root, root) %{_bindir}/mysql_fix_privilege_tables -%attr(755, root, root) %{_bindir}/mysqlhotcopy %attr(755, root, root) %{_bindir}/mysql_install_db %attr(755, root, root) %{_bindir}/mysql_secure_installation %attr(755, root, root) %{_bindir}/mysql_setpermission -%attr(755, root, root) %{_bindir}/mysqltest %attr(755, root, root) %{_bindir}/mysql_tzinfo_to_sql %attr(755, root, root) %{_bindir}/mysql_zap +%attr(755, root, root) %{_bindir}/mysqlbug +%attr(755, root, root) %{_bindir}/mysqld_multi +%attr(755, root, root) %{_bindir}/mysqld_safe +%attr(755, root, root) %{_bindir}/mysqlhotcopy +%attr(755, root, root) %{_bindir}/mysqltest %attr(755, root, root) %{_bindir}/pack_isam %attr(755, root, root) %{_bindir}/perror %attr(755, root, root) %{_bindir}/replace -%attr(755, root, root) %{_bindir}/resolveip %attr(755, root, root) %{_bindir}/resolve_stack_dump +%attr(755, root, root) %{_bindir}/resolveip %attr(755, root, root) %{_bindir}/safe_mysqld %attr(755, root, root) %{_sbindir}/mysqld @@ -662,6 +684,11 @@ fi %{_libdir}/mysql/libmysys.a %{_libdir}/mysql/libnisam.a %{_libdir}/mysql/libvio.a +%if %{STATIC_BUILD} +%else +%{_libdir}/mysql/libz.a +%{_libdir}/mysql/libz.la +%endif %files shared %defattr(-, root, root, 0755) @@ -694,11 +721,26 @@ fi - Set $LDFLAGS from $MYSQL_BUILD_LDFLAGS +* Fri Mar 03 2006 Kent Boortz + +- Can't use bundled zlib when doing static build. Might be a + automake/libtool problem, having two .la files, "libmysqlclient.la" + and "libz.la", on the same command line to link "thread_test" + expands to too many "-lc", "-lpthread" and other libs giving hard + to nail down duplicate symbol defintion problems. + * Fri Jan 10 2006 Joerg Bruehe - Use "-i" on "make test-force"; this is essential for later evaluation of this log file. +* Fri Dec 12 2005 Rodrigo Novo + +- Added zlib to the list of (static) libraries installed +- Added check against libtool wierdness (WRT: sql/mysqld || sql/.libs/mysqld) +- Compile MySQL with bundled zlib +- Fixed %packager name to "MySQL Production Engineering Team" + * Mon Dec 05 2005 Joerg Bruehe - Avoid using the "bundled" zlib on "shared" builds: From a14f1250d6523e71c569c7198ed39cf271b9c7d6 Mon Sep 17 00:00:00 2001 From: "kent@mysql.com" <> Date: Sat, 29 Apr 2006 07:32:12 +0200 Subject: [PATCH 2/4] configure.in: Changed version to 4.1.20 --- configure.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 4b8f30511c5..2dfa2d0b420 100644 --- a/configure.in +++ b/configure.in @@ -5,7 +5,7 @@ AC_INIT(sql/mysqld.cc) AC_CANONICAL_SYSTEM # The Docs Makefile.am parses this line! # remember to also change ndb version below and update version.c in ndb -AM_INIT_AUTOMAKE(mysql, 4.1.19) +AM_INIT_AUTOMAKE(mysql, 4.1.20) AM_CONFIG_HEADER(config.h) PROTOCOL_VERSION=10 @@ -17,7 +17,7 @@ SHARED_LIB_VERSION=$SHARED_LIB_MAJOR_VERSION:0:0 # ndb version NDB_VERSION_MAJOR=4 NDB_VERSION_MINOR=1 -NDB_VERSION_BUILD=19 +NDB_VERSION_BUILD=20 NDB_VERSION_STATUS="" # Set all version vars based on $VERSION. How do we do this more elegant ? From 5e717959d0198ed96cfa2d594509629ae0afcedb Mon Sep 17 00:00:00 2001 From: "kent@mysql.com" <> Date: Sat, 29 Apr 2006 15:58:02 +0200 Subject: [PATCH 3/4] config-win.h: Fix strange "double" define for popen. Avoid warnings about sprintf() etc. being unsafe. Corrected typo "#endfif" --- include/config-win.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/config-win.h b/include/config-win.h index 03f130ad37e..bb54a43b8bb 100644 --- a/include/config-win.h +++ b/include/config-win.h @@ -22,6 +22,11 @@ functions */ #define _WIN32_WINNT 0x0500 #endif +#if defined(_MSC_VER) && _MSC_VER >= 1400 +/* Avoid endless warnings about sprintf() etc. being unsafe. */ +#define _CRT_SECURE_NO_DEPRECATE 1 +#endif + #include #include #include /* Because of rint() */ @@ -195,7 +200,7 @@ typedef uint rf_SetTimer; #define my_sigset(A,B) signal((A),(B)) #define finite(A) _finite(A) #define sleep(A) Sleep((A)*1000) -#define popen(A) popen(A,B) _popen((A),(B)) +#define popen(A,B) _popen((A),(B)) #define pclose(A) _pclose(A) #ifndef __BORLANDC__ @@ -385,7 +390,7 @@ inline double ulonglong2double(ulonglong value) #else #define MYSQL_DEFAULT_CHARSET_NAME "latin1" #define MYSQL_DEFAULT_COLLATION_NAME "latin1_swedish_ci" -#enfif +#endif #define HAVE_SPATIAL 1 #define HAVE_RTREE_KEYS 1 From f45d6d3cc61199587b43da617aee5017c7401ddb Mon Sep 17 00:00:00 2001 From: "kent@mysql.com" <> Date: Mon, 1 May 2006 19:48:31 +0200 Subject: [PATCH 4/4] mysql.spec.sh: Use "./libtool --mode=execute" to find real path to executables --- support-files/mysql.spec.sh | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index ab2319fa2bb..efe42a035e6 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -318,16 +318,11 @@ fi make -i test-force || true # Save mysqld-max -# check if mysqld was installed in .libs/ -if test -f sql/.libs/mysqld -then - cp sql/.libs/mysqld sql/mysqld-max -else - cp sql/mysqld sql/mysqld-max -fi -nm --numeric-sort sql/mysqld-max > sql/mysqld-max.sym +./libtool --mode=execute cp sql/mysqld sql/mysqld-max +./libtool --mode=execute nm --numeric-sort sql/mysqld-max > sql/mysqld-max.sym + # Save the perror binary so it supports the NDB error codes (BUG#13740) -mv extra/perror extra/perror.ndb +./libtool --mode=execute cp extra/perror extra/perror.ndb # Install the ndb binaries (cd ndb; make install DESTDIR=$RBR) @@ -373,12 +368,8 @@ BuildMySQL "--disable-shared \ --with-innodb \ --without-vio \ --without-openssl" -if test -f sql/.libs/mysqld -then - nm --numeric-sort sql/.libs/mysqld > sql/mysqld.sym -else - nm --numeric-sort sql/mysqld > sql/mysqld.sym -fi + +./libtool --mode=execute nm --numeric-sort sql/mysqld > sql/mysqld.sym # We might want to save the config log file if test -n "$MYSQL_CONFLOG_DEST" @@ -717,6 +708,11 @@ fi # itself - note that they must be ordered by date (important when # merging BK trees) %changelog +* Mon May 01 2006 Kent Boortz + +- Use "./libtool --mode=execute" instead of searching for the + executable in current directory and ".libs". + * Sat Apr 01 2006 Kent Boortz - Set $LDFLAGS from $MYSQL_BUILD_LDFLAGS