mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-27 00:57:50 +00:00
databases/mariadb104-server: Make directories configurable
* Create socket dir [1] * Take note of the changed directories PR: 247413 [1] Reported by: Henrik Hudson <ports thelanman net>
This commit is contained in:
parent
6c1c7e02bb
commit
05b8b859dc
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=540633
@ -6,8 +6,6 @@ PKGNAMESUFFIX= 104-client
|
||||
|
||||
COMMENT= Multithreaded SQL database (client)
|
||||
|
||||
BROKEN_i386= compile error: undeclared identifier 'my_atomic_add32'
|
||||
|
||||
MASTERDIR= ${.CURDIR}/../${PORTNAME}${PKGNAMESUFFIX:C/-client/-server/}
|
||||
|
||||
PLIST= ${.CURDIR}/pkg-plist
|
||||
|
@ -169,3 +169,4 @@ man/man1/replace.1.gz
|
||||
@comment man/man1/wsrep_sst_rsync_wan.1.gz
|
||||
@comment man/man8/mysqld.8.gz
|
||||
libdata/pkgconfig/mariadb.pc
|
||||
@dir(%%MARIADB_USER%%,%%MARIADB_GROUP%%,) %%MARIADB_RUNDIR%%
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME?= mariadb
|
||||
PORTVERSION= 10.4.13
|
||||
PORTREVISION?= 2
|
||||
PORTREVISION?= 3
|
||||
CATEGORIES= databases
|
||||
MASTER_SITES= http://mirrors.supportex.net/${SITESDIR}/ \
|
||||
http://mirror2.hs-esslingen.de/pub/Mirrors/${SITESDIR}/ \
|
||||
@ -24,16 +24,25 @@ LICENSE_NAME_PerconaFT= PerconaFT patents license
|
||||
LICENSE_FILE_PerconaFT= ${WRKSRC}/storage/tokudb/PerconaFT/PATENTS
|
||||
LICENSE_PERMS_PerconaFT= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
|
||||
|
||||
BROKEN_i386= compile error: undeclared identifier 'my_atomic_add32'
|
||||
|
||||
USES= bison:build cmake:insource,noninja compiler:c++11-lib cpe iconv:translit libedit ncurses shebangfix ssl
|
||||
|
||||
SUB_FILES= pkg-message
|
||||
PKGMESSAGE= ${WRKDIR}/pkg-message
|
||||
|
||||
SLAVEDIRS= databases/mariadb102-client
|
||||
USE_LDCONFIG= ${PREFIX}/lib/mysql
|
||||
SHEBANG_FILES= scripts/*.sh
|
||||
SITESDIR= mariadb/mariadb-${PORTVERSION}/source
|
||||
|
||||
DOCSDIR= ${PREFIX}/share/doc/mysql
|
||||
ETCDIR= ${PREFIX}/etc/mysql
|
||||
|
||||
MARIADB_USER?= mysql
|
||||
MARIADB_GROUP?= mysql
|
||||
|
||||
MARIADB_RUNDIR?= /var/run/mysql
|
||||
MARIADB_LOGDIR?= /var/log/mysql
|
||||
|
||||
OPTIONS_SINGLE= GSSAPI
|
||||
OPTIONS_SINGLE_GSSAPI= GSSAPI_BASE GSSAPI_HEIMDAL GSSAPI_MIT GSSAPI_NONE
|
||||
@ -83,6 +92,8 @@ CMAKE_ARGS+= -DINSTALL_DOCDIR="share/doc/mysql" \
|
||||
-DINSTALL_SQLBENCHDIR= \
|
||||
-DINSTALL_SUPPORTFILESDIR="share/mysql" \
|
||||
-DDEFAULT_SYSCONFDIR="${PREFIX}/etc" \
|
||||
-DDEFAULT_SYSCONF2DIR="${ETCDIR}/conf.d" \
|
||||
-DINSTALL_UNIX_ADDRDIR="${MARIADB_RUNDIR}" \
|
||||
-DWITH_SSL="${OPENSSLBASE}" \
|
||||
-DCURSES_CURSES_LIBRARY="/usr/lib/libcurses.so" \
|
||||
-DCURSES_FORM_LIBRARY="/usr/lib/libform.so" \
|
||||
@ -90,18 +101,16 @@ CMAKE_ARGS+= -DINSTALL_DOCDIR="share/doc/mysql" \
|
||||
-DKRB5_CONFIG="${KRB5CONFIG}" \
|
||||
-DCURSES_NCURSES_LIBRARY="${NCURSESLIB}/libncurses.so" \
|
||||
-DCOMPILATION_COMMENT="FreeBSD Ports" \
|
||||
-DCMAKE_PREFIX_PATH=${PREFIX} \
|
||||
-DPLUGIN_AUTH_TEST_PLUGIN=NO
|
||||
-DCMAKE_PREFIX_PATH=${PREFIX}
|
||||
CMAKE_OFF+= CONC_WITH_UNIT_TESTS CONNECT_WITH_MONGO WITH_UNIT_TESTS
|
||||
CMAKE_ON+= WITH_LIBWRAP WITHOUT_DOCS
|
||||
DISABLED_PLUGINS+= DAEMON_EXAMPLE DIALOG_EXAMPLES EXAMPLE \
|
||||
EXAMPLE_KEY_MANAGEMENT FTEXAMPLE
|
||||
DISABLED_PLUGINS+= AUTH_TEST_PLUGIN DAEMON_EXAMPLE DIALOG_EXAMPLES \
|
||||
EXAMPLE EXAMPLE_KEY_MANAGEMENT FTEXAMPLE
|
||||
|
||||
DATADIR= ${PREFIX}/share/mysql
|
||||
ETCDIR= ${PREFIX}/etc/mysql
|
||||
|
||||
CONFLICTS_INSTALL= mariadb5*-${PKGNAMESUFFIX:C/^[0-9]*-//}-* \
|
||||
mariadb10[0-24-9]-${PKGNAMESUFFIX:C/^[0-9]*-//}-* \
|
||||
CONFLICTS_INSTALL= mariadb10[0-24-9]-${PKGNAMESUFFIX:C/^[0-9]*-//}-* \
|
||||
mysql[0-9]*-${PKGNAMESUFFIX:C/^[0-9]*-//}-* \
|
||||
mysqlwsrep* \
|
||||
percona[0-9]*-${PKGNAMESUFFIX:C/^[0-9]*-//}-*
|
||||
@ -112,6 +121,10 @@ GSSAPI_HEIMDAL_USES= gssapi:heimdal
|
||||
GSSAPI_MIT_USES= gssapi:mit
|
||||
GSSAPI_NONE_CMAKE_ON= -DPLUGIN_AUTH_GSSAPI_CLIENT=OFF
|
||||
OPTIONS_SUB= yes
|
||||
SUB_LIST+= MARIADB_USER="${MARIADB_USER}" \
|
||||
MARIADB_RUNDIR="${MARIADB_RUNDIR}"
|
||||
PLIST_SUB+= MARIADB_USER="${MARIADB_USER}" \
|
||||
MARIADB_GROUP="${MARIADB_GROUP}"
|
||||
|
||||
.if ${PKGNAMESUFFIX:M*-client}
|
||||
# MySQL-Client part
|
||||
@ -120,16 +133,17 @@ CMAKE_OFF+= WITH_WSREP
|
||||
USES+= readline
|
||||
USE_LDCONFIG= ${PREFIX}/lib/mysql
|
||||
SUB_FILES+= my.cnf.sample client.cnf.sample
|
||||
PLIST_SUB+= MARIADB_RUNDIR="${MARIADB_RUNDIR}"
|
||||
.else # ! ${PKGNAMESUFFIX:M*-client}
|
||||
# MySQL-Server part
|
||||
USES+= mysql:104m
|
||||
USE_LDCONFIG+= ${PREFIX}/lib/mysql/plugin
|
||||
USE_RC_SUBR= mysql-server
|
||||
USERS= mysql
|
||||
GROUPS= mysql
|
||||
CMAKE_ON+= CMAKE_SKIP_BUILD_RPATH WITH_EMBEDDED_SERVER
|
||||
CMAKE_OFF+= WITH_CLIENT
|
||||
SUB_FILES+= server.cnf.sample
|
||||
SUB_LIST+= MARIADB_LOGDIR="${MARIADB_LOGDIR}"
|
||||
PLIST_SUB+= MARIADB_LOGDIR="${MARIADB_LOGDIR}"
|
||||
|
||||
.for ENGINE in ${OPTIONS_GROUP_ENGINES:NINNOBASE}
|
||||
${ENGINE}_CMAKE_OFF= -DPLUGIN_${ENGINE}=NO
|
||||
@ -171,21 +185,21 @@ ZSTD_CMAKE_ON= -DWITH_ROCKSDB_zstd=ON
|
||||
ZSTD_CMAKE_OFF= -DWITH_ROCKSDB_zstd=OFF
|
||||
ZSTD_LIB_DEPENDS= libzstd.so:archivers/zstd
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.for PLUGIN in ${DISABLED_PLUGINS}
|
||||
CMAKE_ARGS+= -DPLUGIN_${PLUGIN}=NO
|
||||
.endfor
|
||||
|
||||
.endif # ${PKGNAMESUFFIX:M*-client}
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200057
|
||||
SUB_LIST+= LEGACY_LIMITS="@comment " MODERN_LIMITS=""
|
||||
.else
|
||||
SUB_LIST+= LEGACY_LIMITS="" MODERN_LIMITS="@comment "
|
||||
.endif
|
||||
|
||||
.endif # ${PKGNAMESUFFIX:M*-client}
|
||||
|
||||
.if defined(WITH_OPENSSL_PORT)
|
||||
.if ${SSL_DEFAULT} != base && ${PORT_OPTIONS:MGSSAPI_BASE}
|
||||
GSSAPI_BASE_IGNORE= BASE_GSSAPI is not compatible with OpenSSL from ports. Use other GSSAPI options or OpenSSL from base system
|
||||
.endif
|
||||
|
||||
@ -215,18 +229,19 @@ post-configure:
|
||||
${WRKSRC}/libmariadb/mariadb_config/mariadb_config.c
|
||||
|
||||
pre-install:
|
||||
${MKDIR} -p ${STAGEDIR}${ETCDIR}/conf.d
|
||||
${MKDIR} ${STAGEDIR}${ETCDIR}/conf.d
|
||||
|
||||
.if ${PKGNAMESUFFIX:M*-client}
|
||||
post-install:
|
||||
${INSTALL_DATA} ${WRKDIR}/my.cnf.sample ${STAGEDIR}${ETCDIR}/my.cnf.sample
|
||||
${INSTALL_DATA} ${WRKDIR}/client.cnf.sample \
|
||||
${STAGEDIR}${ETCDIR}/conf.d/client.cnf.sample
|
||||
${RM} -r ${STAGEDIR}${DATADIR}
|
||||
${RM} -r ${STAGEDIR}${PREFIX}/include/mysql/server
|
||||
${RM} -r ${STAGEDIR}${DATADIR} \
|
||||
${STAGEDIR}${PREFIX}/include/mysql/server
|
||||
${MV} ${STAGEDIR}${PREFIX}/lib/mysql/pkgconfig/mariadb.pc \
|
||||
${STAGEDIR}${PREFIX}/libdata/pkgconfig/mariadb.pc
|
||||
${RMDIR} ${STAGEDIR}${PREFIX}/lib/mysql/pkgconfig
|
||||
${MKDIR} ${STAGEDIR}/${MARIADB_RUNDIR}
|
||||
|
||||
post-install-GSSAPI_NONE-off:
|
||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/mysql/plugin/auth_gssapi_client.so
|
||||
@ -235,11 +250,12 @@ post-install-GSSAPI_NONE-off:
|
||||
post-install:
|
||||
${INSTALL_DATA} ${WRKDIR}/server.cnf.sample \
|
||||
${STAGEDIR}${ETCDIR}/conf.d/server.cnf.sample
|
||||
${RM} -r ${STAGEDIR}${PREFIX}/share/mysql/policy
|
||||
${RM} -r ${STAGEDIR}${PREFIX}/include/mysql/server/private
|
||||
${RM} -r ${STAGEDIR}${PREFIX}/lib/mysql/pkgconfig
|
||||
${RM} -r ${STAGEDIR}${PREFIX}/share/mysql/policy \
|
||||
${STAGEDIR}${PREFIX}/include/mysql/server/private \
|
||||
${STAGEDIR}${PREFIX}/lib/mysql/pkgconfig
|
||||
${MV} ${STAGEDIR}${PREFIX}/etc/mysql/user_map.conf \
|
||||
${STAGEDIR}${PREFIX}/etc/mysql/user_map.conf.sample
|
||||
${MKDIR} ${STAGEDIR}/${MARIADB_LOGDIR}
|
||||
|
||||
post-install-WSREP-on:
|
||||
${MV} ${STAGEDIR}${DATADIR}/wsrep.cnf \
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
# Options specific to all client programs
|
||||
[client]
|
||||
# port = 3306 # set in %%ETCDIR%%/my.cnf
|
||||
# socket = /var/run/mysql/mysql.sock # set in %%ETCDIR%%/my.cnf
|
||||
# port = 3306 # inherited from %%ETCDIR%%/my.cnf
|
||||
# socket = %%MARIADB_RUNDIR%%/mysql.sock # inherited from %%ETCDIR%%/my.cnf
|
||||
|
||||
# Options specific to MariaDB client programs
|
||||
[client-mariadb]
|
||||
|
@ -5,7 +5,7 @@
|
||||
#
|
||||
[client-server]
|
||||
port = 3306
|
||||
socket = /var/run/mysql/mysql.sock
|
||||
socket = %%MARIADB_RUNDIR%%/mysql.sock
|
||||
|
||||
#
|
||||
# include *.cnf from the config directory
|
||||
|
@ -14,6 +14,10 @@ EOM
|
||||
}
|
||||
{ type: upgrade
|
||||
message: <<EOM
|
||||
The default MySQL socket location has moved from /tmp to %%MARIADB_RUNDIR%%
|
||||
for both client and server packages. Make sure you update your configurations
|
||||
in /var/db/mysql and %%PREFIX%%/etc.
|
||||
|
||||
Remember to run mariadb-upgrade (with the optional --datadir=<dbdir> flag)
|
||||
the first time you start the MySQL server after an upgrade from an
|
||||
earlier version.
|
||||
|
@ -12,13 +12,14 @@
|
||||
#
|
||||
|
||||
[mysqld]
|
||||
user = mysql
|
||||
# port = 3306 # set in %%ETCDIR%%/my.cnf
|
||||
# socket = /var/run/mysql/mysql.sock # set in %%ETCDIR%%/my.cnf
|
||||
user = %%MARIADB_USER%%
|
||||
# port = 3306 # inherited from %%ETCDIR%%/my.cnf
|
||||
# socket = %%MARIADB_RUNDIR%%/mysql.sock # inherited from %%ETCDIR%%/my.cnf
|
||||
bind-address = 127.0.0.1
|
||||
basedir = %%PREFIX%%
|
||||
datadir = /var/db/mysql
|
||||
net_retry_count = 16384
|
||||
log_error = %%MARIADB_LOGDIR%%/${hostname}.err
|
||||
# [mysqld] configuration for ZFS
|
||||
# From https://www.percona.com/resources/technical-presentations/zfs-mysql-percona-technical-webinar
|
||||
# Create separate datasets for data and logs, eg
|
||||
|
@ -440,4 +440,4 @@ man/man1/mariadb-waitpid.1.gz
|
||||
@comment man/man1/mysqltest_embedded.1.gz
|
||||
@comment man/man1/replace.1.gz
|
||||
@comment share/pkgconfig/mariadb.pc
|
||||
|
||||
@dir(%%MARIADB_USER%%,%%MARIADB_GROUP%%,) %%MARIADB_LOGDIR%%
|
||||
|
Loading…
Reference in New Issue
Block a user