diff --git a/.cvsignore b/.cvsignore index f3c0171..3aa0705 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -mysql-5.0.27.tar.gz +mysql-5.0.33.tar.gz diff --git a/mysql-install-test.patch b/mysql-install-test.patch index b375e91..0431a9f 100644 --- a/mysql-install-test.patch +++ b/mysql-install-test.patch @@ -1,12 +1,12 @@ mysql's idea of a suitable place to install the regression tests is /usr/mysql-test. To relocate this to a reasonably FHS-compliant place -like /usr/share/mysql-test, we have to hack up the paths in install_test_db -and mysql-test-run. This patch also improves the documentation a tad. +like /usr/share/mysql-test, we have to hack up the paths in install_test_db. +This patch also improves the documentation a tad. -diff -Naur mysql-5.0.21.orig/mysql-test/README mysql-5.0.21/mysql-test/README ---- mysql-5.0.21.orig/mysql-test/README 2006-04-26 14:31:03.000000000 -0400 -+++ mysql-5.0.21/mysql-test/README 2006-05-01 20:58:04.000000000 -0400 +diff -Naur mysql-5.0.33.orig/mysql-test/README mysql-5.0.33/mysql-test/README +--- mysql-5.0.33.orig/mysql-test/README 2007-01-09 07:51:08.000000000 -0500 ++++ mysql-5.0.33/mysql-test/README 2007-02-09 12:27:08.000000000 -0500 @@ -6,6 +6,14 @@ actually have a co-existing MySQL installation. The tests will not conflict with it. @@ -32,34 +32,35 @@ diff -Naur mysql-5.0.21.orig/mysql-test/README mysql-5.0.21/mysql-test/README You can create your own test cases. To create a test case, create a new -diff -Naur mysql-5.0.21.orig/mysql-test/install_test_db.sh mysql-5.0.21/mysql-test/install_test_db.sh ---- mysql-5.0.21.orig/mysql-test/install_test_db.sh 2006-04-26 14:31:03.000000000 -0400 -+++ mysql-5.0.21/mysql-test/install_test_db.sh 2006-05-01 20:56:05.000000000 -0400 -@@ -9,17 +9,17 @@ - shift 1 +diff -Naur mysql-5.0.33.orig/mysql-test/install_test_db.sh mysql-5.0.33/mysql-test/install_test_db.sh +--- mysql-5.0.33.orig/mysql-test/install_test_db.sh 2007-01-09 07:51:07.000000000 -0500 ++++ mysql-5.0.33/mysql-test/install_test_db.sh 2007-02-09 12:32:00.000000000 -0500 +@@ -14,18 +14,15 @@ + libexecdir=../libexec # Check if it's a binary distribution or a 'make install' - if test -x ../libexec/mysqld + if test -x /usr/libexec/mysqld then - execdir=../libexec +- elif test -x ../../sbin/mysqld # RPM installation +- then +- execdir=../../sbin +- bindir=../../bin +- scriptdir=../../bin +- libexecdir=../../libexec + execdir=/usr/libexec else - execdir=../bin + execdir=/usr/bin fi -- bindir=../bin + bindir=/usr/bin - BINARY_DIST=1 - fix_bin=mysql-test -- scriptdir=../bin -- libexecdir=../libexec + scriptdir=/usr/bin + libexecdir=/usr/libexec + fix_bin=mysql-test else execdir=../sql - bindir=../client -@@ -75,7 +75,8 @@ +@@ -82,7 +79,8 @@ #for error messages if [ x$BINARY_DIST = x1 ] ; then @@ -69,15 +70,3 @@ diff -Naur mysql-5.0.21.orig/mysql-test/install_test_db.sh mysql-5.0.21/mysql-te else basedir=. EXTRA_ARG="--language=../sql/share/english/ --character-sets-dir=../sql/share/charsets/" -diff -Naur mysql-5.0.21.orig/mysql-test/mysql-test-run.sh mysql-5.0.21/mysql-test/mysql-test-run.sh ---- mysql-5.0.21.orig/mysql-test/mysql-test-run.sh 2006-04-26 14:31:05.000000000 -0400 -+++ mysql-5.0.21/mysql-test/mysql-test-run.sh 2006-05-01 20:56:05.000000000 -0400 -@@ -740,6 +740,8 @@ - # currently all binaries are in "bin", for a MySQL AB packaging - # some are in "tests". - -+ BASEDIR="/usr" -+ - if test -x "$BASEDIR/libexec/mysqld" - then - MYSQLD="$VALGRIND $BASEDIR/libexec/mysqld" diff --git a/mysql-ssl-bugs.patch b/mysql-ssl-bugs.patch index 6e5553a..24ca522 100644 --- a/mysql-ssl-bugs.patch +++ b/mysql-ssl-bugs.patch @@ -13,10 +13,10 @@ gives system-dependent error messages, since that breaks the openssl_1 test (which has evidently only been tested with yassl, if at all). -diff -Naur mysql-5.0.27.orig/sql-common/client.c mysql-5.0.27/sql-common/client.c ---- mysql-5.0.27.orig/sql-common/client.c 2006-10-20 20:22:26.000000000 -0400 -+++ mysql-5.0.27/sql-common/client.c 2006-11-08 19:20:49.000000000 -0500 -@@ -2949,7 +2949,7 @@ +diff -Naur mysql-5.0.33.orig/sql-common/client.c mysql-5.0.33/sql-common/client.c +--- mysql-5.0.33.orig/sql-common/client.c 2007-01-09 07:51:07.000000000 -0500 ++++ mysql-5.0.33/sql-common/client.c 2007-02-09 12:36:17.000000000 -0500 +@@ -3017,7 +3017,7 @@ mysql->reconnect= *(my_bool *) arg; break; case MYSQL_OPT_SSL_VERIFY_SERVER_CERT: @@ -25,10 +25,10 @@ diff -Naur mysql-5.0.27.orig/sql-common/client.c mysql-5.0.27/sql-common/client. mysql->options.client_flag|= CLIENT_SSL_VERIFY_SERVER_CERT; else mysql->options.client_flag&= ~CLIENT_SSL_VERIFY_SERVER_CERT; -diff -Naur mysql-5.0.27.orig/vio/viossl.c mysql-5.0.27/vio/viossl.c ---- mysql-5.0.27.orig/vio/viossl.c 2006-10-20 20:23:11.000000000 -0400 -+++ mysql-5.0.27/vio/viossl.c 2006-11-09 13:57:32.000000000 -0500 -@@ -119,19 +119,10 @@ +diff -Naur mysql-5.0.33.orig/vio/viossl.c mysql-5.0.33/vio/viossl.c +--- mysql-5.0.33.orig/vio/viossl.c 2007-01-09 07:51:50.000000000 -0500 ++++ mysql-5.0.33/vio/viossl.c 2007-02-09 12:39:12.000000000 -0500 +@@ -124,19 +124,10 @@ if (ssl) { @@ -43,16 +43,16 @@ diff -Naur mysql-5.0.27.orig/vio/viossl.c mysql-5.0.27/vio/viossl.c - default: /* Shutdown failed */ + r = SSL_shutdown(ssl); + if (r < 0) - DBUG_PRINT("vio_error", ("SSL_shutdown() failed, error: %s", + DBUG_PRINT("vio_error", ("SSL_shutdown() failed, error: %d", SSL_get_error(ssl, r))); - break; - } SSL_free(ssl); vio->ssl_arg= 0; } -diff -Naur mysql-5.0.27.orig/mysql-test/r/openssl_1.result mysql-5.0.27/mysql-test/r/openssl_1.result ---- mysql-5.0.27.orig/mysql-test/r/openssl_1.result 2006-10-20 20:36:44.000000000 -0400 -+++ mysql-5.0.27/mysql-test/r/openssl_1.result 2006-11-09 15:11:47.000000000 -0500 +diff -Naur mysql-5.0.33.orig/mysql-test/r/openssl_1.result mysql-5.0.33/mysql-test/r/openssl_1.result +--- mysql-5.0.33.orig/mysql-test/r/openssl_1.result 2007-01-09 08:09:32.000000000 -0500 ++++ mysql-5.0.33/mysql-test/r/openssl_1.result 2007-02-09 12:36:17.000000000 -0500 @@ -3,8 +3,8 @@ insert into t1 values (5); grant select on test.* to ssl_user1@localhost require SSL; @@ -64,9 +64,9 @@ diff -Naur mysql-5.0.27.orig/mysql-test/r/openssl_1.result mysql-5.0.27/mysql-te grant select on test.* to ssl_user5@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "xxx"; flush privileges; connect(localhost,ssl_user5,,test,MASTER_PORT,MASTER_SOCKET); -diff -Naur mysql-5.0.27.orig/mysql-test/t/openssl_1.test mysql-5.0.27/mysql-test/t/openssl_1.test ---- mysql-5.0.27.orig/mysql-test/t/openssl_1.test 2006-10-20 20:36:43.000000000 -0400 -+++ mysql-5.0.27/mysql-test/t/openssl_1.test 2006-11-09 15:10:29.000000000 -0500 +diff -Naur mysql-5.0.33.orig/mysql-test/t/openssl_1.test mysql-5.0.33/mysql-test/t/openssl_1.test +--- mysql-5.0.33.orig/mysql-test/t/openssl_1.test 2007-01-09 08:09:28.000000000 -0500 ++++ mysql-5.0.33/mysql-test/t/openssl_1.test 2007-02-09 12:36:17.000000000 -0500 @@ -10,8 +10,8 @@ grant select on test.* to ssl_user1@localhost require SSL; @@ -78,22 +78,22 @@ diff -Naur mysql-5.0.27.orig/mysql-test/t/openssl_1.test mysql-5.0.27/mysql-test grant select on test.* to ssl_user5@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "xxx"; flush privileges; -diff -Naur mysql-5.0.27.orig/vio/viosslfactories.c mysql-5.0.27/vio/viosslfactories.c ---- mysql-5.0.27.orig/vio/viosslfactories.c 2006-10-20 20:22:39.000000000 -0400 -+++ mysql-5.0.27/vio/viosslfactories.c 2006-11-09 16:02:14.000000000 -0500 -@@ -88,7 +88,7 @@ +diff -Naur mysql-5.0.33.orig/vio/viosslfactories.c mysql-5.0.33/vio/viosslfactories.c +--- mysql-5.0.33.orig/vio/viosslfactories.c 2007-01-09 07:51:28.000000000 -0500 ++++ mysql-5.0.33/vio/viosslfactories.c 2007-02-09 12:37:26.000000000 -0500 +@@ -87,7 +87,7 @@ + { DBUG_PRINT("error",("unable to get certificate from '%s'\n", cert_file)); - /* FIX stderr */ - fprintf(stderr,"Error when connection to server using SSL:"); + fprintf(stderr,"SSL error: "); - ERR_print_errors_fp(stderr); + DBUG_EXECUTE("error",ERR_print_errors_fp(stderr);); fprintf(stderr,"Unable to get certificate from '%s'\n", cert_file); fflush(stderr); DBUG_RETURN(1); -@@ -102,7 +102,7 @@ +@@ -100,7 +100,7 @@ + { DBUG_PRINT("error", ("unable to get private key from '%s'\n", key_file)); - /* FIX stderr */ - fprintf(stderr,"Error when connection to server using SSL:"); + fprintf(stderr,"SSL error: "); - ERR_print_errors_fp(stderr); + DBUG_EXECUTE("error",ERR_print_errors_fp(stderr);); fprintf(stderr,"Unable to get private key from '%s'\n", key_file); diff --git a/mysql-testing.patch b/mysql-testing.patch index a27256b..fc3e897 100644 --- a/mysql-testing.patch +++ b/mysql-testing.patch @@ -1,68 +1,47 @@ -This patch is needed to improve the probability that the MySQL tests pass -in Red Hat's build environment. The 32-bit and 64-bit variants of a single -architecture may be built on the same machine at the same time, so we have -to ensure that the tests use different port numbers on each arch, else they -will interfere with each other. Also, it's been observed that sometimes -the build environment fails to kill a test mysql daemon when a build is -stopped early due to build failure on another machine. To ensure subsequent -tests can succeed, kill off any such daemons. +Hack the top-level Makefile to enable the openssl regression tests. +(Why doesn't this happen automatically given the configure option??) -We also have to hack the top-level Makefile to enable the openssl regression -tests. (Why doesn't this happen automatically given the configure option??) - -Note: keep an eye on which version of "mysql-test-run" gets invoked by -the "make test" target. In the 4.1 branch this is now defaulting to the -perl script, but 5.0 is not (yet?) doing that; they also seem to be fooling -with a C-code version. Besides this patch, mysql-libtool.patch -would need to be changed to use either one. +Also, tweak the Perl test script so that the mysqld daemon gets detached +from the calling terminal session. Without this, the ssl_des test hangs up +because OpenSSL tries to read a PEM key from /dev/tty. -diff -Naur mysql-5.0.22.orig/Makefile.am mysql-5.0.22/Makefile.am ---- mysql-5.0.22.orig/Makefile.am 2006-05-25 04:56:41.000000000 -0400 -+++ mysql-5.0.22/Makefile.am 2006-06-10 13:13:34.000000000 -0400 -@@ -106,8 +106,8 @@ +diff -Naur mysql-5.0.33.orig/Makefile.am mysql-5.0.33/Makefile.am +--- mysql-5.0.33.orig/Makefile.am 2007-01-09 07:51:07.000000000 -0500 ++++ mysql-5.0.33/Makefile.am 2007-02-09 13:37:00.000000000 -0500 +@@ -121,8 +121,8 @@ test: cd mysql-test ; \ - ./mysql-test-run && \ - ./mysql-test-run --ps-protocol -+ ./mysql-test-run --with-openssl && \ -+ ./mysql-test-run --ps-protocol --with-openssl ++ ./mysql-test-run --ssl && \ ++ ./mysql-test-run --ps-protocol --ssl test-force: cd mysql-test; \ -diff -Naur mysql-5.0.22.orig/mysql-test/mysql-test-run.sh mysql-5.0.22/mysql-test/mysql-test-run.sh ---- mysql-5.0.22.orig/mysql-test/mysql-test-run.sh 2006-05-25 04:56:49.000000000 -0400 -+++ mysql-5.0.22/mysql-test/mysql-test-run.sh 2006-06-10 13:36:32.000000000 -0400 -@@ -252,6 +252,16 @@ - # 5.1 test run, even if different MTR_BUILD_THREAD is used. This means - # all port numbers might not be used in this version of the script. - # -+# hack to allow 32- and 64-bit tests to run concurrently on same build machine -+case `uname -m` in -+ ppc64 | s390x | x86_64) -+ MTR_BUILD_THREAD=7 -+ ;; -+ *) -+ MTR_BUILD_THREAD=11 -+ ;; -+esac -+ - if [ -n "$MTR_BUILD_THREAD" ] ; then - MASTER_MYPORT=`expr $MTR_BUILD_THREAD '*' 10 + 10000` - MYSQL_MANAGER_PORT=`expr $MASTER_MYPORT + 2` -@@ -265,6 +275,14 @@ - echo "Using NDBCLUSTER_PORT = $NDBCLUSTER_PORT" - fi +diff -Naur mysql-5.0.33.orig/mysql-test/lib/mtr_process.pl mysql-5.0.33/mysql-test/lib/mtr_process.pl +--- mysql-5.0.33.orig/mysql-test/lib/mtr_process.pl 2007-01-09 08:09:33.000000000 -0500 ++++ mysql-5.0.33/mysql-test/lib/mtr_process.pl 2007-02-09 13:36:05.000000000 -0500 +@@ -147,6 +147,9 @@ + # became a deamon as well, and was hard to kill ;-) + # Need to catch SIGCHLD and do waitpid or something instead...... -+# -+# If a previous build attempt failed it's possible that mysql daemons -+# launched by previous run of this script are still hanging around. -+# Kill 'em so we can re-use the ports. -+# -+ps auxww | grep "/sql/mysqld .*port=$MASTER_MYPORT" | awk '{print $2}' | xargs kill -+ps auxww | grep "/sql/mysqld .*port=$SLAVE_MYPORT" | awk '{print $2}' | xargs kill ++ # dunno, it works for me ... ++ POSIX::setsid(); + - NO_SLAVE=0 - USER_TEST= - FAILED_CASES= + $SIG{INT}= 'DEFAULT'; # Parent do some stuff, we don't + + my $log_file_open_mode = '>'; +diff -Naur mysql-5.0.33.orig/mysql-test/mysql-test-run.pl mysql-5.0.33/mysql-test/mysql-test-run.pl +--- mysql-5.0.33.orig/mysql-test/mysql-test-run.pl 2007-01-09 07:51:07.000000000 -0500 ++++ mysql-5.0.33/mysql-test/mysql-test-run.pl 2007-02-09 13:36:27.000000000 -0500 +@@ -3862,7 +3862,7 @@ + + if ( defined $exe ) + { +- $pid= mtr_spawn($exe, $args, "", ++ $pid= mtr_spawn($exe, $args, '/dev/null', + $mysqld->{'path_myerr'}, + $mysqld->{'path_myerr'}, + "", diff --git a/mysql.init b/mysql.init index fce6e34..4f37047 100644 --- a/mysql.init +++ b/mysql.init @@ -65,7 +65,7 @@ start(){ return $ret fi fi - chown -R mysql:mysql "$datadir" + chown mysql:mysql "$datadir" chmod 0755 "$datadir" # The reason for explicitly specifying --pid-file is that there may # be no such entry in my.cnf, and the default behavior will be to not diff --git a/mysql.spec b/mysql.spec index f164333..f8f77d2 100644 --- a/mysql.spec +++ b/mysql.spec @@ -1,5 +1,5 @@ Name: mysql -Version: 5.0.27 +Version: 5.0.33 Release: 1%{?dist} Summary: MySQL client programs and shared libraries. License: GPL @@ -18,7 +18,6 @@ Source5: my_config.h Source999: filter-requires-mysql.sh Patch1: mysql-libdir.patch Patch2: mysql-errno.patch -Patch3: mysql-libtool.patch Patch4: mysql-testing.patch Patch5: mysql-no-atomic.patch Patch6: mysql-rpl_ddl.patch @@ -26,6 +25,7 @@ Patch7: mysql-rpl-test.patch Patch8: mysql-install-test.patch Patch9: mysql-bdb-link.patch Patch10: mysql-ssl-bugs.patch +Patch11: mysql-y2007bug.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root Prereq: /sbin/ldconfig, /sbin/install-info, grep, fileutils, chkconfig @@ -110,7 +110,6 @@ the MySQL sources. %patch1 -p1 %patch2 -p1 -%patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 @@ -118,6 +117,7 @@ the MySQL sources. %patch8 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 libtoolize --force aclocal @@ -168,6 +168,17 @@ make %{?_smp_mflags} make 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) + MTR_BUILD_THREAD=7 + ;; + *) + MTR_BUILD_THREAD=11 + ;; + esac + export MTR_BUILD_THREAD + make test %endif @@ -250,7 +261,7 @@ fi %preun if [ $1 = 0 ]; then - /sbin/install-info --delete %{_infodir}/mysql.info.gz %{_infodir}/dir + /sbin/install-info --delete %{_infodir}/mysql.info.gz %{_infodir}/dir || : fi %preun server @@ -383,16 +394,16 @@ fi %{_mandir}/man1/mysql_zap.1* %{_mandir}/man1/mysqlbinlog.1.gz %{_mandir}/man1/mysqlcheck.1.gz -%{_mandir}/man1/mysqld.1* %{_mandir}/man1/mysqld_multi.1* %{_mandir}/man1/mysqld_safe.1* %{_mandir}/man1/mysqlhotcopy.1.gz %{_mandir}/man1/mysqlimport.1.gz %{_mandir}/man1/mysqlman.1.gz -%{_mandir}/man1/mysqlmanager.1.gz %{_mandir}/man1/perror.1* %{_mandir}/man1/replace.1* %{_mandir}/man1/safe_mysqld.1* +%{_mandir}/man1/my_print_defaults.1* +%{_mandir}/man1/mysql_tzinfo_to_sql.1* %{_mandir}/man8/mysqld.8* %{_mandir}/man8/mysqlmanager.8* @@ -422,6 +433,14 @@ fi %attr(-,mysql,mysql) %{_datadir}/mysql-test %changelog +* Fri Feb 9 2007 Tom Lane 5.0.33-1 +- Update to MySQL 5.0.33 +- Install band-aid fix for "view" regression test designed to fail after 2006 +- Don't chmod -R the entire database directory tree on every startup +Related: #221085 +- Fix unsafe use of install-info +Resolves: #223713 + * Thu Nov 9 2006 Tom Lane 5.0.27-1 - Update to MySQL 5.0.27 (see CVE-2006-4031, CVE-2006-4226, CVE-2006-4227) Resolves: #202247, #202675, #203427, #203428, #203432, #203434, #208641 diff --git a/sources b/sources index 28502fc..0b20e8c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -584d423440a9d9c859678e3d4f2690b3 mysql-5.0.27.tar.gz +10cb85276a1468c7906a4ff4dd565d61 mysql-5.0.33.tar.gz