Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jul 2017 10:48:11 +0000 (UTC)
From:      Vasil Dimov <vd@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r445424 - head/databases/mysqlwsrep56-server
Message-ID:  <201707101048.v6AAmBwJ036192@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: vd
Date: Mon Jul 10 10:48:11 2017
New Revision: 445424
URL: https://svnweb.freebsd.org/changeset/ports/445424

Log:
  databases/mysqlwsrep56-server: Bring more in line with databases/mysql56-server
  
  * Install my.cnf.sample, /var/db/mysql_secure/ and /var/db/mysql_tmpdir/
  * Use the same CMake options as databases/mysql56-server (almost)

Modified:
  head/databases/mysqlwsrep56-server/Makefile
  head/databases/mysqlwsrep56-server/pkg-plist

Modified: head/databases/mysqlwsrep56-server/Makefile
==============================================================================
--- head/databases/mysqlwsrep56-server/Makefile	Mon Jul 10 09:00:40 2017	(r445423)
+++ head/databases/mysqlwsrep56-server/Makefile	Mon Jul 10 10:48:11 2017	(r445424)
@@ -4,6 +4,7 @@
 PORTNAME=	mysqlwsrep
 PORTVERSION?=	5.6.36
 DISTVERSIONSUFFIX?=	-25.20
+PORTREVISION?=	1
 CATEGORIES=	databases ipv6
 PKGNAMESUFFIX=	56-server
 
@@ -17,6 +18,7 @@ RUN_DEPENDS=	socat:net/socat lsof:sysutils/lsof netcat
 BROKEN_powerpc64=	Does not build
 
 DATADIR=	${PREFIX}/share/mysql
+ETCDIR=		${PREFIX}/etc/mysql
 
 NOT_FOR_ARCHS=	aarch64 armv6 powerpc64
 NOT_FOR_ARCHS_REASON=	error: Unsupported platform
@@ -38,22 +40,39 @@ GH_ACCOUNT=	codership
 GH_PROJECT?=	mysql-wsrep
 GH_TAGNAME?=	wsrep_${DISTVERSION}${DISTVERSIONSUFFIX}
 
-CMAKE_ARGS+=	-DINSTALL_DOCDIR="share/doc/mysql" \
+MY_DBDIR=	/var/db/mysql
+MY_SECDIR=	/var/db/mysql_secure
+MY_TMPDIR=	/var/db/mysql_tmpdir
+
+CMAKE_ARGS+=	-DINSTALL_LAYOUT=FREEBSD \
+		-DINSTALL_LDCONFIGDIR="${LOCALBASE}/libdata/ldconfig" \
+		-DINSTALL_PKGCONFIGDIR="${LOCALBASE}/libdata/pkgconfig" \
+		-DINSTALL_DOCDIR="share/doc/mysql" \
 		-DINSTALL_DOCREADMEDIR="share/doc/mysql" \
 		-DINSTALL_INCLUDEDIR="include/mysql" \
 		-DINSTALL_INFODIR="info" \
 		-DINSTALL_LIBDIR="lib/mysql" \
 		-DINSTALL_MANDIR="man" \
-		-DINSTALL_MYSQLDATADIR="/var/db/mysql" \
+		-DINSTALL_MYSQLDATADIR="${MY_DBDIR}" \
+		-DINSTALL_MYSQLKEYRINGDIR="etc/mysql/keyring" \
 		-DINSTALL_MYSQLSHAREDIR="share/mysql" \
 		-DINSTALL_MYSQLTESTDIR="share/mysql/tests" \
 		-DINSTALL_PLUGINDIR="lib/mysql/plugin" \
 		-DINSTALL_SBINDIR="libexec" \
 		-DINSTALL_SCRIPTDIR="bin" \
+		-DINSTALL_SECURE_FILE_PRIVDIR="${MY_SECDIR}" \
 		-DINSTALL_SHAREDIR="share" \
 		-DINSTALL_SQLBENCHDIR="share/mysql" \
 		-DINSTALL_SUPPORTFILESDIR="share/mysql" \
+		-DMYSQL_KEYRINGDIR="${ETCDIR}/keyring" \
 		-DWITH_EDITLINE=system \
+		-DWITH_LIBEVENT=system \
+		-DWITH_LZ4=system \
+		-DWITH_ZLIB=system \
+		-DWITH_SSL=${OPENSSLBASE} \
+		-DCRYPTO_LIBRARY=${OPENSSLLIB}/libcrypto.so \
+		-DOPENSSL_LIBRARY=${OPENSSLLIB}/libssl.so \
+		-DINSTALL_MYSQLTESTDIR=0 \
 		-DWITH_LIBWRAP=1 \
 		-DWITH_WSREP=1
 
@@ -63,12 +82,22 @@ SHEBANG_FILES=	scripts/*.pl* scripts/*.sh scripts/wsre
 .error You have USE_MYSQL variable defined either in environment or in make(1) arguments. Please undefine it and try again.
 .endif
 
+SUB_LIST=	MY_DBDIR=${MY_DBDIR} \
+		MY_SECDIR=${MY_SECDIR} \
+		MY_TMPDIR=${MY_TMPDIR}
+
+PLIST_SUB=	MY_DBDIR=${MY_DBDIR} \
+		MY_SECDIR=${MY_SECDIR} \
+		MY_TMPDIR=${MY_TMPDIR}
+
 CONFLICTS_INSTALL=	mariadb*-server-* \
 			mysql[0-9]*-server-* \
 			percona*-server-*
 
 USE_RC_SUBR=	mysql-server
 
+SUB_FILES=	my.cnf.sample
+
 USERS=		mysql
 GROUPS=		mysql
 
@@ -99,10 +128,17 @@ MMAN1=		my_print_defaults.1 \
 		resolve_stack_dump.1 \
 		resolveip.1
 
+.include <bsd.port.pre.mk>
+
 post-patch:
 	${REINPLACE_CMD} 's/*.1/${MMAN1}/' ${WRKSRC}/man/CMakeLists.txt
 
-.include <bsd.port.pre.mk>
+post-install:
+	${MKDIR} ${STAGEDIR}${ETCDIR}
+	${INSTALL_DATA} ${WRKDIR}/my.cnf.sample ${STAGEDIR}${ETCDIR}/my.cnf.sample
+	${MKDIR} ${STAGEDIR}${ETCDIR}/keyring
+	${MKDIR} ${STAGEDIR}${MY_SECDIR}
+	${MKDIR} ${STAGEDIR}${MY_TMPDIR}
 
 .if ${ARCH} == "armv6"
 EXTRA_PATCHES+=	${FILESDIR}/extra-patch-config.h.cmake

Modified: head/databases/mysqlwsrep56-server/pkg-plist
==============================================================================
--- head/databases/mysqlwsrep56-server/pkg-plist	Mon Jul 10 09:00:40 2017	(r445423)
+++ head/databases/mysqlwsrep56-server/pkg-plist	Mon Jul 10 10:48:11 2017	(r445424)
@@ -138,3 +138,7 @@ man/man8/mysqld.8.gz
 %%DATADIR%%/swedish/errmsg.sys
 %%DATADIR%%/ukrainian/errmsg.sys
 %%DATADIR%%/wsrep_notify
+%%ETCDIR%%/my.cnf.sample
+@dir(mysql,mysql,0750) %%ETCDIR%%/keyring
+@dir(mysql,mysql,0750) %%MY_SECDIR%%
+@dir(mysql,mysql,0750) %%MY_TMPDIR%%



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