diff --git a/mysql-testing.patch b/mysql-testing.patch index 4236f32..a27256b 100644 --- a/mysql-testing.patch +++ b/mysql-testing.patch @@ -2,7 +2,10 @@ 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. +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. 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??) @@ -16,7 +19,7 @@ would need to be changed to use either one. 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-09 00:03:21.000000000 -0400 ++++ mysql-5.0.22/Makefile.am 2006-06-10 13:13:34.000000000 -0400 @@ -106,8 +106,8 @@ test: @@ -30,39 +33,36 @@ diff -Naur mysql-5.0.22.orig/Makefile.am mysql-5.0.22/Makefile.am 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-09 00:06:22.000000000 -0400 -@@ -252,6 +252,34 @@ ++++ 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 -+ i?86) -+ MTR_BUILD_THREAD=0 -+ ;; -+ x86_64) -+ MTR_BUILD_THREAD=1 -+ ;; -+ ia64) -+ MTR_BUILD_THREAD=2 -+ ;; -+ ppc) -+ MTR_BUILD_THREAD=3 -+ ;; -+ ppc64) -+ MTR_BUILD_THREAD=4 -+ ;; -+ s390) -+ MTR_BUILD_THREAD=5 -+ ;; -+ s390x) -+ MTR_BUILD_THREAD=6 ++ ppc64 | s390x | x86_64) ++ MTR_BUILD_THREAD=7 + ;; + *) -+ 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 + ++# ++# 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 ++ + NO_SLAVE=0 + USER_TEST= + FAILED_CASES= diff --git a/mysql.spec b/mysql.spec index bbf3d77..d983bcd 100644 --- a/mysql.spec +++ b/mysql.spec @@ -1,6 +1,6 @@ Name: mysql Version: 5.0.22 -Release: 1 +Release: 2 Summary: MySQL client programs and shared libraries. License: GPL Group: Applications/Databases @@ -414,6 +414,10 @@ fi %attr(-,mysql,mysql) %{_datadir}/mysql-test %changelog +* Sat Jun 10 2006 Tom Lane 5.0.22-2 +- Work around brew's tendency not to clean up failed builds completely, + by adding code in mysql-testing.patch to kill leftover mysql daemons. + * Thu Jun 8 2006 Tom Lane 5.0.22-1 - Update to MySQL 5.0.22 (fixes CVE-2006-2753) - Install temporary workaround for gcc bug on s390x (bz #193912)