From 719d62a3dd3e77857d373366311cb5449e492573 Mon Sep 17 00:00:00 2001
From: Jonathan Perkin <jonathan.perkin@oracle.com>
Date: Wed, 31 Mar 2010 12:04:21 +0200
Subject: [PATCH] Fix socket path in RPMs.  XXX should be put into cmake/*
 somewhere.

---
 support-files/mysql.spec.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh
index 8c51cff0929..b31c7551951 100644
--- a/support-files/mysql.spec.sh
+++ b/support-files/mysql.spec.sh
@@ -372,16 +372,20 @@ mkdir debug
                   -e 's/ -ip / /' \
                   -e 's/^ //' \
                   -e 's/ $//'`
+  # XXX: MYSQL_UNIX_ADDR should be in cmake/* but mysql_version is included before
+  # XXX: install_layout so we can't just set it based on INSTALL_LAYOUT=RPM
   ${CMAKE} ../%{src_dir} -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM \
-           -DCMAKE_BUILD_TYPE=Debug
+           -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" -DCMAKE_BUILD_TYPE=Debug
   make VERBOSE=1 mysqld mysqlserver
 )
 # Build full release
 mkdir release
 (
   cd release
+  # XXX: MYSQL_UNIX_ADDR should be in cmake/* but mysql_version is included before
+  # XXX: install_layout so we can't just set it based on INSTALL_LAYOUT=RPM
   ${CMAKE} ../%{src_dir} -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM \
-           -DCMAKE_BUILD_TYPE=RelWithDebInfo
+           -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" -DCMAKE_BUILD_TYPE=RelWithDebInfo
   make VERBOSE=1
 )