import mysql80-client and mysql80-server packages from pkgsrc wip
package is experimental right now - it was confirmed working on NetBSD and compile on macOS only for now 8.0 brings many improvements over 5.7, following is shortened list, more details are available on https://dev.mysql.com/doc/refman/8.0/en/mysql-nutshell.html - transactional data dictionary - atomic DDL - integrated upgrade procedure - security and account management improvements - resource groups and threads (thread affinity needs some work for NetBSD) - table encryption management - loads of innodb enhancements - default character set utf8mb4 - JSON enhancements - CTE, Window functions - lateral derived tables - reworked regular experssion support - internal temporary tables - HASH JOIN optimization - EXPLAIN ANALYZE - time zone support for TIMESTAMP and DATETIME - optimizer hints for FORCE INDEX, IGNORE INDEX - XML enhancements - single preparation of statements - single RIGHT JOIN as LEFT JOIN handling - derived condition pushdown optimization Number of features were also deprecated, check the release notes for that
This commit is contained in:
parent
84dfd65fe0
commit
f1f0e5888c
51 changed files with 22873 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
# $NetBSD: Makefile,v 1.629 2021/05/13 11:04:43 nia Exp $
|
# $NetBSD: Makefile,v 1.630 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
COMMENT= Databases
|
COMMENT= Databases
|
||||||
|
|
||||||
|
@ -113,6 +113,8 @@ SUBDIR+= mysql56-client
|
||||||
SUBDIR+= mysql56-server
|
SUBDIR+= mysql56-server
|
||||||
SUBDIR+= mysql57-client
|
SUBDIR+= mysql57-client
|
||||||
SUBDIR+= mysql57-server
|
SUBDIR+= mysql57-server
|
||||||
|
SUBDIR+= mysql80-client
|
||||||
|
SUBDIR+= mysql80-server
|
||||||
SUBDIR+= mysqld_exporter
|
SUBDIR+= mysqld_exporter
|
||||||
SUBDIR+= mysqltuner
|
SUBDIR+= mysqltuner
|
||||||
SUBDIR+= mytop
|
SUBDIR+= mytop
|
||||||
|
|
14
databases/mysql80-client/DESCR
Normal file
14
databases/mysql80-client/DESCR
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
MySQL is a SQL (Structured Query Language) database server. SQL is the most
|
||||||
|
popular database language in the world. MySQL is a client-server implementation
|
||||||
|
that consists of a server daemon `mysqld' and many different client
|
||||||
|
programs/libraries.
|
||||||
|
|
||||||
|
The main goals of MySQL are speed and robustness.
|
||||||
|
|
||||||
|
The base upon which MySQL is built is a set of routines that have been used in
|
||||||
|
a highly demanding production environment for many years. While MySQL is still
|
||||||
|
in development it already offers a rich and highly useful function set.
|
||||||
|
|
||||||
|
The official way to pronounce 'MySQL' is 'My Ess Que Ell' (Not MY-SEQUEL).
|
||||||
|
|
||||||
|
This package contains the MySQL client programs and libraries.
|
5
databases/mysql80-client/MESSAGE
Normal file
5
databases/mysql80-client/MESSAGE
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
===========================================================================
|
||||||
|
$NetBSD: MESSAGE,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
This package is EXPERIMENTAL for now, recommend to only use for testing.
|
||||||
|
===========================================================================
|
15
databases/mysql80-client/Makefile
Normal file
15
databases/mysql80-client/Makefile
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# $NetBSD: Makefile,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
PKGNAME= ${DISTNAME:S/-/-client-/}
|
||||||
|
COMMENT= MySQL 8, a free SQL database (client)
|
||||||
|
|
||||||
|
CONFLICTS= mysql3-client-[0-9]* mariadb-client-[0-9]*
|
||||||
|
|
||||||
|
.include "Makefile.common"
|
||||||
|
|
||||||
|
CMAKE_ARGS+= -DWITHOUT_SERVER=ON
|
||||||
|
UNWRAP_FILES+= scripts/mysql_config
|
||||||
|
INFO_FILES= yes
|
||||||
|
INSTALL_DIRS+= client include libmysql man scripts testclients
|
||||||
|
|
||||||
|
.include "../../mk/bsd.pkg.mk"
|
144
databases/mysql80-client/Makefile.common
Normal file
144
databases/mysql80-client/Makefile.common
Normal file
|
@ -0,0 +1,144 @@
|
||||||
|
# $NetBSD: Makefile.common,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
#
|
||||||
|
# used by databases/mysql80-client/Makefile
|
||||||
|
# used by databases/mysql80-server/Makefile
|
||||||
|
|
||||||
|
DISTNAME= mysql-8.0.24
|
||||||
|
CATEGORIES= databases
|
||||||
|
MASTER_SITES= ${MASTER_SITE_MYSQL:=MySQL-8.0/}
|
||||||
|
DISTFILES= mysql-boost-${PKGVERSION_NOREV}${EXTRACT_SUFX}
|
||||||
|
|
||||||
|
MAINTAINER?= pkgsrc-users@NetBSD.org
|
||||||
|
HOMEPAGE= https://www.mysql.com/
|
||||||
|
LICENSE= gnu-gpl-v2
|
||||||
|
|
||||||
|
DISTINFO_FILE?= ${.CURDIR}/../../databases/mysql80-client/distinfo
|
||||||
|
PATCHDIR?= ${.CURDIR}/../../databases/mysql80-client/patches
|
||||||
|
MESSAGE_SRC+= ${.CURDIR}/../../databases/mariadb104-client/MESSAGE
|
||||||
|
|
||||||
|
BUILDLINK_API_DEPENDS.zlib+= zlib>=1.2.11
|
||||||
|
|
||||||
|
USE_CMAKE= yes
|
||||||
|
USE_LANGUAGES= c c++ c++14 # 1.75+ boost requires c++14
|
||||||
|
USE_TOOLS+= bash bison gmake perl:run
|
||||||
|
USE_GCC_RUNTIME= yes
|
||||||
|
USE_BUILTIN.libevent= no
|
||||||
|
|
||||||
|
.include "../../mk/bsd.prefs.mk"
|
||||||
|
|
||||||
|
.include "options.mk"
|
||||||
|
|
||||||
|
# MYSQL_USER username of the database administrator
|
||||||
|
# MYSQL_GROUP group of the database administrator
|
||||||
|
# MYSQL_DATADIR home directory (location of the databases)
|
||||||
|
# MYSQL_PIDFILE process ID file
|
||||||
|
# MYSQL_CHARSET default character set
|
||||||
|
# MYSQL_EXTRA_CHARSET additional character set to be compiled in
|
||||||
|
MYSQL_USER?= mysql
|
||||||
|
MYSQL_GROUP?= mysql
|
||||||
|
MYSQL_DATADIR?= ${VARBASE}/mysql
|
||||||
|
MYSQL_PIDFILE?= ${MYSQL_DATADIR}/${HOST}.pid
|
||||||
|
MYSQL_CHARSET?= utf8mb4
|
||||||
|
MYSQL_COLLATION?= utf8mb4_unicode_ci
|
||||||
|
MYSQL_EXTRA_CHARSET?= all
|
||||||
|
|
||||||
|
PKG_USERS_VARS+= MYSQL_USER
|
||||||
|
PKG_GROUPS_VARS+= MYSQL_GROUP
|
||||||
|
|
||||||
|
CONFIG_SHELL= ${TOOLS_PATH.bash}
|
||||||
|
|
||||||
|
CFLAGS.IRIX+= -DIRIX5
|
||||||
|
|
||||||
|
BUILD_DEFS+= VARBASE
|
||||||
|
|
||||||
|
# paths
|
||||||
|
CMAKE_ARGS+= -DINSTALL_DOCDIR="share/doc/mysql"
|
||||||
|
CMAKE_ARGS+= -DINSTALL_DOCREADMEDIR="share/doc/mysql"
|
||||||
|
CMAKE_ARGS+= -DINSTALL_INCLUDEDIR="include/mysql"
|
||||||
|
CMAKE_ARGS+= -DINSTALL_INFODIR="info"
|
||||||
|
CMAKE_ARGS+= -DINSTALL_MANDIR="${PKGMANDIR}"
|
||||||
|
CMAKE_ARGS+= -DINSTALL_MYSQLSHAREDIR="share/mysql"
|
||||||
|
CMAKE_ARGS+= -DINSTALL_MYSQLTESTDIR="share/mysql/test"
|
||||||
|
CMAKE_ARGS+= -DINSTALL_PLUGINDIR="lib/mysql/plugin"
|
||||||
|
CMAKE_ARGS+= -DINSTALL_SBINDIR="sbin"
|
||||||
|
CMAKE_ARGS+= -DINSTALL_SUPPORTFILESDIR="share/mysql"
|
||||||
|
CMAKE_ARGS+= -DROUTER_INSTALL_LOGROTATEDIR="share/mysql"
|
||||||
|
CMAKE_ARGS+= -DMYSQL_DATADIR=${MYSQL_DATADIR}
|
||||||
|
|
||||||
|
CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Release
|
||||||
|
|
||||||
|
CMAKE_ARGS+= -DWITH_BOOST="${WRKSRC}/boost"
|
||||||
|
CMAKE_ARGS+= -DWITH_ICU="system"
|
||||||
|
CMAKE_ARGS+= -DWITH_LIBEVENT="system"
|
||||||
|
CMAKE_ARGS+= -DWITH_LZ4="system"
|
||||||
|
CMAKE_ARGS+= -DWITH_RAPIDJSON="bundled"
|
||||||
|
CMAKE_ARGS+= -DWITH_SSL="system"
|
||||||
|
CMAKE_ARGS+= -DWITH_ZLIB="system"
|
||||||
|
CMAKE_ARGS+= -DWITH_ZSTD="system"
|
||||||
|
CMAKE_ARGS+= -DDEFAULT_CHARSET=${MYSQL_CHARSET}
|
||||||
|
CMAKE_ARGS+= -DDEFAULT_COLLATION=${MYSQL_COLLATION}
|
||||||
|
CMAKE_ARGS+= -DWITH_EXTRA_CHARSETS=${MYSQL_EXTRA_CHARSET}
|
||||||
|
CMAKE_ARGS+= -DWITH_UNIT_TESTS=OFF
|
||||||
|
CMAKE_ARGS+= -DFORCE_INSOURCE_BUILD=1
|
||||||
|
|
||||||
|
# we need atomic builtins
|
||||||
|
.if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "i386"
|
||||||
|
GNU_ARCH.i386= i586
|
||||||
|
CFLAGS+= -march=i586
|
||||||
|
.endif
|
||||||
|
|
||||||
|
CPPFLAGS+= -Dunix
|
||||||
|
CFLAGS+= -DUSE_OLD_FUNCTIONS # 3.23.x compat
|
||||||
|
#CFLAGS+= -D__STDC_FORMAT_MACROS=1 # always defined too late
|
||||||
|
|
||||||
|
.if ${OPSYS} != "Interix"
|
||||||
|
CFLAGS+= -fPIC -DPIC
|
||||||
|
CXXFLAGS+= -fPIC -DPIC
|
||||||
|
.endif
|
||||||
|
|
||||||
|
CMAKE_ARGS.SunOS+= -DFORCE_UNSUPPORTED_COMPILER=YES
|
||||||
|
|
||||||
|
# Force HAVE_CURSES_H on Solaris since the configure script is broken
|
||||||
|
# and does not properly detect this, breaking the build later on. Also
|
||||||
|
# explicitly disable epoll support as it is Linux-specific.
|
||||||
|
CMAKE_ARGS.SunOS+= -DHAVE_SYS_EPOLL_H=NO
|
||||||
|
CFLAGS.SunOS+= -DHAVE_CURSES_H
|
||||||
|
CXXFLAGS.SunOS+= -DHAVE_CURSES_H
|
||||||
|
|
||||||
|
.include "../../mk/pthread.buildlink3.mk"
|
||||||
|
|
||||||
|
.if defined(PTHREAD_TYPE) && (${PTHREAD_TYPE} == "pth")
|
||||||
|
CFLAGS+= -DSIGNALS_DONT_BREAK_READ
|
||||||
|
CXXFLAGS+= -DSIGNALS_DONT_BREAK_READ
|
||||||
|
.endif
|
||||||
|
|
||||||
|
LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/mysql
|
||||||
|
|
||||||
|
SUBST_CLASSES+= scr
|
||||||
|
SUBST_STAGE.scr= pre-configure
|
||||||
|
SUBST_FILES.scr= scripts/mysqld_safe.sh
|
||||||
|
SUBST_FILES.scr+= support-files/mysql.server.sh
|
||||||
|
SUBST_SED.scr= -e "s,chown,${CHOWN},g"
|
||||||
|
SUBST_SED.scr+= -e "s,/bin/sh,${RCD_SCRIPTS_SHELL},g"
|
||||||
|
SUBST_SED.scr+= -e "s,@SHELL_PATH@,${RCD_SCRIPTS_SHELL},g"
|
||||||
|
SUBST_MESSAGE.scr= Fixing scripts.
|
||||||
|
|
||||||
|
CMAKE_ARGS+= -DWITH_EDITLINE="system"
|
||||||
|
CMAKE_ARGS+= -DEDITLINE_INCLUDE_DIR=${BUILDLINK_PREFIX.editline}/${BUILDLINK_INCDIRS.editline}
|
||||||
|
|
||||||
|
.if ${OPSYS} == "NetBSD"
|
||||||
|
CFLAGS.NetBSD+= -DHAVE_ALLOCA_H
|
||||||
|
CXXFLAGS.NetBSD+= -DHAVE_ALLOCA_H
|
||||||
|
# MySQL code depends on having <alloca.h>
|
||||||
|
post-patch:
|
||||||
|
echo "#define alloca(sz) __builtin_alloca(sz)" > ${WRKSRC}/include/alloca.h
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.include "../../mk/curses.buildlink3.mk"
|
||||||
|
.include "../../archivers/lz4/buildlink3.mk"
|
||||||
|
.include "../../archivers/zstd/buildlink3.mk"
|
||||||
|
.include "../../devel/editline/buildlink3.mk"
|
||||||
|
.include "../../devel/libevent/buildlink3.mk"
|
||||||
|
.include "../../devel/zlib/buildlink3.mk"
|
||||||
|
.include "../../security/openssl/buildlink3.mk"
|
||||||
|
.include "../../textproc/icu/buildlink3.mk"
|
65
databases/mysql80-client/PLIST
Normal file
65
databases/mysql80-client/PLIST
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
@comment $NetBSD: PLIST,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
bin/mysql
|
||||||
|
bin/mysql_client_test
|
||||||
|
bin/mysql_config
|
||||||
|
bin/mysql_config_editor
|
||||||
|
bin/mysql_migrate_keyring
|
||||||
|
bin/mysql_ssl_rsa_setup
|
||||||
|
bin/mysqladmin
|
||||||
|
bin/mysqlbinlog
|
||||||
|
bin/mysqlcheck
|
||||||
|
bin/mysqldump
|
||||||
|
bin/mysqlimport
|
||||||
|
bin/mysqlpump
|
||||||
|
bin/mysqlshow
|
||||||
|
bin/mysqlslap
|
||||||
|
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/libmysqlclient.a
|
||||||
|
lib/libmysqlclient.so
|
||||||
|
lib/libmysqlclient.so.21
|
||||||
|
lib/libmysqlclient.so.21.1.24
|
||||||
|
lib/pkgconfig/mysqlclient.pc
|
||||||
|
man/man1/comp_err.1
|
||||||
|
man/man1/ibd2sdi.1
|
||||||
|
man/man1/innochecksum.1
|
||||||
|
man/man1/lz4_decompress.1
|
||||||
|
man/man1/my_print_defaults.1
|
||||||
|
man/man1/myisam_ftdump.1
|
||||||
|
man/man1/myisamchk.1
|
||||||
|
man/man1/myisamlog.1
|
||||||
|
man/man1/myisampack.1
|
||||||
|
man/man1/mysql.1
|
||||||
|
man/man1/mysql.server.1
|
||||||
|
man/man1/mysql_config.1
|
||||||
|
man/man1/mysql_config_editor.1
|
||||||
|
man/man1/mysql_secure_installation.1
|
||||||
|
man/man1/mysql_ssl_rsa_setup.1
|
||||||
|
man/man1/mysql_tzinfo_to_sql.1
|
||||||
|
man/man1/mysql_upgrade.1
|
||||||
|
man/man1/mysqladmin.1
|
||||||
|
man/man1/mysqlbinlog.1
|
||||||
|
man/man1/mysqlcheck.1
|
||||||
|
man/man1/mysqld_multi.1
|
||||||
|
man/man1/mysqld_safe.1
|
||||||
|
man/man1/mysqldump.1
|
||||||
|
man/man1/mysqldumpslow.1
|
||||||
|
man/man1/mysqlimport.1
|
||||||
|
man/man1/mysqlman.1
|
||||||
|
man/man1/mysqlpump.1
|
||||||
|
man/man1/mysqlshow.1
|
||||||
|
man/man1/mysqlslap.1
|
||||||
|
man/man1/perror.1
|
||||||
|
man/man1/zlib_decompress.1
|
||||||
|
man/man8/mysqld.8
|
1
databases/mysql80-client/TODO
Normal file
1
databases/mysql80-client/TODO
Normal file
|
@ -0,0 +1 @@
|
||||||
|
perhaps implement thread affinity for netbsd and irix
|
19
databases/mysql80-client/buildlink3.mk
Normal file
19
databases/mysql80-client/buildlink3.mk
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# $NetBSD: buildlink3.mk,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
BUILDLINK_TREE+= mysql-client
|
||||||
|
|
||||||
|
.if !defined(MYSQL_CLIENT_BUILDLINK3_MK)
|
||||||
|
MYSQL_CLIENT_BUILDLINK3_MK:=
|
||||||
|
|
||||||
|
BUILDLINK_API_DEPENDS.mysql-client+= mysql-client>=8.0.19<8.1
|
||||||
|
BUILDLINK_PKGSRCDIR.mysql-client?= ../../wip/mysql80-client
|
||||||
|
BUILDLINK_INCDIRS.mysql-client?= include/mysql
|
||||||
|
BUILDLINK_LIBDIRS.mysql-client?= lib
|
||||||
|
|
||||||
|
.include "../../devel/libevent/buildlink3.mk"
|
||||||
|
.include "../../archivers/zstd/buildlink3.mk"
|
||||||
|
.include "../../devel/zlib/buildlink3.mk"
|
||||||
|
.include "../../security/openssl/buildlink3.mk"
|
||||||
|
.endif # MYSQL_CLIENT_BUILDLINK3_MK
|
||||||
|
|
||||||
|
BUILDLINK_TREE+= -mysql-client
|
36
databases/mysql80-client/distinfo
Normal file
36
databases/mysql80-client/distinfo
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
$NetBSD: distinfo,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
SHA1 (mysql-boost-8.0.24.tar.gz) = e640d9851c1721a0550bdca38f03cb8681d61862
|
||||||
|
RMD160 (mysql-boost-8.0.24.tar.gz) = 2577eb94d5b8651f3520706be9c40c3e924980d4
|
||||||
|
SHA512 (mysql-boost-8.0.24.tar.gz) = ad8510614251c056f0963f8e51b9ed5e75452ccbf2728254d662fcc3a7ee1bdc177d1d34e958ddc31c7e6b5b3af9377ef2d9cbdc0353676b3026619673447deb
|
||||||
|
Size (mysql-boost-8.0.24.tar.gz) = 290263082 bytes
|
||||||
|
SHA1 (patch-CMakeLists.txt) = 16ca9bcbcaefdc8bd1bc0e8dc89ca7a347d14675
|
||||||
|
SHA1 (patch-client_CMakeLists.txt) = f96d0d2e5ad8c1c8f5d6a9eabbd1c706bee852c0
|
||||||
|
SHA1 (patch-client_mysqladmin.cc) = e3459bd009ef7ac0b7acece6bbcb82777a384db3
|
||||||
|
SHA1 (patch-cmake_boost.cmake) = 7452d5ef84c63bb0bd34313aa0cedafee5f41618
|
||||||
|
SHA1 (patch-cmake_os_SunOS.cmake) = 15cf67c136c2b6e608d9379290d235d71d6b769e
|
||||||
|
SHA1 (patch-cmake_readline.cmake) = fb79ed969240ae2984098f72c2d3fb501154902c
|
||||||
|
SHA1 (patch-config.h.cmake) = e6debea316c5bb8338afb693d704007d45b3941f
|
||||||
|
SHA1 (patch-configure.cmake) = 659b93e5a1eeaf32a2937b8201050d34e83f6b5d
|
||||||
|
SHA1 (patch-include_CMakeLists.txt) = 289c1454d1b7e7fe8566187b3cefc722260993b6
|
||||||
|
SHA1 (patch-include_my__compare.h) = e6b3146252d1ebf2e2423ed3682621aa68cce6bd
|
||||||
|
SHA1 (patch-include_my__thread.h) = 176134a238c5c2f983aadb6d1cd620165f4057bb
|
||||||
|
SHA1 (patch-include_my__thread__os__id.h) = 383923523623d0811915d5d75c523904102dcf43
|
||||||
|
SHA1 (patch-include_tables__contained__in.h) = c332b10760ef8b7f16b1e94821b79589f525e4e7
|
||||||
|
SHA1 (patch-libmysql_CMakeLists.txt) = c46b0091aaebe91da89b2a8fb70398965d417664
|
||||||
|
SHA1 (patch-mysys_kqueue__timers.cc) = 837474b779c24dd0af67444c2adbcf07b73e0d36
|
||||||
|
SHA1 (patch-mysys_stacktrace.cc) = 6792ceaae3c3b0d70bd8b6c848a128d50397e6f4
|
||||||
|
SHA1 (patch-router_CMakeLists.txt) = 9bfd1278c42070ada0606dfff34a66b8b95d0413
|
||||||
|
SHA1 (patch-router_src_harness_include_mysql_harness_net_ts_impl_netif.h) = 4daf0b2a9e92eb6ffe8a00eb0bfb37db7a8638ee
|
||||||
|
SHA1 (patch-router_src_harness_include_mysql_harness_net_ts_internet.h) = 29e019236423aaa77b71b273d009404e4fbafe73
|
||||||
|
SHA1 (patch-router_src_harness_include_mysql_harness_net_ts_local.h) = d2149f9840dc8b65a4d9d8332bcd5088b4f9b919
|
||||||
|
SHA1 (patch-router_src_harness_include_mysql_harness_tty.h) = ca883b2ed83b623922b58cf96f896de9847d37cb
|
||||||
|
SHA1 (patch-router_src_harness_src_stdx_io_file_handle.cc) = 0004dfb6a65b8774096ad58825ab5fa04858e6bf
|
||||||
|
SHA1 (patch-scripts_CMakeLists.txt) = 15be14619275f0dc39c216901b2cabc6ee517300
|
||||||
|
SHA1 (patch-scripts_mysqld_safe.sh) = 0784314227657aa0bc3f4a0b4e21c173a86fa94b
|
||||||
|
SHA1 (patch-sql_CMakeLists.txt) = 84af2f2e58a17bde292a665a726489b8f56f4132
|
||||||
|
SHA1 (patch-sql_conn__handler_socket__connection.cc) = b414e0d499f51750e1aa6e9dd7b4e7006456a079
|
||||||
|
SHA1 (patch-sql_item_geofunc_relchecks_bgwrap.h) = d20896bfe2391d30aa9e95834c77e7de03377d76
|
||||||
|
SHA1 (patch-sql_resourcegroups_platform_thread__attrs__api__apple.cc) = e08ed53790ac8b03b38d566fee3a2688ca6065b3
|
||||||
|
SHA1 (patch-storage_ndb_include_ndb__global.h) = 03adf28cbd965869a0e8ea312ae719d7772e63da
|
||||||
|
SHA1 (patch-vio_viosocket.cc) = 76dfaf9c8feb39fc3043cfd83d51a47aa8a8352d
|
35
databases/mysql80-client/options.mk
Normal file
35
databases/mysql80-client/options.mk
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
# $NetBSD: options.mk,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
PKG_OPTIONS_VAR= PKG_OPTIONS.mysql8
|
||||||
|
|
||||||
|
# ndb-cluster does not configure with cmake
|
||||||
|
PKG_SUPPORTED_OPTIONS+= ndb-cluster
|
||||||
|
PKG_SUPPORTED_OPTIONS+= memcached
|
||||||
|
|
||||||
|
.include "../../mk/bsd.options.mk"
|
||||||
|
|
||||||
|
# Enable InnoDB Memcached support
|
||||||
|
PLIST_VARS+= memcached
|
||||||
|
.if !empty(PKG_OPTIONS:Mmemcached)
|
||||||
|
PLIST.memcached= yes
|
||||||
|
CMAKE_ARGS+= -DWITH_INNODB_MEMCACHED=ON
|
||||||
|
CMAKE_ARGS+= -DWITH_BUNDLED_MEMCACHED=ON
|
||||||
|
.else
|
||||||
|
CMAKE_ARGS+= -DWITH_INNODB_MEMCACHED=OFF
|
||||||
|
.endif
|
||||||
|
|
||||||
|
# Enable Sphinx SE support
|
||||||
|
# http://sphinxsearch.com/docs/current.html#sphinxse-overview
|
||||||
|
#PLIST_VARS+= sphinx
|
||||||
|
#.if !empty(PKG_OPTIONS:Msphinx) || make(distinfo) || make(makesum) || make(mdi)
|
||||||
|
#SPHINX_VER= 2.2.11
|
||||||
|
#DISTFILES= ${DEFAULT_DISTFILES} sphinx-${SPHINX_VER}-release${EXTRACT_SUFX}
|
||||||
|
#SITES.sphinx-2.2.11-release.tar.gz= http://sphinxsearch.com/files/
|
||||||
|
#. if !empty(PKGPATH:Mdatabases/mysql56-server)
|
||||||
|
#MESSAGE_SRC= ${PKGDIR}/MESSAGE ${PKGDIR}/MESSAGE.sphinx
|
||||||
|
#. endif
|
||||||
|
#PLIST.sphinx= yes
|
||||||
|
|
||||||
|
#post-extract:
|
||||||
|
# ${CP} -R ${WRKDIR}/sphinx-${SPHINX_VER}-release/mysqlse ${WRKSRC}/storage/sphinx
|
||||||
|
#.endif
|
31
databases/mysql80-client/patches/patch-CMakeLists.txt
Normal file
31
databases/mysql80-client/patches/patch-CMakeLists.txt
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
$NetBSD: patch-CMakeLists.txt,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
Split configuration between mysql-client and mysql-server.
|
||||||
|
|
||||||
|
--- CMakeLists.txt.orig 2019-12-09 19:53:17.000000000 +0000
|
||||||
|
+++ CMakeLists.txt
|
||||||
|
@@ -1329,8 +1329,9 @@ ADD_SUBDIRECTORY(utilities)
|
||||||
|
ADD_SUBDIRECTORY(share)
|
||||||
|
ADD_SUBDIRECTORY(libservices)
|
||||||
|
|
||||||
|
-IF(NOT WITHOUT_SERVER)
|
||||||
|
+IF(WITHOUT_SERVER)
|
||||||
|
ADD_SUBDIRECTORY(testclients)
|
||||||
|
+ELSE()
|
||||||
|
ADD_SUBDIRECTORY(sql)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
@@ -1382,11 +1383,9 @@ IF(ENABLE_GCOV)
|
||||||
|
INCLUDE(fastcov)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
-IF(UNIX)
|
||||||
|
+IF(WITHOUT_SERVER)
|
||||||
|
ADD_SUBDIRECTORY(man)
|
||||||
|
-ENDIF()
|
||||||
|
-
|
||||||
|
-IF(NOT WITHOUT_SERVER)
|
||||||
|
+ELSE()
|
||||||
|
ADD_SUBDIRECTORY(packaging/rpm-common)
|
||||||
|
ADD_SUBDIRECTORY(packaging/rpm-oel)
|
||||||
|
ADD_SUBDIRECTORY(packaging/rpm-fedora)
|
59
databases/mysql80-client/patches/patch-client_CMakeLists.txt
Normal file
59
databases/mysql80-client/patches/patch-client_CMakeLists.txt
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
$NetBSD: patch-client_CMakeLists.txt,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
Split configuration between mysql-client and mysql-server.
|
||||||
|
|
||||||
|
--- client/CMakeLists.txt.orig 2021-05-08 21:52:13.000000000 +0000
|
||||||
|
+++ client/CMakeLists.txt
|
||||||
|
@@ -28,6 +28,7 @@ DISABLE_MISSING_PROFILE_WARNING()
|
||||||
|
## Subdirectory with common client code.
|
||||||
|
ADD_SUBDIRECTORY(base)
|
||||||
|
## Subdirectory for mysqlpump code.
|
||||||
|
+IF(WITHOUT_SERVER)
|
||||||
|
ADD_SUBDIRECTORY(dump)
|
||||||
|
## Subdirectory for mysql_migrate_keyring code.
|
||||||
|
ADD_SUBDIRECTORY(migrate_keyring)
|
||||||
|
@@ -41,6 +42,7 @@ MYSQL_ADD_EXECUTABLE(mysql
|
||||||
|
client_query_attributes.cc
|
||||||
|
LINK_LIBRARIES mysqlclient client_base ${EDITLINE_LIBRARY}
|
||||||
|
)
|
||||||
|
+ENDIF()
|
||||||
|
|
||||||
|
IF(NOT WITHOUT_SERVER)
|
||||||
|
MYSQL_ADD_EXECUTABLE(mysql_upgrade
|
||||||
|
@@ -57,6 +59,7 @@ IF(SOLARIS_SPARC AND MY_COMPILER_IS_SUNP
|
||||||
|
)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
+IF(NOT WITHOUT_SERVER)
|
||||||
|
MYSQL_ADD_EXECUTABLE(mysqltest
|
||||||
|
mysqltest.cc
|
||||||
|
mysqltest/error_names.cc
|
||||||
|
@@ -73,6 +76,7 @@ MYSQL_ADD_EXECUTABLE(mysqltest
|
||||||
|
ENABLE_EXPORTS
|
||||||
|
LINK_LIBRARIES mysqlclient
|
||||||
|
)
|
||||||
|
+ELSE()
|
||||||
|
MYSQL_ADD_EXECUTABLE(mysqlcheck
|
||||||
|
check/mysqlcheck.cc
|
||||||
|
check/mysqlcheck_core.cc
|
||||||
|
@@ -261,16 +265,20 @@ MYSQL_ADD_EXECUTABLE(mysql_config_editor
|
||||||
|
mysql_config_editor.cc
|
||||||
|
LINK_LIBRARIES mysqlclient
|
||||||
|
)
|
||||||
|
+ENDIF()
|
||||||
|
+IF(NOT WITHOUT_SERVER)
|
||||||
|
MYSQL_ADD_EXECUTABLE(mysql_secure_installation
|
||||||
|
mysql_secure_installation.cc
|
||||||
|
LINK_LIBRARIES mysqlclient
|
||||||
|
)
|
||||||
|
+ELSE()
|
||||||
|
MYSQL_ADD_EXECUTABLE(mysql_ssl_rsa_setup
|
||||||
|
logger.cc
|
||||||
|
mysql_ssl_rsa_setup.cc
|
||||||
|
path.cc
|
||||||
|
LINK_LIBRARIES mysys
|
||||||
|
)
|
||||||
|
+ENDIF()
|
||||||
|
|
||||||
|
# "WIN32" also covers 64 bit. "echo" is used in some files below "mysql-test/".
|
||||||
|
IF(WIN32)
|
23
databases/mysql80-client/patches/patch-client_mysqladmin.cc
Normal file
23
databases/mysql80-client/patches/patch-client_mysqladmin.cc
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
$NetBSD: patch-client_mysqladmin.cc,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
Redefine signals for Irix.
|
||||||
|
|
||||||
|
--- client/mysqladmin.cc.orig 2019-12-09 19:53:17.000000000 +0000
|
||||||
|
+++ client/mysqladmin.cc
|
||||||
|
@@ -413,8 +413,14 @@ int main(int argc, char *argv[]) {
|
||||||
|
commands = temp_argv;
|
||||||
|
if (tty_password) opt_password = get_tty_password(NullS);
|
||||||
|
|
||||||
|
- (void)signal(SIGINT, endprog); /* Here if abort */
|
||||||
|
- (void)signal(SIGTERM, endprog); /* Here if abort */
|
||||||
|
+#ifdef IRIX5
|
||||||
|
+#define _MYSQL_END_TYPE (void (*)(...))
|
||||||
|
+#else
|
||||||
|
+#define _MYSQL_END_TYPE
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+ (void)signal(SIGINT, _MYSQL_END_TYPE endprog); /* Here if abort */
|
||||||
|
+ (void)signal(SIGTERM, _MYSQL_END_TYPE endprog); /* Here if abort */
|
||||||
|
|
||||||
|
if (opt_bind_addr) mysql_options(&mysql, MYSQL_OPT_BIND, opt_bind_addr);
|
||||||
|
if (opt_compress) mysql_options(&mysql, MYSQL_OPT_COMPRESS, NullS);
|
20
databases/mysql80-client/patches/patch-cmake_boost.cmake
Normal file
20
databases/mysql80-client/patches/patch-cmake_boost.cmake
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
$NetBSD: patch-cmake_boost.cmake,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
Allow newer boost.
|
||||||
|
|
||||||
|
--- cmake/boost.cmake.orig 2021-03-22 08:44:50.000000000 +0000
|
||||||
|
+++ cmake/boost.cmake
|
||||||
|
@@ -300,13 +300,6 @@ IF(NOT BOOST_MAJOR_VERSION EQUAL 10)
|
||||||
|
COULD_NOT_FIND_BOOST()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
-IF(NOT BOOST_MINOR_VERSION EQUAL 73)
|
||||||
|
- MESSAGE(WARNING "Boost minor version found is ${BOOST_MINOR_VERSION} "
|
||||||
|
- "we need 73"
|
||||||
|
- )
|
||||||
|
- COULD_NOT_FIND_BOOST()
|
||||||
|
-ENDIF()
|
||||||
|
-
|
||||||
|
MESSAGE(STATUS "BOOST_INCLUDE_DIR ${BOOST_INCLUDE_DIR}")
|
||||||
|
|
||||||
|
# We have a limited set of patches/bugfixes here:
|
22
databases/mysql80-client/patches/patch-cmake_os_SunOS.cmake
Normal file
22
databases/mysql80-client/patches/patch-cmake_os_SunOS.cmake
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
$NetBSD: patch-cmake_os_SunOS.cmake,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
* Do not attempt to detect ISA, it conflicts with wrappers.
|
||||||
|
|
||||||
|
--- cmake/os/SunOS.cmake.orig 2019-12-09 19:53:17.000000000 +0000
|
||||||
|
+++ cmake/os/SunOS.cmake
|
||||||
|
@@ -32,6 +32,7 @@ ELSE()
|
||||||
|
SET(SOLARIS_INTEL 1)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
+IF(0)
|
||||||
|
IF (NOT "${CMAKE_C_FLAGS}${CMAKE_CXX_FLAGS}" MATCHES "-m32|-m64")
|
||||||
|
IF(NOT FORCE_UNSUPPORTED_COMPILER)
|
||||||
|
MESSAGE("Adding -m64")
|
||||||
|
@@ -41,6 +42,7 @@ IF (NOT "${CMAKE_C_FLAGS}${CMAKE_CXX_FLA
|
||||||
|
STRING_APPEND(CMAKE_CXX_LINK_FLAGS " -m64")
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
+ENDIF()
|
||||||
|
|
||||||
|
INCLUDE(CheckTypeSize)
|
||||||
|
CHECK_TYPE_SIZE("void *" SIZEOF_VOIDP)
|
19
databases/mysql80-client/patches/patch-cmake_readline.cmake
Normal file
19
databases/mysql80-client/patches/patch-cmake_readline.cmake
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
$NetBSD: patch-cmake_readline.cmake,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
Fix for pkgsrc editline.
|
||||||
|
|
||||||
|
--- cmake/readline.cmake.orig 2016-06-30 06:22:11.000000000 +0000
|
||||||
|
+++ cmake/readline.cmake
|
||||||
|
@@ -112,10 +112,10 @@ ENDMACRO()
|
||||||
|
|
||||||
|
MACRO (FIND_SYSTEM_EDITLINE)
|
||||||
|
FIND_PATH(FOUND_EDITLINE_READLINE
|
||||||
|
- NAMES editline/readline.h
|
||||||
|
+ NAMES readline/readline.h
|
||||||
|
)
|
||||||
|
IF(FOUND_EDITLINE_READLINE)
|
||||||
|
- SET(EDITLINE_INCLUDE_DIR "${FOUND_EDITLINE_READLINE}/editline")
|
||||||
|
+ SET(EDITLINE_INCLUDE_DIR "${FOUND_EDITLINE_READLINE}/readline")
|
||||||
|
ELSE()
|
||||||
|
# Different path on FreeBSD
|
||||||
|
FIND_PATH(FOUND_EDIT_READLINE_READLINE
|
24
databases/mysql80-client/patches/patch-config.h.cmake
Normal file
24
databases/mysql80-client/patches/patch-config.h.cmake
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
$NetBSD: patch-config.h.cmake,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
* bstring.h is needed for bzero on some platforms.
|
||||||
|
* check for ffsll and provide a portable version for sytems that
|
||||||
|
don't have it.
|
||||||
|
|
||||||
|
--- config.h.cmake.orig 2021-03-22 08:44:50.000000000 +0000
|
||||||
|
+++ config.h.cmake
|
||||||
|
@@ -40,6 +40,7 @@
|
||||||
|
/* Header files */
|
||||||
|
#cmakedefine HAVE_ALLOCA_H 1
|
||||||
|
#cmakedefine HAVE_ARPA_INET_H 1
|
||||||
|
+#cmakedefine HAVE_BSTRING_H 1
|
||||||
|
#cmakedefine HAVE_DLFCN_H 1
|
||||||
|
#cmakedefine HAVE_EXECINFO_H 1
|
||||||
|
#cmakedefine HAVE_FPU_CONTROL_H 1
|
||||||
|
@@ -80,6 +81,7 @@
|
||||||
|
#cmakedefine HAVE_FDATASYNC 1
|
||||||
|
#cmakedefine HAVE_DECL_FDATASYNC 1
|
||||||
|
#cmakedefine HAVE_FEDISABLEEXCEPT 1
|
||||||
|
+#cmakedefine HAVE_FFSLL 1
|
||||||
|
#cmakedefine HAVE_FSYNC 1
|
||||||
|
#cmakedefine HAVE_GETHRTIME 1
|
||||||
|
#cmakedefine HAVE_GETPASS 1
|
31
databases/mysql80-client/patches/patch-configure.cmake
Normal file
31
databases/mysql80-client/patches/patch-configure.cmake
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
$NetBSD: patch-configure.cmake,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
* check for ffsll and provide a portable version if not found
|
||||||
|
|
||||||
|
$NetBSD: patch-configure.cmake,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
--- configure.cmake.orig 2021-03-22 08:44:50.000000000 +0000
|
||||||
|
+++ configure.cmake
|
||||||
|
@@ -186,13 +186,9 @@ ENDIF()
|
||||||
|
#
|
||||||
|
INCLUDE (CheckIncludeFiles)
|
||||||
|
|
||||||
|
-IF(FREEBSD)
|
||||||
|
- # On FreeBSD some includes, e.g. sasl/sasl.h, is in /usr/local/include
|
||||||
|
- LIST(APPEND CMAKE_REQUIRED_INCLUDES "/usr/local/include")
|
||||||
|
-ENDIF()
|
||||||
|
-
|
||||||
|
CHECK_INCLUDE_FILES (alloca.h HAVE_ALLOCA_H)
|
||||||
|
CHECK_INCLUDE_FILES (arpa/inet.h HAVE_ARPA_INET_H)
|
||||||
|
+CHECK_INCLUDE_FILES (bstring.h HAVE_BSTRING_H)
|
||||||
|
CHECK_INCLUDE_FILES (dlfcn.h HAVE_DLFCN_H)
|
||||||
|
CHECK_INCLUDE_FILES (endian.h HAVE_ENDIAN_H)
|
||||||
|
CHECK_INCLUDE_FILES (execinfo.h HAVE_EXECINFO_H)
|
||||||
|
@@ -241,6 +237,7 @@ CHECK_FUNCTION_EXISTS (fcntl HAVE_FCNTL)
|
||||||
|
CHECK_FUNCTION_EXISTS (fdatasync HAVE_FDATASYNC)
|
||||||
|
CHECK_SYMBOL_EXISTS(fdatasync "unistd.h" HAVE_DECL_FDATASYNC)
|
||||||
|
CHECK_FUNCTION_EXISTS (fedisableexcept HAVE_FEDISABLEEXCEPT)
|
||||||
|
+CHECK_FUNCTION_EXISTS (ffsll HAVE_FFSLL)
|
||||||
|
CHECK_FUNCTION_EXISTS (fsync HAVE_FSYNC)
|
||||||
|
CHECK_FUNCTION_EXISTS (gethrtime HAVE_GETHRTIME)
|
||||||
|
CHECK_FUNCTION_EXISTS (getpass HAVE_GETPASS)
|
|
@ -0,0 +1,23 @@
|
||||||
|
$NetBSD: patch-include_CMakeLists.txt,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
Only mysql-client installs includes.
|
||||||
|
|
||||||
|
--- include/CMakeLists.txt.orig 2019-12-09 19:53:17.000000000 +0000
|
||||||
|
+++ include/CMakeLists.txt
|
||||||
|
@@ -44,6 +44,7 @@ SET(HEADERS_MYSQL_DIR
|
||||||
|
mysql/udf_registration_types.h
|
||||||
|
)
|
||||||
|
|
||||||
|
+IF(WITHOUT_SERVER)
|
||||||
|
INSTALL(FILES ${HEADERS}
|
||||||
|
DESTINATION ${INSTALL_INCLUDEDIR}
|
||||||
|
COMPONENT Development
|
||||||
|
@@ -53,7 +54,7 @@ INSTALL(FILES ${HEADERS_MYSQL_DIR}
|
||||||
|
DESTINATION ${INSTALL_INCLUDEDIR}/mysql
|
||||||
|
COMPONENT Development
|
||||||
|
)
|
||||||
|
-
|
||||||
|
+ENDIF()
|
||||||
|
# openssl/applink.c must be built into applications linking with libmysql.dll
|
||||||
|
IF (WIN32 AND OPENSSL_APPLINK_C)
|
||||||
|
INSTALL(FILES ${OPENSSL_APPLINK_C}
|
15
databases/mysql80-client/patches/patch-include_my__compare.h
Normal file
15
databases/mysql80-client/patches/patch-include_my__compare.h
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
$NetBSD: patch-include_my__compare.h,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
Adjust HA_MAX_KEY_LENGTH x4.
|
||||||
|
|
||||||
|
--- include/my_compare.h.orig 2019-12-09 19:53:17.000000000 +0000
|
||||||
|
+++ include/my_compare.h
|
||||||
|
@@ -49,7 +49,7 @@
|
||||||
|
But beware the dependency of MI_MAX_POSSIBLE_KEY_BUFF and HA_MAX_KEY_LENGTH.
|
||||||
|
*/
|
||||||
|
|
||||||
|
-#define HA_MAX_KEY_LENGTH 1000 /* Max length in bytes */
|
||||||
|
+#define HA_MAX_KEY_LENGTH 4000 /* Max length in bytes */
|
||||||
|
#define HA_MAX_KEY_SEG 16 /* Max segments for key */
|
||||||
|
|
||||||
|
#define HA_MAX_POSSIBLE_KEY_BUFF (HA_MAX_KEY_LENGTH + 24 + 6 + 6)
|
18
databases/mysql80-client/patches/patch-include_my__thread.h
Normal file
18
databases/mysql80-client/patches/patch-include_my__thread.h
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
$NetBSD: patch-include_my__thread.h,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
--- include/my_thread.h.orig 2019-12-09 19:53:17.000000000 +0000
|
||||||
|
+++ include/my_thread.h
|
||||||
|
@@ -39,6 +39,13 @@
|
||||||
|
#include "my_inttypes.h"
|
||||||
|
#include "my_macros.h"
|
||||||
|
|
||||||
|
+/* defines __NetBSD_Version__ */
|
||||||
|
+#if defined(__NetBSD__)
|
||||||
|
+#include <sys/param.h>
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#include <signal.h>
|
||||||
|
+
|
||||||
|
#ifndef ETIME
|
||||||
|
#define ETIME ETIMEDOUT /* For FreeBSD */
|
||||||
|
#endif
|
|
@ -0,0 +1,35 @@
|
||||||
|
$NetBSD: patch-include_my__thread__os__id.h,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
Add support for NetBSD.
|
||||||
|
|
||||||
|
--- include/my_thread_os_id.h.orig 2019-12-09 19:53:17.000000000 +0000
|
||||||
|
+++ include/my_thread_os_id.h
|
||||||
|
@@ -36,6 +36,10 @@
|
||||||
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#ifdef __NetBSD__
|
||||||
|
+#include <lwp.h>
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#ifdef HAVE_PTHREAD_GETTHREADID_NP
|
||||||
|
#include <pthread_np.h> /* pthread_getthreadid_np() */
|
||||||
|
#endif /* HAVE_PTHREAD_GETTHREADID_NP */
|
||||||
|
@@ -83,6 +87,9 @@ static inline my_thread_os_id_t my_threa
|
||||||
|
/* FreeBSD 10.2 */
|
||||||
|
return pthread_getthreadid_np();
|
||||||
|
#else
|
||||||
|
+#ifdef __NetBSD__
|
||||||
|
+ return (int)_lwp_self();
|
||||||
|
+#else
|
||||||
|
#ifdef HAVE_INTEGER_PTHREAD_SELF
|
||||||
|
/* Unknown platform, fallback. */
|
||||||
|
return pthread_self();
|
||||||
|
@@ -90,6 +97,7 @@ static inline my_thread_os_id_t my_threa
|
||||||
|
/* Feature not available. */
|
||||||
|
return 0;
|
||||||
|
#endif /* HAVE_INTEGER_PTHREAD_SELF */
|
||||||
|
+#endif /* __NetBSD__ */
|
||||||
|
#endif /* HAVE_PTHREAD_GETTHREADID_NP */
|
||||||
|
#endif /* _WIN32 */
|
||||||
|
#endif /* HAVE_SYS_GETTID */
|
|
@ -0,0 +1,24 @@
|
||||||
|
$NetBSD: patch-include_tables__contained__in.h,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
* some systems have ffsll in strings.h
|
||||||
|
* for systems that don't have ffsll, use the provided version
|
||||||
|
|
||||||
|
--- include/tables_contained_in.h.orig 2019-12-09 19:53:17.000000000 +0000
|
||||||
|
+++ include/tables_contained_in.h
|
||||||
|
@@ -26,6 +26,16 @@
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
+#include "my_config.h"
|
||||||
|
+
|
||||||
|
+#ifdef HAVE_STRINGS_H
|
||||||
|
+#include <strings.h>
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#ifndef HAVE_FFSLL
|
||||||
|
+int ffsll(longlong);
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#include "my_inttypes.h"
|
||||||
|
#include "sql/sql_optimizer.h"
|
||||||
|
|
|
@ -0,0 +1,68 @@
|
||||||
|
$NetBSD: patch-libmysql_CMakeLists.txt,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
Do not install libmysqlclient with the server.
|
||||||
|
Generate versioned lib symlinks on FreeBSD to supress PLIST divergence.
|
||||||
|
authentication_ldap and libmysql_api_test require libmysqld.
|
||||||
|
|
||||||
|
--- libmysql/CMakeLists.txt.orig 2021-03-22 08:44:50.000000000 +0000
|
||||||
|
+++ libmysql/CMakeLists.txt
|
||||||
|
@@ -270,11 +270,12 @@ IF(WIN32)
|
||||||
|
LIST(APPEND LIBS_TO_MERGE auth_win_client)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
-# LDAP authentication SASL client plugin
|
||||||
|
-ADD_SUBDIRECTORY(authentication_ldap)
|
||||||
|
-
|
||||||
|
# Merge several convenience libraries into one big mysqlclient
|
||||||
|
+IF(WITHOUT_SERVER)
|
||||||
|
MERGE_CONVENIENCE_LIBRARIES(mysqlclient ${LIBS_TO_MERGE} COMPONENT Development)
|
||||||
|
+ELSE()
|
||||||
|
+MERGE_CONVENIENCE_LIBRARIES(mysqlclient SKIP_INSTALL ${LIBS_TO_MERGE} COMPONENT Development)
|
||||||
|
+ENDIF()
|
||||||
|
TARGET_LINK_LIBRARIES(mysqlclient PRIVATE ${LIBS_TO_LINK})
|
||||||
|
|
||||||
|
# Visual Studio users need debug static library for debug projects
|
||||||
|
@@ -310,12 +311,21 @@ ENDIF()
|
||||||
|
|
||||||
|
# Merge several convenience libraries into one big mysqlclient
|
||||||
|
# and link them together into shared library.
|
||||||
|
+IF(WITHOUT_SERVER)
|
||||||
|
MERGE_LIBRARIES_SHARED(libmysql ${LIBS_TO_MERGE}
|
||||||
|
EXPORTS
|
||||||
|
${CLIENT_API_FUNCTIONS}
|
||||||
|
${CLIENT_API_FUNCTIONS_UNDOCUMENTED}
|
||||||
|
${CLIENT_API_NONBLOCKING_FUNCTIONS}
|
||||||
|
COMPONENT SharedLibraries)
|
||||||
|
+ELSE()
|
||||||
|
+MERGE_LIBRARIES_SHARED(libmysql SKIP_INSTALL ${LIBS_TO_MERGE}
|
||||||
|
+ EXPORTS
|
||||||
|
+ ${CLIENT_API_FUNCTIONS}
|
||||||
|
+ ${CLIENT_API_FUNCTIONS_UNDOCUMENTED}
|
||||||
|
+ ${CLIENT_API_NONBLOCKING_FUNCTIONS}
|
||||||
|
+ COMPONENT SharedLibraries)
|
||||||
|
+ENDIF()
|
||||||
|
TARGET_LINK_LIBRARIES(libmysql PRIVATE ${LIBS_TO_LINK})
|
||||||
|
|
||||||
|
IF(LINUX_STANDALONE AND KERBEROS_CUSTOM_LIBRARY)
|
||||||
|
@@ -334,7 +344,7 @@ ENDIF()
|
||||||
|
|
||||||
|
IF(UNIX)
|
||||||
|
# libtool compatability
|
||||||
|
- IF(FREEBSD OR APPLE)
|
||||||
|
+ IF(APPLE)
|
||||||
|
SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}")
|
||||||
|
ELSE()
|
||||||
|
SET(OS_SHARED_LIB_VERSION
|
||||||
|
@@ -397,6 +407,7 @@ CONFIGURE_FILE(api_test.c.in ${CMAKE_CUR
|
||||||
|
# from @CLIENT_API_FUNCTIONS@ are declared by <mysql.h>. It will fail
|
||||||
|
# to run if not all of these symbols are exported by the library.
|
||||||
|
#
|
||||||
|
+IF(NOT WITHOUT_SERVER)
|
||||||
|
MYSQL_ADD_EXECUTABLE(libmysql_api_test
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/api_test.c
|
||||||
|
LINK_LIBRARIES libmysql ${LIBRT}
|
||||||
|
@@ -425,3 +436,4 @@ ADD_CUSTOM_COMMAND(TARGET libmysql_api_t
|
||||||
|
COMMAND libmysql_api_test
|
||||||
|
> ${CMAKE_CURRENT_BINARY_DIR}/libmysql_api_test.out
|
||||||
|
)
|
||||||
|
+ENDIF()
|
|
@ -0,0 +1,69 @@
|
||||||
|
$NetBSD: patch-mysys_kqueue__timers.cc,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
* support pre NetBSD 10 __intptr_t udata type
|
||||||
|
* Fix for systems whcich do not define EVFILT_USER
|
||||||
|
|
||||||
|
--- mysys/kqueue_timers.cc.orig 2021-03-22 08:44:50.000000000 +0000
|
||||||
|
+++ mysys/kqueue_timers.cc
|
||||||
|
@@ -40,6 +40,18 @@
|
||||||
|
#include "mysys_err.h"
|
||||||
|
#include "mysys_priv.h" /* key_thread_timer_notifier */
|
||||||
|
|
||||||
|
+#ifdef __NetBSD__
|
||||||
|
+#include <sys/param.h>
|
||||||
|
+#if __NetBSD_Version__ < 999001400
|
||||||
|
+#define KEVENT_UDATA_TYPE_CAST (__intptr_t)
|
||||||
|
+#else
|
||||||
|
+#define KEVENT_UDATA_TYPE_CAST
|
||||||
|
+#endif
|
||||||
|
+#else
|
||||||
|
+#define KEVENT_UDATA_TYPE_CAST
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+
|
||||||
|
/* Kernel event queue file descriptor. */
|
||||||
|
static int kq_fd = -1;
|
||||||
|
|
||||||
|
@@ -69,10 +81,12 @@ static void *timer_notify_thread_func(vo
|
||||||
|
}
|
||||||
|
|
||||||
|
if (kev.filter == EVFILT_TIMER) {
|
||||||
|
- timer = static_cast<my_timer_t *>(kev.udata);
|
||||||
|
+ timer = static_cast<my_timer_t *>((void *)kev.udata);
|
||||||
|
assert(timer->id == kev.ident);
|
||||||
|
timer->notify_function(timer);
|
||||||
|
+#ifdef EVFILT_USER
|
||||||
|
} else if (kev.filter == EVFILT_USER)
|
||||||
|
+#endif
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -91,7 +105,9 @@ static void *timer_notify_thread_func(vo
|
||||||
|
static int start_helper_thread(void) {
|
||||||
|
struct kevent kev;
|
||||||
|
|
||||||
|
+#ifdef EVFILT_USER
|
||||||
|
EV_SET(&kev, 0, EVFILT_USER, EV_ADD, 0, 0, 0);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
if (kevent(kq_fd, &kev, 1, NULL, 0, NULL) < 0) {
|
||||||
|
my_message_local(ERROR_LEVEL, EE_FAILED_TO_CREATE_TIMER, errno);
|
||||||
|
@@ -134,7 +150,9 @@ int my_timer_initialize(void) {
|
||||||
|
void my_timer_deinitialize(void) {
|
||||||
|
struct kevent kev;
|
||||||
|
|
||||||
|
+#ifdef EVFILT_USER
|
||||||
|
EV_SET(&kev, 0, EVFILT_USER, 0, NOTE_TRIGGER, 0, 0);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
if (kevent(kq_fd, &kev, 1, NULL, 0, NULL) < 0)
|
||||||
|
my_message_local(ERROR_LEVEL,
|
||||||
|
@@ -165,7 +183,7 @@ int my_timer_create(my_timer_t *timer) {
|
||||||
|
int my_timer_set(my_timer_t *timer, unsigned long time) {
|
||||||
|
struct kevent kev;
|
||||||
|
|
||||||
|
- EV_SET(&kev, timer->id, EVFILT_TIMER, EV_ADD | EV_ONESHOT, 0, time, timer);
|
||||||
|
+ EV_SET(&kev, timer->id, EVFILT_TIMER, EV_ADD | EV_ONESHOT, 0, time,KEVENT_UDATA_TYPE_CAST timer);
|
||||||
|
|
||||||
|
return kevent(kq_fd, &kev, 1, NULL, 0, NULL);
|
||||||
|
}
|
15
databases/mysql80-client/patches/patch-mysys_stacktrace.cc
Normal file
15
databases/mysql80-client/patches/patch-mysys_stacktrace.cc
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
$NetBSD: patch-mysys_stacktrace.cc,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
* make sure sigsend is available if used
|
||||||
|
|
||||||
|
--- mysys/stacktrace.cc.orig 2019-12-09 19:53:17.000000000 +0000
|
||||||
|
+++ mysys/stacktrace.cc
|
||||||
|
@@ -304,7 +304,7 @@ void my_print_stacktrace(const uchar *st
|
||||||
|
void my_write_core(int sig) {
|
||||||
|
signal(sig, SIG_DFL);
|
||||||
|
pthread_kill(my_thread_self(), sig);
|
||||||
|
-#if defined(P_MYID)
|
||||||
|
+#if defined(HAVE_SIGSEND) && defined(P_MYID)
|
||||||
|
/* On Solaris, the above kill is not enough */
|
||||||
|
sigsend(P_PID, P_MYID, sig);
|
||||||
|
#endif
|
16
databases/mysql80-client/patches/patch-router_CMakeLists.txt
Normal file
16
databases/mysql80-client/patches/patch-router_CMakeLists.txt
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
$NetBSD: patch-router_CMakeLists.txt,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
* install license and readme file with the other docs instead of directly in
|
||||||
|
${PREFIX}
|
||||||
|
|
||||||
|
--- router/CMakeLists.txt.orig 2020-01-23 20:52:36.406138412 +0000
|
||||||
|
+++ router/CMakeLists.txt
|
||||||
|
@@ -95,7 +95,7 @@ INCLUDE(${CMAKE_SOURCE_DIR}/cmake/rapidj
|
||||||
|
SET(ROUTER_LICENSE_FILE "${CMAKE_SOURCE_DIR}/router/LICENSE.router")
|
||||||
|
SET(ROUTER_README_FILE "${CMAKE_SOURCE_DIR}/router/README.router")
|
||||||
|
|
||||||
|
-SET(DOC_DESTINATION ".")
|
||||||
|
+SET(DOC_DESTINATION "share/doc/mysql")
|
||||||
|
IF(NOT INSTALL_LAYOUT MATCHES "RPM")
|
||||||
|
INSTALL(FILES
|
||||||
|
${ROUTER_LICENSE_FILE}
|
|
@ -0,0 +1,15 @@
|
||||||
|
$NetBSD: patch-router_src_harness_include_mysql_harness_net_ts_impl_netif.h,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
NetBSD also has & needs <ifaddrs.h>
|
||||||
|
|
||||||
|
--- router/src/harness/include/mysql/harness/net_ts/impl/netif.h.orig 2021-05-09 02:48:24.814349260 +0000
|
||||||
|
+++ router/src/harness/include/mysql/harness/net_ts/impl/netif.h
|
||||||
|
@@ -31,7 +31,7 @@
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || \
|
||||||
|
- defined(__sun__)
|
||||||
|
+ defined(__sun__) || defined(__NetBSD__)
|
||||||
|
#define HAVE_IFADDRS_H
|
||||||
|
#endif
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
$NetBSD: patch-router_src_harness_include_mysql_harness_net_ts_internet.h,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
Conditionalize some AI_* constants not present on NetBSD.
|
||||||
|
|
||||||
|
--- router/src/harness/include/mysql/harness/net_ts/internet.h.orig 2021-05-09 00:35:34.199395387 +0000
|
||||||
|
+++ router/src/harness/include/mysql/harness/net_ts/internet.h
|
||||||
|
@@ -598,8 +598,12 @@ class resolver_base {
|
||||||
|
static constexpr flags canonical_name = AI_CANONNAME;
|
||||||
|
static constexpr flags numeric_host = AI_NUMERICHOST;
|
||||||
|
static constexpr flags numeric_service = AI_NUMERICSERV;
|
||||||
|
+#ifdef AI_V4MAPPED
|
||||||
|
static constexpr flags v4_mapped = AI_V4MAPPED;
|
||||||
|
+#endif
|
||||||
|
+#ifdef AI_ALL
|
||||||
|
static constexpr flags all_matching = AI_ALL;
|
||||||
|
+#endif
|
||||||
|
static constexpr flags address_configured = AI_ADDRCONFIG;
|
||||||
|
};
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
$NetBSD: patch-router_src_harness_include_mysql_harness_net_ts_local.h,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
NetBSD has uucred, not sockpeercred.
|
||||||
|
|
||||||
|
--- router/src/harness/include/mysql/harness/net_ts/local.h.orig 2021-05-09 01:07:01.720111634 +0000
|
||||||
|
+++ router/src/harness/include/mysql/harness/net_ts/local.h
|
||||||
|
@@ -44,7 +44,7 @@
|
||||||
|
|
||||||
|
#ifdef NET_TS_HAS_UNIX_SOCKET
|
||||||
|
|
||||||
|
-#if defined(__FreeBSD__) || defined(__APPLE__)
|
||||||
|
+#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__NetBSD__)
|
||||||
|
#include <sys/ucred.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@@ -229,7 +229,7 @@ class cred {
|
||||||
|
#elif defined(__FreeBSD__) || defined(__APPLE__)
|
||||||
|
using value_type = struct xucred;
|
||||||
|
#elif defined(__NetBSD__)
|
||||||
|
- using value_type = struct sockpeercred;
|
||||||
|
+ using value_type = struct uucred;
|
||||||
|
#else
|
||||||
|
#error "unsupported OS"
|
||||||
|
#endif
|
|
@ -0,0 +1,16 @@
|
||||||
|
$NetBSD: patch-router_src_harness_include_mysql_harness_tty.h,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
* TABDLY is an XSI standard not supported on all platforms (BSD)
|
||||||
|
|
||||||
|
--- router/src/harness/include/mysql/harness/tty.h.orig 2019-12-09 19:53:17.000000000 +0000
|
||||||
|
+++ router/src/harness/include/mysql/harness/tty.h
|
||||||
|
@@ -201,7 +201,9 @@ class HARNESS_EXPORT Tty {
|
||||||
|
// not on freebsd
|
||||||
|
static constexpr const size_t kCarriangeReturnDelayMask = CRDLY;
|
||||||
|
#endif
|
||||||
|
+#ifdef TABDLY
|
||||||
|
static constexpr const size_t kHorizontalTabDelayMask = TABDLY;
|
||||||
|
+#endif
|
||||||
|
#ifdef BSDLY
|
||||||
|
// not on freebsd
|
||||||
|
static constexpr const size_t kBackspaceDelayMask = BSDLY;
|
|
@ -0,0 +1,28 @@
|
||||||
|
$NetBSD: patch-router_src_harness_src_stdx_io_file_handle.cc,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
Support for NetBSD - reuses F_GETPATH code originally for macOS. Also
|
||||||
|
use correct constant for the fcntl() code - PATH_MAX, not MAXPATHLEN
|
||||||
|
|
||||||
|
--- router/src/harness/src/stdx/io/file_handle.cc.orig 2021-03-22 08:44:50.000000000 +0000
|
||||||
|
+++ router/src/harness/src/stdx/io/file_handle.cc
|
||||||
|
@@ -47,8 +47,6 @@
|
||||||
|
#include <sys/user.h>
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
-#elif defined(__APPLE__)
|
||||||
|
-#include <sys/param.h> // MAXPATHLEN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "mysql/harness/stdx/expected.h"
|
||||||
|
@@ -233,9 +230,9 @@ file_handle::current_path() const noexce
|
||||||
|
}
|
||||||
|
|
||||||
|
return {std::string{path.data(), std::next(path.data(), sz)}};
|
||||||
|
-#elif defined(__APPLE__)
|
||||||
|
+#elif defined(F_GETPATH) // __APPLE__, __NetBSD__
|
||||||
|
std::string path_name;
|
||||||
|
- path_name.resize(MAXPATHLEN + 1);
|
||||||
|
+ path_name.resize(PATH_MAX + 1);
|
||||||
|
|
||||||
|
if (-1 == fcntl(handle_, F_GETPATH, &path_name.front())) {
|
||||||
|
return stdx::make_unexpected(last_error_code());
|
|
@ -0,0 +1,42 @@
|
||||||
|
$NetBSD: patch-scripts_CMakeLists.txt,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
Split configuration between mysql-client and mysql-server.
|
||||||
|
|
||||||
|
--- scripts/CMakeLists.txt.orig 2021-03-22 08:44:50.000000000 +0000
|
||||||
|
+++ scripts/CMakeLists.txt
|
||||||
|
@@ -398,7 +398,7 @@ ELSE()
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/${PKGCONFIG_FILE}
|
||||||
|
ESCAPE_QUOTES @ONLY)
|
||||||
|
|
||||||
|
- IF(INSTALL_PKGCONFIGDIR)
|
||||||
|
+ IF(INSTALL_PKGCONFIGDIR AND WITHOUT_SERVER)
|
||||||
|
MESSAGE(STATUS "INSTALL ${PKGCONFIG_FILE} ${INSTALL_PKGCONFIGDIR}")
|
||||||
|
INSTALL(FILES
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/${PKGCONFIG_FILE}
|
||||||
|
@@ -411,19 +411,24 @@ ELSE()
|
||||||
|
# mysqld_safe used in mtr even for systemd platforms
|
||||||
|
IF(WITH_SYSTEMD)
|
||||||
|
SET(BIN_SCRIPTS
|
||||||
|
- mysql_config
|
||||||
|
mysqldumpslow
|
||||||
|
mysqld_safe
|
||||||
|
)
|
||||||
|
ELSE()
|
||||||
|
SET(BIN_SCRIPTS
|
||||||
|
- mysql_config
|
||||||
|
mysqldumpslow
|
||||||
|
mysqld_multi
|
||||||
|
mysqld_safe
|
||||||
|
)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
+ IF(NOT WITHOUT_CLIENTLIBS)
|
||||||
|
+ SET(BIN_SCRIPTS
|
||||||
|
+ ${BIN_SCRIPTS}
|
||||||
|
+ mysql_config
|
||||||
|
+ )
|
||||||
|
+ ENDIF(NOT WITHOUT_CLIENTLIBS)
|
||||||
|
+
|
||||||
|
FOREACH(file ${BIN_SCRIPTS})
|
||||||
|
IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh)
|
||||||
|
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh
|
|
@ -0,0 +1,13 @@
|
||||||
|
$NetBSD: patch-scripts_mysqld_safe.sh,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
--- scripts/mysqld_safe.sh.orig 2011-03-31 13:36:18.000000000 +0000
|
||||||
|
+++ scripts/mysqld_safe.sh
|
||||||
|
@@ -747,7 +747,7 @@ fi
|
||||||
|
# Alternatively, you can start mysqld with the "myisam-recover" option. See
|
||||||
|
# the manual for details.
|
||||||
|
#
|
||||||
|
-# echo "Checking tables in $DATADIR"
|
||||||
|
+# log_notice "Checking tables in $DATADIR"
|
||||||
|
# $MY_BASEDIR_VERSION/bin/myisamchk --silent --force --fast --medium-check $DATADIR/*/*.MYI
|
||||||
|
# $MY_BASEDIR_VERSION/bin/isamchk --silent --force $DATADIR/*/*.ISM
|
||||||
|
|
29
databases/mysql80-client/patches/patch-sql_CMakeLists.txt
Normal file
29
databases/mysql80-client/patches/patch-sql_CMakeLists.txt
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
$NetBSD: patch-sql_CMakeLists.txt,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
* use a provided ffsll implementation if the system does not have one
|
||||||
|
* use noop implementation (apple) for binding threads to a cpu
|
||||||
|
TODO: netbsd and irix has apis for this, perhaps implement this.
|
||||||
|
|
||||||
|
--- sql/CMakeLists.txt.orig 2021-03-22 08:44:50.000000000 +0000
|
||||||
|
+++ sql/CMakeLists.txt
|
||||||
|
@@ -589,6 +589,10 @@ SET(SQL_SHARED_SOURCES
|
||||||
|
daemon_proxy_keyring/daemon_proxy_keyring.cc
|
||||||
|
)
|
||||||
|
|
||||||
|
+IF(NOT HAVE_FFSLL)
|
||||||
|
+LIST(APPEND SQL_SHARED_SOURCES ffsll.cc)
|
||||||
|
+ENDIF()
|
||||||
|
+
|
||||||
|
# BISON_TARGET(<Name> <YaccInput> <CodeOutput>
|
||||||
|
# [COMPILE_FLAGS <flags>]
|
||||||
|
# [DEFINES_FILE <file>]
|
||||||
|
@@ -689,6 +693,9 @@ ELSEIF(SOLARIS)
|
||||||
|
ELSEIF(WIN32)
|
||||||
|
LIST(APPEND SQL_SHARED_SOURCES
|
||||||
|
resourcegroups/platform/thread_attrs_api_win.cc)
|
||||||
|
+ELSE()
|
||||||
|
+ LIST(APPEND SQL_SHARED_SOURCES
|
||||||
|
+ resourcegroups/platform/thread_attrs_api_apple.cc)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
SET(SQL_SOURCE
|
|
@ -0,0 +1,29 @@
|
||||||
|
$NetBSD: patch-sql_conn__handler_socket__connection.cc,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
--- sql/conn_handler/socket_connection.cc.orig 2019-12-09 19:53:17.000000000 +0000
|
||||||
|
+++ sql/conn_handler/socket_connection.cc
|
||||||
|
@@ -950,9 +950,11 @@ bool check_connection_refused_by_tcp_wra
|
||||||
|
signal(SIGCHLD, SIG_DFL);
|
||||||
|
request_init(&req, RQ_DAEMON, libwrap_name, RQ_FILE,
|
||||||
|
mysql_socket_getfd(connect_sock), NULL);
|
||||||
|
- fromhost(&req);
|
||||||
|
+ void (*my_fromhost) (void *) = (void (*) (void *)) fromhost;
|
||||||
|
+ my_fromhost(&req);
|
||||||
|
|
||||||
|
- if (!hosts_access(&req)) {
|
||||||
|
+ int (*my_host_access) (void *) = (int (*) (void *)) host_access;
|
||||||
|
+ if (!myhosts_access(&req)) {
|
||||||
|
/*
|
||||||
|
This may be stupid but refuse() includes an exit(0)
|
||||||
|
which we surely don't want...
|
||||||
|
@@ -964,8 +966,9 @@ bool check_connection_refused_by_tcp_wra
|
||||||
|
This is unproblematic as TCP-wrapper is unix specific,
|
||||||
|
anyway.
|
||||||
|
*/
|
||||||
|
+ char *(*my_eval_client) (void *) = (char *(*) (void *) eval_client;
|
||||||
|
syslog(LOG_AUTH | LOG_WARNING, "refused connect from %s",
|
||||||
|
- eval_client(&req));
|
||||||
|
+ my_eval_client(&req));
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBWRAP_PROTOTYPES
|
||||||
|
// Some distros have patched tcpd.h to have proper prototypes
|
|
@ -0,0 +1,15 @@
|
||||||
|
$NetBSD: patch-sql_item_geofunc_relchecks_bgwrap.h,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
<algorithm> is needed to define std::for_each() required by the boost 1.73
|
||||||
|
headers
|
||||||
|
|
||||||
|
--- sql/item_geofunc_relchecks_bgwrap.h.orig 2021-05-09 10:15:24.903436550 +0000
|
||||||
|
+++ sql/item_geofunc_relchecks_bgwrap.h
|
||||||
|
@@ -39,6 +39,7 @@
|
||||||
|
#include <set>
|
||||||
|
#include <string> // Boost expects std::string to be already present.
|
||||||
|
#include <vector>
|
||||||
|
+#include <algorithm>
|
||||||
|
|
||||||
|
#include <boost/geometry/algorithms/crosses.hpp>
|
||||||
|
#include <boost/geometry/algorithms/intersects.hpp>
|
|
@ -0,0 +1,35 @@
|
||||||
|
$NetBSD: patch-sql_resourcegroups_platform_thread__attrs__api__apple.cc,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
* support getting the cpu count on netbsd, openbsd and irix
|
||||||
|
|
||||||
|
--- sql/resourcegroups/platform/thread_attrs_api_apple.cc.orig 2021-03-22 08:44:50.000000000 +0000
|
||||||
|
+++ sql/resourcegroups/platform/thread_attrs_api_apple.cc
|
||||||
|
@@ -84,14 +84,28 @@ bool set_thread_priority(int, my_thread_
|
||||||
|
|
||||||
|
uint32_t num_vcpus_using_affinity() { return 0; }
|
||||||
|
|
||||||
|
+
|
||||||
|
+#ifdef IRIX5
|
||||||
|
+#include <sys/sysmp.h>
|
||||||
|
+
|
||||||
|
+uint32_t num_vcpus_using_config() {
|
||||||
|
+ return sysmp(MP_NAPROCS);
|
||||||
|
+}
|
||||||
|
+#else
|
||||||
|
+
|
||||||
|
uint32_t num_vcpus_using_config() {
|
||||||
|
+#ifdef HW_AVAILCPU
|
||||||
|
int name[2] = {CTL_HW, HW_AVAILCPU};
|
||||||
|
+#else
|
||||||
|
+ int name[2] = {CTL_HW, HW_NCPUONLINE};
|
||||||
|
+#endif
|
||||||
|
int ncpu;
|
||||||
|
|
||||||
|
size_t size = sizeof(ncpu);
|
||||||
|
sysctl(name, 2, &ncpu, &size, nullptr, 0);
|
||||||
|
return ncpu;
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
bool can_thread_priority_be_set() {
|
||||||
|
assert(0);
|
19
databases/mysql80-client/patches/patch-vio_viosocket.cc
Normal file
19
databases/mysql80-client/patches/patch-vio_viosocket.cc
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
$NetBSD: patch-vio_viosocket.cc,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
* don't use kqueue on older NetBSD which misses EVFILT_USER
|
||||||
|
|
||||||
|
$NetBSD: patch-vio_viosocket.cc,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
--- vio/viosocket.cc.orig 2021-03-22 08:44:50.000000000 +0000
|
||||||
|
+++ vio/viosocket.cc
|
||||||
|
@@ -70,6 +70,10 @@
|
||||||
|
|
||||||
|
#include "mysql/psi/mysql_socket.h"
|
||||||
|
|
||||||
|
+#if defined(HAVE_QUEUE) && !defined(EVFILT_USER)
|
||||||
|
+#undef HAVE_KQUEUE
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
int vio_errno(Vio *vio MY_ATTRIBUTE((unused))) {
|
||||||
|
/* These transport types are not Winsock based. */
|
||||||
|
#ifdef _WIN32
|
16
databases/mysql80-server/DEINSTALL
Normal file
16
databases/mysql80-server/DEINSTALL
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# $NetBSD: DEINSTALL,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
case ${STAGE} in
|
||||||
|
POST-DEINSTALL)
|
||||||
|
if [ -d @MYSQL_DATADIR@ ]; then
|
||||||
|
${CAT} << EOF
|
||||||
|
===========================================================================
|
||||||
|
If you won't be using ${PKGNAME} any longer, and you don't
|
||||||
|
wish to preserve your existing databases, then you may remove the
|
||||||
|
following directory:
|
||||||
|
|
||||||
|
@MYSQL_DATADIR@
|
||||||
|
===========================================================================
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
esac
|
15
databases/mysql80-server/DESCR
Normal file
15
databases/mysql80-server/DESCR
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
MySQL is a SQL (Structured Query Language) database server. SQL is the most
|
||||||
|
popular database language in the world. MySQL is a client-server implementation
|
||||||
|
that consists of a server daemon `mysqld' and many different client
|
||||||
|
programs/libraries.
|
||||||
|
|
||||||
|
The main goals of MySQL are speed and robustness.
|
||||||
|
|
||||||
|
The base upon which MySQL is built is a set of routines that have been used in
|
||||||
|
a highly demanding production environment for many years. While MySQL is still
|
||||||
|
in development it already offers a rich and highly useful function set.
|
||||||
|
|
||||||
|
The official way to pronounce 'MySQL' is 'My Ess Que Ell' (Not MY-SEQUEL).
|
||||||
|
|
||||||
|
This package contains the MySQL server programs and libraries including
|
||||||
|
embedded server (by PKG_OPTION).
|
21
databases/mysql80-server/MESSAGE
Normal file
21
databases/mysql80-server/MESSAGE
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
===========================================================================
|
||||||
|
$NetBSD: MESSAGE,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
After the tables are set up and the MySQL server is running,
|
||||||
|
please remember to set a password for the MySQL root user!
|
||||||
|
This is done by running both:
|
||||||
|
|
||||||
|
${PREFIX}/bin/mysqladmin -u root -p password 'new-password'
|
||||||
|
${PREFIX}/bin/mysqladmin -h `hostname` -u root -p password 'new-password'
|
||||||
|
|
||||||
|
The "Enter password:" prompt is asking for the existing password.
|
||||||
|
As there is no existing password, just press the Return key.
|
||||||
|
|
||||||
|
There is a script distributed with MySQL that can help you lock down
|
||||||
|
an installation. This script has been installed to
|
||||||
|
|
||||||
|
${PREFIX}/bin/mysql_secure_installation.
|
||||||
|
|
||||||
|
Please see the manual and the MySQL web site for more instructions.
|
||||||
|
|
||||||
|
===========================================================================
|
14
databases/mysql80-server/MESSAGE.sphinx
Normal file
14
databases/mysql80-server/MESSAGE.sphinx
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
===========================================================================
|
||||||
|
$NetBSD: MESSAGE.sphinx,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
To install the SphinxSE MySQL plugin, log into your MySQL console
|
||||||
|
and issue the following query:
|
||||||
|
|
||||||
|
INSTALL PLUGIN sphinx SONAME 'ha_sphinx.so';
|
||||||
|
|
||||||
|
You can verify it has been loaded properly by checking whether
|
||||||
|
it shows up in the list when list your engines:
|
||||||
|
|
||||||
|
SHOW ENGINES;
|
||||||
|
|
||||||
|
===========================================================================
|
94
databases/mysql80-server/Makefile
Normal file
94
databases/mysql80-server/Makefile
Normal file
|
@ -0,0 +1,94 @@
|
||||||
|
# $NetBSD: Makefile,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
PKGNAME= ${DISTNAME:S/-/-server-/}
|
||||||
|
COMMENT= MySQL 8, a free SQL database (server)
|
||||||
|
|
||||||
|
CONFLICTS= mysql3-server-[0-9]*
|
||||||
|
|
||||||
|
.include "../../databases/mysql80-client/Makefile.common"
|
||||||
|
|
||||||
|
CMAKE_ARGS+= -DINSTALL_INFODIR=${PKGINFODIR}
|
||||||
|
CMAKE_ARGS+= -DWITH_PROTOBUF="system"
|
||||||
|
|
||||||
|
PLIST_VARS+= ndb auth_socket
|
||||||
|
|
||||||
|
.if ${OPSYS} == "Linux"
|
||||||
|
PLIST.auth_socket= yes
|
||||||
|
.endif
|
||||||
|
|
||||||
|
PTHREAD_OPTS+= require
|
||||||
|
|
||||||
|
PKG_GROUPS= ${MYSQL_GROUP}
|
||||||
|
PKG_USERS= ${MYSQL_USER}:${MYSQL_GROUP}
|
||||||
|
|
||||||
|
PKG_GECOS.${MYSQL_USER}= MySQL database administrator
|
||||||
|
PKG_HOME.${MYSQL_USER}= ${MYSQL_DATADIR}
|
||||||
|
PKG_SHELL.${MYSQL_USER}= ${SH}
|
||||||
|
|
||||||
|
RCD_SCRIPTS= mysqld
|
||||||
|
SMF_NAME= mysql
|
||||||
|
SMF_METHODS= ${RCD_SCRIPTS}
|
||||||
|
|
||||||
|
FILES_SUBST+= HOSTNAME_CMD=${HOSTNAME_CMD:Q}
|
||||||
|
FILES_SUBST+= MYSQL_DATADIR=${MYSQL_DATADIR}
|
||||||
|
FILES_SUBST+= MYSQL_USER=${MYSQL_USER} MYSQL_GROUP=${MYSQL_GROUP}
|
||||||
|
FILES_SUBST+= MYSQL_PIDFILE=${MYSQL_PIDFILE}
|
||||||
|
MESSAGE_SUBST+= MYSQL_DATADIR=${MYSQL_DATADIR}
|
||||||
|
MESSAGE_SUBST+= MYSQL_USER=${MYSQL_USER} MYSQL_GROUP=${MYSQL_GROUP}
|
||||||
|
BUILD_DEFS+= MYSQL_DATADIR
|
||||||
|
|
||||||
|
REPLACE_PERL+= mysql-test/lib/v1/mysql-test-run.pl
|
||||||
|
REPLACE_PERL+= mysql-test/lib/t/SafeProcessStress.pl
|
||||||
|
REPLACE_PERL+= mysql-test/lib/t/testMyConfig.t
|
||||||
|
REPLACE_PERL+= mysql-test/lib/t/testMyConfigFactory.t
|
||||||
|
REPLACE_PERL+= mysql-test/lib/t/test_child.pl
|
||||||
|
REPLACE_PERL+= mysql-test/mysql-stress-test.pl
|
||||||
|
REPLACE_PERL+= mysql-test/mysql-test-run.pl
|
||||||
|
REPLACE_PERL+= mysql-test/suite/engines/rr_trx/run_stress_tx_rr.pl
|
||||||
|
REPLACE_PERL+= mysql-test/suite/funcs_1/lib/DataGen_local.pl
|
||||||
|
REPLACE_PERL+= mysql-test/suite/funcs_1/lib/DataGen_modify.pl
|
||||||
|
REPLACE_PERL+= mysql-test/suite/funcs_2/lib/gen_charset_utf8.pl
|
||||||
|
REPLACE_PERL+= mysql-test/suite/opt_trace/validate_json.pl
|
||||||
|
REPLACE_PERL+= mysql-test/suite/rpl/extension/bhs.pl
|
||||||
|
REPLACE_PERL+= mysql-test/suite/rpl/extension/checksum.pl
|
||||||
|
REPLACE_PERL+= scripts/randomize-order.pl
|
||||||
|
|
||||||
|
REPLACE_SH+= mysql-test/suite/rpl/t/rpl_loaddata_symlink-master.sh
|
||||||
|
REPLACE_SH+= mysql-test/suite/rpl/t/rpl_loaddata_symlink-slave.sh
|
||||||
|
REPLACE_SH+= mysql-test/suite/rpl/t/rpl_misc_functions-slave.sh
|
||||||
|
REPLACE_SH+= mysql-test/suite/rpl_nogtid/t/rpl_misc_functions-slave.sh
|
||||||
|
REPLACE_SH+= mysql-test/t/long_tmpdir-master.sh
|
||||||
|
REPLACE_SH+= mysql-test/t/lowercase_mixed_tmpdir-master.sh
|
||||||
|
REPLACE_SH+= mysql-test/t/lowercase_mixed_tmpdir_innodb-master.sh
|
||||||
|
REPLACE_SH+= scripts/mysql_config.sh
|
||||||
|
|
||||||
|
SUBST_CLASSES+= perlpath
|
||||||
|
SUBST_STAGE.perlpath= pre-configure
|
||||||
|
SUBST_MESSAGE.perlpath= Fixing Perl paths.
|
||||||
|
SUBST_FILES.perlpath+= scripts/mysqld_multi.pl.in
|
||||||
|
SUBST_FILES.perlpath+= scripts/mysqldumpslow.pl.in
|
||||||
|
SUBST_SED.perlpath= -e 's,@PERL_PATH@,${PERL5},g'
|
||||||
|
|
||||||
|
INSTALLATION_DIRS+= bin
|
||||||
|
TEST_TARGET= test
|
||||||
|
|
||||||
|
.include "../../mk/compiler.mk"
|
||||||
|
|
||||||
|
.if !empty(PKGSRC_COMPILER:Msunpro)
|
||||||
|
CFLAGS+= -D_POSIX_C_SOURCE=199506L -D__EXTENSIONS__
|
||||||
|
CXXFLAGS+= -D_POSIX_C_SOURCE=199506L -D__EXTENSIONS__
|
||||||
|
.endif
|
||||||
|
|
||||||
|
LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/mysqlrouter
|
||||||
|
|
||||||
|
CMAKE_ARGS+= -DWITHOUT_CLIENTLIBS="ON"
|
||||||
|
|
||||||
|
post-extract:
|
||||||
|
${CP} ${FILESDIR}/ffsll.cc ${WRKSRC}/sql/
|
||||||
|
${CHMOD} a-x ${WRKSRC}/mysql-test/std_data/datadir_tablespace_*
|
||||||
|
|
||||||
|
.include "../../devel/protobuf/buildlink3.mk"
|
||||||
|
BUILDLINK_AUTO_DIRS.mysql-client= no
|
||||||
|
.include "../../databases/mysql80-client/buildlink3.mk"
|
||||||
|
.include "../../security/tcp_wrappers/buildlink3.mk"
|
||||||
|
.include "../../mk/bsd.pkg.mk"
|
21369
databases/mysql80-server/PLIST
Normal file
21369
databases/mysql80-server/PLIST
Normal file
File diff suppressed because it is too large
Load diff
2
databases/mysql80-server/PLIST.SunOS
Normal file
2
databases/mysql80-server/PLIST.SunOS
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
@comment $NetBSD: PLIST.SunOS,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
share/mysql/solaris/postinstall-solaris
|
15
databases/mysql80-server/buildlink3.mk
Normal file
15
databases/mysql80-server/buildlink3.mk
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# $NetBSD: buildlink3.mk,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
|
||||||
|
BUILDLINK_TREE+= mysql-server
|
||||||
|
|
||||||
|
.if !defined(MYSQL_SERVER_BUILDLINK3_MK)
|
||||||
|
MYSQL_SERVER_BUILDLINK3_MK:=
|
||||||
|
|
||||||
|
BUILDLINK_API_DEPENDS.mysql-server+= mysql-server>=5.7.12
|
||||||
|
BUILDLINK_ABI_DEPENDS.mysql-server?= mysql-server>=5.7.12
|
||||||
|
BUILDLINK_PKGSRCDIR.mysql-server?= ../../databases/mysql57-server
|
||||||
|
BUILDLINK_LIBDIRS.mysql-server?= lib
|
||||||
|
|
||||||
|
.endif # MYSQL_SERVER_BUILDLINK3_MK
|
||||||
|
|
||||||
|
BUILDLINK_TREE+= -mysql-server
|
23
databases/mysql80-server/files/ffsll.cc
Normal file
23
databases/mysql80-server/files/ffsll.cc
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
/*
|
||||||
|
* Public domain version of ffsll by Niclas Rosenvik
|
||||||
|
* used here for platforms that miss a system ffsll.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
ffsll(long long int v)
|
||||||
|
{
|
||||||
|
size_t llbits = sizeof(long long int) * 8;
|
||||||
|
long long unsigned int comp_mask = 1;
|
||||||
|
|
||||||
|
for (size_t i=0; i < llbits; ++i)
|
||||||
|
{
|
||||||
|
if (v & comp_mask) {
|
||||||
|
return (i+1);
|
||||||
|
}
|
||||||
|
comp_mask <<= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
108
databases/mysql80-server/files/mysqld.sh
Normal file
108
databases/mysql80-server/files/mysqld.sh
Normal file
|
@ -0,0 +1,108 @@
|
||||||
|
#!@RCD_SCRIPTS_SHELL@
|
||||||
|
#
|
||||||
|
# $NetBSD: mysqld.sh,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
#
|
||||||
|
# PROVIDE: mysqld
|
||||||
|
# REQUIRE: DAEMON LOGIN mountall
|
||||||
|
# KEYWORD: shutdown
|
||||||
|
#
|
||||||
|
# You will need to set some variables in /etc/rc.conf to start MySQL:
|
||||||
|
#
|
||||||
|
# mysqld=YES
|
||||||
|
#
|
||||||
|
# The following variables are optional:
|
||||||
|
#
|
||||||
|
# mysqld_user="mysql" # user to run mysqld as
|
||||||
|
# mysqld_datadir="/path/to/home" # path to MySQL database directory
|
||||||
|
# mysqld_pidfile="/path/to/p.pid" # path to MySQL PID file
|
||||||
|
|
||||||
|
if [ -f /etc/rc.subr ]; then
|
||||||
|
. /etc/rc.subr
|
||||||
|
fi
|
||||||
|
|
||||||
|
name="mysqld"
|
||||||
|
rcvar=${name}
|
||||||
|
command="@PREFIX@/bin/mysqld_safe"
|
||||||
|
procname="@PREFIX@/sbin/${name}"
|
||||||
|
: ${mysqld_user:=@MYSQL_USER@}
|
||||||
|
: ${mysqld_group:=@MYSQL_GROUP@}
|
||||||
|
: ${mysqld_datadir:=@MYSQL_DATADIR@}
|
||||||
|
: ${mysqld_pidfile:=@MYSQL_PIDFILE@}
|
||||||
|
|
||||||
|
extra_commands="initdb"
|
||||||
|
initdb_cmd="mysqld_initdb"
|
||||||
|
start_precmd="mysqld_precmd"
|
||||||
|
start_cmd="mysqld_start"
|
||||||
|
|
||||||
|
mysqld_precmd()
|
||||||
|
{
|
||||||
|
if [ ! -d ${mysqld_datadir}/mysql ]; then
|
||||||
|
${initdb_cmd}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
mysqld_initdb()
|
||||||
|
{
|
||||||
|
initdb="@PREFIX@/sbin/mysqld"
|
||||||
|
if [ ! -x ${initdb} ]; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
if [ -f ${mysqld_datadir}/mysql/host.frm ]; then
|
||||||
|
@ECHO@ "The MySQL database has already been initialized."
|
||||||
|
@ECHO@ "Skipping database initialization."
|
||||||
|
else
|
||||||
|
@ECHO@ "Initializing MySQL database system tables."
|
||||||
|
${initdb} --initialize --user=${mysqld_user} \
|
||||||
|
--datadir=${mysqld_datadir} || return 1
|
||||||
|
if [ -d ${mysqld_datadir} ]; then
|
||||||
|
@CHOWN@ -R ${mysqld_user}:${mysqld_group} \
|
||||||
|
${mysqld_datadir}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
mysqld_start()
|
||||||
|
{
|
||||||
|
for f in $required_files; do
|
||||||
|
if [ ! -r "$f" ]; then
|
||||||
|
@ECHO@ 1>&2 "$0: WARNING: $f is not readable"
|
||||||
|
if [ -z $rc_force ]; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
@ECHO@ "Starting ${name}."
|
||||||
|
ulimit -n 4096
|
||||||
|
cd @PREFIX@
|
||||||
|
@PERL5@ -e 'use POSIX qw(setsid); setsid(); { exec (@ARGV) }' ${command} --user=${mysqld_user} --datadir=${mysqld_datadir} \
|
||||||
|
--pid-file=${mysqld_pidfile} ${mysqld_flags} \
|
||||||
|
${thread_flags} \
|
||||||
|
2>&1 | @PERL5@ -e 'use POSIX qw(setsid); setsid(); { exec (@ARGV) }' @SU@ -m ${mysqld_user} -c 'logger -t nbmysqld_safe' \
|
||||||
|
&
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
|
||||||
|
load_rc_config $name
|
||||||
|
pidfile="${mysqld_pidfile}"
|
||||||
|
run_rc_command "$1"
|
||||||
|
else
|
||||||
|
if [ -f /etc/rc.conf ]; then
|
||||||
|
. /etc/rc.conf
|
||||||
|
fi
|
||||||
|
pidfile="${mysqld_pidfile}"
|
||||||
|
case "$1" in
|
||||||
|
initdb)
|
||||||
|
eval ${initdb_cmd}
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
if [ -r "${pidfile}" ]; then
|
||||||
|
@ECHO@ "Stopping ${name}."
|
||||||
|
kill `@CAT@ ${pidfile}`
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
eval ${start_precmd}
|
||||||
|
eval ${start_cmd}
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
32
databases/mysql80-server/files/smf/manifest.xml
Normal file
32
databases/mysql80-server/files/smf/manifest.xml
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
<?xml version='1.0'?>
|
||||||
|
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
|
||||||
|
<service_bundle type='manifest' name='@SMF_NAME@'>
|
||||||
|
<service name='@SMF_PREFIX@/@SMF_NAME@' type='service' version='1'>
|
||||||
|
<create_default_instance enabled='false' />
|
||||||
|
<single_instance />
|
||||||
|
<dependency name='fs' grouping='require_all' restart_on='none' type='service'>
|
||||||
|
<service_fmri value='svc:/system/filesystem/local' />
|
||||||
|
</dependency>
|
||||||
|
<dependency name='net' grouping='require_all' restart_on='none' type='service'>
|
||||||
|
<service_fmri value='svc:/network/loopback' />
|
||||||
|
</dependency>
|
||||||
|
<method_context working_directory='@MYSQL_DATADIR@'>
|
||||||
|
<method_credential user='@MYSQL_USER@' group='@MYSQL_GROUP@' />
|
||||||
|
<method_environment>
|
||||||
|
<envvar name='LD_PRELOAD_32' value='/usr/lib/extendedFILE.so.1' />
|
||||||
|
</method_environment>
|
||||||
|
</method_context>
|
||||||
|
<exec_method name='start' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.mysqld@ start' timeout_seconds='18446744073709551615' />
|
||||||
|
<exec_method name='stop' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.mysqld@ stop' timeout_seconds='18446744073709551615' />
|
||||||
|
<stability value='Evolving' />
|
||||||
|
<template>
|
||||||
|
<common_name>
|
||||||
|
<loctext xml:lang='C'>MySQL RDBMS</loctext>
|
||||||
|
</common_name>
|
||||||
|
<documentation>
|
||||||
|
<manpage title='MySQL 8.0' section='1' />
|
||||||
|
<doc_link name='mysql.com' uri='http://dev.mysql.com/docs' />
|
||||||
|
</documentation>
|
||||||
|
</template>
|
||||||
|
</service>
|
||||||
|
</service_bundle>
|
31
databases/mysql80-server/files/smf/mysqld.sh
Normal file
31
databases/mysql80-server/files/smf/mysqld.sh
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
#!@SMF_METHOD_SHELL@
|
||||||
|
#
|
||||||
|
# $NetBSD: mysqld.sh,v 1.1 2021/05/13 15:25:20 jdolecek Exp $
|
||||||
|
#
|
||||||
|
# Init script for mysqld.
|
||||||
|
#
|
||||||
|
|
||||||
|
. /lib/svc/share/smf_include.sh
|
||||||
|
|
||||||
|
PIDFILE="@MYSQL_DATADIR@/mysql.pid"
|
||||||
|
|
||||||
|
ulimit -n 10240
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
@LOCALBASE@/sbin/mysqld --user=mysql \
|
||||||
|
--basedir=@LOCALBASE@ \
|
||||||
|
--datadir=@MYSQL_DATADIR@ \
|
||||||
|
--pid-file=${PIDFILE} \
|
||||||
|
--log-error=@VARBASE@/log/mysql/error.log &
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
[ -f ${PIDFILE} ] && kill `@HEAD@ -1 ${PIDFILE}`
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop}" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit $SMF_EXIT_OK
|
Loading…
Reference in a new issue