summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortimothy.smith@sun.com <>2009-09-29 08:58:32 +0200
committerMySQL Build Team <build@mysql.com>2009-09-29 08:58:32 +0200
commitd86e8b7c64567bd475ab840be6e4ac28ac069234 (patch)
treec76cc4d55536a837e4dac5bd0eac6de1a7116656
parent768f2cdb6a7be8a747495bc9c4fad74d22346c5d (diff)
downloadmariadb-git-d86e8b7c64567bd475ab840be6e4ac28ac069234.tar.gz
make_binary_distribution and mysql.spec: add options to copy a shared library, for use by mysqld_safe, into pkglibdir during package creation
-rw-r--r--scripts/make_binary_distribution.sh8
-rw-r--r--support-files/mysql.spec.sh11
2 files changed, 19 insertions, 0 deletions
diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh
index bf22267cf42..27fe2acb447 100644
--- a/scripts/make_binary_distribution.sh
+++ b/scripts/make_binary_distribution.sh
@@ -64,6 +64,7 @@ cflags="@CFLAGS@"
STRIP=1 # Option ignored
SILENT=0
+MALLOC_LIB=
PLATFORM=""
TMP=/tmp
NEW_NAME="" # Final top directory and TAR package name
@@ -76,6 +77,7 @@ for arg do
--tmp=*) TMP=`echo "$arg" | sed -e "s;--tmp=;;"` ;;
--suffix=*) SUFFIX=`echo "$arg" | sed -e "s;--suffix=;;"` ;;
--short-product-tag=*) SHORT_PRODUCT_TAG=`echo "$arg" | sed -e "s;--short-product-tag=;;"` ;;
+ --inject-malloc-lib=*) MALLOC_LIB=`echo "$arg" | sed -e 's;^[^=]*=;;'` ;;
--no-strip) STRIP=0 ;;
--machine=*) machine=`echo "$arg" | sed -e "s;--machine=;;"` ;;
--platform=*) PLATFORM=`echo "$arg" | sed -e "s;--platform=;;"` ;;
@@ -293,6 +295,12 @@ if [ x"$BASE_SYSTEM" != x"netware" ] ; then
fi
fi
+ # If requested, add a malloc library .so into pkglibdir for use
+ # by mysqld_safe
+ if [ -n "$MALLOC_LIB" ]; then
+ cp "$MALLOC_LIB" '@pkglibdir@'
+ fi
+
# FIXME let this script be in "bin/", where it is in the RPMs?
# http://dev.mysql.com/doc/refman/5.1/en/mysql-install-db-problems.html
mkdir $DEST/scripts
diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh
index 02561a2551d..6fd8929266e 100644
--- a/support-files/mysql.spec.sh
+++ b/support-files/mysql.spec.sh
@@ -448,6 +448,13 @@ $MBD/libtool --mode=execute install -m 755 \
$RPM_BUILD_DIR/mysql-%{mysql_version}/mysql-debug-%{mysql_version}/sql/mysqld \
$RBR%{_sbindir}/mysqld-debug
+%if %{?malloc_lib_target:1}%{!?malloc_lib_target:0}
+# Even though this is a shared library, put it under /usr/lib/mysql, so it
+# doesn't conflict with possible shared lib by the same name in /usr/lib. See
+# `mysql_config --variable=pkglibdir` and mysqld_safe for how this is used.
+install -m 644 "%{malloc_lib_source}" "$RBR%{_libdir}/mysql/%{malloc_lib_target}"
+%endif
+
# install saved perror binary with NDB support (BUG#13740)
install -m 755 $MBD/extra/perror $RBR%{_bindir}/perror
@@ -703,6 +710,10 @@ fi
%attr(755, root, root) %{_libdir}/plugin/*.so*
+%if %{?malloc_lib_target:1}%{!?malloc_lib_target:0}
+%attr(644, root, root) %{_libdir}/mysql/%{malloc_lib_target}
+%endif
+
%attr(755, root, root) %{_sbindir}/mysqld
%attr(755, root, root) %{_sbindir}/mysqld-debug
%attr(755, root, root) %{_sbindir}/rcmysql