Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 May 2020 09:58:39 +0000 (UTC)
From:      Bernard Spil <brnrd@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r536602 - in head/databases: mariadb104-client mariadb104-client/files mariadb104-server mariadb104-server/files
Message-ID:  <202005260958.04Q9wdqP044357@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brnrd
Date: Tue May 26 09:58:39 2020
New Revision: 536602
URL: https://svnweb.freebsd.org/changeset/ports/536602

Log:
  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

Added:
  head/databases/mariadb104-server/files/client.cnf.sample.in   (contents, props changed)
  head/databases/mariadb104-server/files/my.cnf.sample.in   (contents, props changed)
  head/databases/mariadb104-server/files/server.cnf.sample.in   (contents, props changed)
Deleted:
  head/databases/mariadb104-client/files/
  head/databases/mariadb104-server/files/patch-man_CMakeLists.txt
Modified:
  head/databases/mariadb104-client/Makefile
  head/databases/mariadb104-client/pkg-plist
  head/databases/mariadb104-server/Makefile
  head/databases/mariadb104-server/files/pkg-message.in
  head/databases/mariadb104-server/pkg-plist

Modified: head/databases/mariadb104-client/Makefile
==============================================================================
--- head/databases/mariadb104-client/Makefile	Tue May 26 09:53:44 2020	(r536601)
+++ head/databases/mariadb104-client/Makefile	Tue May 26 09:58:39 2020	(r536602)
@@ -10,8 +10,6 @@ BROKEN_i386=	compile error: undeclared identifier 'my_
 
 MASTERDIR=	${.CURDIR}/../${PORTNAME}${PKGNAMESUFFIX:C/-client/-server/}
 
-FILESDIR=	${.CURDIR}/files
-PATCHDIR=	${.CURDIR}/files
 PLIST=		${.CURDIR}/pkg-plist
 
 CONFLICTS_INSTALL=	databases/mytop

Modified: head/databases/mariadb104-client/pkg-plist
==============================================================================
--- head/databases/mariadb104-client/pkg-plist	Tue May 26 09:53:44 2020	(r536601)
+++ head/databases/mariadb104-client/pkg-plist	Tue May 26 09:58:39 2020	(r536602)
@@ -36,6 +36,8 @@ bin/mysqlslap
 bin/mytop
 bin/replace
 @comment bin/wsrep_sst_rsync_wan
+@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
@@ -65,7 +67,6 @@ lib/mysql/libmysqlclient.a
 lib/mysql/libmysqlclient.so
 lib/mysql/libmysqlclient_r.a
 lib/mysql/libmysqlclient_r.so
-lib/mysql/libmysqlservices.a
 @comment lib/mysql/plugin/caching_sha2_password.so
 lib/mysql/plugin/client_ed25519.so
 lib/mysql/plugin/daemon_example.ini
@@ -161,15 +162,10 @@ man/man1/mysqlslap.1.gz
 man/man1/replace.1.gz
 @comment man/man1/resolve_stack_dump.1.gz
 @comment man/man1/resolveip.1.gz
-@comment man/man1/tokuft_logprint.1.gz
-@comment man/man1/tokuftdump.1.gz
 @comment man/man1/wsrep_sst_common.1.gz
 @comment man/man1/wsrep_sst_mariabackup.1.gz
 @comment man/man1/wsrep_sst_mysqldump.1.gz
 @comment man/man1/wsrep_sst_rsync.1.gz
 @comment man/man1/wsrep_sst_rsync_wan.1.gz
-@comment man/man1/wsrep_sst_xtrabackup-v2.1.gz
-@comment man/man1/wsrep_sst_xtrabackup.1.gz
 @comment man/man8/mysqld.8.gz
-@comment share/aclocal/mysql.m4
 libdata/pkgconfig/mariadb.pc

Modified: head/databases/mariadb104-server/Makefile
==============================================================================
--- head/databases/mariadb104-server/Makefile	Tue May 26 09:53:44 2020	(r536601)
+++ head/databases/mariadb104-server/Makefile	Tue May 26 09:58:39 2020	(r536602)
@@ -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 EXAM
 		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>

Added: head/databases/mariadb104-server/files/client.cnf.sample.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mariadb104-server/files/client.cnf.sample.in	Tue May 26 09:58:39 2020	(r536602)
@@ -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]
+

Added: head/databases/mariadb104-server/files/my.cnf.sample.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mariadb104-server/files/my.cnf.sample.in	Tue May 26 09:58:39 2020	(r536602)
@@ -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/

Modified: head/databases/mariadb104-server/files/pkg-message.in
==============================================================================
--- head/databases/mariadb104-server/files/pkg-message.in	Tue May 26 09:53:44 2020	(r536601)
+++ head/databases/mariadb104-server/files/pkg-message.in	Tue May 26 09:58:39 2020	(r536602)
@@ -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
 }
-]
+

Added: head/databases/mariadb104-server/files/server.cnf.sample.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mariadb104-server/files/server.cnf.sample.in	Tue May 26 09:58:39 2020	(r536602)
@@ -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]
+

Modified: head/databases/mariadb104-server/pkg-plist
==============================================================================
--- head/databases/mariadb104-server/pkg-plist	Tue May 26 09:53:44 2020	(r536601)
+++ head/databases/mariadb104-server/pkg-plist	Tue May 26 09:58:39 2020	(r536602)
@@ -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
+



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005260958.04Q9wdqP044357>