File obs-server-2.9-0015-api-Specify-mysqld-pidfile-explicitly-for-api-test.patch of Package obs-server

From 41dfee13690541ebc7bd0bc438005ff006a56e4b Mon Sep 17 00:00:00 2001
From: Oleg Girko <ol@infoserver.lv>
Date: Thu, 30 Jun 2016 02:41:14 +0100
Subject: [PATCH] [api] Specify mysqld pidfile explicitly for api test.

This is needed at least for mariadb in Fedora because otherwise
it unsuccessfully tries to create default pidfile and fails
because of lack of permissions.
As a result, mysqld startup fails completely.

Signed-off-by: Oleg Girko <ol@infoserver.lv>
---
 src/api/script/api_test_in_spec.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/api/script/api_test_in_spec.sh b/src/api/script/api_test_in_spec.sh
index fff0592782..0d85e1462e 100755
--- a/src/api/script/api_test_in_spec.sh
+++ b/src/api/script/api_test_in_spec.sh
@@ -55,7 +55,7 @@ rm -rf $MYSQL_DATADIR $MYSQL_SOCKET
 mkdir -p $MYSQL_BASEDIR
 chown -R $MYSQLD_USER $MYSQL_BASEDIR
 mysql_install_db --user=$MYSQLD_USER --datadir=$MYSQL_DATADIR
-$MYSQL_SERVER --user=$MYSQLD_USER --datadir=$MYSQL_DATADIR --skip-networking --socket=$MYSQL_SOCKET &
+$MYSQL_SERVER --user=$MYSQLD_USER --datadir=$MYSQL_DATADIR --skip-networking --socket=$MYSQL_SOCKET --pid-file=$TEMP_DIR/mysqld.pid &
 sleep 2
 
 ##################### api
-- 
2.20.1