mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
Upgrade to version 5.2.10:
* Introduce a PAM authentication plugin * Various bug fixes For the rc.d script, add the ability to run multiple instances PR: ports/161883 Submitted by: Geoffroy Desvernay <dgeo@centrale-marseille.fr> (maintainer)
This commit is contained in:
parent
8883a7f87a
commit
ec129af2cb
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=288535
5 changed files with 85 additions and 11 deletions
|
@ -5,7 +5,7 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= mariadb
|
||||
PORTVERSION= 5.2.9
|
||||
PORTVERSION= 5.2.10
|
||||
PORTREVISION?= 0
|
||||
CATEGORIES= databases ipv6
|
||||
MASTER_SITES= http://www.percona.com/downloads/MariaDB/${PORTNAME}-${PORTVERSION}/kvm-tarbake-jaunty-x86/ \
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
SIZE (mariadb-5.2.9.tar.gz) = 25107185
|
||||
SHA256 (mariadb-5.2.9.tar.gz) = 6ef38be1d6f1fe7b1b99b9d6ddf5ac46cd7d0c05cb2a5088a7ec294e62fbd611
|
||||
SIZE (mariadb-5.2.10.tar.gz) = 25242675
|
||||
SHA256 (mariadb-5.2.10.tar.gz) = dbcbd4f627fa7a045094fe5e1b0d27201966937d0135e54ca892fb5ab912d7b3
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
# Base database directory.
|
||||
# mysql_args (str): Custom additional arguments to be passed
|
||||
# to mysqld_safe (default empty).
|
||||
# mysql_instances (str): Set to "" by default.
|
||||
# If defined, list of instances to enable
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
|
@ -26,32 +28,86 @@ load_rc_config $name
|
|||
|
||||
: ${mysql_enable="NO"}
|
||||
: ${mysql_limits="NO"}
|
||||
: ${mysql_user="mysql"}
|
||||
: ${mysql_dbdir="/var/db/mysql"}
|
||||
|
||||
mysql_user="mysql"
|
||||
mysql_limits_args="-e -U ${mysql_user}"
|
||||
pidfile="${mysql_dbdir}/`/bin/hostname`.pid"
|
||||
command="/usr/sbin/daemon"
|
||||
command_args="-c -f %%PREFIX%%/bin/mysqld_safe --defaults-extra-file=${mysql_dbdir}/my.cnf --user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysql_args}"
|
||||
procname="%%PREFIX%%/libexec/mysqld"
|
||||
start_precmd="${name}_prestart"
|
||||
start_postcmd="${name}_poststart"
|
||||
|
||||
if [ -n "$2" ]; then
|
||||
instance="$2"
|
||||
load_rc_config ${name}_${instance}
|
||||
case "$mysql_instances" in
|
||||
"$2 "*|*" $2 "*|*" $2"|"$2")
|
||||
eval _args="\${mysql_${instance}_args:-\"${mysql_args}\"}"
|
||||
eval _dbdir="\${mysql_${instance}_dbdir:-\"/var/db/mysql_${instance}\"}"
|
||||
eval _limits="\${mysql_${instance}_limits:-\"${mysql_limits}\"}"
|
||||
eval _user="\${mysql_${instance}_user:-\"${mysql_user}\"}"
|
||||
eval _limits_args="\${mysql_${instance}_limits_args:-\"${mysql_limits_args}\"}"
|
||||
[ -z "$_limits_args" ] && eval _limits_args=\"-e -U $_user\"
|
||||
pidfile="${_dbdir}/`/bin/hostname`.pid"
|
||||
;;
|
||||
*)
|
||||
err 1 "$2 not found in mysql_instances" ;;
|
||||
esac
|
||||
else
|
||||
if [ -n "${mysql_instances}" -a -n "$1" ]; then
|
||||
for instance in ${mysql_instances}; do
|
||||
eval _enable="\${mysql_${instance}_enable}"
|
||||
case "${_enable:-${mysql_enable}}" in
|
||||
[Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0)
|
||||
continue
|
||||
;;
|
||||
[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
|
||||
;;
|
||||
*)
|
||||
if [ -z "$_enable" ]; then
|
||||
_var=mysql_enable
|
||||
else
|
||||
_var=mysql_${instance}_enable
|
||||
fi
|
||||
warn "Bad value" \
|
||||
"'${_enable:-${mysql_enable}}'" \
|
||||
"for ${_var}. " \
|
||||
"Instance ${instance} skipped."
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
echo "===> mysql instance: ${instance}"
|
||||
if %%PREFIX%%/etc/rc.d/mysql-server $1 ${instance}; then
|
||||
success="${instance} ${success}"
|
||||
else
|
||||
failed="${instance} (${retcode}) ${failed}"
|
||||
fi
|
||||
done
|
||||
exit 0
|
||||
else
|
||||
pidfile="${mysql_dbdir}/`/bin/hostname`.pid"
|
||||
_dbdir="/var/db/mysql"
|
||||
_user="mysql"
|
||||
_limits_args="-e -U ${_user}"
|
||||
fi
|
||||
fi
|
||||
|
||||
mysql_install_db="%%PREFIX%%/bin/mysql_install_db"
|
||||
mysql_install_db_args="--ldata=${mysql_dbdir}"
|
||||
mysql_install_db_args="--ldata=${_dbdir}"
|
||||
command_args="-c -f %%PREFIX%%/bin/mysqld_safe --defaults-extra-file=${_dbdir}/my.cnf --user=${_user} --datadir=${_dbdir} --pid-file=${pidfile} ${_args}"
|
||||
|
||||
mysql_create_auth_tables()
|
||||
{
|
||||
eval $mysql_install_db $mysql_install_db_args >/dev/null 2>/dev/null
|
||||
[ $? -eq 0 ] && chown -R ${mysql_user}:${mysql_user} ${mysql_dbdir}
|
||||
[ $? -eq 0 ] && chown -R ${_user}:${_user} ${_dbdir}
|
||||
}
|
||||
|
||||
mysql_prestart()
|
||||
{
|
||||
if [ ! -d "${mysql_dbdir}/mysql/." ]; then
|
||||
if [ ! -d "${_dbdir}/mysql/." ]; then
|
||||
mysql_create_auth_tables || return 1
|
||||
fi
|
||||
if checkyesno mysql_limits; then
|
||||
eval `/usr/bin/limits ${mysql_limits_args}` 2>/dev/null
|
||||
eval `/usr/bin/limits $_limits_args` 2>/dev/null
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
--- plugin/auth_pam/auth_pam.c.orig 2012-01-04 14:17:30.000000000 +0100
|
||||
+++ plugin/auth_pam/auth_pam.c 2012-01-04 14:17:36.000000000 +0100
|
||||
@@ -1,7 +1,6 @@
|
||||
#include <mysql/plugin_auth.h>
|
||||
#include <string.h>
|
||||
#include <security/pam_appl.h>
|
||||
-#include <security/pam_modules.h>
|
||||
|
||||
struct param {
|
||||
unsigned char buf[10240], *ptr;
|
|
@ -96,10 +96,18 @@ lib/mysql/libmysys.a
|
|||
%%NDB%%lib/mysql/libndbclient.so
|
||||
%%NDB%%lib/mysql/libndbclient.so.3
|
||||
lib/mysql/libvio.a
|
||||
%%STATIC%%lib/mysql/plugin/auth_pam.a
|
||||
%%STATIC%%lib/mysql/plugin/auth_pam.la
|
||||
%%STATIC%%lib/mysql/plugin/auth_pam.so
|
||||
%%STATIC%%lib/mysql/plugin/auth_pam.so.0
|
||||
%%STATIC%%lib/mysql/plugin/dialog.a
|
||||
%%STATIC%%lib/mysql/plugin/dialog.la
|
||||
%%STATIC%%lib/mysql/plugin/dialog.so
|
||||
%%STATIC%%lib/mysql/plugin/dialog.so.0
|
||||
%%STATIC%%lib/mysql/plugin/feedback.a
|
||||
%%STATIC%%lib/mysql/plugin/feedback.la
|
||||
%%STATIC%%lib/mysql/plugin/feedback.so
|
||||
%%STATIC%%lib/mysql/plugin/feedback.so.0
|
||||
%%STATIC%%%%ARCHIVE%%lib/mysql/plugin/ha_archive.a
|
||||
%%STATIC%%%%ARCHIVE%%lib/mysql/plugin/ha_archive.la
|
||||
%%STATIC%%%%ARCHIVE%%lib/mysql/plugin/ha_archive.so
|
||||
|
|
Loading…
Add table
Reference in a new issue