summaryrefslogtreecommitdiff
path: root/support-files
diff options
context:
space:
mode:
authorJoerg Bruehe <joerg.bruehe@oracle.com>2011-08-19 18:48:14 +0200
committerJoerg Bruehe <joerg.bruehe@oracle.com>2011-08-19 18:48:14 +0200
commitb2648c9036058ae323ca032f3b09a91270405b6e (patch)
tree7f655a943103eed40067c5d86ff021ebad13e688 /support-files
parent72daf267dfba221caafbe3ace0cf36587a2d9b27 (diff)
downloadmariadb-git-b2648c9036058ae323ca032f3b09a91270405b6e.tar.gz
Fix bug#37165 "((Generic rpm)) fail to install on Fedora 9 x86_64"
On Fedora, certain accesses to "/var/lib/mysql/HOSTNAME.err" were blocked by SELinux policy, this made the server start fail with the message Manager of pid-file quit without updating file Calling "/sbin/restorecon -R /var/lib/mysql" fixes this.
Diffstat (limited to 'support-files')
-rw-r--r--support-files/mysql.spec.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh
index 006dea45e64..28f2b0f773a 100644
--- a/support-files/mysql.spec.sh
+++ b/support-files/mysql.spec.sh
@@ -382,7 +382,7 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \
--enable-local-infile \
--with-fast-mutexes \
--with-mysqld-user=%{mysqld_user} \
- --with-unix-socket-path=/var/lib/mysql/mysql.sock \
+ --with-unix-socket-path=%{mysqldatadir}/mysql.sock \
--with-pic \
--prefix=/ \
%if %{CLUSTER_BUILD}
@@ -858,6 +858,13 @@ chown -R %{mysqld_user}:%{mysqld_group} $mysql_datadir
# ----------------------------------------------------------------------
chmod -R og-rw $mysql_datadir/mysql
+# ----------------------------------------------------------------------
+# Deal with SELinux, if it is installed / used
+# ----------------------------------------------------------------------
+if [ -x /sbin/restorecon ] ; then
+ /sbin/restorecon -R %{mysqldatadir}
+fi
+
# Was the server running before the upgrade? If so, restart the new one.
if [ "$SERVER_TO_START" = "true" ] ; then
# Restart in the same way that mysqld will be started normally.
@@ -1165,6 +1172,15 @@ fi
# merging BK trees)
##############################################################################
%changelog
+* Fri Aug 19 2011 Joerg Bruehe <joerg.bruehe@oracle.com>
+
+- Fix bug#37165 "((Generic rpm)) fail to install on Fedora 9 x86_64"
+ On Fedora, certain accesses to "/var/lib/mysql/HOSTNAME.err" were blocked
+ by SELinux policy, this made the server start fail with the message
+ Manager of pid-file quit without updating file
+ Calling "/sbin/restorecon -R /var/lib/mysql" fixes this.
+- Replace occurrences of that path name by the spec file variable %{mysqldatadir}.
+
* Thu Jul 07 2011 Joerg Bruehe <joerg.bruehe@oracle.com>
- Fix bug#45415: "rpm upgrade recreates test database"