aboutsummaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorBernard Spil <brnrd@FreeBSD.org>2020-07-12 20:16:51 +0000
committerBernard Spil <brnrd@FreeBSD.org>2020-07-12 20:16:51 +0000
commit12a4e03e6a256968e414fbbe2fce40b071cad098 (patch)
tree20670a5da563fb25bd3e18271955bfcb02576dff /databases
parentf9a49d45b524808749b852c8fed66e22619863f3 (diff)
downloadports-12a4e03e6a256968e414fbbe2fce40b071cad098.tar.gz
ports-12a4e03e6a256968e414fbbe2fce40b071cad098.zip
databases/mariadb105-server: Unbreak runtime
* Align with mariadb104-server * PID must be in mysql owned dir PR: 247535 Reported by: VVD <vvd unislabs com>
Notes
Notes: svn path=/head/; revision=542103
Diffstat (limited to 'databases')
-rw-r--r--databases/mariadb105-server/Makefile34
-rw-r--r--databases/mariadb105-server/files/client.cnf.sample.in4
-rw-r--r--databases/mariadb105-server/files/my.cnf.sample.in2
-rw-r--r--databases/mariadb105-server/files/mysql-server.in6
-rw-r--r--databases/mariadb105-server/files/server.cnf.sample.in2
5 files changed, 28 insertions, 20 deletions
diff --git a/databases/mariadb105-server/Makefile b/databases/mariadb105-server/Makefile
index fa0e2da8c3a7..b3932ff60c2c 100644
--- a/databases/mariadb105-server/Makefile
+++ b/databases/mariadb105-server/Makefile
@@ -3,7 +3,7 @@
PORTNAME?= mariadb
PORTVERSION= 10.5.4
-PORTREVISION?= 0
+PORTREVISION?= 1
CATEGORIES= databases
MASTER_SITES= http://mirrors.supportex.net/${SITESDIR}/ \
http://mirror2.hs-esslingen.de/pub/Mirrors/${SITESDIR}/ \
@@ -41,6 +41,15 @@ SHEBANG_FILES= scripts/*.sh
SITESDIR= mariadb/mariadb-${PORTVERSION}/source
DOCSDIR= ${PREFIX}/share/doc/mysql
+MARIADB_USER?= mysql
+MARIADB_GROUP?= mysql
+MARIADB_RUNDIR?= /var/run/mysql
+MARIADB_SOCK?= mysql.sock
+MARIADB_LOGDIR?= /var/log/mysql
+
+USERS= ${MARIADB_USER}
+GROUPS= ${MARIADB_GROUP}
+
OPTIONS_SINGLE= GSSAPI
OPTIONS_SINGLE_GSSAPI= GSSAPI_BASE GSSAPI_HEIMDAL GSSAPI_MIT GSSAPI_NONE
OPTIONS_DEFAULT= GSSAPI_BASE
@@ -89,7 +98,7 @@ CMAKE_ARGS+= -DCMAKE_PREFIX_PATH=${PREFIX} \
-DINSTALL_SUPPORTFILESDIR="share/mysql" \
-DINSTALL_SYSCONFDIR="${ETCDIR}" \
-DINSTALL_SYSCONF2DIR="${ETCDIR}/conf.d" \
- -DINSTALL_UNIX_ADDRDIR="${MARIADB_RUNDIR}" \
+ -DINSTALL_UNIX_ADDRDIR="${MARIADB_RUNDIR}/${MARIADB_SOCK}" \
-DWITH_PCRE=system \
-DWITH_SSL="${OPENSSLBASE}" \
-DCURSES_CURSES_LIBRARY="/usr/lib/libcurses.so" \
@@ -107,12 +116,7 @@ DISABLED_PLUGINS+= AUTH_TEST_PLUGIN DAEMON_EXAMPLE DIALOG_EXAMPLES \
DATADIR= ${PREFIX}/share/mysql
ETCDIR= ${PREFIX}/etc/mysql
-MARIADB_RUNDIR?= /var/run/mysql
-MARIADB_LOGDIR?= /var/log/mysql
-MARIADB_USER?= mysql
-MARIADB_GROUP?= mysql
-
-CONFLICTS_INSTALL= mariadb10[0-35-9]-${PKGNAMESUFFIX:C/^[0-9]*-//}-* \
+CONFLICTS_INSTALL= mariadb10[0-46-9]-${PKGNAMESUFFIX:C/^[0-9]*-//}-* \
mysql[0-9]*-${PKGNAMESUFFIX:C/^[0-9]*-//}-* \
mysqlwsrep* \
percona[0-9]*-${PKGNAMESUFFIX:C/^[0-9]*-//}-*
@@ -123,11 +127,11 @@ GSSAPI_HEIMDAL_USES= gssapi:heimdal
GSSAPI_MIT_USES= gssapi:mit
GSSAPI_NONE_CMAKE_ON= -DPLUGIN_AUTH_GSSAPI_CLIENT=OFF
OPTIONS_SUB= yes
-
-PLIST_SUB+= MARIADB_USER="${MARIADB_USER}"
-PLIST_SUB+= MARIADB_GROUP="${MARIADB_GROUP}"
-PLIST_SUB+= MARIADB_RUNDIR="${MARIADB_RUNDIR}"
-PLIST_SUB+= MARIADB_LOGDIR="${MARIADB_LOGDIR}"
+SUB_LIST+= MARIADB_USER="${MARIADB_USER}" \
+ MARIADB_RUNDIR="${MARIADB_RUNDIR}" \
+ MARIADB_SOCK="${MARIADB_SOCK}"
+PLIST_SUB+= MARIADB_USER="${MARIADB_USER}" \
+ MARIADB_GROUP="${MARIADB_GROUP}"
.if ${PKGNAMESUFFIX:M*-client}
# MySQL-Client part
@@ -136,6 +140,7 @@ CMAKE_OFF+= WITH_WSREP
USES+= readline
USE_LDCONFIG= ${PREFIX}/lib/mysql
SUB_FILES+= my.cnf.sample client.cnf.sample
+PLIST_SUB+= MARIADB_RUNDIR="${MARIADB_RUNDIR}"
.else # ! ${PKGNAMESUFFIX:M*-client}
# MySQL-Server part
@@ -147,6 +152,9 @@ USE_RC_SUBR= mysql-server
CMAKE_ON+= CMAKE_SKIP_BUILD_RPATH WITH_EMBEDDED_SERVER
CMAKE_OFF+= WITH_CLIENT
SUB_FILES+= server.cnf.sample
+SUB_LIST+= MARIADB_GROUP="${MARIADB_GROUP}" \
+ MARIADB_LOGDIR="${MARIADB_LOGDIR}"
+PLIST_SUB+= MARIADB_LOGDIR="${MARIADB_LOGDIR}"
.for ENGINE in ${OPTIONS_GROUP_ENGINES:NINNOBASE}
${ENGINE}_CMAKE_OFF= -DPLUGIN_${ENGINE}=NO
diff --git a/databases/mariadb105-server/files/client.cnf.sample.in b/databases/mariadb105-server/files/client.cnf.sample.in
index f66262f2fefa..2513f6a04fb2 100644
--- a/databases/mariadb105-server/files/client.cnf.sample.in
+++ b/databases/mariadb105-server/files/client.cnf.sample.in
@@ -3,8 +3,8 @@
# Options specific to all client programs
[client]
-# port = 3306 # set in %%ETCDIR%%/my.cnf
-# socket = /var/run/mysql/mysql.sock # set in %%ETCDIR%%/my.cnf
+# port = 3306 # inherited from %%ETCDIR%%/my.cnf
+# socket = %%MARIADB_RUNDIR%%/%%MARIADB_SOCK%% # inherited from %%ETCDIR%%/my.cnf
# Options specific to MariaDB client programs
[client-mariadb]
diff --git a/databases/mariadb105-server/files/my.cnf.sample.in b/databases/mariadb105-server/files/my.cnf.sample.in
index 0426f1313556..15dbc7e64da8 100644
--- a/databases/mariadb105-server/files/my.cnf.sample.in
+++ b/databases/mariadb105-server/files/my.cnf.sample.in
@@ -5,7 +5,7 @@
#
[client-server]
port = 3306
-socket = %%MARIADB_RUNDIR%%/mysql.sock
+socket = %%MARIADB_RUNDIR%%/%%MARIADB_SOCK%%
#
# include *.cnf from the config directory
diff --git a/databases/mariadb105-server/files/mysql-server.in b/databases/mariadb105-server/files/mysql-server.in
index 3519e22a5550..4d0cafafa06a 100644
--- a/databases/mariadb105-server/files/mysql-server.in
+++ b/databases/mariadb105-server/files/mysql-server.in
@@ -34,13 +34,13 @@ load_rc_config $name
: ${mysql_enable="NO"}
%%LEGACY_LIMITS%%: ${mysql_limits="NO"}
-: ${mysql_user="%%MARIADB_USER"}
+: ${mysql_user="%%MARIADB_USER%%"}
%%LEGACY_LIMITS%%mysql_limits_args="-e -U ${mysql_user}"
: ${mysql_dbdir="/var/db/mysql"}
: ${mysql_optfile="%%ETCDIR%%/my.cnf"}
command="/usr/sbin/daemon"
-procname="%%PREFIX%%/libexec/mysqld"
+procname="%%PREFIX%%/libexec/mariadbd"
start_precmd="${name}_prestart"
start_postcmd="${name}_poststart"
@@ -92,7 +92,7 @@ else
done
exit 0
else
- mysql_pidfile=${mysql_pidfile:-"/var/run/mysqld.pid"}
+ mysql_pidfile=${mysql_pidfile:-"%%MARIADB_RUNDIR%%/mysqld.pid"}
fi
fi
diff --git a/databases/mariadb105-server/files/server.cnf.sample.in b/databases/mariadb105-server/files/server.cnf.sample.in
index 26a49f6236af..90687f4e1f63 100644
--- a/databases/mariadb105-server/files/server.cnf.sample.in
+++ b/databases/mariadb105-server/files/server.cnf.sample.in
@@ -19,7 +19,7 @@ bind-address = 127.0.0.1
basedir = %%PREFIX%%
datadir = /var/db/mysql
net_retry_count = 16384
-log_error = %%MARIADB_LOGDIR%%/${hostname}.err
+log_error = %%MARIADB_LOGDIR%%/mysqld.err
# [mysqld] configuration for ZFS
# From https://www.percona.com/resources/technical-presentations/zfs-mysql-percona-technical-webinar
# Create separate datasets for data and logs, eg