diff --git a/CHANGES b/CHANGES --- a/CHANGES +++ b/CHANGES @@ -10,6 +10,29 @@ All ports committers are allowed to commit to this file. +20240228: +AUTHOR: tcberner@FreeBSD.org + + Simplify and improve the mysql/mariadb ports and packages. + + Changes: + * only one client port for each provider: + - databases/mysql-client + - databases/mariadb-client + * servers install to ${LOCALBASE}/${provider}${version} + * new default version MYSQL_CLIENT_DEFAULT=mysql|mariadb + * mysql.mk only adds run or build depends on ${MYSQL_CLIENT_DEFAULT} + + The greatest benefit of this is, that one can have multiple + mysql/mariadb servers installed at once; which makes migrations + to never server versions finally easier. + + The respective client ports should be kept at the version of the latest + provided server package. So if there is a databases/mysql82-server port + in the future, databases/mysql-client should be updated to use that one. + + Note: the clients are backwards compatible. + 20230111: AUTHOR: bapt@FreeBSD.org diff --git a/MOVED b/MOVED --- a/MOVED +++ b/MOVED @@ -2988,3 +2988,8 @@ graphics/rayshade||2024-02-10|Has expired: Defunct upstream with last release in 1992 graphics/urt||2024-02-11|Has expired: Defunct upstream security/sssd-devel|security/sssd2|2024-11-01|Port is stable +databases/mysql80-client|databases/mysql-client|2024-02-28|Make only one client port available +databases/mysql81-client|databases/mysql-client|2024-02-28|Make only one client port available +databases/mariadb105-client|databases/mariadb-client|2024-02-28|Make only one client port available +databases/mariadb106-client|databases/mariadb-client|2024-02-28|Make only one client port available +databases/mariadb1011-client|databases/mariadb-client|2024-02-28|Make only one client port available diff --git a/Mk/Uses/mysql.mk b/Mk/Uses/mysql.mk --- a/Mk/Uses/mysql.mk +++ b/Mk/Uses/mysql.mk @@ -1,145 +1,38 @@ # Provide support for MySQL # Feature: mysql -# Usage: USES=mysql or USES=mysql:args -# Valid ARGS: , client, server +# Usage: USES=mysql[:args] +# Valid ARGS: depends # -# version If no version is given (by the maintainer via the port), try to -# find the currently installed version. Fall back to default if -# necessary (MySQL-8.0 = 80, look at bsd.default-versions.mk for -# possible values). -# client Depends on the libmysqlclient library (default) -# server Depend on the server at run/build time. If none of these is -# set, depends on the client. -# -# IGNORE_WITH_MYSQL -# This variable can be defined if the ports does not support one -# or more versions of MySQL. -# WITH_MYSQL_VER -# User defined variable to set MySQL version. -# MYSQL_VER -# Detected MySQL version. +# depends: * run +# * build # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_MYSQL_MK) _INCLUDE_USES_MYSQL_MK= yes -. if !empty(mysql_ARGS) -.undef _WANT_MYSQL_VER -.undef _WANT_MYSQL_SERVER -_MYSQL_ARGS= ${mysql_ARGS:S/,/ /g} -. if ${_MYSQL_ARGS:Mserver} -_WANT_MYSQL_SERVER= yes -_MYSQL_ARGS:= ${_MYSQL_ARGS:Nserver} -. endif -. if ${_MYSQL_ARGS:Mclient} -_WANT_MYSQL_CLIENT= yes -_MYSQL_ARGS:= ${_MYSQL_ARGS:Nclient} -. endif - -# Port requested a version -. if !empty(_MYSQL_ARGS) -_WANT_MYSQL_VER= ${_MYSQL_ARGS} -. if (${_WANT_MYSQL_VER:C/[0-9]*//} == "m") -_WANT_MYSQL_FLAVOUR= mariadb -. else -_WANT_MYSQL_FLAVOUR= mysql -. endif +_mysql_depends= run build +. for _arg in ${mysql_ARGS:O:u} +. if empty(_mysql_depends:M${_arg}) +IGNORE= "Invalid argument 'mysql:${_arg}'. Only '${_mysql_depends}' are supported." . endif -. endif # !empty(mysql_ARGS) - -. if defined(DEFAULT_MYSQL_VER) -WARNING+= "DEFAULT_MYSQL_VER is defined, consider using DEFAULT_VERSIONS=mysql=${DEFAULT_MYSQL_VER} instead" -. endif - -DEFAULT_MYSQL_VER?= ${MYSQL_DEFAULT:S/.//} -# MySQL client version currently supported. -# When adding a version, please keep the comment in -# Mk/bsd.default-versions.mk in sync. -MYSQL80_LIBVER= 21 -MYSQL81_LIBVER= 22 -. for v in 5 6 11 -MYSQL10${v}m_LIBVER= 3 . endfor -# Setting/finding MySQL version we want. -. if exists(${LOCALBASE}/bin/mysql) -_MYSQL!= ${LOCALBASE}/bin/mysql_config --version | ${SED} -e 's/\([0-9]\{1,2\}\)\.\([0-9]*\).*/\1\2/' -_MARIADB!= ${LOCALBASE}/bin/mysql --version | ${GREP} MariaDB | wc -l - -. if ${_MARIADB} == 1 -_MYSQL_VER= ${_MYSQL}m -_MYSQL_FLAVOUR= mariadb -. else -_MYSQL_VER= ${_MYSQL} -_MYSQL_FLAVOUR= mysql -. endif -. endif - -. if defined(_WANT_MYSQL_VER) -. if defined(WITH_MYSQL_VER) && (${WITH_MYSQL_VER:C/[0-9]*//} == "m") -WITH_MYSQL_FLAVOUR= mariadb -. else -WITH_MYSQL_FLAVOUR= mysql -. endif -. if defined(WITH_MYSQL_VER) && ${WITH_MYSQL_VER} != ${_WANT_MYSQL_VER} -IGNORE= cannot install: the port wants ${_WANT_MYSQL_FLAVOUR}${_WANT_MYSQL_VER:C/[m]//}-client and you try to install ${WITH_MYSQL_FLAVOUR}${WITH_MYSQL_VER:C/[m]//}-client -. endif -MYSQL_VER= ${_WANT_MYSQL_VER} -. elif defined(WITH_MYSQL_VER) -MYSQL_VER= ${WITH_MYSQL_VER} -. else -. if defined(_MYSQL_VER) -MYSQL_VER= ${_MYSQL_VER} -. else -MYSQL_VER= ${DEFAULT_MYSQL_VER} +_mysql_depend= # +. for _depend in ${_mysql_depends:O:u} +. if ${mysql_ARGS:M${_depend}} +_mysql_depend+= ${_depend} . endif -. endif # _WANT_MYSQL_VER - -. if ${MYSQL_VER:C/[0-9]*//} == "m" -MYSQL_FLAVOUR= mariadb -. else -MYSQL_FLAVOUR= mysql -. endif - -. if defined(_MYSQL_VER) -. if ${_MYSQL_VER} != ${MYSQL_VER} -IGNORE= cannot install: MySQL versions mismatch: ${_MYSQL_FLAVOUR}${_MYSQL_VER:C/[m]//}-client is installed and wanted version is ${MYSQL_FLAVOUR}${MYSQL_VER:C/[m]//}-client -. endif -. endif - -_MYSQL_SHLIB= libmysqlclient -. if (${MYSQL_VER:C/[0-9]*//} == "m") -_MYSQL_SERVER_FLAVOUR= mariadb -_MYSQL_CLIENT_FLAVOUR= mariadb -. if ${MYSQL_VER:C/m//} >= 105 -_MYSQL_SHLIB= libmariadb -. endif -. else -_MYSQL_SERVER_FLAVOUR= mysql -_MYSQL_CLIENT_FLAVOUR= mysql +. endfor +. if empty(_mysql_depend) +_mysql_depend= run . endif -_MYSQL_CLIENT= databases/${_MYSQL_CLIENT_FLAVOUR}${MYSQL_VER:C/[m]//}-client -_MYSQL_SERVER= databases/${_MYSQL_SERVER_FLAVOUR}${MYSQL_VER:C/[m]//}-server - -# And now we are checking if we can use it -. if defined(MYSQL${MYSQL_VER}_LIBVER) -. if defined(IGNORE_WITH_MYSQL) -. for VER in ${IGNORE_WITH_MYSQL} -. if (${MYSQL_VER} == "${VER}") -IGNORE= cannot install: does not work with MySQL version ${MYSQL_VER} (MySQL ${IGNORE_WITH_MYSQL} not supported) -. endif -. endfor -. endif # IGNORE_WITH_MYSQL -. if defined(_WANT_MYSQL_SERVER) -RUN_DEPENDS+= ${LOCALBASE}/libexec/mysqld:${_MYSQL_SERVER} -. endif -. if defined(_WANT_MYSQL_CLIENT) || !defined(_WANT_MYSQL_SERVER) -LIB_DEPENDS+= ${_MYSQL_SHLIB}.so.${MYSQL${MYSQL_VER}_LIBVER}:${_MYSQL_CLIENT} -. endif -. else -IGNORE= cannot install: unknown MySQL version: ${MYSQL_VER} -. endif # Check for correct libs +# chose the client's origin by setting MYSQL_CLIENT_DEFAULT to either mysql or mariadb +_MYSQL_CLIENT_DEPENDS= mysql:databases/${MYSQL_CLIENT_DEFAULT}-client +# === Dependency handling +. for _depend in ${_mysql_depend} +${_depend:tu}_DEPENDS+= ${_MYSQL_CLIENT_DEPENDS} +. endfor .endif diff --git a/Mk/bsd.default-versions.mk b/Mk/bsd.default-versions.mk --- a/Mk/bsd.default-versions.mk +++ b/Mk/bsd.default-versions.mk @@ -19,7 +19,7 @@ . for lang in APACHE BDB COROSYNC EBUR128 EMACS FIREBIRD FORTRAN FPC GCC \ GHOSTSCRIPT GL GO GUILE IMAGEMAGICK JAVA LAZARUS LIBRSVG2 LINUX LLVM \ - LUA LUAJIT MONO MYSQL NINJA NODEJS OPENLDAP PERL5 PGSQL PHP \ + LUA LUAJIT MONO MYSQL_CLIENT NINJA NODEJS OPENLDAP PERL5 PGSQL PHP \ PYCRYPTOGRAPHY PYTHON PYTHON2 RUBY RUST SAMBA SSL TCLTK VARNISH . if defined(${lang}_DEFAULT) ERROR+= "The variable ${lang}_DEFAULT is set and it should only be defined through DEFAULT_VERSIONS+=${lang:tl}=${${lang}_DEFAULT} in /etc/make.conf" @@ -101,8 +101,8 @@ . endif # Possible values: 5.10, 5.20, 6.8 MONO_DEFAULT?= 5.20 -# Possible values: 8.0, 8.1, 10.5m, 10.6m, 10.11m -MYSQL_DEFAULT?= 8.0 +# Possible values: mysql mariadb +MYSQL_CLIENT_DEFAULT?= mysql # Possible values: ninja, samurai NINJA_DEFAULT?= ninja # Possible value: 16, 18, 20, 21, current, lts (Note: current = 21 and lts = 20) diff --git a/UPDATING b/UPDATING --- a/UPDATING +++ b/UPDATING @@ -5,6 +5,14 @@ You should get into the habit of checking this file for changes each time you update your ports collection, before attempting any port upgrades. +20240228: + AFFECTS: users of databases/mysql*-server, databases/mariadb*-server + AUTHOR: tcberner@FreeBSD.org + + The mysql and mariadb servers now install into a prefix. This makes + them co-installable. The rc-files have been renamed, so rc.conf + needs to be updated to reflect that. + 20231229: AFFECTS: users of databases/tarantool AUTHOR: arrowd@FreeBSD.org diff --git a/benchmarks/sysbench/Makefile b/benchmarks/sysbench/Makefile --- a/benchmarks/sysbench/Makefile +++ b/benchmarks/sysbench/Makefile @@ -25,7 +25,7 @@ LFS_CONFIGURE_ENABLE= largefile MYSQL_CONFIGURE_WITH= mysql -MYSQL_USES= mysql +MYSQL_USES= mysql:build,run PGSQL_CONFIGURE_WITH= pgsql PGSQL_USES= pgsql diff --git a/cad/camotics/Makefile b/cad/camotics/Makefile --- a/cad/camotics/Makefile +++ b/cad/camotics/Makefile @@ -28,7 +28,7 @@ GH_ACCOUNT= CauldronDevelopmentLLC USES= compiler:c++14-lang desktop-file-utils gettext-runtime gl gnome \ - localbase:ldflags mysql:client pkgconfig python qt:5 scons \ + localbase:ldflags mysql pkgconfig python qt:5 scons \ shared-mime-info shebangfix sqlite ssl SHEBANG_FILES= examples/python/camotics_python_example.py \ tests/testHarness diff --git a/comms/cqrlog/Makefile b/comms/cqrlog/Makefile --- a/comms/cqrlog/Makefile +++ b/comms/cqrlog/Makefile @@ -14,7 +14,7 @@ LIB_DEPENDS= libhamlib.so:comms/hamlib USES= fpc gnome lazarus:flavors shebangfix ssl:run dos2unix \ - mysql:server xorg + mysql:build,run xorg USE_GNOME+= cairo USE_XORG= x11 diff --git a/databases/Makefile b/databases/Makefile --- a/databases/Makefile +++ b/databases/Makefile @@ -166,12 +166,10 @@ SUBDIR += mantis SUBDIR += mariadb-connector-c SUBDIR += mariadb-connector-odbc - SUBDIR += mariadb1011-client SUBDIR += mariadb1011-server - SUBDIR += mariadb105-client SUBDIR += mariadb105-server - SUBDIR += mariadb106-client SUBDIR += mariadb106-server + SUBDIR += mariadb-client SUBDIR += mdbtools SUBDIR += mdbx SUBDIR += mdcached @@ -192,10 +190,9 @@ SUBDIR += mysql-connector-java51 SUBDIR += mysql-connector-odbc-80 SUBDIR += mysql2pgsql - SUBDIR += mysql80-client SUBDIR += mysql80-server - SUBDIR += mysql81-client SUBDIR += mysql81-server + SUBDIR += mysql-client SUBDIR += mysqlbackup SUBDIR += mysqldump-secure SUBDIR += mysqlreport diff --git a/databases/akonadi/Makefile b/databases/akonadi/Makefile --- a/databases/akonadi/Makefile +++ b/databases/akonadi/Makefile @@ -42,7 +42,6 @@ OPTIONS_DEFAULT= MYSQL MYSQL_DESC= Install MySQL Qt plugin and server -MYSQL_USES= mysql:server MYSQL_USE= QT=sql-mysql:run PGSQL_DESC= Install PostgreSQL Qt plugin diff --git a/databases/dbow/Makefile b/databases/dbow/Makefile --- a/databases/dbow/Makefile +++ b/databases/dbow/Makefile @@ -8,7 +8,7 @@ COMMENT= Database object generator for C, Perl, PHP, etc. WWW= http://dbow.sf.net/ -USES= mysql +USES= mysql:build,run MAKE_ENV+= MYSQL_INC=${LOCALBASE}/include/mysql \ MYSQL_LIB=${LOCALBASE}/lib/mysql diff --git a/databases/diesel/Makefile b/databases/diesel/Makefile --- a/databases/diesel/Makefile +++ b/databases/diesel/Makefile @@ -14,7 +14,7 @@ LICENSE_FILE_APACHE20= ${WRKSRC}/LICENSE-APACHE LICENSE_FILE_MIT= ${WRKSRC}/LICENSE-MIT -USES= cargo mysql pgsql sqlite +USES= cargo mysql:build,run pgsql sqlite USE_GITHUB= yes GH_ACCOUNT= diesel-rs diff --git a/databases/kdb/Makefile b/databases/kdb/Makefile --- a/databases/kdb/Makefile +++ b/databases/kdb/Makefile @@ -27,7 +27,7 @@ SQLITE_USES= sqlite SQLITE_CMAKE_BOOL_OFF= CMAKE_DISABLE_FIND_PACKAGE_Sqlite -MYSQL_USES= mysql +MYSQL_USES= mysql:build,run MYSQL_CMAKE_BOOL_OFF= CMAKE_DISABLE_FIND_PACKAGE_MySQL PGSQL_USES= pgsql PGSQL_CMAKE_BOOL_OFF= CMAKE_DISABLE_FIND_PACKAGE_PostgreSQL diff --git a/databases/libdbi-drivers/Makefile b/databases/libdbi-drivers/Makefile --- a/databases/libdbi-drivers/Makefile +++ b/databases/libdbi-drivers/Makefile @@ -35,7 +35,7 @@ OPTIONS_DEFAULT= MYSQL PGSQL SQLITE3 OPTIONS_SUB= yes -MYSQL_USES= mysql +MYSQL_USES= mysql:build,run MYSQL_CONFIGURE_WITH= mysql MYSQL_PLIST_FILES= lib/dbd/libdbdmysql.so PGSQL_USES= pgsql diff --git a/databases/luasql-mysql/Makefile b/databases/luasql-mysql/Makefile --- a/databases/luasql-mysql/Makefile +++ b/databases/luasql-mysql/Makefile @@ -33,7 +33,7 @@ .if ${LUASQL_DRIVER} == "mysql" COMMENT= Lua interface to MySQL -USES+= mysql +USES+= mysql:build,run MAKE_ARGS+= DRIVER_LIBS_mysql="-L ${LOCALBASE}/lib/mysql -lmysqlclient" \ DRIVER_INCS_mysql="-I ${LOCALBASE}/include/mysql" .elif ${LUASQL_DRIVER} == "postgres" diff --git a/databases/mariadb1011-client/Makefile b/databases/mariadb-client/Makefile rename from databases/mariadb1011-client/Makefile rename to databases/mariadb-client/Makefile --- a/databases/mariadb1011-client/Makefile +++ b/databases/mariadb-client/Makefile @@ -1,10 +1,12 @@ PORTNAME= mariadb PORTREVISION= 1 -PKGNAMESUFFIX= 1011-client +PKGNAMESUFFIX= -client COMMENT= Multithreaded SQL database (client) -MASTERDIR= ${.CURDIR}/../${PORTNAME}${PKGNAMESUFFIX:C/-client/-server/} +_MARIADB_LATEST= 1011 +MASTERDIR= ${.CURDIR}/../${PORTNAME}${_MARIADB_LATEST}-server +PREFIX= ${LOCALBASE} PLIST= ${.CURDIR}/pkg-plist diff --git a/databases/mariadb1011-client/pkg-plist b/databases/mariadb-client/pkg-plist rename from databases/mariadb1011-client/pkg-plist rename to databases/mariadb-client/pkg-plist diff --git a/databases/mariadb1011-server/Makefile b/databases/mariadb1011-server/Makefile --- a/databases/mariadb1011-server/Makefile +++ b/databases/mariadb1011-server/Makefile @@ -42,6 +42,7 @@ SHEBANG_FILES= scripts/*.sh support-files/*.sh SITESDIR= mariadb/mariadb-${PORTVERSION}/source DOCSDIR= ${PREFIX}/share/doc/mysql +DATADIR= ${PREFIX}/share/mysql MARIADB_USER?= mysql MARIADB_GROUP?= mysql @@ -123,8 +124,9 @@ DISABLED_PLUGINS+= AUTH_TEST_PLUGIN DAEMON_EXAMPLE DIALOG_EXAMPLES \ EXAMPLE EXAMPLE_KEY_MANAGEMENT FTEXAMPLE -DATADIR= ${PREFIX}/share/mysql -ETCDIR= ${PREFIX}/etc/mysql +# Install to a prefix to be able to co-install multiple versions of the +# server. The client installs to ${LOCALBASE}. +PREFIX?= ${LOCALBASE}/mariadb10.11 CONFLICTS_INSTALL= mariadb10[0-57-9]-${PKGNAMESUFFIX:C/^[0-9]*-//}-* \ mysql[0-9]*-${PKGNAMESUFFIX:C/^[0-9]*-//}-* \ @@ -150,10 +152,10 @@ .else # ! ${PKGNAMESUFFIX:M*-client} # MySQL-Server part -USES+= mysql:1011m +USES+= mysql -USE_LDCONFIG+= ${PREFIX}/lib/mysql/plugin -USE_RC_SUBR= mysql-server +USE_LDCONFIG+= ${REFIX}/lib/mysql/plugin +USE_RC_SUBR= mariadb1011-server CMAKE_ON+= CMAKE_SKIP_BUILD_RPATH WITH_EMBEDDED_SERVER CMAKE_OFF+= WITH_CLIENT @@ -270,7 +272,7 @@ ${INSTALL_DATA} ${WRKDIR}/server.cnf.sample \ ${STAGEDIR}${ETCDIR}/conf.d/server.cnf.sample ${MV} ${STAGEDIR}${PREFIX}/share/user_map.conf \ - ${STAGEDIR}${PREFIX}/etc/mysql/user_map.conf.sample + ${STAGEDIR}${ETCDIR}/user_map.conf.sample ${MV} ${STAGEDIR}${PREFIX}/share/pam_user_map.so \ ${STAGEDIR}${PREFIX}/lib/mysql/ ${RM} -r ${STAGEDIR}${PREFIX}/share/mysql/policy \ @@ -282,8 +284,6 @@ ${STAGEDIR}${ETCDIR}/logrotate.d \ ${STAGEDIR}${DOCSDIR}/COPYING ${MKDIR} ${STAGEDIR}${MARIADB_LOGDIR} - ${SED} '/%%/d;/^@comment /d;s/^/@comment /' ${PORTSDIR}/${CATEGORIES:[1]}/${PORTNAME}${PKGNAMESUFFIX:S/-server/-client/}/pkg-plist \ - >> ${TMPPLIST} post-install-MROONGA-on: ${MV} ${STAGEDIR}${PREFIX}/share/groonga ${STAGEDIR}${DOCSDIR}/ @@ -295,7 +295,7 @@ ${STAGEDIR}${ETCDIR}/conf.d/spider.cnf.sample post-install-WSREP-on: - ${MV} ${STAGEDIR}${DATADIR}/wsrep.cnf \ + ${MV} ${STAGEDIR}${PREFIX}/share/mysql/wsrep.cnf \ ${STAGEDIR}${ETCDIR}/conf.d/wsrep.cnf.sample .endif # ${PKGNAMESUFFIX:M*-client} diff --git a/databases/mariadb1011-server/files/mariadb1011-server.in b/databases/mariadb1011-server/files/mariadb1011-server.in new file mode 100644 --- /dev/null +++ b/databases/mariadb1011-server/files/mariadb1011-server.in @@ -0,0 +1,149 @@ +#!/bin/sh + +# PROVIDE: mariadb1011 +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable mysql: +# mariadb1011_(instance_)?enable (bool): Set to "NO" by default. +# Set it to "YES" to enable MySQL. +%%LEGACY_LIMITS%%# mariadb1011_(instance_)?limits (bool): Set to "NO" by default. +%%LEGACY_LIMITS%%# Set it to yes to run `limits -e -U mysql` +%%LEGACY_LIMITS%%# just before mysql starts. +# mariadb1011_(instance_)?dbdir (str): Default to "%%MARIADB_DBDIR%%" +# Base database directory. +# mariadb1011_(instance_)?args (str): Custom additional arguments to be passed +# to mysqld_safe (default empty). +# mariadb1011_(instance_)?pidfile (str): Custom PID file path and name. +# Default to "${mariadb1011_dbdir}/${hostname}.pid". +# mariadb1011_(instance_)?user (str): User to run mysqld as +# Default to "%%MARIADB_USER%%" created by the port +# mariadb1011_(instance_)?optfile (str): Server-specific option file. +# Default to "${mariadb1011_dbdir}/my.cnf". +# mariadb1011_(instance)?rundir (str): Default to "%%MARIADB_RUNDIR%%" +# mariadb1011_instances (str): Set to "" by default. +# If defined, list of instances to enable + +. /etc/rc.subr + +name="mariadb1011" +rcvar=mariadb1011_enable + +load_rc_config $name + +: ${mariadb1011_enable="NO"} +%%LEGACY_LIMITS%%: ${mariadb1011_limits="NO"} +: ${mariadb1011_user="%%MARIADB_USER%%"} +%%LEGACY_LIMITS%%mariadb1011_limits_args="-e -U ${mariadb1011_user}" +: ${mariadb1011_dbdir="%%MARIADB_DBDIR%%"} +: ${mariadb1011_optfile="%%ETCDIR%%/my.cnf"} +: ${mariadb1011_rundir="%%MARIADB_RUNDIR%%"} + +command="/usr/sbin/daemon" +procname="%%PREFIX%%/libexec/mariadbd" +start_precmd="${name}_prestart" +start_postcmd="${name}_poststart" + +if [ -n "$2" ]; then + instance="$2" + load_rc_config ${name}_${instance} + case "$mariadb1011_instances" in + "$2 "*|*" $2 "*|*" $2"|"$2") + eval mariadb1011_args="\${mariadb1011_${instance}_args:-\"${mariadb1011_args}\"}" + eval mariadb1011_dbdir="\${mariadb1011_${instance}_dbdir:-\"%%MARIADB_DBDIR%%_${instance}\"}" + %%LEGACY_LIMITS%%eval mariadb1011_limits="\${mariadb1011_${instance}_limits:-\"${mariadb1011_limits}\"}" + eval mariadb1011_user="\${mariadb1011_${instance}_user:-\"${mariadb1011_user}\"}" + %%LEGACY_LIMITS%%eval mariadb1011_limits_args="\${mariadb1011_${instance}_limits_args:-\"-e -U $mariadb1011_user\"}" + eval mariadb1011_socket="\${mariadb1011_${instance}_socket:-\"%%MARIADB_RUNDIR%%_${instance}/%%MARIADB_SOCK%%\"}" + eval mariadb1011_optfile="\${mariadb1011_${instance}_optfile:-\"%%ETCDIR%%_${instance}/my.cnf\"}" + eval mariadb1011_pidfile="\${mariadb1011_${instance}_pidfile:-\"%%MARIADB_RUNDIR%%_${instance}/mysqld.pid\"}" + ;; + *) + err 1 "$2 not found in mariadb1011_instances" ;; + esac +else + if [ -n "${mariadb1011_instances}" -a -n "$1" ]; then + for instance in ${mariadb1011_instances}; do + eval _enable="\${mariadb1011_${instance}_enable}" + case "${_enable:-${mariadb1011_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=mariadb1011_enable + else + _var=mariadb1011_${instance}_enable + fi + warn "Bad value" \ + "'${_enable:-${mariadb1011_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 + mariadb1011_pidfile=${mariadb1011_pidfile:-"%%MARIADB_RUNDIR%%/mysqld.pid"} + fi +fi + +pidfile=$mariadb1011_pidfile +mariadb1011_install_db="%%PREFIX%%/bin/mariadb-install-db" +mariadb1011_install_db_args="--basedir=%%PREFIX%% --datadir=${mariadb1011_dbdir} --force" +command_args="-c -f %%PREFIX%%/bin/mariadbd-safe --defaults-extra-file=${mariadb1011_optfile} --user=${mariadb1011_user} --datadir=${mariadb1011_dbdir} --pid-file=${pidfile} ${mariadb1011_socket:+--socket=${mariadb1011_socket}} ${mariadb1011_args}" + +mariadb1011_create_auth_tables() +{ + eval $mariadb1011_install_db $mariadb1011_install_db_args + [ $? -eq 0 ] && chown -R ${mariadb1011_user}:$(id -gn $mariadb1011_user) ${mariadb1011_dbdir} +} + +mariadb1011_prestart() +{ + local dir + for dir in /etc /usr/local/etc /etc/mysql /var/db/mysql; do + if [ -f "${dir}/my.cnf" ]; then + echo "Please merge existing ${dir}/my.cnf file with %%ETCDIR%%/conf.d/server.cnf" + return 1 + fi + done + if [ ! -d "${mariadb1011_dbdir}/mysql/." ]; then + mariadb1011_create_auth_tables || return 1 + fi + mariadb1011_group="`/usr/bin/id -gn ${mariadb1011_user}`" + [ "${mariadb1011_socket}" = "" ] && mariadb1011_rundir="%%MARIADB_RUNDIR%%" || mariadb1011_rundir="`/usr/bin/dirname ${mariadb1011_socket}`" + if [ ! -d "${mariadb1011_rundir}" ]; then + install -d -o ${mariadb1011_user} -g ${mariadb1011_group} "${mariadb1011_rundir}" + fi +%%LEGACY_LIMITS%% if checkyesno mariadb1011_limits; then +%%LEGACY_LIMITS%% eval `/usr/bin/limits ${mariadb1011_limits_args}` 2>/dev/null +%%LEGACY_LIMITS%% else +%%LEGACY_LIMITS%% return 0 +%%LEGACY_LIMITS%% fi +%%MODERN_LIMITS%% return 0 + if [ ! -d "${mariadb1011_rundir}" ]; then + install -d -u${mariadb1011_user} -g$(id -gn $mariadb1011_user) -m755 ${mariadb1011_rundir} + fi +} + +mariadb1011_poststart() +{ + local timeout=15 + while [ ! -f "${pidfile}" -a ${timeout} -gt 0 ]; do + timeout=$(( timeout - 1 )) + sleep 1 + done + return 0 +} + +run_rc_command "$1" diff --git a/databases/mariadb1011-server/files/mysql-server.in b/databases/mariadb1011-server/files/mysql-server.in deleted file mode 100644 --- a/databases/mariadb1011-server/files/mysql-server.in +++ /dev/null @@ -1,149 +0,0 @@ -#!/bin/sh - -# PROVIDE: mysql -# REQUIRE: LOGIN -# KEYWORD: shutdown -# -# Add the following line to /etc/rc.conf to enable mysql: -# mysql_(instance_)?enable (bool): Set to "NO" by default. -# Set it to "YES" to enable MySQL. -%%LEGACY_LIMITS%%# mysql_(instance_)?limits (bool): Set to "NO" by default. -%%LEGACY_LIMITS%%# Set it to yes to run `limits -e -U mysql` -%%LEGACY_LIMITS%%# just before mysql starts. -# mysql_(instance_)?dbdir (str): Default to "%%MARIADB_DBDIR%%" -# Base database directory. -# mysql_(instance_)?args (str): Custom additional arguments to be passed -# to mysqld_safe (default empty). -# mysql_(instance_)?pidfile (str): Custom PID file path and name. -# Default to "${mysql_dbdir}/${hostname}.pid". -# mysql_(instance_)?user (str): User to run mysqld as -# Default to "%%MARIADB_USER%%" created by the port -# mysql_(instance_)?optfile (str): Server-specific option file. -# Default to "${mysql_dbdir}/my.cnf". -# mysql_(instance)?rundir (str): Default to "%%MARIADB_RUNDIR%%" -# mysql_instances (str): Set to "" by default. -# If defined, list of instances to enable - -. /etc/rc.subr - -name="mysql" -rcvar=mysql_enable - -load_rc_config $name - -: ${mysql_enable="NO"} -%%LEGACY_LIMITS%%: ${mysql_limits="NO"} -: ${mysql_user="%%MARIADB_USER%%"} -%%LEGACY_LIMITS%%mysql_limits_args="-e -U ${mysql_user}" -: ${mysql_dbdir="%%MARIADB_DBDIR%%"} -: ${mysql_optfile="%%ETCDIR%%/my.cnf"} -: ${mysql_rundir="%%MARIADB_RUNDIR%%"} - -command="/usr/sbin/daemon" -procname="%%PREFIX%%/libexec/mariadbd" -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 mysql_args="\${mysql_${instance}_args:-\"${mysql_args}\"}" - eval mysql_dbdir="\${mysql_${instance}_dbdir:-\"%%MARIADB_DBDIR%%_${instance}\"}" - %%LEGACY_LIMITS%%eval mysql_limits="\${mysql_${instance}_limits:-\"${mysql_limits}\"}" - eval mysql_user="\${mysql_${instance}_user:-\"${mysql_user}\"}" - %%LEGACY_LIMITS%%eval mysql_limits_args="\${mysql_${instance}_limits_args:-\"-e -U $mysql_user\"}" - eval mysql_socket="\${mysql_${instance}_socket:-\"%%MARIADB_RUNDIR%%_${instance}/%%MARIADB_SOCK%%\"}" - eval mysql_optfile="\${mysql_${instance}_optfile:-\"%%ETCDIR%%_${instance}/my.cnf\"}" - eval mysql_pidfile="\${mysql_${instance}_pidfile:-\"%%MARIADB_RUNDIR%%_${instance}/mysqld.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 - mysql_pidfile=${mysql_pidfile:-"%%MARIADB_RUNDIR%%/mysqld.pid"} - fi -fi - -pidfile=$mysql_pidfile -mysql_install_db="%%PREFIX%%/bin/mariadb-install-db" -mysql_install_db_args="--basedir=%%PREFIX%% --datadir=${mysql_dbdir} --force" -command_args="-c -f %%PREFIX%%/bin/mariadbd-safe --defaults-extra-file=${mysql_optfile} --user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysql_socket:+--socket=${mysql_socket}} ${mysql_args}" - -mysql_create_auth_tables() -{ - eval $mysql_install_db $mysql_install_db_args - [ $? -eq 0 ] && chown -R ${mysql_user}:$(id -gn $mysql_user) ${mysql_dbdir} -} - -mysql_prestart() -{ - local dir - for dir in /etc /usr/local/etc /etc/mysql /var/db/mysql; do - if [ -f "${dir}/my.cnf" ]; then - echo "Please merge existing ${dir}/my.cnf file with %%ETCDIR%%/conf.d/server.cnf" - return 1 - fi - done - if [ ! -d "${mysql_dbdir}/mysql/." ]; then - mysql_create_auth_tables || return 1 - fi - mysql_group="`/usr/bin/id -gn ${mysql_user}`" - [ "${mysql_socket}" = "" ] && mysql_rundir="%%MARIADB_RUNDIR%%" || mysql_rundir="`/usr/bin/dirname ${mysql_socket}`" - if [ ! -d "${mysql_rundir}" ]; then - install -d -o ${mysql_user} -g ${mysql_group} "${mysql_rundir}" - fi -%%LEGACY_LIMITS%% if checkyesno mysql_limits; then -%%LEGACY_LIMITS%% eval `/usr/bin/limits ${mysql_limits_args}` 2>/dev/null -%%LEGACY_LIMITS%% else -%%LEGACY_LIMITS%% return 0 -%%LEGACY_LIMITS%% fi -%%MODERN_LIMITS%% return 0 - if [ ! -d "${mysql_rundir}" ]; then - install -d -u${mysql_user} -g$(id -gn $mysql_user) -m755 ${mysql_rundir} - fi -} - -mysql_poststart() -{ - local timeout=15 - while [ ! -f "${pidfile}" -a ${timeout} -gt 0 ]; do - timeout=$(( timeout - 1 )) - sleep 1 - done - return 0 -} - -run_rc_command "$1" diff --git a/databases/mariadb1011-server/pkg-plist b/databases/mariadb1011-server/pkg-plist --- a/databases/mariadb1011-server/pkg-plist +++ b/databases/mariadb1011-server/pkg-plist @@ -1,3 +1,8 @@ +@comment %%S3%%share/man/man1/aria_s3_copy.1.gz +@comment %%ROCKSDB%%share/man/man1/mariadb-ldb.1.gz +@comment %%ROCKSDB%%share/man/man1/myrocks_hotbackup.1.gz +@comment %%ROCKSDB%%share/man/man1/mysql_ldb.1.gz +@comment @comment share/man/man1/mytop.1.gz bin/aria_chk bin/aria_dump_log bin/aria_ftdump @@ -6,55 +11,92 @@ %%S3%%bin/aria_s3_copy %%INNOBASE%%bin/innochecksum %%INNOBASE%%bin/mariabackup +bin/mariadb +bin/mariadb-access +bin/mariadb-admin bin/mariadb-backup +bin/mariadb-binlog +bin/mariadb-check bin/mariadb-client-test bin/mariadb-client-test-embedded +bin/mariadb-config +bin/mariadb-conv +bin/mariadb-convert-table-format +bin/mariadb-dump bin/mariadb-dumpslow bin/mariadb-embedded +bin/mariadb-find-rows bin/mariadb-fix-extensions +bin/mariadb-hotcopy +bin/mariadb-import bin/mariadb-install-db %%ROCKSDB%%bin/mariadb-ldb +bin/mariadb-plugin bin/mariadb-secure-installation +bin/mariadb-setpermission +bin/mariadb-show +bin/mariadb-slap +bin/mariadb-test bin/mariadb-test-embedded bin/mariadb-tzinfo-to-sql bin/mariadb-upgrade +bin/mariadb-waitpid +bin/mariadb_config bin/mariadbd-multi bin/mariadbd-safe bin/mariadbd-safe-helper %%INNOBASE%%bin/mbstream +bin/msql2mysql +bin/my_print_defaults bin/myisam_ftdump bin/myisamchk bin/myisamlog bin/myisampack -@comment bin/mytop %%ROCKSDB%%bin/myrocks_hotbackup +bin/mysql bin/mysql_client_test bin/mysql_client_test_embedded +bin/mysql_config +bin/mysql_convert_table_format bin/mysql_embedded +bin/mysql_find_rows bin/mysql_fix_extensions bin/mysql_install_db %%ROCKSDB%%bin/mysql_ldb bin/mysql_plugin bin/mysql_secure_installation +bin/mysql_setpermission bin/mysql_tzinfo_to_sql bin/mysql_upgrade bin/mysql_waitpid +bin/mysqlaccess +bin/mysqladmin +bin/mysqlbinlog +bin/mysqlcheck bin/mysqld_multi bin/mysqld_safe bin/mysqld_safe_helper +bin/mysqldump bin/mysqldumpslow +bin/mysqlhotcopy +bin/mysqlimport +bin/mysqlshow +bin/mysqlslap +bin/mysqltest bin/mysqltest_embedded +@comment bin/mytop bin/perror +bin/replace bin/resolve_stack_dump bin/resolveip %%ROCKSDB%%bin/sst_dump bin/test-connect-t +%%WSREP%%bin/wsrep_sst_backup %%WSREP%%bin/wsrep_sst_common %%WSREP%%bin/wsrep_sst_mariabackup %%WSREP%%bin/wsrep_sst_mysqldump %%WSREP%%bin/wsrep_sst_rsync %%WSREP%%bin/wsrep_sst_rsync_wan -%%WSREP%%bin/wsrep_sst_backup @comment %%ETCDIR%%/conf.d/client.cnf %%ETCDIR%%/conf.d/enable_encryption.preset %%HASHICORP_VAULT%%%%ETCDIR%%/conf.d/hashicorp_key_management.cnf @@ -71,6 +113,28 @@ @comment %%ETCDIR%%/my.cnf @comment %%ETCDIR%%/server.cnf @sample %%ETCDIR%%/user_map.conf.sample +include/mysql/errmsg.h +include/mysql/ma_list.h +include/mysql/ma_pvio.h +include/mysql/ma_tls.h +include/mysql/mariadb/ma_io.h +include/mysql/mariadb_com.h +include/mysql/mariadb_ctype.h +include/mysql/mariadb_dyncol.h +include/mysql/mariadb_rpl.h +include/mysql/mariadb_stmt.h +include/mysql/mariadb_version.h +include/mysql/my_alloca.h +include/mysql/my_config.h +include/mysql/my_global.h +include/mysql/my_sys.h +include/mysql/mysql.h +include/mysql/mysql/client_plugin.h +include/mysql/mysql/plugin_auth.h +include/mysql/mysql/plugin_auth_common.h +include/mysql/mysql_com.h +include/mysql/mysql_version.h +include/mysql/mysqld_error.h include/mysql/server/big_endian.h include/mysql/server/byte_order_generic.h include/mysql/server/byte_order_generic_x86.h @@ -147,6 +211,7 @@ include/mysql/server/mysql/service_progress_report.h include/mysql/server/mysql/service_sha1.h include/mysql/server/mysql/service_sha2.h +include/mysql/server/mysql/service_sql.h include/mysql/server/mysql/service_thd_alloc.h include/mysql/server/mysql/service_thd_autoinc.h include/mysql/server/mysql/service_thd_error_context.h @@ -155,7 +220,6 @@ include/mysql/server/mysql/service_thd_specifics.h include/mysql/server/mysql/service_thd_timezone.h include/mysql/server/mysql/service_thd_wait.h -include/mysql/server/mysql/service_sql.h %%WSREP%%include/mysql/server/mysql/service_wsrep.h include/mysql/server/mysql/services.h include/mysql/server/mysql_com.h @@ -172,21 +236,34 @@ include/mysql/server/sslopt-longopts.h include/mysql/server/sslopt-vars.h include/mysql/server/typelib.h +lib/mysql/libmariadb.a +lib/mysql/libmariadb.so +lib/mysql/libmariadb.so.3 +lib/mysql/libmariadbclient.a lib/mysql/libmariadbd.a lib/mysql/libmariadbd.so lib/mysql/libmariadbd.so.19 +lib/mysql/libmysqlclient.a +lib/mysql/libmysqlclient.so +lib/mysql/libmysqlclient_r.a +lib/mysql/libmysqlclient_r.so lib/mysql/libmysqld.a lib/mysql/libmysqld.so +lib/mysql/libmysqlservices.a lib/mysql/pam_user_map.so lib/mysql/plugin/adt_null.so lib/mysql/plugin/auth_0x0100.so lib/mysql/plugin/auth_ed25519.so -@comment lib/mysql/plugin/auth_gssapi_client.so %%NO_GSSAPI_NONE%%lib/mysql/plugin/auth_gssapi.so +@comment lib/mysql/plugin/auth_gssapi_client.so lib/mysql/plugin/auth_pam.so lib/mysql/plugin/auth_pam_tool_dir/auth_pam_tool lib/mysql/plugin/auth_pam_v1.so +lib/mysql/plugin/caching_sha2_password.so +lib/mysql/plugin/client_ed25519.so +lib/mysql/plugin/daemon_example.ini lib/mysql/plugin/debug_key_management.so +lib/mysql/plugin/dialog.so lib/mysql/plugin/disks.so lib/mysql/plugin/file_key_management.so lib/mysql/plugin/func_test.so @@ -206,6 +283,7 @@ %%HASHICORP_VAULT%%lib/mysql/plugin/hashicorp_key_management.so lib/mysql/plugin/locales.so lib/mysql/plugin/metadata_lock_info.so +lib/mysql/plugin/mysql_clear_password.so lib/mysql/plugin/password_reuse_check.so lib/mysql/plugin/provider_bzip2.so lib/mysql/plugin/provider_lz4.so @@ -218,6 +296,7 @@ lib/mysql/plugin/query_cache_info.so lib/mysql/plugin/query_response_time.so lib/mysql/plugin/server_audit.so +lib/mysql/plugin/sha256_password.so lib/mysql/plugin/simple_password_check.so lib/mysql/plugin/sql_errlog.so lib/mysql/plugin/test_sql_service.so @@ -227,14 +306,24 @@ lib/mysql/plugin/type_test.so %%WSREP%%lib/mysql/plugin/wsrep_info.so lib/mysql/plugin/zstd.so +libdata/pkgconfig/libmariadb.pc libexec/mariadbd libexec/mysqld +share/aclocal/mysql.m4 +%%PORTDOCS%%%%DOCSDIR%%/CREDITS +%%PORTDOCS%%%%DOCSDIR%%/INSTALL-BINARY +%%PORTDOCS%%%%WSREP%%%%DOCSDIR%%/README-wsrep +%%PORTDOCS%%%%DOCSDIR%%/README.md +%%PORTDOCS%%%%DOCSDIR%%/THIRDPARTY +%%MROONGA%%%%PORTDOCS%%%%DOCSDIR%%/groonga/README.md +%%HASHICORP_VAULT%%%%PORTDOCS%%%%DOCSDIR%%/hashicorp_key_management.txt +%%MROONGA%%share/groonga-normalizer-mysql/README.md +%%MROONGA%%share/groonga-normalizer-mysql/lgpl-2.0.txt @comment share/man/man1/aria_chk.1.gz @comment share/man/man1/aria_dump_log.1.gz @comment share/man/man1/aria_ftdump.1.gz @comment share/man/man1/aria_pack.1.gz @comment share/man/man1/aria_read_log.1.gz -@comment %%S3%%share/man/man1/aria_s3_copy.1.gz @comment share/man/man1/galera_new_cluster.1.gz @comment share/man/man1/galera_recovery.1.gz @comment share/man/man1/innochecksum.1.gz @@ -256,7 +345,6 @@ @comment share/man/man1/mariadb-hotcopy.1.gz @comment share/man/man1/mariadb-import.1.gz @comment share/man/man1/mariadb-install-db.1.gz -@comment %%ROCKSDB%%share/man/man1/mariadb-ldb.1.gz @comment share/man/man1/mariadb-plugin.1.gz @comment share/man/man1/mariadb-secure-installation.1.gz @comment share/man/man1/mariadb-service-convert.1.gz @@ -268,11 +356,11 @@ @comment share/man/man1/mariadb-tzinfo-to-sql.1.gz @comment share/man/man1/mariadb-upgrade.1.gz @comment share/man/man1/mariadb-waitpid.1.gz +@comment share/man/man1/mariadb.1.gz +@comment share/man/man1/mariadb_config.1.gz @comment share/man/man1/mariadbd-multi.1.gz @comment share/man/man1/mariadbd-safe-helper.1.gz @comment share/man/man1/mariadbd-safe.1.gz -@comment share/man/man1/mariadb.1.gz -@comment share/man/man1/mariadb_config.1.gz @comment share/man/man1/mbstream.1.gz @comment share/man/man1/msql2mysql.1.gz @comment share/man/man1/my_print_defaults.1.gz @@ -281,42 +369,39 @@ @comment share/man/man1/myisamchk.1.gz @comment share/man/man1/myisamlog.1.gz @comment share/man/man1/myisampack.1.gz -@comment %%ROCKSDB%%share/man/man1/myrocks_hotbackup.1.gz @comment share/man/man1/mysql-stress-test.pl.1.gz @comment share/man/man1/mysql-test-run.pl.1.gz @comment share/man/man1/mysql.1.gz +@comment share/man/man1/mysql.server.1.gz @comment share/man/man1/mysql_client_test.1.gz @comment share/man/man1/mysql_client_test_embedded.1.gz @comment share/man/man1/mysql_config.1.gz @comment share/man/man1/mysql_convert_table_format.1.gz @comment share/man/man1/mysql_embedded.1.gz @comment share/man/man1/mysql_find_rows.1.gz +@comment share/man/man1/mysql_fix_extensions.1.gz +@comment share/man/man1/mysql_install_db.1.gz @comment share/man/man1/mysql_plugin.1.gz +@comment share/man/man1/mysql_secure_installation.1.gz @comment share/man/man1/mysql_setpermission.1.gz +@comment share/man/man1/mysql_tzinfo_to_sql.1.gz +@comment share/man/man1/mysql_upgrade.1.gz +@comment share/man/man1/mysql_waitpid.1.gz @comment share/man/man1/mysqlaccess.1.gz @comment share/man/man1/mysqladmin.1.gz @comment share/man/man1/mysqlbinlog.1.gz @comment share/man/man1/mysqlcheck.1.gz +@comment share/man/man1/mysqld_multi.1.gz +@comment share/man/man1/mysqld_safe.1.gz +@comment share/man/man1/mysqld_safe_helper.1.gz @comment share/man/man1/mysqldump.1.gz +@comment share/man/man1/mysqldumpslow.1.gz @comment share/man/man1/mysqlhotcopy.1.gz @comment share/man/man1/mysqlimport.1.gz @comment share/man/man1/mysqlshow.1.gz @comment share/man/man1/mysqlslap.1.gz @comment share/man/man1/mysqltest.1.gz @comment share/man/man1/mysqltest_embedded.1.gz -@comment @comment share/man/man1/mytop.1.gz -@comment share/man/man1/mysql.server.1.gz -@comment share/man/man1/mysql_fix_extensions.1.gz -@comment share/man/man1/mysql_install_db.1.gz -@comment %%ROCKSDB%%share/man/man1/mysql_ldb.1.gz -@comment share/man/man1/mysql_secure_installation.1.gz -@comment share/man/man1/mysql_tzinfo_to_sql.1.gz -@comment share/man/man1/mysql_upgrade.1.gz -@comment share/man/man1/mysql_waitpid.1.gz -@comment share/man/man1/mysqld_multi.1.gz -@comment share/man/man1/mysqld_safe.1.gz -@comment share/man/man1/mysqld_safe_helper.1.gz -@comment share/man/man1/mysqldumpslow.1.gz @comment share/man/man1/perror.1.gz @comment share/man/man1/replace.1.gz @comment share/man/man1/resolve_stack_dump.1.gz @@ -448,16 +533,6 @@ @comment share/man/man3/mysql_warning_count.3.gz @comment share/man/man8/mariadbd.8.gz @comment share/man/man8/mysqld.8.gz -share/aclocal/mysql.m4 -%%PORTDOCS%%%%DOCSDIR%%/CREDITS -%%PORTDOCS%%%%DOCSDIR%%/INSTALL-BINARY -%%PORTDOCS%%%%WSREP%%%%DOCSDIR%%/README-wsrep -%%PORTDOCS%%%%DOCSDIR%%/README.md -%%PORTDOCS%%%%DOCSDIR%%/THIRDPARTY -%%MROONGA%%%%PORTDOCS%%%%DOCSDIR%%/groonga/README.md -%%MROONGA%%share/groonga-normalizer-mysql/README.md -%%MROONGA%%share/groonga-normalizer-mysql/lgpl-2.0.txt -%%HASHICORP_VAULT%%%%PORTDOCS%%%%DOCSDIR%%/hashicorp_key_management.txt %%DATADIR%%/binary-configure %%DATADIR%%/bulgarian/errmsg.sys %%DATADIR%%/charsets/Index.xml @@ -495,8 +570,8 @@ %%DATADIR%%/estonian/errmsg.sys %%DATADIR%%/fill_help_tables.sql %%DATADIR%%/french/errmsg.sys -%%DATADIR%%/german/errmsg.sys %%DATADIR%%/georgian/errmsg.sys +%%DATADIR%%/german/errmsg.sys %%DATADIR%%/greek/errmsg.sys %%DATADIR%%/hindi/errmsg.sys %%DATADIR%%/hungarian/errmsg.sys @@ -533,4 +608,3 @@ @comment %%DATADIR%%/wsrep.cnf %%WSREP%%%%DATADIR%%/wsrep_notify @dir(%%MARIADB_USER%%,%%MARIADB_GROUP%%,) %%MARIADB_LOGDIR%% - diff --git a/databases/mariadb105-client/Makefile b/databases/mariadb105-client/Makefile deleted file mode 100644 --- a/databases/mariadb105-client/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -PORTNAME= mariadb -PKGNAMESUFFIX= 105-client - -COMMENT= Multithreaded SQL database (client) - -MASTERDIR= ${.CURDIR}/../${PORTNAME}${PKGNAMESUFFIX:C/-client/-server/} - -PLIST= ${.CURDIR}/pkg-plist - -.include "${MASTERDIR}/Makefile" diff --git a/databases/mariadb105-client/pkg-plist b/databases/mariadb105-client/pkg-plist deleted file mode 100644 --- a/databases/mariadb105-client/pkg-plist +++ /dev/null @@ -1,187 +0,0 @@ -bin/mariadb -bin/mariadb-access -bin/mariadb-admin -bin/mariadb-binlog -bin/mariadb-check -bin/mariadb-config -bin/mariadb-conv -bin/mariadb-dump -bin/mariadb-find-rows -bin/mariadb-import -@comment bin/mysql_install_db -bin/mariadb-plugin -bin/mariadb-show -bin/mariadb-slap -bin/mariadb-test -bin/mariadb-waitpid -bin/mariadb_config -bin/msql2mysql -bin/mysql -bin/mysql_config -bin/mysql_convert_table_format -bin/mysql_find_rows -@comment bin/mysql_secure_installation -bin/mysql_setpermission -@comment bin/mysql_plugin -@comment bin/mysql_waitpid -bin/mysqlaccess -bin/mysqladmin -bin/mysqlbinlog -bin/mysqlcheck -bin/mysqldump -bin/mysqlhotcopy -bin/mysqlimport -bin/mysqlshow -bin/mysqlslap -bin/mysqltest -@comment bin/mytop -bin/my_print_defaults -@comment bin/wsrep_sst_rsync_wan -@sample %%ETCDIR%%/my.cnf.sample -@sample %%ETCDIR%%/conf.d/client.cnf.sample -@comment %%ETCDIR%%/conf.d/enable_encryption.preset -@comment %%ETCDIR%%/conf.d/mysql-clients.cnf -@comment %%ETCDIR%%/conf.d/server.cnf -@comment %%ETCDIR%%/init.d/mysql -@comment %%ETCDIR%%/logrotate.d/mysql -include/mysql/errmsg.h -include/mysql/ma_list.h -include/mysql/ma_pvio.h -include/mysql/ma_tls.h -include/mysql/mariadb/ma_io.h -include/mysql/mariadb_com.h -include/mysql/mariadb_ctype.h -include/mysql/mariadb_dyncol.h -include/mysql/mariadb_rpl.h -include/mysql/mariadb_stmt.h -include/mysql/mariadb_version.h -include/mysql/my_alloca.h -include/mysql/my_config.h -include/mysql/my_global.h -include/mysql/my_sys.h -include/mysql/mysql.h -include/mysql/mysql_com.h -include/mysql/mysql_version.h -include/mysql/mysql/client_plugin.h -include/mysql/mysql/plugin_auth.h -include/mysql/mysql/plugin_auth_common.h -include/mysql/mysqld_error.h -%%NO_GSSAPI_NONE%%lib/mysql/plugin/auth_gssapi_client.so -lib/mysql/libmariadb.a -lib/mysql/libmariadb.so -lib/mysql/libmariadb.so.3 -lib/mysql/libmariadbclient.a -lib/mysql/libmysqlclient.a -lib/mysql/libmysqlclient.so -lib/mysql/libmysqlclient_r.a -lib/mysql/libmysqlclient_r.so -lib/mysql/libmysqlservices.a -lib/mysql/plugin/caching_sha2_password.so -lib/mysql/plugin/client_ed25519.so -lib/mysql/plugin/daemon_example.ini -lib/mysql/plugin/dialog.so -lib/mysql/plugin/mysql_clear_password.so -lib/mysql/plugin/sha256_password.so -libdata/pkgconfig/libmariadb.pc -libdata/pkgconfig/mariadb.pc -@comment libexec/rcmysql -@comment share/man/man1/aria_chk.1.gz -@comment share/man/man1/aria_dump_log.1.gz -@comment share/man/man1/aria_ftdump.1.gz -@comment share/man/man1/aria_pack.1.gz -@comment share/man/man1/aria_read_log.1.gz -@comment share/man/man1/aria_s3_copy.1.gz -@comment share/man/man1/galera_new_cluster.1.gz -@comment share/man/man1/galera_recovery.1.gz -@comment share/man/man1/innochecksum.1.gz -@comment share/man/man1/mariabackup.1.gz -share/man/man1/mariadb.1.gz -share/man/man1/mariadb-access.1.gz -share/man/man1/mariadb-admin.1.gz -@comment share/man/man1/mariadb-backup.1.gz -share/man/man1/mariadb-binlog.1.gz -share/man/man1/mariadb-check.1.gz -share/man/man1/mariadb-client-test-embedded.1.gz -share/man/man1/mariadb-client-test.1.gz -share/man/man1/mariadb-conv.1.gz -share/man/man1/mariadb-convert-table-format.1.gz -share/man/man1/mariadb_config.1.gz -share/man/man1/mariadb-dump.1.gz -@comment share/man/man1/mariadb-dumpslow.1.gz -@comment share/man/man1/mariadb-embedded.1.gz -share/man/man1/mariadb-find-rows.1.gz -@comment share/man/man1/mariadb-fix-extensions.1.gz -share/man/man1/mariadb-hotcopy.1.gz -share/man/man1/mariadb-import.1.gz -@comment share/man/man1/mariadb-install-db.1.gz -@comment share/man/man1/mariadb-ldb.1.gz -share/man/man1/mariadb-plugin.1.gz -@comment share/man/man1/mariadb-secure-installation.1.gz -share/man/man1/mariadb-service-convert.1.gz -share/man/man1/mariadb-setpermission.1.gz -share/man/man1/mariadb-show.1.gz -share/man/man1/mariadb-slap.1.gz -share/man/man1/mariadb-test-embedded.1.gz -share/man/man1/mariadb-test.1.gz -@comment share/man/man1/mariadb-tzinfo-to-sql.1.gz -@comment share/man/man1/mariadb-upgrade.1.gz -@comment share/man/man1/mariadb-waitpid.1.gz -@comment share/man/man1/mariadbd-multi.1.gz -@comment share/man/man1/mariadbd-safe-helper.1.gz -@comment share/man/man1/mariadbd-safe.1.gz -@comment share/man/man1/mbstream.1.gz -share/man/man1/msql2mysql.1.gz -share/man/man1/my_print_defaults.1.gz -share/man/man1/my_safe_process.1.gz -@comment share/man/man1/myisam_ftdump.1.gz -@comment share/man/man1/myisamchk.1.gz -@comment share/man/man1/myisamlog.1.gz -@comment share/man/man1/myisampack.1.gz -@comment share/man/man1/myrocks_hotbackup.1.gz -share/man/man1/mysql-stress-test.pl.1.gz -share/man/man1/mysql-test-run.pl.1.gz -share/man/man1/mysql.1.gz -@comment share/man/man1/mysql.server.1.gz -share/man/man1/mysql_client_test.1.gz -share/man/man1/mysql_client_test_embedded.1.gz -share/man/man1/mysql_config.1.gz -share/man/man1/mysql_convert_table_format.1.gz -share/man/man1/mysql_embedded.1.gz -share/man/man1/mysql_find_rows.1.gz -@comment share/man/man1/mysql_fix_extensions.1.gz -@comment share/man/man1/mysql_install_db.1.gz -@comment share/man/man1/mysql_ldb.1.gz -share/man/man1/mysql_plugin.1.gz -@comment share/man/man1/mysql_secure_installation.1.gz -share/man/man1/mysql_setpermission.1.gz -@comment share/man/man1/mysql_tzinfo_to_sql.1.gz -@comment share/man/man1/mysql_upgrade.1.gz -@comment share/man/man1/mysql_waitpid.1.gz -share/man/man1/mysqlaccess.1.gz -share/man/man1/mysqladmin.1.gz -share/man/man1/mysqlbinlog.1.gz -share/man/man1/mysqlcheck.1.gz -@comment share/man/man1/mysqld_multi.1.gz -@comment share/man/man1/mysqld_safe.1.gz -@comment share/man/man1/mysqld_safe_helper.1.gz -share/man/man1/mysqldump.1.gz -@comment share/man/man1/mysqldumpslow.1.gz -share/man/man1/mysqlhotcopy.1.gz -share/man/man1/mysqlimport.1.gz -share/man/man1/mysqlshow.1.gz -share/man/man1/mysqlslap.1.gz -share/man/man1/mysqltest.1.gz -share/man/man1/mysqltest_embedded.1.gz -@comment share/man/man1/mytop.1.gz -@comment share/man/man1/perror.1.gz -share/man/man1/replace.1.gz -@comment share/man/man1/resolve_stack_dump.1.gz -@comment share/man/man1/resolveip.1.gz -@comment share/man/man1/wsrep_sst_common.1.gz -@comment share/man/man1/wsrep_sst_mariabackup.1.gz -@comment share/man/man1/wsrep_sst_mysqldump.1.gz -@comment share/man/man1/wsrep_sst_rsync.1.gz -@comment share/man/man1/wsrep_sst_rsync_wan.1.gz -@comment share/man/man8/mariadbd.8.gz -@comment share/man/man8/mysqld.8.gz -share/aclocal/mysql.m4 diff --git a/databases/mariadb105-server/Makefile b/databases/mariadb105-server/Makefile --- a/databases/mariadb105-server/Makefile +++ b/databases/mariadb105-server/Makefile @@ -40,6 +40,7 @@ SHEBANG_FILES= scripts/*.sh SITESDIR= mariadb/mariadb-${PORTVERSION}/source DOCSDIR= ${PREFIX}/share/doc/mysql +DATADIR= ${PREFIX}/share/mysql MARIADB_USER?= mysql MARIADB_GROUP?= mysql @@ -119,8 +120,9 @@ DISABLED_PLUGINS+= AUTH_TEST_PLUGIN DAEMON_EXAMPLE DIALOG_EXAMPLES \ EXAMPLE EXAMPLE_KEY_MANAGEMENT FTEXAMPLE TOKUDB -DATADIR= ${PREFIX}/share/mysql -ETCDIR= ${PREFIX}/etc/mysql +# Install to a prefix to be able to co-install multiple versions of the +# server. The client installs to ${LOCALBASE}. +PREFIX?= ${LOCALBASE}/mariadb10.05 CONFLICTS_INSTALL= mariadb10[0-46-9]-${PKGNAMESUFFIX:C/^[0-9]*-//} \ mariadb1011-${PKGNAMESUFFIX:C/^[0-9]*-//} \ @@ -147,10 +149,10 @@ .else # ! ${PKGNAMESUFFIX:M*-client} # MySQL-Server part -USES+= mysql:105m +USES+= mysql USE_LDCONFIG+= ${PREFIX}/lib/mysql/plugin -USE_RC_SUBR= mysql-server +USE_RC_SUBR= mariadb105-server CMAKE_ON+= CMAKE_SKIP_BUILD_RPATH WITH_EMBEDDED_SERVER CMAKE_OFF+= WITH_CLIENT @@ -266,7 +268,7 @@ ${INSTALL_DATA} ${WRKDIR}/server.cnf.sample \ ${STAGEDIR}${ETCDIR}/conf.d/server.cnf.sample ${MV} ${STAGEDIR}${PREFIX}/share/user_map.conf \ - ${STAGEDIR}${PREFIX}/etc/mysql/user_map.conf.sample + ${STAGEDIR}${ETCDIR}/user_map.conf.sample ${MV} ${STAGEDIR}${PREFIX}/share/pam_user_map.so \ ${STAGEDIR}${PREFIX}/lib/mysql/ ${RM} -r ${STAGEDIR}${PREFIX}/share/mysql/policy \ diff --git a/databases/mariadb105-server/files/mariadb105-server.in b/databases/mariadb105-server/files/mariadb105-server.in new file mode 100644 --- /dev/null +++ b/databases/mariadb105-server/files/mariadb105-server.in @@ -0,0 +1,137 @@ +#!/bin/sh + +# PROVIDE: mariadb105 +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable mysql: +# mariadb105_(instance_)?enable (bool): Set to "NO" by default. +# Set it to "YES" to enable MySQL. +# mariadb105_(instance_)?dbdir (str): Default to "%%MARIADB_DBDIR%%" +# Base database directory. +# mariadb105_(instance_)?args (str): Custom additional arguments to be passed +# to mysqld_safe (default empty). +# mariadb105_(instance_)?pidfile (str): Custom PID file path and name. +# Default to "${mariadb105_dbdir}/${hostname}.pid". +# mariadb105_(instance_)?user (str): User to run mysqld as +# Default to "%%MARIADB_USER%%" created by the port +# mariadb105_(instance_)?optfile (str): Server-specific option file. +# Default to "${mariadb105_dbdir}/my.cnf". +# mariadb105_(instance)?rundir (str): Default to "%%MARIADB_RUNDIR%%" +# mariadb105_instances (str): Set to "" by default. +# If defined, list of instances to enable + +. /etc/rc.subr + +name="mariadb105" +rcvar=mariadb105_enable + +load_rc_config $name + +: ${mariadb105_enable="NO"} +: ${mariadb105_user="%%MARIADB_USER%%"} +: ${mariadb105_dbdir="%%MARIADB_DBDIR%%"} +: ${mariadb105_optfile="%%ETCDIR%%/my.cnf"} +: ${mariadb105_rundir="%%MARIADB_RUNDIR%%"} + +command="/usr/sbin/daemon" +procname="%%PREFIX%%/libexec/mariadbd" +start_precmd="${name}_prestart" +start_postcmd="${name}_poststart" + +if [ -n "$2" ]; then + instance="$2" + load_rc_config ${name}_${instance} + case "$mariadb105_instances" in + "$2 "*|*" $2 "*|*" $2"|"$2") + eval mariadb105_args="\${mariadb105_${instance}_args:-\"${mariadb105_args}\"}" + eval mariadb105_dbdir="\${mariadb105_${instance}_dbdir:-\"%%MARIADB_DBDIR%%_${instance}\"}" + eval mariadb105_user="\${mariadb105_${instance}_user:-\"${mariadb105_user}\"}" + eval mariadb105_socket="\${mariadb105_${instance}_socket:-\"%%MARIADB_RUNDIR%%_${instance}/%%MARIADB_SOCK%%\"}" + eval mariadb105_optfile="\${mariadb105_${instance}_optfile:-\"%%ETCDIR%%_${instance}/my.cnf\"}" + eval mariadb105_pidfile="\${mariadb105_${instance}_pidfile:-\"%%MARIADB_RUNDIR%%_${instance}/mysqld.pid\"}" + ;; + *) + err 1 "$2 not found in mariadb105_instances" ;; + esac +else + if [ -n "${mariadb105_instances}" -a -n "$1" ]; then + for instance in ${mariadb105_instances}; do + eval _enable="\${mariadb105_${instance}_enable}" + case "${_enable:-${mariadb105_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=mariadb105_enable + else + _var=mariadb105_${instance}_enable + fi + warn "Bad value" \ + "'${_enable:-${mariadb105_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 + mariadb105_pidfile=${mariadb105_pidfile:-"%%MARIADB_RUNDIR%%/mysqld.pid"} + fi +fi + +pidfile=$mariadb105_pidfile +mariadb105_install_db="%%PREFIX%%/bin/mariadb-install-db" +mariadb105_install_db_args="--basedir=%%PREFIX%% --datadir=${mariadb105_dbdir} --force" +command_args="-c -f %%PREFIX%%/bin/mariadbd-safe --defaults-extra-file=${mariadb105_optfile} --user=${mariadb105_user} --datadir=${mariadb105_dbdir} --pid-file=${pidfile} ${mariadb105_socket:+--socket=${mariadb105_socket}} ${mariadb105_args}" + +mariadb105_create_auth_tables() +{ + eval $mariadb105_install_db $mariadb105_install_db_args + [ $? -eq 0 ] && chown -R ${mariadb105_user}:$(id -gn $mariadb105_user) ${mariadb105_dbdir} +} + +mariadb105_prestart() +{ + local dir + for dir in /etc /usr/local/etc /etc/mysql /var/db/mysql; do + if [ -f "${dir}/my.cnf" ]; then + echo "Please merge existing ${dir}/my.cnf file with %%ETCDIR%%/conf.d/server.cnf" + return 1 + fi + done + if [ ! -d "${mariadb105_dbdir}/mysql/." ]; then + mariadb105_create_auth_tables || return 1 + fi + mariadb105_group="`/usr/bin/id -gn ${mariadb105_user}`" + [ "${mariadb105_socket}" = "" ] && mariadb105_rundir="%%MARIADB_RUNDIR%%" || mariadb105_rundir="`/usr/bin/dirname ${mariadb105_socket}`" + if [ ! -d "${mariadb105_rundir}" ]; then + install -d -o ${mariadb105_user} -g ${mariadb105_group} "${mariadb105_rundir}" + fi + return 0 + if [ ! -d "${mariadb105_rundir}" ]; then + install -d -u${mariadb105_user} -g$(id -gn $mariadb105_user) -m755 ${mariadb105_rundir} + fi +} + +mariadb105_poststart() +{ + local timeout=15 + while [ ! -f "${pidfile}" -a ${timeout} -gt 0 ]; do + timeout=$(( timeout - 1 )) + sleep 1 + done + return 0 +} + +run_rc_command "$1" diff --git a/databases/mariadb105-server/files/mysql-server.in b/databases/mariadb105-server/files/mysql-server.in deleted file mode 100644 --- a/databases/mariadb105-server/files/mysql-server.in +++ /dev/null @@ -1,137 +0,0 @@ -#!/bin/sh - -# PROVIDE: mysql -# REQUIRE: LOGIN -# KEYWORD: shutdown -# -# Add the following line to /etc/rc.conf to enable mysql: -# mysql_(instance_)?enable (bool): Set to "NO" by default. -# Set it to "YES" to enable MySQL. -# mysql_(instance_)?dbdir (str): Default to "%%MARIADB_DBDIR%%" -# Base database directory. -# mysql_(instance_)?args (str): Custom additional arguments to be passed -# to mysqld_safe (default empty). -# mysql_(instance_)?pidfile (str): Custom PID file path and name. -# Default to "${mysql_dbdir}/${hostname}.pid". -# mysql_(instance_)?user (str): User to run mysqld as -# Default to "%%MARIADB_USER%%" created by the port -# mysql_(instance_)?optfile (str): Server-specific option file. -# Default to "${mysql_dbdir}/my.cnf". -# mysql_(instance)?rundir (str): Default to "%%MARIADB_RUNDIR%%" -# mysql_instances (str): Set to "" by default. -# If defined, list of instances to enable - -. /etc/rc.subr - -name="mysql" -rcvar=mysql_enable - -load_rc_config $name - -: ${mysql_enable="NO"} -: ${mysql_user="%%MARIADB_USER%%"} -: ${mysql_dbdir="%%MARIADB_DBDIR%%"} -: ${mysql_optfile="%%ETCDIR%%/my.cnf"} -: ${mysql_rundir="%%MARIADB_RUNDIR%%"} - -command="/usr/sbin/daemon" -procname="%%PREFIX%%/libexec/mariadbd" -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 mysql_args="\${mysql_${instance}_args:-\"${mysql_args}\"}" - eval mysql_dbdir="\${mysql_${instance}_dbdir:-\"%%MARIADB_DBDIR%%_${instance}\"}" - eval mysql_user="\${mysql_${instance}_user:-\"${mysql_user}\"}" - eval mysql_socket="\${mysql_${instance}_socket:-\"%%MARIADB_RUNDIR%%_${instance}/%%MARIADB_SOCK%%\"}" - eval mysql_optfile="\${mysql_${instance}_optfile:-\"%%ETCDIR%%_${instance}/my.cnf\"}" - eval mysql_pidfile="\${mysql_${instance}_pidfile:-\"%%MARIADB_RUNDIR%%_${instance}/mysqld.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 - mysql_pidfile=${mysql_pidfile:-"%%MARIADB_RUNDIR%%/mysqld.pid"} - fi -fi - -pidfile=$mysql_pidfile -mysql_install_db="%%PREFIX%%/bin/mariadb-install-db" -mysql_install_db_args="--basedir=%%PREFIX%% --datadir=${mysql_dbdir} --force" -command_args="-c -f %%PREFIX%%/bin/mariadbd-safe --defaults-extra-file=${mysql_optfile} --user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysql_socket:+--socket=${mysql_socket}} ${mysql_args}" - -mysql_create_auth_tables() -{ - eval $mysql_install_db $mysql_install_db_args - [ $? -eq 0 ] && chown -R ${mysql_user}:$(id -gn $mysql_user) ${mysql_dbdir} -} - -mysql_prestart() -{ - local dir - for dir in /etc /usr/local/etc /etc/mysql /var/db/mysql; do - if [ -f "${dir}/my.cnf" ]; then - echo "Please merge existing ${dir}/my.cnf file with %%ETCDIR%%/conf.d/server.cnf" - return 1 - fi - done - if [ ! -d "${mysql_dbdir}/mysql/." ]; then - mysql_create_auth_tables || return 1 - fi - mysql_group="`/usr/bin/id -gn ${mysql_user}`" - [ "${mysql_socket}" = "" ] && mysql_rundir="%%MARIADB_RUNDIR%%" || mysql_rundir="`/usr/bin/dirname ${mysql_socket}`" - if [ ! -d "${mysql_rundir}" ]; then - install -d -o ${mysql_user} -g ${mysql_group} "${mysql_rundir}" - fi - return 0 - if [ ! -d "${mysql_rundir}" ]; then - install -d -u${mysql_user} -g$(id -gn $mysql_user) -m755 ${mysql_rundir} - fi -} - -mysql_poststart() -{ - local timeout=15 - while [ ! -f "${pidfile}" -a ${timeout} -gt 0 ]; do - timeout=$(( timeout - 1 )) - sleep 1 - done - return 0 -} - -run_rc_command "$1" diff --git a/databases/mariadb106-client/Makefile b/databases/mariadb106-client/Makefile deleted file mode 100644 --- a/databases/mariadb106-client/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -PORTNAME= mariadb -PKGNAMESUFFIX= 106-client - -COMMENT= Multithreaded SQL database (client) - -MASTERDIR= ${.CURDIR}/../${PORTNAME}${PKGNAMESUFFIX:C/-client/-server/} - -PLIST= ${.CURDIR}/pkg-plist - -.include "${MASTERDIR}/Makefile" diff --git a/databases/mariadb106-client/pkg-plist b/databases/mariadb106-client/pkg-plist deleted file mode 100644 --- a/databases/mariadb106-client/pkg-plist +++ /dev/null @@ -1,267 +0,0 @@ -bin/mariadb -bin/mariadb-access -bin/mariadb-admin -bin/mariadb-binlog -bin/mariadb-check -bin/mariadb-config -bin/mariadb-conv -bin/mariadb-convert-table-format -bin/mariadb-dump -@comment bin/mariadb-dumpslow -bin/mariadb-find-rows -bin/mariadb-hotcopy -bin/mariadb-import -bin/mariadb-plugin -bin/mariadb-show -@comment bin/mariadb-secure-installation -bin/mariadb-setpermission -bin/mariadb-slap -bin/mariadb-test -bin/mariadb-waitpid -bin/mariadb_config -bin/msql2mysql -bin/mysql -bin/mysql_config -bin/mysql_convert_table_format -bin/mysql_find_rows -@comment bin/mysql_secure_installation -bin/mysql_setpermission -@comment bin/mysql_plugin -@comment bin/mysql_waitpid -bin/mysqlaccess -bin/mysqladmin -bin/mysqlbinlog -bin/mysqlcheck -bin/mysqldump -@comment bin/mysqldumpslow -bin/mysqlhotcopy -bin/mysqlimport -bin/mysqlshow -bin/mysqlslap -bin/mysqltest -@comment bin/mytop -bin/my_print_defaults -bin/replace -@sample %%ETCDIR%%/my.cnf.sample -@sample %%ETCDIR%%/conf.d/client.cnf.sample -include/mysql/errmsg.h -include/mysql/ma_list.h -include/mysql/ma_pvio.h -include/mysql/ma_tls.h -include/mysql/mariadb/ma_io.h -include/mysql/mariadb_com.h -include/mysql/mariadb_ctype.h -include/mysql/mariadb_dyncol.h -include/mysql/mariadb_rpl.h -include/mysql/mariadb_stmt.h -include/mysql/mariadb_version.h -include/mysql/my_alloca.h -include/mysql/my_config.h -include/mysql/my_global.h -include/mysql/my_sys.h -include/mysql/mysql.h -include/mysql/mysql_com.h -include/mysql/mysql_version.h -include/mysql/mysql/client_plugin.h -include/mysql/mysql/plugin_auth.h -include/mysql/mysql/plugin_auth_common.h -include/mysql/mysqld_error.h -%%NO_GSSAPI_NONE%%lib/mysql/plugin/auth_gssapi_client.so -lib/mysql/libmariadb.a -lib/mysql/libmariadb.so -lib/mysql/libmariadb.so.3 -lib/mysql/libmariadbclient.a -lib/mysql/libmysqlclient.a -lib/mysql/libmysqlclient.so -lib/mysql/libmysqlclient_r.a -lib/mysql/libmysqlclient_r.so -lib/mysql/libmysqlservices.a -lib/mysql/plugin/caching_sha2_password.so -lib/mysql/plugin/client_ed25519.so -lib/mysql/plugin/daemon_example.ini -lib/mysql/plugin/dialog.so -lib/mysql/plugin/mysql_clear_password.so -lib/mysql/plugin/sha256_password.so -@comment lib/mysql/plugin/zstd.so -libdata/pkgconfig/libmariadb.pc -share/man/man1/mariadb.1.gz -share/man/man1/mariadb-access.1.gz -share/man/man1/mariadb-admin.1.gz -share/man/man1/mariadb-binlog.1.gz -share/man/man1/mariadb-check.1.gz -share/man/man1/mariadb-client-test-embedded.1.gz -share/man/man1/mariadb-client-test.1.gz -share/man/man1/mariadb-convert-table-format.1.gz -share/man/man1/mariadb_config.1.gz -share/man/man1/mariadb-dump.1.gz -@comment share/man/man1/mariadb-dumpslow.1.gz -@comment share/man/man1/mariadb-embedded.1.gz -share/man/man1/mariadb-find-rows.1.gz -share/man/man1/mariadb-hotcopy.1.gz -share/man/man1/mariadb-import.1.gz -share/man/man1/mariadb-plugin.1.gz -@comment share/man/man1/mariadb-secure-installation.1.gz -share/man/man1/mariadb-setpermission.1.gz -share/man/man1/mariadb-show.1.gz -share/man/man1/mariadb-slap.1.gz -share/man/man1/mariadb-test-embedded.1.gz -share/man/man1/mariadb-test.1.gz -@comment share/man/man1/mariadb-tzinfo-to-sql.1.gz -@comment share/man/man1/mariadb-waitpid.1.gz -share/man/man1/msql2mysql.1.gz -share/man/man1/my_print_defaults.1.gz -share/man/man1/my_safe_process.1.gz -@comment share/man/man1/myisam_ftdump.1.gz -@comment share/man/man1/myisamchk.1.gz -@comment share/man/man1/myisamlog.1.gz -@comment share/man/man1/myisampack.1.gz -share/man/man1/mysql-stress-test.pl.1.gz -share/man/man1/mysql-test-run.pl.1.gz -share/man/man1/mysql.1.gz -share/man/man1/mysql_client_test.1.gz -share/man/man1/mysql_client_test_embedded.1.gz -share/man/man1/mysql_config.1.gz -share/man/man1/mysql_convert_table_format.1.gz -share/man/man1/mysql_embedded.1.gz -share/man/man1/mysql_find_rows.1.gz -share/man/man1/mysql_plugin.1.gz -@comment share/man/man1/mysql_secure_installation.1.gz -share/man/man1/mysql_setpermission.1.gz -@comment share/man/man1/mysql_tzinfo_to_sql.1.gz -@comment share/man/man1/mysql_waitpid.1.gz -share/man/man1/mysqlaccess.1.gz -share/man/man1/mysqladmin.1.gz -share/man/man1/mysqlbinlog.1.gz -share/man/man1/mysqlcheck.1.gz -share/man/man1/mysqldump.1.gz -@comment share/man/man1/mysqldumpslow.1.gz -share/man/man1/mysqlhotcopy.1.gz -share/man/man1/mysqlimport.1.gz -share/man/man1/mysqlshow.1.gz -share/man/man1/mysqlslap.1.gz -share/man/man1/mysqltest.1.gz -share/man/man1/mysqltest_embedded.1.gz -@comment share/man/man1/mytop.1.gz -@comment share/man/man1/perror.1.gz -share/man/man1/replace.1.gz -@comment share/man/man1/resolve_stack_dump.1.gz -share/man/man3/mariadb_cancel.3.gz -share/man/man3/mariadb_connection.3.gz -share/man/man3/mariadb_dyncol_check.3.gz -share/man/man3/mariadb_dyncol_column_cmp_named.3.gz -share/man/man3/mariadb_dyncol_column_count.3.gz -share/man/man3/mariadb_dyncol_create_many_named.3.gz -share/man/man3/mariadb_dyncol_create_many_num.3.gz -share/man/man3/mariadb_dyncol_exists_named.3.gz -share/man/man3/mariadb_dyncol_exists_num.3.gz -share/man/man3/mariadb_dyncol_free.3.gz -share/man/man3/mariadb_dyncol_list_named.3.gz -share/man/man3/mariadb_dyncol_list_num.3.gz -share/man/man3/mariadb_dyncol_unpack.3.gz -share/man/man3/mariadb_dyncol_update_many_named.3.gz -share/man/man3/mariadb_dyncol_update_many_num.3.gz -share/man/man3/mariadb_get_infov.3.gz -share/man/man3/mariadb_reconnect.3.gz -share/man/man3/mariadb_rpl_close.3.gz -share/man/man3/mariadb_rpl_fetch.3.gz -share/man/man3/mariadb_rpl_get_optionsv.3.gz -share/man/man3/mariadb_rpl_open.3.gz -share/man/man3/mariadb_rpl_optionsv.3.gz -share/man/man3/mariadb_stmt_execute_direct.3.gz -share/man/man3/mariadb_stmt_fetch_fields.3.gz -share/man/man3/mysql_affected_rows.3.gz -share/man/man3/mysql_autocommit.3.gz -share/man/man3/mysql_change_user.3.gz -share/man/man3/mysql_close.3.gz -share/man/man3/mysql_commit.3.gz -share/man/man3/mysql_data_seek.3.gz -share/man/man3/mysql_errno.3.gz -share/man/man3/mysql_error.3.gz -share/man/man3/mysql_fetch_field.3.gz -share/man/man3/mysql_fetch_field_direct.3.gz -share/man/man3/mysql_fetch_fields.3.gz -share/man/man3/mysql_fetch_lengths.3.gz -share/man/man3/mysql_fetch_row.3.gz -share/man/man3/mysql_field_count.3.gz -share/man/man3/mysql_field_seek.3.gz -share/man/man3/mysql_field_tell.3.gz -share/man/man3/mysql_free_result.3.gz -share/man/man3/mysql_get_character_set_info.3.gz -share/man/man3/mysql_get_client_info.3.gz -share/man/man3/mysql_get_client_version.3.gz -share/man/man3/mysql_get_host_info.3.gz -share/man/man3/mysql_get_proto_info.3.gz -share/man/man3/mysql_get_server_info.3.gz -share/man/man3/mysql_get_server_version.3.gz -share/man/man3/mysql_get_socket.3.gz -share/man/man3/mysql_get_ssl_cipher.3.gz -share/man/man3/mysql_hex_string.3.gz -share/man/man3/mysql_info.3.gz -share/man/man3/mysql_init.3.gz -share/man/man3/mysql_kill.3.gz -share/man/man3/mysql_more_results.3.gz -share/man/man3/mysql_next_result.3.gz -share/man/man3/mysql_num_fields.3.gz -share/man/man3/mysql_num_rows.3.gz -share/man/man3/mysql_options.3.gz -share/man/man3/mysql_options4.3.gz -share/man/man3/mysql_optionsv.3.gz -share/man/man3/mysql_ping.3.gz -share/man/man3/mysql_query.3.gz -share/man/man3/mysql_read_query_result.3.gz -share/man/man3/mysql_real_connect.3.gz -share/man/man3/mysql_real_escape_string.3.gz -share/man/man3/mysql_real_query.3.gz -share/man/man3/mysql_refresh.3.gz -share/man/man3/mysql_reset_connection.3.gz -share/man/man3/mysql_rollback.3.gz -share/man/man3/mysql_row_seek.3.gz -share/man/man3/mysql_row_tell.3.gz -share/man/man3/mysql_select_db.3.gz -share/man/man3/mysql_send_query.3.gz -share/man/man3/mysql_server_end.3.gz -share/man/man3/mysql_server_init.3.gz -share/man/man3/mysql_session_track_get_first.3.gz -share/man/man3/mysql_session_track_get_next.3.gz -share/man/man3/mysql_set_character_set.3.gz -share/man/man3/mysql_set_server_option.3.gz -share/man/man3/mysql_shutdown.3.gz -share/man/man3/mysql_sqlstate.3.gz -share/man/man3/mysql_ssl_set.3.gz -share/man/man3/mysql_stat.3.gz -share/man/man3/mysql_stmt_affected_rows.3.gz -share/man/man3/mysql_stmt_attr_get.3.gz -share/man/man3/mysql_stmt_attr_set.3.gz -share/man/man3/mysql_stmt_bind_param.3.gz -share/man/man3/mysql_stmt_bind_result.3.gz -share/man/man3/mysql_stmt_close.3.gz -share/man/man3/mysql_stmt_data_seek.3.gz -share/man/man3/mysql_stmt_errno.3.gz -share/man/man3/mysql_stmt_error.3.gz -share/man/man3/mysql_stmt_execute.3.gz -share/man/man3/mysql_stmt_fetch.3.gz -share/man/man3/mysql_stmt_fetch_column.3.gz -share/man/man3/mysql_stmt_field_count.3.gz -share/man/man3/mysql_stmt_free_result.3.gz -share/man/man3/mysql_stmt_init.3.gz -share/man/man3/mysql_stmt_insert_id.3.gz -share/man/man3/mysql_stmt_more_results.3.gz -share/man/man3/mysql_stmt_next_result.3.gz -share/man/man3/mysql_stmt_num_rows.3.gz -share/man/man3/mysql_stmt_param_count.3.gz -share/man/man3/mysql_stmt_param_metadata.3.gz -share/man/man3/mysql_stmt_prepare.3.gz -share/man/man3/mysql_stmt_reset.3.gz -share/man/man3/mysql_stmt_result_metadata.3.gz -share/man/man3/mysql_stmt_row_seek.3.gz -share/man/man3/mysql_stmt_row_tell.3.gz -share/man/man3/mysql_stmt_send_long_data.3.gz -share/man/man3/mysql_stmt_sqlstate.3.gz -share/man/man3/mysql_stmt_store_result.3.gz -share/man/man3/mysql_stmt_warning_count.3.gz -share/man/man3/mysql_store_result.3.gz -share/man/man3/mysql_thread_end.3.gz -share/man/man3/mysql_thread_id.3.gz -share/man/man3/mysql_thread_init.3.gz -share/man/man3/mysql_use_result.3.gz -share/man/man3/mysql_warning_count.3.gz diff --git a/databases/mariadb106-server/Makefile b/databases/mariadb106-server/Makefile --- a/databases/mariadb106-server/Makefile +++ b/databases/mariadb106-server/Makefile @@ -40,6 +40,7 @@ SHEBANG_FILES= scripts/*.sh SITESDIR= mariadb/mariadb-${PORTVERSION}/source DOCSDIR= ${PREFIX}/share/doc/mysql +DATADIR= ${PREFIX}/share/mysql MARIADB_USER?= mysql MARIADB_GROUP?= mysql @@ -118,8 +119,9 @@ DISABLED_PLUGINS+= AUTH_TEST_PLUGIN DAEMON_EXAMPLE DIALOG_EXAMPLES \ EXAMPLE EXAMPLE_KEY_MANAGEMENT FTEXAMPLE -DATADIR= ${PREFIX}/share/mysql -ETCDIR= ${PREFIX}/etc/mysql +# Install to a prefix to be able to co-install multiple versions of the +# server. The client installs to ${LOCALBASE}. +PREFIX?= ${LOCALBASE}/mariadb10.06 CONFLICTS_INSTALL= mariadb10[0-57-9]-${PKGNAMESUFFIX:C/^[0-9]*-//}-* \ mariadb1011-${PKGNAMESUFFIX:C/^[0-9]*-//}-* \ @@ -146,10 +148,10 @@ .else # ! ${PKGNAMESUFFIX:M*-client} # MySQL-Server part -USES+= mysql:106m +USES+= mysql USE_LDCONFIG+= ${PREFIX}/lib/mysql/plugin -USE_RC_SUBR= mysql-server +USE_RC_SUBR= mariadb106-server CMAKE_ON+= CMAKE_SKIP_BUILD_RPATH WITH_EMBEDDED_SERVER CMAKE_OFF+= WITH_CLIENT @@ -267,7 +269,7 @@ ${INSTALL_DATA} ${WRKDIR}/server.cnf.sample \ ${STAGEDIR}${ETCDIR}/conf.d/server.cnf.sample ${MV} ${STAGEDIR}${PREFIX}/share/user_map.conf \ - ${STAGEDIR}${PREFIX}/etc/mysql/user_map.conf.sample + ${STAGEDIR}${ETCDIR}/user_map.conf.sample ${MV} ${STAGEDIR}${PREFIX}/share/pam_user_map.so \ ${STAGEDIR}${PREFIX}/lib/mysql/ ${RM} -r ${STAGEDIR}${PREFIX}/share/mysql/policy \ @@ -279,7 +281,7 @@ ${STAGEDIR}${ETCDIR}/logrotate.d \ ${STAGEDIR}${DOCSDIR}/COPYING ${MKDIR} ${STAGEDIR}${MARIADB_LOGDIR} - ${SED} '/%%/d;/^@comment /d;s/^/@comment /' ${PORTSDIR}/${CATEGORIES:[1]}/${PORTNAME}${PKGNAMESUFFIX:S/-server/-client/}/pkg-plist \ + ${SED} '/%%/d;/^@comment /d;s/^/@comment /' ${PORTSDIR}/${CATEGORIES:[1]}/${PORTNAME}-client/pkg-plist \ >> ${TMPPLIST} post-install-MROONGA-on: diff --git a/databases/mariadb106-server/files/mariadb106-server.in b/databases/mariadb106-server/files/mariadb106-server.in new file mode 100644 --- /dev/null +++ b/databases/mariadb106-server/files/mariadb106-server.in @@ -0,0 +1,149 @@ +#!/bin/sh + +# PROVIDE: mariadb106 +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable mysql: +# mariadb106_(instance_)?enable (bool): Set to "NO" by default. +# Set it to "YES" to enable MySQL. +%%LEGACY_LIMITS%%# mariadb106_(instance_)?limits (bool): Set to "NO" by default. +%%LEGACY_LIMITS%%# Set it to yes to run `limits -e -U mysql` +%%LEGACY_LIMITS%%# just before mysql starts. +# mariadb106_(instance_)?dbdir (str): Default to "%%MARIADB_DBDIR%%" +# Base database directory. +# mariadb106_(instance_)?args (str): Custom additional arguments to be passed +# to mysqld_safe (default empty). +# mariadb106_(instance_)?pidfile (str): Custom PID file path and name. +# Default to "${mariadb106_dbdir}/${hostname}.pid". +# mariadb106_(instance_)?user (str): User to run mysqld as +# Default to "%%MARIADB_USER%%" created by the port +# mariadb106_(instance_)?optfile (str): Server-specific option file. +# Default to "${mariadb106_dbdir}/my.cnf". +# mariadb106_(instance)?rundir (str): Default to "%%MARIADB_RUNDIR%%" +# mariadb106_instances (str): Set to "" by default. +# If defined, list of instances to enable + +. /etc/rc.subr + +name="mariadb106" +rcvar=mariadb106_enable + +load_rc_config $name + +: ${mariadb106_enable="NO"} +%%LEGACY_LIMITS%%: ${mariadb106_limits="NO"} +: ${mariadb106_user="%%MARIADB_USER%%"} +%%LEGACY_LIMITS%%mariadb106_limits_args="-e -U ${mariadb106_user}" +: ${mariadb106_dbdir="%%MARIADB_DBDIR%%"} +: ${mariadb106_optfile="%%ETCDIR%%/my.cnf"} +: ${mariadb106_rundir="%%MARIADB_RUNDIR%%"} + +command="/usr/sbin/daemon" +procname="%%PREFIX%%/libexec/mariadbd" +start_precmd="${name}_prestart" +start_postcmd="${name}_poststart" + +if [ -n "$2" ]; then + instance="$2" + load_rc_config ${name}_${instance} + case "$mariadb106_instances" in + "$2 "*|*" $2 "*|*" $2"|"$2") + eval mariadb106_args="\${mariadb106_${instance}_args:-\"${mariadb106_args}\"}" + eval mariadb106_dbdir="\${mariadb106_${instance}_dbdir:-\"%%MARIADB_DBDIR%%_${instance}\"}" + %%LEGACY_LIMITS%%eval mariadb106_limits="\${mariadb106_${instance}_limits:-\"${mariadb106_limits}\"}" + eval mariadb106_user="\${mariadb106_${instance}_user:-\"${mariadb106_user}\"}" + %%LEGACY_LIMITS%%eval mariadb106_limits_args="\${mariadb106_${instance}_limits_args:-\"-e -U $mariadb106_user\"}" + eval mariadb106_socket="\${mariadb106_${instance}_socket:-\"%%MARIADB_RUNDIR%%_${instance}/%%MARIADB_SOCK%%\"}" + eval mariadb106_optfile="\${mariadb106_${instance}_optfile:-\"%%ETCDIR%%_${instance}/my.cnf\"}" + eval mariadb106_pidfile="\${mariadb106_${instance}_pidfile:-\"%%MARIADB_RUNDIR%%_${instance}/mysqld.pid\"}" + ;; + *) + err 1 "$2 not found in mariadb106_instances" ;; + esac +else + if [ -n "${mariadb106_instances}" -a -n "$1" ]; then + for instance in ${mariadb106_instances}; do + eval _enable="\${mariadb106_${instance}_enable}" + case "${_enable:-${mariadb106_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=mariadb106_enable + else + _var=mariadb106_${instance}_enable + fi + warn "Bad value" \ + "'${_enable:-${mariadb106_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 + mariadb106_pidfile=${mariadb106_pidfile:-"%%MARIADB_RUNDIR%%/mysqld.pid"} + fi +fi + +pidfile=$mariadb106_pidfile +mariadb106_install_db="%%PREFIX%%/bin/mariadb-install-db" +mariadb106_install_db_args="--basedir=%%PREFIX%% --datadir=${mariadb106_dbdir} --force" +command_args="-c -f %%PREFIX%%/bin/mariadbd-safe --defaults-extra-file=${mariadb106_optfile} --user=${mariadb106_user} --datadir=${mariadb106_dbdir} --pid-file=${pidfile} ${mariadb106_socket:+--socket=${mariadb106_socket}} ${mariadb106_args}" + +mariadb106_create_auth_tables() +{ + eval $mariadb106_install_db $mariadb106_install_db_args + [ $? -eq 0 ] && chown -R ${mariadb106_user}:$(id -gn $mariadb106_user) ${mariadb106_dbdir} +} + +mariadb106_prestart() +{ + local dir + for dir in /etc /usr/local/etc /etc/mysql /var/db/mysql; do + if [ -f "${dir}/my.cnf" ]; then + echo "Please merge existing ${dir}/my.cnf file with %%ETCDIR%%/conf.d/server.cnf" + return 1 + fi + done + if [ ! -d "${mariadb106_dbdir}/mysql/." ]; then + mariadb106_create_auth_tables || return 1 + fi + mariadb106_group="`/usr/bin/id -gn ${mariadb106_user}`" + [ "${mariadb106_socket}" = "" ] && mariadb106_rundir="%%MARIADB_RUNDIR%%" || mariadb106_rundir="`/usr/bin/dirname ${mariadb106_socket}`" + if [ ! -d "${mariadb106_rundir}" ]; then + install -d -o ${mariadb106_user} -g ${mariadb106_group} "${mariadb106_rundir}" + fi +%%LEGACY_LIMITS%% if checkyesno mariadb106_limits; then +%%LEGACY_LIMITS%% eval `/usr/bin/limits ${mariadb106_limits_args}` 2>/dev/null +%%LEGACY_LIMITS%% else +%%LEGACY_LIMITS%% return 0 +%%LEGACY_LIMITS%% fi +%%MODERN_LIMITS%% return 0 + if [ ! -d "${mariadb106_rundir}" ]; then + install -d -u${mariadb106_user} -g$(id -gn $mariadb106_user) -m755 ${mariadb106_rundir} + fi +} + +mariadb106_poststart() +{ + local timeout=15 + while [ ! -f "${pidfile}" -a ${timeout} -gt 0 ]; do + timeout=$(( timeout - 1 )) + sleep 1 + done + return 0 +} + +run_rc_command "$1" diff --git a/databases/mariadb106-server/files/mysql-server.in b/databases/mariadb106-server/files/mysql-server.in deleted file mode 100644 --- a/databases/mariadb106-server/files/mysql-server.in +++ /dev/null @@ -1,149 +0,0 @@ -#!/bin/sh - -# PROVIDE: mysql -# REQUIRE: LOGIN -# KEYWORD: shutdown -# -# Add the following line to /etc/rc.conf to enable mysql: -# mysql_(instance_)?enable (bool): Set to "NO" by default. -# Set it to "YES" to enable MySQL. -%%LEGACY_LIMITS%%# mysql_(instance_)?limits (bool): Set to "NO" by default. -%%LEGACY_LIMITS%%# Set it to yes to run `limits -e -U mysql` -%%LEGACY_LIMITS%%# just before mysql starts. -# mysql_(instance_)?dbdir (str): Default to "%%MARIADB_DBDIR%%" -# Base database directory. -# mysql_(instance_)?args (str): Custom additional arguments to be passed -# to mysqld_safe (default empty). -# mysql_(instance_)?pidfile (str): Custom PID file path and name. -# Default to "${mysql_dbdir}/${hostname}.pid". -# mysql_(instance_)?user (str): User to run mysqld as -# Default to "%%MARIADB_USER%%" created by the port -# mysql_(instance_)?optfile (str): Server-specific option file. -# Default to "${mysql_dbdir}/my.cnf". -# mysql_(instance)?rundir (str): Default to "%%MARIADB_RUNDIR%%" -# mysql_instances (str): Set to "" by default. -# If defined, list of instances to enable - -. /etc/rc.subr - -name="mysql" -rcvar=mysql_enable - -load_rc_config $name - -: ${mysql_enable="NO"} -%%LEGACY_LIMITS%%: ${mysql_limits="NO"} -: ${mysql_user="%%MARIADB_USER%%"} -%%LEGACY_LIMITS%%mysql_limits_args="-e -U ${mysql_user}" -: ${mysql_dbdir="%%MARIADB_DBDIR%%"} -: ${mysql_optfile="%%ETCDIR%%/my.cnf"} -: ${mysql_rundir="%%MARIADB_RUNDIR%%"} - -command="/usr/sbin/daemon" -procname="%%PREFIX%%/libexec/mariadbd" -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 mysql_args="\${mysql_${instance}_args:-\"${mysql_args}\"}" - eval mysql_dbdir="\${mysql_${instance}_dbdir:-\"%%MARIADB_DBDIR%%_${instance}\"}" - %%LEGACY_LIMITS%%eval mysql_limits="\${mysql_${instance}_limits:-\"${mysql_limits}\"}" - eval mysql_user="\${mysql_${instance}_user:-\"${mysql_user}\"}" - %%LEGACY_LIMITS%%eval mysql_limits_args="\${mysql_${instance}_limits_args:-\"-e -U $mysql_user\"}" - eval mysql_socket="\${mysql_${instance}_socket:-\"%%MARIADB_RUNDIR%%_${instance}/%%MARIADB_SOCK%%\"}" - eval mysql_optfile="\${mysql_${instance}_optfile:-\"%%ETCDIR%%_${instance}/my.cnf\"}" - eval mysql_pidfile="\${mysql_${instance}_pidfile:-\"%%MARIADB_RUNDIR%%_${instance}/mysqld.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 - mysql_pidfile=${mysql_pidfile:-"%%MARIADB_RUNDIR%%/mysqld.pid"} - fi -fi - -pidfile=$mysql_pidfile -mysql_install_db="%%PREFIX%%/bin/mariadb-install-db" -mysql_install_db_args="--basedir=%%PREFIX%% --datadir=${mysql_dbdir} --force" -command_args="-c -f %%PREFIX%%/bin/mariadbd-safe --defaults-extra-file=${mysql_optfile} --user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysql_socket:+--socket=${mysql_socket}} ${mysql_args}" - -mysql_create_auth_tables() -{ - eval $mysql_install_db $mysql_install_db_args - [ $? -eq 0 ] && chown -R ${mysql_user}:$(id -gn $mysql_user) ${mysql_dbdir} -} - -mysql_prestart() -{ - local dir - for dir in /etc /usr/local/etc /etc/mysql /var/db/mysql; do - if [ -f "${dir}/my.cnf" ]; then - echo "Please merge existing ${dir}/my.cnf file with %%ETCDIR%%/conf.d/server.cnf" - return 1 - fi - done - if [ ! -d "${mysql_dbdir}/mysql/." ]; then - mysql_create_auth_tables || return 1 - fi - mysql_group="`/usr/bin/id -gn ${mysql_user}`" - [ "${mysql_socket}" = "" ] && mysql_rundir="%%MARIADB_RUNDIR%%" || mysql_rundir="`/usr/bin/dirname ${mysql_socket}`" - if [ ! -d "${mysql_rundir}" ]; then - install -d -o ${mysql_user} -g ${mysql_group} "${mysql_rundir}" - fi -%%LEGACY_LIMITS%% if checkyesno mysql_limits; then -%%LEGACY_LIMITS%% eval `/usr/bin/limits ${mysql_limits_args}` 2>/dev/null -%%LEGACY_LIMITS%% else -%%LEGACY_LIMITS%% return 0 -%%LEGACY_LIMITS%% fi -%%MODERN_LIMITS%% return 0 - if [ ! -d "${mysql_rundir}" ]; then - install -d -u${mysql_user} -g$(id -gn $mysql_user) -m755 ${mysql_rundir} - fi -} - -mysql_poststart() -{ - local timeout=15 - while [ ! -f "${pidfile}" -a ${timeout} -gt 0 ]; do - timeout=$(( timeout - 1 )) - sleep 1 - done - return 0 -} - -run_rc_command "$1" diff --git a/databases/mroonga/Makefile b/databases/mroonga/Makefile --- a/databases/mroonga/Makefile +++ b/databases/mroonga/Makefile @@ -14,13 +14,15 @@ BUILD_DEPENDS= ${NONEXISTENT}:${_MYSQL_SERVER}:configure LIB_DEPENDS= libgroonga.so:textproc/groonga -USES= compiler:c11 libtool mysql pkgconfig shebangfix +USES= compiler:c11 libtool mysql:build,run pkgconfig shebangfix IGNORE_WITH_MYSQL= 105m 106m 1011m 81 SHEBANG_FILES= data/rpm/post.sh data/rpm/preun.sh GNU_CONFIGURE= yes GNU_CONFIGURE_MANPREFIX=${PREFIX}/share +# TODO: fix this to use the proper server sources +BROKEN= needs a workaround with the new mysql server/client handling CONFIGURE_ARGS= --with-mysql-build="$$(cd ${PORTSDIR}/${_MYSQL_SERVER}; ${MAKE} -V BUILD_WRKSRC)" \ --with-mysql-config=${PREFIX}/bin/mysql_config \ --with-mysql-source="$$(cd ${PORTSDIR}/${_MYSQL_SERVER}; ${MAKE} -V WRKSRC)" diff --git a/databases/mydumper/Makefile b/databases/mydumper/Makefile --- a/databases/mydumper/Makefile +++ b/databases/mydumper/Makefile @@ -11,7 +11,7 @@ LIB_DEPENDS= libpcre.so:devel/pcre -USES= cmake:insource compiler:c11 gnome mysql pkgconfig ssl +USES= cmake:insource compiler:c11 gnome mysql:build,run pkgconfig ssl USE_GNOME= glib20 CMAKE_ARGS= ${CMAKE_ARGS_${CHOSEN_COMPILER_TYPE}} diff --git a/databases/mysql++/Makefile b/databases/mysql++/Makefile --- a/databases/mysql++/Makefile +++ b/databases/mysql++/Makefile @@ -9,7 +9,7 @@ LICENSE= LGPL21 -USES= gmake mysql +USES= gmake mysql:build,run USE_CXXSTD= c++14 USE_LDCONFIG= yes diff --git a/databases/mysql81-client/Makefile b/databases/mysql-client/Makefile rename from databases/mysql81-client/Makefile rename to databases/mysql-client/Makefile --- a/databases/mysql81-client/Makefile +++ b/databases/mysql-client/Makefile @@ -1,12 +1,16 @@ PORTNAME= mysql PORTREVISION= 0 -PKGNAMESUFFIX= 81-client +PKGNAMESUFFIX= -client COMMENT= Multithreaded SQL database (client) LICENSE+= LGPL21 -MASTERDIR= ${.CURDIR}/../mysql81-server +_MYSQL_LATEST= 81 +MASTERDIR= ${.CURDIR}/../${PORTNAME}${_MYSQL_LATEST}-server +# Install to a prefix to be able to co-install multiple versions of the +# server. Client installs directly to PREFIX +PREFIX= ${LOCALBASE} PKGMESSAGE= ${.CURDIR}/pkg-message PATCHDIR= ${MASTERDIR}/files diff --git a/databases/mysql80-client/pkg-message b/databases/mysql-client/pkg-message rename from databases/mysql80-client/pkg-message rename to databases/mysql-client/pkg-message diff --git a/databases/mysql81-client/pkg-plist b/databases/mysql-client/pkg-plist rename from databases/mysql81-client/pkg-plist rename to databases/mysql-client/pkg-plist diff --git a/databases/mysql-connector-c++/Makefile b/databases/mysql-connector-c++/Makefile --- a/databases/mysql-connector-c++/Makefile +++ b/databases/mysql-connector-c++/Makefile @@ -17,7 +17,7 @@ libprotobuf.so:devel/protobuf \ libzstd.so:archivers/zstd -USES= cmake:noninja compiler:c++17-lang cpe gmake mysql ssl +USES= cmake:noninja compiler:c++17-lang cpe gmake mysql:build,run ssl IGNORE_WITH_MYSQL= 105m 106m 1011m CPE_VENDOR= oracle USE_CXXSTD= c++17 diff --git a/databases/mysql-connector-odbc-80/Makefile b/databases/mysql-connector-odbc-80/Makefile --- a/databases/mysql-connector-odbc-80/Makefile +++ b/databases/mysql-connector-odbc-80/Makefile @@ -16,7 +16,7 @@ libunwind.so:devel/libunwind \ libzstd.so:archivers/zstd -USES= cmake compiler:c++11-lang localbase:ldflags mysql:80 ssl +USES= cmake compiler:c++11-lang localbase:ldflags mysql:build,run ssl USE_LDCONFIG= yes CMAKE_ARGS= -DWITH_UNIXODBC=1 -DDISABLE_GUI=1 diff --git a/databases/mysql80-client/Makefile b/databases/mysql80-client/Makefile deleted file mode 100644 --- a/databases/mysql80-client/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -PORTNAME= mysql -PORTREVISION= 0 -PKGNAMESUFFIX= 80-client - -COMMENT= Multithreaded SQL database (client) - -LICENSE+= LGPL21 - -MASTERDIR= ${.CURDIR}/../mysql80-server - -PKGMESSAGE= ${.CURDIR}/pkg-message -PATCHDIR= ${MASTERDIR}/files -PLIST= ${.CURDIR}/pkg-plist - -CONFLICTS_INSTALL= mysql8[1-9]-client \ - mysql[0-79][0-9]-client \ - mariadb[0-9][0-9]-client \ - percona[0-9][0-9]-client - -CMAKE_ARGS+= -DWITHOUT_SERVER=1 -DINSTALL_SUPPORTFILESDIR=0 - -USE_LDCONFIG+= ${PREFIX}/lib/mysql - -MMAN1= comp_err.1 lz4_decompress.1 mysql.1 mysql_config.1 mysql_config_editor.1 \ - mysqladmin.1 mysqlbinlog.1 mysqlcheck.1 mysqldump.1 mysqlimport.1 mysqlman.1 \ - mysqlpump.1 mysqlshow.1 mysqlslap.1 perror.1 zlib_decompress.1 - -CLIENT_ONLY= yes - -OPTIONS_GROUP+= PLUGINS -PLUGINS_DESC= Default Client Plugins -OPTIONS_GROUP_PLUGINS= SASLCLIENT -SASLCLIENT_DESC= SASL client plugin module -SASLCLIENT_CMAKE_BOOL= WITH_AUTHENTICATION_LDAP -SASLCLIENT_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2 -SASLCLIENT_USES= ldap - -OPTIONS_DEFAULT+= SASLCLIENT -OPTIONS_SUB= yes - -# issue 166367: adding symlinks for back-compatibility with ${lib}_r -post-install: -# @${RM} ${STAGEDIR}${PREFIX}/lib/mysql/private/libprotobuf-lite.so.3.19.4 -# @${RM} ${STAGEDIR}${PREFIX}/lib/mysql/private/libprotobuf.so.3.19.4 - @${RM} -r ${STAGEDIR}${PREFIX}/lib/mysql/private - @${LN} -s libmysqlclient.a ${STAGEDIR}${PREFIX}/lib/mysql/libmysqlclient_r.a - @${LN} -s libmysqlclient.so ${STAGEDIR}${PREFIX}/lib/mysql/libmysqlclient_r.so - @${LN} -s libmysqlclient.so.21 ${STAGEDIR}${PREFIX}/lib/mysql/libmysqlclient_r.so.21 - -.include "${MASTERDIR}/Makefile" diff --git a/databases/mysql80-client/pkg-plist b/databases/mysql80-client/pkg-plist deleted file mode 100644 --- a/databases/mysql80-client/pkg-plist +++ /dev/null @@ -1,58 +0,0 @@ -bin/comp_err -bin/my_print_defaults -bin/mysql -bin/mysql_config -bin/mysql_config_editor -bin/mysql_migrate_keyring -bin/mysqladmin -bin/mysqlbinlog -bin/mysqlcheck -bin/mysqldump -bin/mysqlimport -bin/mysqlpump -bin/mysqlshow -bin/mysqlslap -bin/perror -@comment bin/zlib_decompress -include/mysql/errmsg.h -include/mysql/field_types.h -include/mysql/my_command.h -include/mysql/my_compress.h -include/mysql/my_list.h -include/mysql/mysql.h -include/mysql/mysql/client_plugin.h -include/mysql/mysql/plugin_auth_common.h -include/mysql/mysql/udf_registration_types.h -include/mysql/mysql_com.h -include/mysql/mysql_time.h -include/mysql/mysql_version.h -include/mysql/mysqld_error.h -lib/mysql/libmysqlclient.a -lib/mysql/libmysqlclient.so -lib/mysql/libmysqlclient.so.21 -lib/mysql/libmysqlclient_r.a -lib/mysql/libmysqlclient_r.so -lib/mysql/libmysqlclient_r.so.21 -@comment lib/private/libprotobuf-lite.so.3.19.4 -@comment lib/private/libprotobuf.so.3.19.4 -%%SASLCLIENT%%lib/mysql/plugin/authentication_ldap_sasl_client.so -lib/mysql/plugin/authentication_fido_client.so -lib/mysql/plugin/authentication_oci_client.so -libdata/pkgconfig/mysqlclient.pc -@comment share/man/man1/comp_err.1.gz -@comment share/man/man1/lz4_decompress.1.gz -@comment share/man/man1/mysql.1.gz -@comment share/man/man1/mysql_config.1.gz -@comment share/man/man1/mysql_config_editor.1.gz -@comment share/man/man1/mysqladmin.1.gz -@comment share/man/man1/mysqlbinlog.1.gz -@comment share/man/man1/mysqlcheck.1.gz -@comment share/man/man1/mysqldump.1.gz -@comment share/man/man1/mysqlimport.1.gz -@comment share/man/man1/mysqlman.1.gz -@comment share/man/man1/mysqlpump.1.gz -@comment share/man/man1/mysqlshow.1.gz -@comment share/man/man1/mysqlslap.1.gz -@comment share/man/man1/perror.1.gz -@comment share/man/man1/zlib_decompress.1.gz -share/aclocal/mysql.m4 diff --git a/databases/mysql80-server/Makefile b/databases/mysql80-server/Makefile --- a/databases/mysql80-server/Makefile +++ b/databases/mysql80-server/Makefile @@ -14,7 +14,6 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}${DISTVERSIONSUFFIX} -SLAVEDIRS= databases/mysql80-client USES= bison:build cmake:noninja cpe groff:run libedit localbase \ ncurses perl5 pkgconfig shebangfix ssl @@ -99,6 +98,10 @@ -DWITHOUT_ROCKSDB_STORAGE_ENGINE=1 \ -DWITHOUT_TOKUDB_STORAGE_ENGINE=1 +# Install to a prefix to be able to co-install multiple versions of the +# server. Client installs directly to PREFIX +PREFIX?= ${LOCALBASE}/mysql80 + SHEBANG_FILES= scripts/*.pl* scripts/*.sh .ifdef USE_MYSQL @@ -116,14 +119,14 @@ # MySQL-Server part .if !defined(CLIENT_ONLY) -USES+= mysql:80 +USES+= mysql CONFLICTS_INSTALL= mysql*-server \ mysqlwsrep*-server \ mariadb*-server \ percona*-server -USE_RC_SUBR= mysql-server +USE_RC_SUBR= mysql80-server SUB_FILES= my.cnf.sample pkg-message diff --git a/databases/mysql80-server/files/mysql-server.in b/databases/mysql80-server/files/mysql-server.in deleted file mode 100644 --- a/databases/mysql80-server/files/mysql-server.in +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/sh - -# PROVIDE: mysql -# REQUIRE: LOGIN -# KEYWORD: shutdown - -# -# Add the following line to /etc/rc.conf to enable mysql: -# mysql_enable (bool): Set to "NO" by default. -# Set it to "YES" to enable MySQL. -# mysql_dbdir (str): Default to "%%MY_DBDIR%%" -# Base database directory. -# mysql_confdir (str): Default to "%%ETCDIR%%" -# Base configuration directory. -# mysql_optfile (str): Server-specific option file. -# Set it in the rc.conf or default behaviour of -# `mysqld_safe` itself, will be picking -# ${mysql_confdir}/my.cnf if it exists. -# mysql_pidfile (str): Custom PID file path and name. -# Default to "${mysql_dbdir}/${hostname}.pid". -# mysql_args (str): Custom additional arguments to be passed -# to mysqld_safe (default empty). -# - -. /etc/rc.subr - -name="mysql" -rcvar=mysql_enable - -load_rc_config $name - -: ${mysql_enable="NO"} -: ${mysql_dbdir="%%MY_DBDIR%%"} -: ${mysql_confdir="%%ETCDIR%%"} -if [ -f "${mysql_confdir}/my.cnf" ]; then -: ${mysql_optfile="${mysql_confdir}/my.cnf"} -elif [ -f "${mysql_dbdir}/my.cnf" ]; then -: ${mysql_optfile="${mysql_dbdir}/my.cnf"} -fi -if [ ! -z "${mysql_optfile}" ]; then -mysql_extra="--defaults-extra-file=${mysql_optfile}" -fi - -mysql_user="mysql" -: ${hostname:=`/bin/hostname`} -pidfile=${mysql_pidfile:-"${mysql_dbdir}/${hostname}.pid"} -command="/usr/sbin/daemon" -command_args="-c -f %%PREFIX%%/bin/mysqld_safe ${mysql_extra} --basedir=%%PREFIX%% --datadir=${mysql_dbdir} --pid-file=${pidfile} --user=${mysql_user} ${mysql_args} %%FEDER%% %%PERFSCHEMRC%%" -procname="%%PREFIX%%/libexec/mysqld" -start_precmd="${name}_prestart" -start_postcmd="${name}_poststart" -mysqld_init="${procname}" -mysqld_init_args="${mysql_extra} --initialize-insecure --basedir=%%PREFIX%% --datadir=${mysql_dbdir} --user=${mysql_user}" - -mysql_create_auth_tables() -{ - eval $mysqld_init $mysqld_init_args >/dev/null 2>/dev/null -} - -mysql_prestart() -{ - if [ ! -d "${mysql_dbdir}/mysql/." ]; then - mysql_create_auth_tables || return 1 - fi - return 0 -} - -mysql_poststart() -{ - local timeout=15 - while [ ! -f "${pidfile}" -a ${timeout} -gt 0 ]; do - timeout=$(( timeout - 1 )) - sleep 1 - done - return 0 -} - -run_rc_command "$1" diff --git a/databases/mysql80-server/files/mysql80-server.in b/databases/mysql80-server/files/mysql80-server.in new file mode 100644 --- /dev/null +++ b/databases/mysql80-server/files/mysql80-server.in @@ -0,0 +1,78 @@ +#!/bin/sh + +# PROVIDE: mysql80 +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# +# Add the following line to /etc/rc.conf to enable mysql: +# mysql80_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable MySQL. +# mysql80_dbdir (str): Default to "%%MY_DBDIR%%" +# Base database directory. +# mysql80_confdir (str): Default to "%%ETCDIR%%" +# Base configuration directory. +# mysql80_optfile (str): Server-specific option file. +# Set it in the rc.conf or default behaviour of +# `mysqld_safe` itself, will be picking +# ${mysql80_confdir}/my.cnf if it exists. +# mysql80_pidfile (str): Custom PID file path and name. +# Default to "${mysql80_dbdir}/${hostname}.pid". +# mysql80_args (str): Custom additional arguments to be passed +# to mysqld_safe (default empty). +# + +. /etc/rc.subr + +name="mysql80" +rcvar=mysql80_enable + +load_rc_config $name + +: ${mysql80_enable="NO"} +: ${mysql80_dbdir="%%MY_DBDIR%%"} +: ${mysql80_confdir="%%ETCDIR%%"} +if [ -f "${mysql80_confdir}/my.cnf" ]; then +: ${mysql80_optfile="${mysql80_confdir}/my.cnf"} +elif [ -f "${mysql80_dbdir}/my.cnf" ]; then +: ${mysql80_optfile="${mysql80_dbdir}/my.cnf"} +fi +if [ ! -z "${mysql80_optfile}" ]; then +mysql80_extra="--defaults-extra-file=${mysql80_optfile}" +fi + +mysql80_user="mysql" +: ${hostname:=`/bin/hostname`} +pidfile=${mysql80_pidfile:-"${mysql80_dbdir}/${hostname}.pid"} +command="/usr/sbin/daemon" +command_args="-c -f %%PREFIX%%/bin/mysqld_safe ${mysql80_extra} --basedir=%%PREFIX%% --datadir=${mysql80_dbdir} --pid-file=${pidfile} --user=${mysql80_user} ${mysql80_args} %%FEDER%% %%PERFSCHEMRC%%" +procname="%%PREFIX%%/libexec/mysqld" +start_precmd="${name}_prestart" +start_postcmd="${name}_poststart" +mysqld_init="${procname}" +mysqld_init_args="${mysql80_extra} --initialize-insecure --basedir=%%PREFIX%% --datadir=${mysql80_dbdir} --user=${mysql80_user}" + +mysql80_create_auth_tables() +{ + eval $mysqld_init $mysqld_init_args >/dev/null 2>/dev/null +} + +mysql80_prestart() +{ + if [ ! -d "${mysql80_dbdir}/mysql/." ]; then + mysql80_create_auth_tables || return 1 + fi + return 0 +} + +mysql80_poststart() +{ + local timeout=15 + while [ ! -f "${pidfile}" -a ${timeout} -gt 0 ]; do + timeout=$(( timeout - 1 )) + sleep 1 + done + return 0 +} + +run_rc_command "$1" diff --git a/databases/mysql80-server/pkg-plist b/databases/mysql80-server/pkg-plist --- a/databases/mysql80-server/pkg-plist +++ b/databases/mysql80-server/pkg-plist @@ -23,6 +23,7 @@ bin/mysqltest_safe_process bin/mysqlxtest etc/logrotate.d/mysqlrouter +%%ETCDIR%%/my.cnf.sample lib/mysql/libmysqlharness.so lib/mysql/libmysqlharness.so.1 lib/mysql/libmysqlharness_stdx.so @@ -44,6 +45,7 @@ lib/mysql/libmysqlrouter_metadata_cache.so.1 lib/mysql/libmysqlrouter_mysqlxmessages.so.1 lib/mysql/libmysqlrouter_routing.so.1 +lib/mysql/libprotobuf-lite.so.3.19.4 lib/mysql/mysqlrouter/connection_pool.so lib/mysql/mysqlrouter/destination_status.so lib/mysql/mysqlrouter/http_auth_backend.so @@ -57,13 +59,12 @@ lib/mysql/mysqlrouter/rest_metadata_cache.so lib/mysql/mysqlrouter/rest_router.so lib/mysql/mysqlrouter/rest_routing.so -lib/mysql/mysqlrouter/router_protobuf.so lib/mysql/mysqlrouter/router_openssl.so +lib/mysql/mysqlrouter/router_protobuf.so lib/mysql/mysqlrouter/routing.so lib/mysql/plugin/adt_null.so lib/mysql/plugin/auth.so lib/mysql/plugin/auth_test_plugin.so -lib/mysql/plugin/conflicting_variables.so lib/mysql/plugin/component_audit_api_message_emit.so lib/mysql/plugin/component_example_component1.so lib/mysql/plugin/component_example_component2.so @@ -108,7 +109,7 @@ lib/mysql/plugin/component_test_system_variable_source.so lib/mysql/plugin/component_test_table_access.so lib/mysql/plugin/component_test_udf_registration.so -@comment lib/mysql/plugin/component_test_udf_services.so +lib/mysql/plugin/component_test_udf_services.so lib/mysql/plugin/component_udf_reg_3_func.so lib/mysql/plugin/component_udf_reg_avg_func.so lib/mysql/plugin/component_udf_reg_int_func.so @@ -119,14 +120,15 @@ lib/mysql/plugin/component_udf_unreg_int_func.so lib/mysql/plugin/component_udf_unreg_real_func.so lib/mysql/plugin/component_validate_password.so +lib/mysql/plugin/conflicting_variables.so lib/mysql/plugin/connection_control.so lib/mysql/plugin/daemon_example.ini lib/mysql/plugin/ddl_rewriter.so lib/mysql/plugin/group_replication.so %%NO_EXAMPLE%%lib/mysql/plugin/ha_example.so lib/mysql/plugin/ha_mock.so -lib/mysql/plugin/component_test_udf_services.so lib/mysql/plugin/keyring_file.so +lib/mysql/plugin/keyring_udf.so lib/mysql/plugin/libdaemon_example.so lib/mysql/plugin/libtest_framework.so lib/mysql/plugin/libtest_services.so @@ -172,34 +174,13 @@ lib/mysql/plugin/test_services_command_services.so lib/mysql/plugin/test_services_host_application_signal.so lib/mysql/plugin/test_services_plugin_registry.so -lib/mysql/plugin/udf_example.so -lib/mysql/plugin/keyring_udf.so lib/mysql/plugin/test_udf_services.so +lib/mysql/plugin/udf_example.so lib/mysql/plugin/validate_password.so lib/mysql/plugin/version_token.so lib/mysql/private/libprotobuf-lite.so.3.19.4 lib/mysql/private/libprotobuf.so.3.19.4 -lib/mysql/libprotobuf-lite.so.3.19.4 libexec/mysqld -@comment share/man/man1/ibd2sdi.1.gz -@comment share/man/man1/innochecksum.1.gz -@comment share/man/man1/my_print_defaults.1.gz -@comment share/man/man1/myisam_ftdump.1.gz -@comment share/man/man1/myisamchk.1.gz -@comment share/man/man1/myisamlog.1.gz -@comment share/man/man1/myisampack.1.gz -@comment share/man/man1/mysql_secure_installation.1.gz -@comment share/man/man1/mysql_ssl_rsa_setup.1.gz -@comment share/man/man1/mysql_tzinfo_to_sql.1.gz -@comment share/man/man1/mysql_upgrade.1.gz -@comment share/man/man1/mysql.server.1.gz -@comment share/man/man1/mysqld_multi.1.gz -@comment share/man/man1/mysqld_safe.1.gz -@comment share/man/man1/mysqldumpslow.1.gz -@comment share/man/man1/mysqlrouter_passwd.1.gz -@comment share/man/man1/mysqlrouter_plugin_info.1.gz -@comment share/man/man1/mysqlrouter.1.gz -@comment share/man/man8/mysqld.8.gz %%DATADIR%%/bulgarian/errmsg.sys %%DATADIR%%/charsets/Index.xml %%DATADIR%%/charsets/README @@ -260,8 +241,6 @@ %%DATADIR%%/uninstall_rewriter.sql %%DATADIR%%router/docs/sample_mysqlrouter.conf @dir lib/mysql/plugin/debug -@dir %%DATADIR%%router/docs -@sample(root,wheel,0644) %%ETCDIR%%/my.cnf.sample -@dir(mysql,mysql,0750) %%ETCDIR%%/keyring -@dir(mysql,mysql,0750) %%MY_SECDIR%% -@dir(mysql,mysql,0750) %%MY_TMPDIR%% +@dir %%ETCDIR%%/keyring +@dir %%MY_TMPDIR%% +@dir %%MY_SECDIR%% diff --git a/databases/mysql81-client/pkg-message b/databases/mysql81-client/pkg-message deleted file mode 100644 --- a/databases/mysql81-client/pkg-message +++ /dev/null @@ -1,8 +0,0 @@ -[ -{ type: install - message: </dev/null 2>/dev/null -} - -mysql_prestart() -{ - if [ ! -d "${mysql_dbdir}/mysql/." ]; then - mysql_create_auth_tables || return 1 - fi - return 0 -} - -mysql_poststart() -{ - local timeout=15 - while [ ! -f "${pidfile}" -a ${timeout} -gt 0 ]; do - timeout=$(( timeout - 1 )) - sleep 1 - done - return 0 -} - -run_rc_command "$1" diff --git a/databases/mysql81-server/files/mysql81-server.in b/databases/mysql81-server/files/mysql81-server.in new file mode 100644 --- /dev/null +++ b/databases/mysql81-server/files/mysql81-server.in @@ -0,0 +1,78 @@ +#!/bin/sh + +# PROVIDE: mysql81 +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# +# Add the following line to /etc/rc.conf to enable mysql: +# mysql81_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable MySQL. +# mysql81_dbdir (str): Default to "%%MY_DBDIR%%" +# Base database directory. +# mysql81_confdir (str): Default to "%%ETCDIR%%" +# Base configuration directory. +# mysql81_optfile (str): Server-specific option file. +# Set it in the rc.conf or default behaviour of +# `mysqld_safe` itself, will be picking +# ${mysql81_confdir}/my.cnf if it exists. +# mysql81_pidfile (str): Custom PID file path and name. +# Default to "${mysql81_dbdir}/${hostname}.pid". +# mysql81_args (str): Custom additional arguments to be passed +# to mysqld_safe (default empty). +# + +. /etc/rc.subr + +name="mysql81" +rcvar=mysql81_enable + +load_rc_config $name + +: ${mysql81_enable="NO"} +: ${mysql81_dbdir="%%MY_DBDIR%%"} +: ${mysql81_confdir="%%ETCDIR%%"} +if [ -f "${mysql81_confdir}/my.cnf" ]; then +: ${mysql81_optfile="${mysql81_confdir}/my.cnf"} +elif [ -f "${mysql81_dbdir}/my.cnf" ]; then +: ${mysql81_optfile="${mysql81_dbdir}/my.cnf"} +fi +if [ ! -z "${mysql81_optfile}" ]; then +mysql81_extra="--defaults-extra-file=${mysql81_optfile}" +fi + +mysql81_user="mysql" +: ${hostname:=`/bin/hostname`} +pidfile=${mysql81_pidfile:-"${mysql81_dbdir}/${hostname}.pid"} +command="/usr/sbin/daemon" +command_args="-c -f %%PREFIX%%/bin/mysqld_safe ${mysql81_extra} --basedir=%%PREFIX%% --datadir=${mysql81_dbdir} --pid-file=${pidfile} --user=${mysql81_user} ${mysql81_args} %%FEDER%% %%PERFSCHEMRC%%" +procname="%%PREFIX%%/libexec/mysqld" +start_precmd="${name}_prestart" +start_postcmd="${name}_poststart" +mysqld_init="${procname}" +mysqld_init_args="${mysql81_extra} --initialize-insecure --basedir=%%PREFIX%% --datadir=${mysql81_dbdir} --user=${mysql81_user}" + +mysql81_create_auth_tables() +{ + eval $mysqld_init $mysqld_init_args >/dev/null 2>/dev/null +} + +mysql81_prestart() +{ + if [ ! -d "${mysql81_dbdir}/mysql/." ]; then + mysql81_create_auth_tables || return 1 + fi + return 0 +} + +mysql81_poststart() +{ + local timeout=15 + while [ ! -f "${pidfile}" -a ${timeout} -gt 0 ]; do + timeout=$(( timeout - 1 )) + sleep 1 + done + return 0 +} + +run_rc_command "$1" diff --git a/databases/mysql81-server/pkg-plist b/databases/mysql81-server/pkg-plist --- a/databases/mysql81-server/pkg-plist +++ b/databases/mysql81-server/pkg-plist @@ -247,7 +247,7 @@ %%DATADIR%%/ukrainian/errmsg.sys %%DATADIR%%/uninstall_rewriter.sql %%DATADIR%%router/docs/sample_mysqlrouter.conf -@dir %%ETCDIR%%/keyring @dir lib/mysql/plugin/debug -@dir %%MY_SECDIR%% +@dir %%ETCDIR%%/keyring @dir %%MY_TMPDIR%% +@dir %%MY_SECDIR%% diff --git a/databases/mysqltcl/Makefile b/databases/mysqltcl/Makefile --- a/databases/mysqltcl/Makefile +++ b/databases/mysqltcl/Makefile @@ -8,7 +8,7 @@ COMMENT= TCL module for accessing MySQL databases based on msqltcl WWW= http://www.xdobry.de/mysqltcl/ -USES= mysql tcl +USES= mysql:build,run tcl USE_LDCONFIG= yes PLIST_FILES= lib/${PORTNAME}-${PORTVERSION}/libmysqltcl${PORTVERSION}.so \ diff --git a/databases/ocaml-mysql/Makefile b/databases/ocaml-mysql/Makefile --- a/databases/ocaml-mysql/Makefile +++ b/databases/ocaml-mysql/Makefile @@ -12,8 +12,7 @@ LICENSE= LGPL21 -USES= gmake mysql -IGNORE_WITH_MYSQL= 80 81 +USES= gmake mysql:build,run USE_OCAML= yes USE_OCAML_FINDLIB= yes USE_OCAML_CAMLP4= yes @@ -32,6 +31,12 @@ DOCS_ALL_TARGET= htdoc +.include + +.if !empty(MYSQL_CLIENT_DEFAULT:Mmysql) +IGNORE= Does not build against mysql, switch the default to mariadb. +.endif + post-patch: ${REINPLACE_CMD} 's,OCAMLFIND_INSTFLAGS=,OCAMLFIND_INSTFLAGS=-ldconf ignore ,' \ ${WRKSRC}/Makefile.in @@ -40,4 +45,4 @@ @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/doc/mysql/html/* ${STAGEDIR}${DOCSDIR} -.include +.include diff --git a/databases/opendbx/Makefile b/databases/opendbx/Makefile --- a/databases/opendbx/Makefile +++ b/databases/opendbx/Makefile @@ -28,7 +28,7 @@ DRIVER_DESC= Database drivers OPTIONS_SUB= YES -MYSQL_USES= mysql +MYSQL_USES= mysql:build,run MYSQL_CPPFLAGS= -I${LOCALBASE}/include/mysql MYSQL_LDFLAGS= -L${LOCALBASE}/lib/mysql diff --git a/databases/postgresql-mysql_fdw/Makefile b/databases/postgresql-mysql_fdw/Makefile --- a/databases/postgresql-mysql_fdw/Makefile +++ b/databases/postgresql-mysql_fdw/Makefile @@ -11,7 +11,7 @@ LICENSE= PostgreSQL LICENSE_FILE= ${WRKSRC}/LICENSE -USES= gmake mysql pgsql:11+ +USES= gmake mysql:build,run pgsql:11+ WANT_PGSQL= server USE_GITHUB= yes GH_ACCOUNT= EnterpriseDB diff --git a/databases/proftpd-mod_sql_mysql/Makefile b/databases/proftpd-mod_sql_mysql/Makefile --- a/databases/proftpd-mod_sql_mysql/Makefile +++ b/databases/proftpd-mod_sql_mysql/Makefile @@ -12,7 +12,7 @@ MASTERDIR= ${.CURDIR}/../../ftp/proftpd -USES= cpe mysql +USES= cpe mysql:build,run INCLUDEDIRS= ${LOCALBASE}/include:${LOCALBASE}/include/mysql LIBDIRS= ${LOCALBASE}/lib diff --git a/databases/py-mysqlclient/Makefile b/databases/py-mysqlclient/Makefile --- a/databases/py-mysqlclient/Makefile +++ b/databases/py-mysqlclient/Makefile @@ -14,7 +14,7 @@ BUILD_DEPENDS= ${PY_SETUPTOOLS} \ ${PYTHON_PKGNAMEPREFIX}wheel>=0.37:devel/py-wheel@${PY_FLAVOR} -USES= compiler:c11 dos2unix iconv mysql pkgconfig python ssl +USES= compiler:c11 dos2unix iconv mysql:build,run pkgconfig python ssl USE_PYTHON= autoplist concurrent pep517 PORTDOCS= * diff --git a/databases/qt5-sqldrivers-mysql/Makefile b/databases/qt5-sqldrivers-mysql/Makefile --- a/databases/qt5-sqldrivers-mysql/Makefile +++ b/databases/qt5-sqldrivers-mysql/Makefile @@ -2,6 +2,6 @@ DB= MYSQL DB_DESC= MySQL -USES= mysql +USES= mysql:build,run .include "${.CURDIR:H:H}/devel/qt5/Makefile.sqldrivers" diff --git a/databases/qt6-base_sqldriver/Makefile b/databases/qt6-base_sqldriver/Makefile --- a/databases/qt6-base_sqldriver/Makefile +++ b/databases/qt6-base_sqldriver/Makefile @@ -23,7 +23,7 @@ CMAKE_OFF= ${FLAVORS:N${FLAVOR}:S/^/FEATURE_sql_/} \ FEATURE_sql_ibase -mysql_USES= mysql +mysql_USES= mysql:build,run odbc_LIB_DEPENDS= libodbc.so:databases/unixODBC psql_USES= pgsql sqlite_USES= sqlite:3 diff --git a/databases/rubygem-mysql/Makefile b/databases/rubygem-mysql/Makefile --- a/databases/rubygem-mysql/Makefile +++ b/databases/rubygem-mysql/Makefile @@ -11,7 +11,12 @@ LICENSE= GPLv2 RUBY LICENSE_COMB= dual -USES= gem mysql -IGNORE_WITH_MYSQL= 80 81 +USES= gem mysql:build,run -.include +.include + +.if !empty(MYSQL_CLIENT_DEFAULT:Mmysql) +IGNORE= Does not build against mysql, switch the default to mariadb. +.endif + +.include diff --git a/databases/rubygem-mysql2/Makefile b/databases/rubygem-mysql2/Makefile --- a/databases/rubygem-mysql2/Makefile +++ b/databases/rubygem-mysql2/Makefile @@ -10,6 +10,6 @@ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE -USES= gem mysql ssl +USES= gem mysql:build ssl .include diff --git a/databases/soci/Makefile b/databases/soci/Makefile --- a/databases/soci/Makefile +++ b/databases/soci/Makefile @@ -45,7 +45,7 @@ FIREBIRD_USES= firebird FIREBIRD_CMAKE_BOOL= WITH_FIREBIRD -MYSQL_USES= mysql +MYSQL_USES= mysql:build,run MYSQL_CMAKE_BOOL= WITH_MYSQL ODBC_LIB_DEPENDS= libodbc.so:databases/unixODBC diff --git a/databases/sqlclient/Makefile b/databases/sqlclient/Makefile --- a/databases/sqlclient/Makefile +++ b/databases/sqlclient/Makefile @@ -13,7 +13,7 @@ LIB_DEPENDS= libPerformance.so:devel/performance \ libsqlite3.so:databases/sqlite3 -USES= gnustep mysql pgsql +USES= gnustep mysql:build,run pgsql USE_GNUSTEP= base build GNU_CONFIGURE= yes USE_LDCONFIG= ${GNUSTEP_LOCAL_LIBRARIES} diff --git a/databases/tcl-Mysql/Makefile b/databases/tcl-Mysql/Makefile --- a/databases/tcl-Mysql/Makefile +++ b/databases/tcl-Mysql/Makefile @@ -15,7 +15,7 @@ OPTIONS_DEFINE= DOCS -USES= mysql tcl tar:tgz +USES= mysql:build,run tcl tar:tgz TCL_NODOT= tcl${TCL_VER:S/.//} WRKSRC= ${WRKDIR}/tcl-sql LIB_NAME= libTclMySQL.so.1 diff --git a/databases/tdbc/Makefile b/databases/tdbc/Makefile --- a/databases/tdbc/Makefile +++ b/databases/tdbc/Makefile @@ -35,7 +35,7 @@ # MySQL MYSQL_VARS= MODULES+=tdbcmysql -MYSQL_USES= mysql:client +MYSQL_USES= mysql MYSQL_DISTFILES= ${PORTNAME}mysql${PORTVERSION}${EXTRACT_SUFX} # ODBC diff --git a/deskutils/moregroupware/Makefile b/deskutils/moregroupware/Makefile --- a/deskutils/moregroupware/Makefile +++ b/deskutils/moregroupware/Makefile @@ -29,7 +29,7 @@ ADDONS_DESC= install additional workgroup features (addons) ADDONS_DISTFILES= ${PORTNAME}-addons-${PORTVERSION}${EXTRACT_SUFX} -MYSQL_USES= mysql:server +MYSQL_USES= mysql NLS_USES= gettext PGSQL_USES= pgsql diff --git a/devel/cbang/Makefile b/devel/cbang/Makefile --- a/devel/cbang/Makefile +++ b/devel/cbang/Makefile @@ -23,7 +23,7 @@ USE_GITHUB= yes GH_ACCOUNT= CauldronDevelopmentLLC -USES= compiler:c++17-lang localbase mysql:client python:test scons \ +USES= compiler:c++17-lang localbase mysql python:test scons \ sqlite ssl USE_CXXSTD= gnu++17 USE_LDCONFIG= yes diff --git a/devel/gearmand/Makefile b/devel/gearmand/Makefile --- a/devel/gearmand/Makefile +++ b/devel/gearmand/Makefile @@ -52,7 +52,7 @@ LIBHIREDIS_LDFLAGS=-L${LOCALBASE}/lib MEMCACHED_LIB_DEPENDS= libmemcached.so:databases/libmemcached MEMCACHED_CONFIGURE_ENABLE= libmemcached -MYSQL_USES= mysql +MYSQL_USES= mysql:build,run MYSQL_CONFIGURE_ON= --with-mysql=yes MYSQL_CONFIGURE_OFF= --with-mysql=no MYSQL_VARS= IGNORE_WITH_MYSQL="80 81" diff --git a/devel/poco/Makefile b/devel/poco/Makefile --- a/devel/poco/Makefile +++ b/devel/poco/Makefile @@ -43,7 +43,7 @@ ZIP_DESC= Enable Zip support # Database support -MYSQL_USES= mysql +MYSQL_USES= mysql:build,run MYSQL_CMAKE_BOOL= ENABLE_DATA_MYSQL PGSQL_USES= pgsql PGSQL_CMAKE_BOOL= ENABLE_DATA_POSTGRESQL diff --git a/dns/powerdns/Makefile b/dns/powerdns/Makefile --- a/dns/powerdns/Makefile +++ b/dns/powerdns/Makefile @@ -90,7 +90,7 @@ LUA_USES= lua -MYSQL_USES= mysql +MYSQL_USES= mysql:build,run MYSQL_CONFIGURE_ON= --with-mysql=${LOCALBASE} MYSQL_CONFIGURE_OFF= --without-mysql MYSQL_VARS= MODULES+=gmysql diff --git a/finance/frontaccounting/Makefile b/finance/frontaccounting/Makefile --- a/finance/frontaccounting/Makefile +++ b/finance/frontaccounting/Makefile @@ -30,7 +30,7 @@ LIGHTTPD_USES= php:web NGINX_RUN_DEPENDS= nginx:www/nginx NGINX_USES= php:web -MYSQL_SERVER_USES= mysql:server +MYSQL_SERVER_USES= mysql NLS_USES= gettext .include diff --git a/finance/frontaccounting24/Makefile b/finance/frontaccounting24/Makefile --- a/finance/frontaccounting24/Makefile +++ b/finance/frontaccounting24/Makefile @@ -36,9 +36,10 @@ DOCS_VARS_OFF= PORTDOCSARGS='-not -path "./doc*"' LIGHTTPD_RUN_DEPENDS= lighttpd:www/lighttpd LIGHTTPD_USES= php:web -MARIADB_CLIENT_USES= mysql:106m -MYSQL_CLIENT_USES= mysql:client -MYSQL_SERVER_USES= mysql:server +# TODO: remove dependencies on server parts +MARIADB_CLIENT_USES= mysql +MYSQL_CLIENT_USES= mysql +MYSQL_SERVER_USES= mysql NGINX_RUN_DEPENDS= nginx:www/nginx NGINX_USES= php:web NLS_USES= gettext diff --git a/irc/anope/Makefile b/irc/anope/Makefile --- a/irc/anope/Makefile +++ b/irc/anope/Makefile @@ -30,7 +30,7 @@ LDAP_USES= ldap -MYSQL_USES= mysql +MYSQL_USES= mysql:build,run NLS_USES= gettext diff --git a/irc/thales/Makefile b/irc/thales/Makefile --- a/irc/thales/Makefile +++ b/irc/thales/Makefile @@ -13,7 +13,7 @@ RUN_DEPENDS= ${LOCALBASE}/bin/ircd:irc/ircd-hybrid -USES= gmake mysql shebangfix +USES= gmake mysql:build,run shebangfix SHEBANG_FILES= examples/MRTG/thalesinfo.pl USE_RC_SUBR= thales diff --git a/lang/neko/Makefile b/lang/neko/Makefile --- a/lang/neko/Makefile +++ b/lang/neko/Makefile @@ -18,7 +18,7 @@ libmbedtls.so:security/mbedtls libmbedcrypto.so:security/mbedtls libmbedx509.so:security/mbedtls \ libfontconfig.so:x11-fonts/fontconfig libfreetype.so:print/freetype2 -USES= cmake mysql pkgconfig sqlite:3 +USES= cmake mysql:build,run pkgconfig sqlite:3 USE_GITHUB= yes GH_ACCOUNT= HaxeFoundation USE_LDCONFIG= ${PREFIX}/lib ${PREFIX}/lib/neko diff --git a/lang/seed7/Makefile b/lang/seed7/Makefile --- a/lang/seed7/Makefile +++ b/lang/seed7/Makefile @@ -18,7 +18,7 @@ LIB_DEPENDS= libodbc.so:databases/unixODBC -USES= mysql:client ncurses pgsql sqlite tar:tgz xorg +USES= mysql ncurses pgsql sqlite tar:tgz xorg OPTIONS_DEFINE= DOCS EXAMPLES diff --git a/mail/dspam/Makefile b/mail/dspam/Makefile --- a/mail/dspam/Makefile +++ b/mail/dspam/Makefile @@ -266,7 +266,7 @@ .endif .if ${PORT_OPTIONS:MMYSQL} -USES+= mysql +USES+= mysql:build,run CONFIGURE_ARGS+= --with-mysql-includes=${LOCALBASE}/include/mysql \ --with-mysql-libraries=${LOCALBASE}/lib/mysql PLIST_SUB+= MYSQL="" diff --git a/mail/opensmtpd-extras-table-mysql/Makefile b/mail/opensmtpd-extras-table-mysql/Makefile --- a/mail/opensmtpd-extras-table-mysql/Makefile +++ b/mail/opensmtpd-extras-table-mysql/Makefile @@ -9,7 +9,7 @@ CFLAGS+= -I${LOCALBASE}/include/mysql LDFLAGS+= -L${LOCALBASE}/lib/mysql -USES= mysql +USES= mysql:build,run MASTERDIR= ${.CURDIR}/../opensmtpd-extras SLAVE_PORT= yes diff --git a/mail/postfix-policyd-sf/Makefile b/mail/postfix-policyd-sf/Makefile --- a/mail/postfix-policyd-sf/Makefile +++ b/mail/postfix-policyd-sf/Makefile @@ -14,7 +14,7 @@ LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/LICENSE -USES= gmake mysql +USES= gmake mysql:build,run USE_RC_SUBR= policyd ALL_TARGET= linux diff --git a/mail/postfix/Makefile b/mail/postfix/Makefile --- a/mail/postfix/Makefile +++ b/mail/postfix/Makefile @@ -121,7 +121,7 @@ EAI_LIB_DEPENDS= libicuuc.so:devel/icu LDAP_USES= ldap LMDB_LIB_DEPENDS= liblmdb.so:databases/lmdb -MYSQL_USES?= mysql +MYSQL_USES?= mysql:build,run PCRE2_LIB_DEPENDS= libpcre2-8.so:devel/pcre2 PGSQL_USES= pgsql SASLKMIT_LIB_DEPENDS= libkrb5.so:security/krb5 diff --git a/mail/qmail-autoresponder/Makefile b/mail/qmail-autoresponder/Makefile --- a/mail/qmail-autoresponder/Makefile +++ b/mail/qmail-autoresponder/Makefile @@ -13,7 +13,7 @@ LIB_DEPENDS= libbg.so:devel/bglibs -USES= mysql +USES= mysql:build,run CFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/include/bglibs LDFLAGS+= -L${LOCALBASE}/lib/mysql -L${LOCALBASE}/lib/bglibs diff --git a/mail/qmail-mysql/Makefile b/mail/qmail-mysql/Makefile --- a/mail/qmail-mysql/Makefile +++ b/mail/qmail-mysql/Makefile @@ -13,7 +13,7 @@ SLAVE_MYSQL= yes -USES= compiler:c11 mysql +USES= compiler:c11 mysql:build,run MASTERDIR= ${.CURDIR}/../qmail DESCR= ${.CURDIR}/pkg-descr diff --git a/net-im/jabberd/Makefile b/net-im/jabberd/Makefile --- a/net-im/jabberd/Makefile +++ b/net-im/jabberd/Makefile @@ -73,7 +73,7 @@ SQLITE_CONFIGURE_ENABLE=sqlite SQLITE_LIB_DEPENDS= libsqlite3.so:databases/sqlite3 -MYSQL_USES= mysql +MYSQL_USES= mysql:build,run MYSQL_CONFIGURE_ENABLE= mysql MYSQL_VARS= IGNORE_WITH_MYSQL="81" @@ -131,6 +131,10 @@ .include +.if !empty(MYSQL_CLIENT_DEFAULT:Mmysql) +IGNORE= Does not build against mysql, switch the default to mariadb. +.endif + post-patch: .for FILE in c2s.xml jabberd.cfg router-filter.xml router-users.xml \ router.xml s2s.xml sm.xml templates/roster.xml @@ -156,4 +160,4 @@ .endfor .endif -.include +.include diff --git a/net-mgmt/argus3-clients/Makefile b/net-mgmt/argus3-clients/Makefile --- a/net-mgmt/argus3-clients/Makefile +++ b/net-mgmt/argus3-clients/Makefile @@ -19,7 +19,7 @@ OPTIONS_SUB= yes SASL_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2 SASL_CONFIGURE_ON= --with-sasl=${LOCALBASE} -MYSQL_USES= mysql +MYSQL_USES= mysql:build,run GNU_CONFIGURE= yes SHEBANG_FILES= examples/rahosts/raips.pl diff --git a/net-mgmt/cacti-spine/Makefile b/net-mgmt/cacti-spine/Makefile --- a/net-mgmt/cacti-spine/Makefile +++ b/net-mgmt/cacti-spine/Makefile @@ -19,7 +19,7 @@ CONFIGURE_ARGS+=--with-mysql=${LOCALBASE} --with-snmp=${LOCALBASE} CPPFLAGS+= `net-snmp-config --cflags` LDFLAGS+= `net-snmp-config --libs` -lexecinfo -USES= libtool mysql ssl autoreconf +USES= libtool mysql:build,run ssl autoreconf CONFLICTS_INSTALL= cacti88 diff --git a/net-mgmt/cacti88-spine/Makefile b/net-mgmt/cacti88-spine/Makefile --- a/net-mgmt/cacti88-spine/Makefile +++ b/net-mgmt/cacti88-spine/Makefile @@ -20,7 +20,7 @@ CONFIGURE_ARGS+=--with-mysql=${LOCALBASE} --with-snmp=${LOCALBASE} CPPFLAGS+= `net-snmp-config --cflags` LDFLAGS+= `net-snmp-config --libs` -USES= libtool mysql ssl +USES= libtool mysql:build,run ssl CONFLICTS_INSTALL= cacti spine diff --git a/net-mgmt/icinga2/Makefile b/net-mgmt/icinga2/Makefile --- a/net-mgmt/icinga2/Makefile +++ b/net-mgmt/icinga2/Makefile @@ -75,7 +75,7 @@ LINUX_CONFIG= groups.conf services.conf hosts.conf LTO_CMAKE_BOOL= ICINGA2_LTO_BUILD -MYSQL_USES= mysql +MYSQL_USES= mysql:build,run PGSQL_USES= pgsql OPTIONS_SUB= yes diff --git a/net-mgmt/icingaweb2-module-x509/Makefile b/net-mgmt/icingaweb2-module-x509/Makefile --- a/net-mgmt/icingaweb2-module-x509/Makefile +++ b/net-mgmt/icingaweb2-module-x509/Makefile @@ -15,7 +15,7 @@ icingaweb2${PHP_PKGNAMESUFFIX}>=2.11.4:net-mgmt/icingaweb2@${PHP_FLAVOR} \ icingaweb2-module-reactbundle${PHP_PKGNAMESUFFIX}>0:net-mgmt/icingaweb2-module-reactbundle@${PHP_FLAVOR} -USES= mysql:server php:web,flavors ssl +USES= mysql php:web,flavors ssl USE_GITHUB= yes GH_ACCOUNT= Icinga diff --git a/net-mgmt/klg/Makefile b/net-mgmt/klg/Makefile --- a/net-mgmt/klg/Makefile +++ b/net-mgmt/klg/Makefile @@ -12,7 +12,7 @@ LICENSE= BSD3CLAUSE -USES= tar:txz php:web,flavors mysql:client +USES= tar:txz php:web,flavors mysql USE_PHP= mysqli sockets xml NO_ARCH= yes diff --git a/net-mgmt/librenms/Makefile b/net-mgmt/librenms/Makefile --- a/net-mgmt/librenms/Makefile +++ b/net-mgmt/librenms/Makefile @@ -105,8 +105,9 @@ FPING_RUN_DEPENDS= fping:net/fping IPMITOOL_RUN_DEPENDS= ipmitool:sysutils/ipmitool LIBVIRT_RUN_DEPENDS= virsh:devel/libvirt -MYSQLD_USES= mysql:server -MYSQLD_USES_OFF= mysql:client +MYSQLD_USES= mysql +# TODO: remove this option, don't try to depend on servers +MYSQLD_USES_OFF= mysql NAGPLUGINS_RUN_DEPENDS= ${LOCALBASE}/libexec/nagios/check_nagios:net-mgmt/nagios-plugins NMAP_RUN_DEPENDS= nmap:security/nmap WMIC_RUN_DEPENDS= wmic:net-mgmt/wmi-client diff --git a/net-mgmt/ndoutils/Makefile b/net-mgmt/ndoutils/Makefile --- a/net-mgmt/ndoutils/Makefile +++ b/net-mgmt/ndoutils/Makefile @@ -29,7 +29,7 @@ NAGIOS4X_RUN_DEPENDS= ${LOCALBASE}/bin/nagios:net-mgmt/nagios4 NANOSLEEP_CONFIGURE_ENABLE= nanosleep -USES= compiler:c11 mysql perl5 ssl +USES= compiler:c11 mysql:build,run perl5 ssl USE_RC_SUBR= ndo2db SUB_FILES= pkg-message diff --git a/net-mgmt/netdot/Makefile b/net-mgmt/netdot/Makefile --- a/net-mgmt/netdot/Makefile +++ b/net-mgmt/netdot/Makefile @@ -39,7 +39,7 @@ rrdtool:databases/rrdtool \ netdisco-mibs>=0:net-mgmt/netdisco-mibs -USES= gmake mysql perl5 shebangfix +USES= gmake mysql:build,run perl5 shebangfix USE_GITHUB= yes GH_ACCOUNT= cvicente diff --git a/net-mgmt/observium/Makefile b/net-mgmt/observium/Makefile --- a/net-mgmt/observium/Makefile +++ b/net-mgmt/observium/Makefile @@ -86,9 +86,10 @@ .endif .if ${PORT_OPTIONS:MMYSQLD} -USES+= mysql:server +# TODO: remove the server option -- there is no need/way to depend on a specific server. +USES+= mysql .else -USES+= mysql:client +USES+= mysql .endif post-patch: diff --git a/net-mgmt/seafile-server/Makefile b/net-mgmt/seafile-server/Makefile --- a/net-mgmt/seafile-server/Makefile +++ b/net-mgmt/seafile-server/Makefile @@ -77,7 +77,7 @@ ${WRKSRC}/controller/seafile-controller.c @${MKDIR} ${_PKGCONFIGDIR} -.if ${MYSQL_FLAVOUR} == mariadb +.if ${MYSQL_CLIENT_DEFAULT} == mariadb # If mariadb is the selected flavor, link the pc file as # mysqlclient so PKG_CHECK_MODULES can find it. Mariadb # doesn't supply this file in the same way other flavours do. diff --git a/net-mgmt/super_mediator/Makefile b/net-mgmt/super_mediator/Makefile --- a/net-mgmt/super_mediator/Makefile +++ b/net-mgmt/super_mediator/Makefile @@ -28,8 +28,7 @@ SKIPSET_DESC= Enable SiLK IPSET files for filtering SPREAD_DESC= Enable Spread libary as a pub/sub distribution capability -MYSQL_LIB_DEPENDS= libmysqlclient.so:${_MYSQL_CLIENT} -MYSQL_USES= mysql +MYSQL_USES= mysql:build,run MYSQL_CONFIGURE_WITH= mysql MYSQL_VARS= IGNORE_WITH_MYSQL="80 81" SKIPSET_LIB_DEPENDS= libsilk.so:security/silktools diff --git a/net-mgmt/zabbix5-server/Makefile b/net-mgmt/zabbix5-server/Makefile --- a/net-mgmt/zabbix5-server/Makefile +++ b/net-mgmt/zabbix5-server/Makefile @@ -81,7 +81,7 @@ OPTIONS_SINGLE_SSL= OPENSSL GNUTLS MYSQL_CONFIGURE_WITH= mysql -MYSQL_USES+= compiler:c11 mysql +MYSQL_USES+= compiler:c11 mysql:build,run PGSQL_CONFIGURE_WITH= postgresql PGSQL_USES+= pgsql diff --git a/net-mgmt/zabbix6-server/Makefile b/net-mgmt/zabbix6-server/Makefile --- a/net-mgmt/zabbix6-server/Makefile +++ b/net-mgmt/zabbix6-server/Makefile @@ -108,18 +108,19 @@ LDAP_CONFIGURE_WITH= ldap LDAP_USES= ldap +# TODO: This does not really make sense with the new mysql-client/mariadb-client scheme. MYSQL_CONFIGURE_ON= --with-mysql -MYSQL_USES+= compiler:c11 mysql:80 +MYSQL_USES+= compiler:c11 mysql:build,run MYSQLDV_CONFIGURE_ON= --with-mysql -MYSQLDV_USES+= compiler:c11 mysql +MYSQLDV_USES+= compiler:c11 mysql:build,run MDB5_CONFIGURE_ON= --with-mysql=${LOCALBASE}/bin/mysql_config -MDB5_USES+= compiler:c11 mysql:105m +MDB5_USES+= compiler:c11 mysql:build,run MDB5_DESC= Mariadb 10.5 database support MDB6_CONFIGURE_ON= --with-mysql=${LOCALBASE}/bin/mysql_config -MDB6_USES+= compiler:c11 mysql:106m +MDB6_USES+= compiler:c11 mysql:build,run MDB6_DESC= Mariadb 10.6 database support ORACLE_CONFIGURE_WITH= oracle diff --git a/net-mgmt/zabbix64-server/Makefile b/net-mgmt/zabbix64-server/Makefile --- a/net-mgmt/zabbix64-server/Makefile +++ b/net-mgmt/zabbix64-server/Makefile @@ -107,18 +107,19 @@ LDAP_CONFIGURE_WITH= ldap LDAP_USES= ldap +# TODO: unify mysql/maridb option, as they all use the same client port now MYSQL_CONFIGURE_ON= --with-mysql -MYSQL_USES+= compiler:c11 mysql:80 +MYSQL_USES+= compiler:c11 mysql:build,run MYSQLDV_CONFIGURE_ON= --with-mysql -MYSQLDV_USES+= compiler:c11 mysql +MYSQLDV_USES+= compiler:c11 mysql:build,run MDB5_CONFIGURE_ON= --with-mysql=${LOCALBASE}/bin/mysql_config -MDB5_USES+= compiler:c11 mysql:105m +MDB5_USES+= compiler:c11 mysql:build,run MDB5_DESC= Mariadb 10.5 database support MDB6_CONFIGURE_ON= --with-mysql=${LOCALBASE}/bin/mysql_config -MDB6_USES+= compiler:c11 mysql:106m +MDB6_USES+= compiler:c11 mysql:build,run MDB6_DESC= Mariadb 10.6 database support ORACLE_CONFIGURE_WITH= oracle diff --git a/net-p2p/xbt/Makefile b/net-p2p/xbt/Makefile --- a/net-p2p/xbt/Makefile +++ b/net-p2p/xbt/Makefile @@ -11,7 +11,7 @@ BUILD_DEPENDS= ${LOCALBASE}/include/boost/asio.hpp:devel/boost-libs -USES= compiler:c++17-lang mysql pkgconfig +USES= compiler:c++17-lang mysql:build,run pkgconfig IGNORE_WITH_MYSQL= 105m 106m 1011m USE_GITHUB= yes GH_ACCOUNT= OlafvdSpek diff --git a/net/asterisk18/Makefile b/net/asterisk18/Makefile --- a/net/asterisk18/Makefile +++ b/net/asterisk18/Makefile @@ -148,7 +148,7 @@ MYSQL_LIB_DEPENDS= libzstd.so:archivers/zstd \ libunwind.so:devel/libunwind -MYSQL_USES= mysql +MYSQL_USES= mysql:build,run MYSQL_CONFIGURE_WITH= mysqlclient NCURSES_USES= ncurses diff --git a/net/freeradius3/Makefile b/net/freeradius3/Makefile --- a/net/freeradius3/Makefile +++ b/net/freeradius3/Makefile @@ -112,7 +112,7 @@ MITKRB_PORT_LIB_DEPENDS= libkrb5support.so:security/krb5 MITKRB_CONFLICTS_BUILD= heimdal-[0-9].* MYSQL_CONFIGURE_WITH= rlm_sql_mysql -MYSQL_USES= mysql +MYSQL_USES= mysql:build,run MYSQL_VARS= _REQUIRE+=mysql NOKRB_CONFIGURE_ON= --without-rlm_krb5 NOKRB_PLIST_SUB= RLMKRB5="@comment " diff --git a/net/gnu-radius/Makefile b/net/gnu-radius/Makefile --- a/net/gnu-radius/Makefile +++ b/net/gnu-radius/Makefile @@ -46,7 +46,7 @@ CLIENT_CONFIGURE_ENABLE= client CLIENT_USES= guile:1.8,alias CLIENT_CONFIGURE_OFF= --without-guile -MYSQL_USES= mysql +MYSQL_USES= mysql:build,run MYSQL_CONFIGURE_WITH= mysql PGSQL_USES= pgsql PGSQL_CONFIGURE_WITH= postgres diff --git a/net/kamailio/Makefile b/net/kamailio/Makefile --- a/net/kamailio/Makefile +++ b/net/kamailio/Makefile @@ -108,7 +108,7 @@ MQTT_VARS= EXTRA_MODULES+=mqtt MYSQL_IMPLIES= DATABASE -MYSQL_USES= mysql +MYSQL_USES= mysql:build,run MYSQL_VARS= EXTRA_GROUPS+=mysql OUTBOUND_VARS= EXTRA_MODULES+=outbound diff --git a/net/libnss-mysql/Makefile b/net/libnss-mysql/Makefile --- a/net/libnss-mysql/Makefile +++ b/net/libnss-mysql/Makefile @@ -11,7 +11,7 @@ GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-mysql=${LOCALBASE} INSTALL_TARGET= install-strip -USES= libtool mysql +USES= libtool mysql:build,run USE_LDCONFIG= yes post-patch: diff --git a/net/pwhois/Makefile b/net/pwhois/Makefile --- a/net/pwhois/Makefile +++ b/net/pwhois/Makefile @@ -22,7 +22,7 @@ USERS= ${PORTNAME} GROUPS= ${PORTNAME} -USES= mysql shebangfix tar:tgz +USES= mysql:build,run shebangfix tar:tgz SHEBANG_FILES= pwhois-updatedb USE_RC_SUBR= ${PORTNAME}d SUB_FILES= pkg-message 512.pwhois-updatedb diff --git a/net/rtg/Makefile b/net/rtg/Makefile --- a/net/rtg/Makefile +++ b/net/rtg/Makefile @@ -14,7 +14,7 @@ RUN_DEPENDS= p5-DBI>=0:databases/p5-DBI \ p5-DBD-mysql>=0:databases/p5-DBD-mysql -USES= mysql:client perl5 shebangfix ssl +USES= mysql:build,run perl5 shebangfix ssl USE_RC_SUBR= rtgpoll SHEBANG_FILES= etc/95.pl etc/report.pl etc/rtgtargmkr.pl.in @@ -35,7 +35,8 @@ MYSQL_DESC= Pull MySQL server in as a dependancy for local setups WEB_DESC= Include PHP-based web client interface pre-requisites -MYSQL_USES= mysql:server +# TODO: remove this part +MYSQL_USES= mysql:build,run WEB_USES= php WEB_USE= PHP=mysqli diff --git a/net/traff/Makefile b/net/traff/Makefile --- a/net/traff/Makefile +++ b/net/traff/Makefile @@ -25,7 +25,7 @@ .include .if ${PORT_OPTIONS:MMYSQL} -USES+= mysql +USES+= mysql:build,run CPPFLAGS+= -DwithMYSQL -I${LOCALBASE}/include LIBS+= -L${LOCALBASE}/lib/mysql -lmysqlclient_r CONFIGURE_ARGS+=--enable-mysql diff --git a/science/orthanc-mysql/Makefile b/science/orthanc-mysql/Makefile --- a/science/orthanc-mysql/Makefile +++ b/science/orthanc-mysql/Makefile @@ -26,7 +26,7 @@ libpugixml.so:textproc/pugixml RUN_DEPENDS= Orthanc:science/orthanc -USES= cmake localbase mysql:client python:build ssl +USES= cmake localbase mysql:build,run python:build ssl USE_CXXSTD= c++14 # googletest 1.13 USE_LDCONFIG= yes diff --git a/security/cyrus-sasl2-sql/Makefile b/security/cyrus-sasl2-sql/Makefile --- a/security/cyrus-sasl2-sql/Makefile +++ b/security/cyrus-sasl2-sql/Makefile @@ -10,7 +10,7 @@ OPTIONS_DEFAULT= MYSQL OPTIONS_SUB= yes -MYSQL_USES= mysql +MYSQL_USES= mysql:build,run MYSQL_CONFIGURE_ON= --with-mysql=${LOCALBASE} MYSQL_CONFIGURE_OFF= --without-mysql PGSQL_USES= pgsql diff --git a/security/libpreludedb/Makefile b/security/libpreludedb/Makefile --- a/security/libpreludedb/Makefile +++ b/security/libpreludedb/Makefile @@ -34,7 +34,7 @@ OPTIONS_MULTI_DB= MYSQL PGSQL SQLITE OPTIONS_SUB= yes -MYSQL_USES= mysql +MYSQL_USES= mysql:build,run MYSQL_CONFIGURE_WITH= mysql PGSQL_USES= pgsql PGSQL_CONFIGURE_WITH= postgresql diff --git a/security/maia/Makefile b/security/maia/Makefile --- a/security/maia/Makefile +++ b/security/maia/Makefile @@ -132,12 +132,12 @@ .endif .if ${PORT_OPTIONS:MMYSQL} && ${PORT_OPTIONS:MLOCAL} -USES+= mysql:server,client +USES+= mysql RUN_DEPENDS+= p5-DBD-mysql>=0:databases/p5-DBD-mysql .endif .if ${PORT_OPTIONS:MMYSQL} && ! ${PORT_OPTIONS:MLOCAL} -USES+= mysql:client +USES+= mysql RUN_DEPENDS+= p5-DBD-mysql>=0:databases/p5-DBD-mysql .endif diff --git a/security/pam-mysql/Makefile b/security/pam-mysql/Makefile --- a/security/pam-mysql/Makefile +++ b/security/pam-mysql/Makefile @@ -10,7 +10,7 @@ LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING -USES= autoreconf compiler:c11 libtool:keepla mysql pkgconfig +USES= autoreconf compiler:c11 libtool:keepla mysql:build,run pkgconfig USE_GITHUB= yes GH_ACCOUNT= NigelCunningham diff --git a/security/vaultwarden/Makefile b/security/vaultwarden/Makefile --- a/security/vaultwarden/Makefile +++ b/security/vaultwarden/Makefile @@ -33,7 +33,7 @@ DATABASE_DESC= Database support WEBVAULT_DESC= Vaultwarden web (bw_web_builds) -MYSQL_USES= mysql:client +MYSQL_USES= mysql:build,run MYSQL_VARS= cargo_features+=mysql PGSQL_USES= pgsql PGSQL_VARS= cargo_features+=postgresql diff --git a/sysutils/froxlor/Makefile b/sysutils/froxlor/Makefile --- a/sysutils/froxlor/Makefile +++ b/sysutils/froxlor/Makefile @@ -93,7 +93,8 @@ APACHE_USES= apache php:mod -MYSQLS_USES= mysql:server +# TODO: remove option, there is no way/need to depend on a specific mysql server +MYSQLS_USES= mysql PCNTL_USE= PHP=pcntl diff --git a/sysutils/n98-magerun/Makefile b/sysutils/n98-magerun/Makefile --- a/sysutils/n98-magerun/Makefile +++ b/sysutils/n98-magerun/Makefile @@ -11,7 +11,7 @@ LICENSE= MIT -USES= mysql:client php:cli +USES= mysql php:cli USE_PHP= phar bz2 simplexml pdo_mysql zlib ctype dom posix NO_ARCH= yes diff --git a/sysutils/omnibackup/Makefile b/sysutils/omnibackup/Makefile --- a/sysutils/omnibackup/Makefile +++ b/sysutils/omnibackup/Makefile @@ -57,8 +57,7 @@ RUN_DEPENDS+= pg_dumpall:databases/postgresql${PGSQL_VER_NODOT}-client .endif .if ${PORT_OPTIONS:MMYSQL} -USES+= mysql -RUN_DEPENDS+= mysqldump:${_MYSQL_CLIENT} +USES+= mysql:build,run .endif .endif diff --git a/sysutils/slurm-wlm/Makefile b/sysutils/slurm-wlm/Makefile --- a/sysutils/slurm-wlm/Makefile +++ b/sysutils/slurm-wlm/Makefile @@ -29,7 +29,7 @@ libtbb.so:devel/onetbb \ libjwt.so:www/libjwt -USES= compiler:c11 cpe gmake gnome libtool localbase lua mysql:client \ +USES= compiler:c11 cpe gmake gnome libtool localbase lua mysql:build,run \ perl5 pkgconfig python:build readline shebangfix ssl tar:bz2 USE_PERL5= build CPE_VENDOR= schedmd diff --git a/textproc/sphinxsearch/Makefile b/textproc/sphinxsearch/Makefile --- a/textproc/sphinxsearch/Makefile +++ b/textproc/sphinxsearch/Makefile @@ -71,7 +71,7 @@ MYSQL_CONFIGURE_WITH= mysql MYSQL_CONFIGURE_ON= --with-mysql-includes=${LOCALBASE}/include/mysql \ --with-mysql-libs=${LOCALBASE}/lib/mysql -MYSQL_USES= mysql +MYSQL_USES= mysql:build,run OPTIMIZED_CFLAGS_CXXFLAGS=-O3 -fomit-frame-pointer diff --git a/www/hotcrp/Makefile b/www/hotcrp/Makefile --- a/www/hotcrp/Makefile +++ b/www/hotcrp/Makefile @@ -11,7 +11,7 @@ RUN_DEPENDS= pdftohtml:graphics/poppler-utils \ zip:archivers/zip -USES= php mysql:server +USES= php mysql USE_PHP= mysqli gd session ctype NO_BUILD= yes diff --git a/www/mod_auth_cookie_mysql2/Makefile b/www/mod_auth_cookie_mysql2/Makefile --- a/www/mod_auth_cookie_mysql2/Makefile +++ b/www/mod_auth_cookie_mysql2/Makefile @@ -10,7 +10,7 @@ COMMENT= Allows authentication against MySQL database via secure cookie WWW= http://home.digithi.de/digithi/dev/mod_auth_cookie_mysql/ -USES= apache mysql +USES= apache mysql:build,run AP_FAST_BUILD= yes AP_GENPLIST= yes diff --git a/www/mod_auth_mysql2/Makefile b/www/mod_auth_mysql2/Makefile --- a/www/mod_auth_mysql2/Makefile +++ b/www/mod_auth_mysql2/Makefile @@ -12,7 +12,7 @@ LICENSE= APACHE20 -USES= apache mysql tar:tgz +USES= apache mysql:build,run tar:tgz WRKSRC= ${WRKDIR}/${PORTNAME} AP_FAST_BUILD= yes AP_GENPLIST= yes diff --git a/www/mod_auth_mysql_another/Makefile b/www/mod_auth_mysql_another/Makefile --- a/www/mod_auth_mysql_another/Makefile +++ b/www/mod_auth_mysql_another/Makefile @@ -11,7 +11,7 @@ LICENSE= APACHE10 -USES= apache mysql +USES= apache mysql:build,run SHORTMODNAME= mysql_auth AP_FAST_BUILD= yes diff --git a/www/mod_log_sql/Makefile b/www/mod_log_sql/Makefile --- a/www/mod_log_sql/Makefile +++ b/www/mod_log_sql/Makefile @@ -9,7 +9,7 @@ COMMENT= Allows Apache to log to a MySQL database WWW= http://www.outoforder.cc/projects/httpd/mod_log_sql/ -USES= apache gmake mysql tar:bzip2 +USES= apache gmake mysql:build,run tar:bzip2 GNU_CONFIGURE= yes OPTIONS_SUB= yes