List:Commits« Previous MessageNext Message »
From:tim Date:December 3 2007 10:48pm
Subject:bk commit into 5.1 tree (tsmith:1.2624) BUG#32679
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tsmith. When tsmith does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-12-03 15:48:27-07:00, tsmith@stripped +2 -0
  Bug #32679: mysqld_safe looks for errmsg.sys in wrong path
  
  The fix for bug 28544 moved our package data from ./share/mysql
  to ./share.  mysqld_safe had the old directory hard-coded.  The
  fix is to use the @pkgdatadir@ and @prefix@ values, to adapt to
  different ways of building the package.

  scripts/make_binary_distribution.sh@stripped, 2007-12-03 15:48:24-07:00, tsmith@stripped +2 -1
    Document that our build system explicitly overrides the @pkgfoo@ (e.g.,
    pkgdatadir, pkglibdir, etc.) variables when 'make' is called.

  scripts/mysqld_safe.sh@stripped, 2007-12-03 15:48:24-07:00, tsmith@stripped +12 -3
    Replace hard-coded "./share/mysql" with something like
    echo @pkgdatadir@ | sed -e s/^@prefix@//.
    
    Since the fix for bug 28544, this has been broken for mysql 5.1+,
    where the package data dir is "./share" instead of "./share/mysql".

diff -Nrup a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh
--- a/scripts/make_binary_distribution.sh	2007-10-01 10:40:40 -06:00
+++ b/scripts/make_binary_distribution.sh	2007-12-03 15:48:24 -07:00
@@ -23,7 +23,8 @@
 #  Note that the structure created by this script is slightly different from
 #  what a normal "make install" would produce. No extra "mysql" sub directory
 #  will be created, i.e. no "$prefix/include/mysql", "$prefix/lib/mysql" or
-#  "$prefix/share/mysql".
+#  "$prefix/share/mysql".  This is because the build system explicitly calls
+#  make with pkgdatadir=<datadir>, etc.
 #
 #  In GNU make/automake terms
 #
diff -Nrup a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
--- a/scripts/mysqld_safe.sh	2007-10-10 14:15:05 -06:00
+++ b/scripts/mysqld_safe.sh	2007-12-03 15:48:24 -07:00
@@ -200,16 +200,24 @@ parse_arguments() {
 
 #
 # First, try to find BASEDIR and ledir (where mysqld is)
-# 
+#
+
+if echo '@pkgdatadir@' | grep '^@prefix@' > /dev/null
+then
+  relpkgdata=`echo '@pkgdatadir@' | sed -e 's,^@prefix@,,' -e 's,^/,,' -e 's,^,./,'`
+else
+  # pkgdatadir is not relative to prefix
+  relpkgdata='@pkgdatadir@'
+fi
 
 MY_PWD=`pwd`
 # Check for the directories we would expect from a binary release install
-if test -f ./share/mysql/english/errmsg.sys -a -x ./bin/mysqld
+if test -f "$relpkgdata"/english/errmsg.sys -a -x ./bin/mysqld
 then
   MY_BASEDIR_VERSION=$MY_PWD		# Where bin, share and data are
   ledir=$MY_BASEDIR_VERSION/bin		# Where mysqld is
 # Check for the directories we would expect from a source install
-elif test -f ./share/mysql/english/errmsg.sys -a -x ./libexec/mysqld
+elif test -f "$relpkgdata"/english/errmsg.sys -a -x ./libexec/mysqld
 then
   MY_BASEDIR_VERSION=$MY_PWD		# Where libexec, share and var are
   ledir=$MY_BASEDIR_VERSION/libexec	# Where mysqld is
@@ -218,6 +226,7 @@ else
   MY_BASEDIR_VERSION=@prefix@
   ledir=@libexecdir@
 fi
+
 
 #
 # Second, try to find the data directory
Thread
bk commit into 5.1 tree (tsmith:1.2624) BUG#32679tim3 Dec