aboutsummaryrefslogtreecommitdiff
path: root/databases/mariadb104-server
diff options
context:
space:
mode:
authorBernard Spil <brnrd@FreeBSD.org>2020-05-26 09:58:39 +0000
committerBernard Spil <brnrd@FreeBSD.org>2020-05-26 09:58:39 +0000
commitda3ccc48428fd463e97838e7c0e3c8b723886c1c (patch)
tree6159c5183d1006f5d7d2a4e12f8a60ed1d66f2c4 /databases/mariadb104-server
parent9f9a0444680a68e9763196c6a572bc628fd965f5 (diff)
downloadports-da3ccc48428fd463e97838e7c0e3c8b723886c1c.tar.gz
ports-da3ccc48428fd463e97838e7c0e3c8b723886c1c.zip
databases/mariadb104-server: Fix configuration location / overhaul
* Fix configuration location [1] * Share patches between client and server * Provide minimal configuration for client and server * Make the wsrep config a sample only * Fixup plists PR: 246694 [1] Reported by: <theis gmx at> MFH: 2020Q2
Notes
Notes: svn path=/head/; revision=536602
Diffstat (limited to 'databases/mariadb104-server')
-rw-r--r--databases/mariadb104-server/Makefile18
-rw-r--r--databases/mariadb104-server/files/client.cnf.sample.in52
-rw-r--r--databases/mariadb104-server/files/my.cnf.sample.in13
-rw-r--r--databases/mariadb104-server/files/patch-man_CMakeLists.txt17
-rw-r--r--databases/mariadb104-server/files/pkg-message.in8
-rw-r--r--databases/mariadb104-server/files/server.cnf.sample.in59
-rw-r--r--databases/mariadb104-server/pkg-plist32
7 files changed, 174 insertions, 25 deletions
diff --git a/databases/mariadb104-server/Makefile b/databases/mariadb104-server/Makefile
index 3f659c5034bd..39040b8234c2 100644
--- a/databases/mariadb104-server/Makefile
+++ b/databases/mariadb104-server/Makefile
@@ -3,7 +3,7 @@
PORTNAME?= mariadb
PORTVERSION= 10.4.13
-PORTREVISION?= 1
+PORTREVISION?= 2
CATEGORIES= databases
MASTER_SITES= http://mirrors.supportex.net/${SITESDIR}/ \
http://mirror2.hs-esslingen.de/pub/Mirrors/${SITESDIR}/ \
@@ -98,6 +98,7 @@ DISABLED_PLUGINS+= 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]*-//}-* \
@@ -118,6 +119,7 @@ CMAKE_ON+= CONC_WITH_MYSQLCOMPAT WITHOUT_SERVER
CMAKE_OFF+= WITH_WSREP
USES+= readline
USE_LDCONFIG= ${PREFIX}/lib/mysql
+SUB_FILES+= my.cnf.sample client.cnf.sample
.else # ! ${PKGNAMESUFFIX:M*-client}
# MySQL-Server part
USES+= mysql:104m
@@ -127,6 +129,7 @@ USERS= mysql
GROUPS= mysql
CMAKE_ON+= CMAKE_SKIP_BUILD_RPATH WITH_EMBEDDED_SERVER
CMAKE_OFF+= WITH_CLIENT
+SUB_FILES+= server.cnf.sample
.for ENGINE in ${OPTIONS_GROUP_ENGINES:NINNOBASE}
${ENGINE}_CMAKE_OFF= -DPLUGIN_${ENGINE}=NO
@@ -199,6 +202,7 @@ CMAKE_OFF+= WITH_TOKUDB
post-patch:
${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g' \
${WRKSRC}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake
+ ${REINPLACE_CMD} 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/mysys/my_default.c
${MV} ${WRKSRC}/storage/mroonga/version ${WRKSRC}/storage/mroonga/version_txt
.if ${OPSYS} == DragonFly
${CP} ${WRKSRC}/cmake/os/FreeBSD.cmake \
@@ -210,8 +214,14 @@ post-configure:
-e 's|(#define LIBS .*)"$$|\1 -L${PREFIX}/lib"|' \
${WRKSRC}/libmariadb/mariadb_config/mariadb_config.c
+pre-install:
+ ${MKDIR} -p ${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
${MV} ${STAGEDIR}${PREFIX}/lib/mysql/pkgconfig/mariadb.pc \
@@ -223,11 +233,17 @@ post-install-GSSAPI_NONE-off:
.else # ! ${PKGNAMESUFFIX:M*-client}
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
${MV} ${STAGEDIR}${PREFIX}/etc/mysql/user_map.conf \
${STAGEDIR}${PREFIX}/etc/mysql/user_map.conf.sample
+
+post-install-WSREP-on:
+ ${MV} ${STAGEDIR}${DATADIR}/wsrep.cnf \
+ ${STAGEDIR}${ETCDIR}/conf.d/wsrep.cnf.sample
.endif # ${PKGNAMESUFFIX:M*-client}
.include <bsd.port.post.mk>
diff --git a/databases/mariadb104-server/files/client.cnf.sample.in b/databases/mariadb104-server/files/client.cnf.sample.in
new file mode 100644
index 000000000000..f66262f2fefa
--- /dev/null
+++ b/databases/mariadb104-server/files/client.cnf.sample.in
@@ -0,0 +1,52 @@
+# Options specific to client applications, see
+# https://mariadb.com/kb/en/configuring-mariadb-with-option-files/#client-option-groups
+
+# 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
+
+# Options specific to MariaDB client programs
+[client-mariadb]
+
+#
+## Options for specific client Tools
+#
+
+# Options read by `mysql`
+# Renamed from [mysql] starting with MariaDB 10.4.6.
+[mariadb-client] Options read by mysql. Available starting with MariaDB 10.4.6.
+prompt = \u@\h [\d]>\_
+no_auto_rehash
+
+# Options read by `mysqldump`
+# Renamed from [mysqldump] starting with MariaDB 10.4.6.
+[mariadb-dump]
+max_allowed_packet = 256M
+quote_names
+quick
+
+# Options read by `mysqladmin`
+# Renamed from [mysqladmin] starting with MariaDB 10.4.6.
+[mariadb-admin]
+
+# Options read by `mysqlbinlog`
+# Renamed from [mysqlbinlog] starting with MariaDB 10.4.6.
+[mariadb-binlog]
+
+# Options read by `mysqlcheck`
+# Renamed from [mysqlcheck] starting with MariaDB 10.4.6.
+[mariadb-check]
+
+# Options read by `mysqlimport`
+# Renamed from [mysqlimport] starting with MariaDB 10.4.6.
+[mariadb-import]
+
+# Options read by `mysqlshow`
+# Renamed from [mysqlshow] starting with MariaDB 10.4.6.
+[mariadb-show]
+
+# Options read by `mysqlslap`
+# Renamed from [mysqlslap] starting with MariaDB 10.4.6.
+[mariadb-slap]
+
diff --git a/databases/mariadb104-server/files/my.cnf.sample.in b/databases/mariadb104-server/files/my.cnf.sample.in
new file mode 100644
index 000000000000..b4fed968fc48
--- /dev/null
+++ b/databases/mariadb104-server/files/my.cnf.sample.in
@@ -0,0 +1,13 @@
+#
+# This group is read both by the client and the server
+# use it for options that affect everything, see
+# https://mariadb.com/kb/en/configuring-mariadb-with-option-files/#option-groups
+#
+[client-server]
+port = 3306
+socket = /var/run/mysql/mysql.sock
+
+#
+# include *.cnf from the config directory
+#
+!includedir %%ETCDIR%%/conf.d/
diff --git a/databases/mariadb104-server/files/patch-man_CMakeLists.txt b/databases/mariadb104-server/files/patch-man_CMakeLists.txt
deleted file mode 100644
index 445abd48de4c..000000000000
--- a/databases/mariadb104-server/files/patch-man_CMakeLists.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-Fix up missing WITHOUT_DOCS, WITHOUT_CLIENT options
-
---- man/CMakeLists.txt.orig 2019-11-07 05:52:21 UTC
-+++ man/CMakeLists.txt
-@@ -40,10 +40,11 @@ SET(MAN1_TEST mysql-stress-test.pl.1 mysql-test-run.pl
-
- INSTALL(FILES ${MAN1_SERVER} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPagesServer)
- INSTALL(FILES ${MAN8_SERVER} DESTINATION ${INSTALL_MANDIR}/man8 COMPONENT ManPagesServer)
-+IF(FALSE)
- INSTALL(FILES ${MAN1_CLIENT} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPagesClient)
- INSTALL(FILES ${MAN1_DEVEL} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPagesDevelopment)
- INSTALL(FILES ${MAN1_TEST} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPagesTest)
--
-+ENDIF()
- macro(MARIADB_SYMLINK_MANPAGE)
- list(LENGTH MARIADB_SYMLINK_FROMS _len)
- math(EXPR _listlen "${_len}-1")
diff --git a/databases/mariadb104-server/files/pkg-message.in b/databases/mariadb104-server/files/pkg-message.in
index 7c02aa873dca..861db54383eb 100644
--- a/databases/mariadb104-server/files/pkg-message.in
+++ b/databases/mariadb104-server/files/pkg-message.in
@@ -3,7 +3,9 @@
message: <<EOM
MariaDB respects hier(7) and doesn't check /etc and /etc/mysql for
my.cnf. Please move existing my.cnf files from those paths to
-%%PREFIX%%/etc and %%PREFIX%%/etc/mysql.
+%%PREFIX%%/etc/mysql or %%PREFIX%%/etc. Sample
+configuration files are provided in %%PREFIX%%/etc/mysql
+and %%PREFIX%%/etc/mysql/conf.d.
This port does NOT include the mytop perl script, this is included in
the MariaDB tarball but the most recent version can be found in the
@@ -12,9 +14,9 @@ EOM
}
{ type: upgrade
message: <<EOM
-Remember to run mysql_upgrade (with the optional --datadir=<dbdir> flag)
+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.
EOM
}
-]
+
diff --git a/databases/mariadb104-server/files/server.cnf.sample.in b/databases/mariadb104-server/files/server.cnf.sample.in
new file mode 100644
index 000000000000..c49de469ce1e
--- /dev/null
+++ b/databases/mariadb104-server/files/server.cnf.sample.in
@@ -0,0 +1,59 @@
+# Options specific to server applications, see
+# https://mariadb.com/kb/en/configuring-mariadb-with-option-files/#server-option-groups
+
+# Options specific to all server programs
+[server]
+
+# Options specific to MariaDB server programs
+[server-mariadb]
+
+#
+# Options for specific server tools
+#
+
+[mysqld]
+user = mysql
+# port = 3306 # set in %%ETCDIR%%/my.cnf
+# socket = /var/run/mysql/mysql.sock # set in %%ETCDIR%%/my.cnf
+bind-address = 127.0.0.1
+basedir = %%PREFIX%%
+datadir = /var/db/mysql
+net_retry_count = 16384
+# [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
+# zroot/mysql compression=on recordsize=128k atime=off
+# zroot/mysql/data recordsize=16k
+# zroot/mysql/logs
+# datadir = /var/db/mysql/data
+# innodb_log_group_home_dir = /var/db/mysql/log
+# audit_log_file = /var/db/mysql/log/audit.log
+# general_log_file = /var/db/mysql/log/general.log
+# log_bin = /var/db/mysql/log/mysql-bin
+# relay_log = /var/db/mysql/log/relay-log
+# slow_query_log_file = /var/db/mysql/log/slow.log
+# innodb_doublewrite = 0
+# innodb_flush_method = O_DSYNC
+
+# Options read by `mysqld_safe`
+# Renamed from [mysqld_safe] starting with MariaDB 10.4.6.
+[mariadb_safe]
+
+# Options read my `mariabackup`
+[mariabackup]
+
+# Options read by `mysql_upgrade`
+# Renamed from [mysql_upgrade] starting with MariaDB 10.4.6.
+[mariadb-upgrade]
+
+# Specific options read by the mariabackup SST method
+[sst]
+
+# Options read by `mysqlbinlog`
+# Renamed from [mysqlbinlog] starting with MariaDB 10.4.6.
+[mariadb-binlog]
+
+# Options read by `mysqladmin`
+# Renamed from [mysqladmin] starting with MariaDB 10.4.6.
+[mariadb-admin]
+
diff --git a/databases/mariadb104-server/pkg-plist b/databases/mariadb104-server/pkg-plist
index 58c0ca061700..b26b736dc6e7 100644
--- a/databases/mariadb104-server/pkg-plist
+++ b/databases/mariadb104-server/pkg-plist
@@ -53,7 +53,9 @@ bin/resolveip
%%WSREP%%bin/wsrep_sst_mysqldump
%%WSREP%%bin/wsrep_sst_rsync
%%WSREP%%bin/wsrep_sst_rsync_wan
-@sample etc/mysql/user_map.conf.sample
+@sample %%ETCDIR%%/conf.d/server.cnf.sample
+%%WSREP%%%%ETCDIR%%/conf.d/wsrep.cnf.sample
+@sample %%ETCDIR%%/user_map.conf.sample
@comment data/test/db.opt
include/mysql/server/big_endian.h
include/mysql/server/byte_order_generic.h
@@ -309,7 +311,6 @@ man/man8/mysqld.8.gz
%%DATADIR%%/spanish/errmsg.sys
%%DATADIR%%/swedish/errmsg.sys
%%DATADIR%%/ukrainian/errmsg.sys
-%%WSREP%%%%DATADIR%%/wsrep.cnf
%%WSREP%%%%DATADIR%%/wsrep_notify
@comment %%DOCSDIR%%/COPYING
%%DOCSDIR%%/INSTALL-BINARY
@@ -392,8 +393,6 @@ man/man8/mysqld.8.gz
@comment lib/mysql/plugin/mysql_clear_password.so
@comment lib/mysql/plugin/sha256_password.so
@comment libdata/pkgconfig/libmariadb.pc
-@comment man/man1/mysql_convert_table_format.1.gz
-@comment man/man1/mariadb.1.gz
@comment man/man1/mariadb-access.1.gz
@comment man/man1/mariadb-admin.1.gz
@comment man/man1/mariadb-binlog.1.gz
@@ -406,14 +405,39 @@ man/man8/mysqld.8.gz
@comment man/man1/mariadb-hotcopy.1.gz
@comment man/man1/mariadb-import.1.gz
@comment man/man1/mariadb-plugin.1.gz
+@comment man/man1/mariadb-service-convert.1.gz
@comment man/man1/mariadb-setpermission.1.gz
@comment man/man1/mariadb-show.1.gz
@comment man/man1/mariadb-slap.1.gz
@comment man/man1/mariadb-test-embedded.1.gz
@comment man/man1/mariadb-test.1.gz
man/man1/mariadb-waitpid.1.gz
+@comment man/man1/mariadb.1.gz
+@comment man/man1/msql2mysql.1.gz
+@comment man/man1/my_safe_process.1.gz
+@comment man/man1/mysql-stress-test.pl.1.gz
+@comment man/man1/mysql-test-run.pl.1.gz
+@comment man/man1/mysql.1.gz
+@comment man/man1/mysql_client_test.1.gz
+@comment man/man1/mysql_client_test_embedded.1.gz
+@comment man/man1/mysql_config.1.gz
+@comment man/man1/mysql_convert_table_format.1.gz
+@comment man/man1/mysql_embedded.1.gz
+@comment man/man1/mysql_find_rows.1.gz
+@comment man/man1/mysql_plugin.1.gz
@comment man/man1/mysql_setpermission.1.gz
+@comment man/man1/mysql_waitpid.1.gz
+@comment man/man1/mysqlaccess.1.gz
+@comment man/man1/mysqladmin.1.gz
+@comment man/man1/mysqlbinlog.1.gz
+@comment man/man1/mysqlcheck.1.gz
+@comment man/man1/mysqldump.1.gz
@comment man/man1/mysqlhotcopy.1.gz
+@comment man/man1/mysqlimport.1.gz
+@comment man/man1/mysqlshow.1.gz
+@comment man/man1/mysqlslap.1.gz
@comment man/man1/mysqltest.1.gz
+@comment man/man1/mysqltest_embedded.1.gz
@comment man/man1/replace.1.gz
@comment share/pkgconfig/mariadb.pc
+