git: 5a2bb7e61569 - main - databases/mariadb114-server: New MariaDB 11.4 port
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 16 Jun 2024 14:23:06 UTC
The branch main has been updated by brnrd: URL: https://cgit.FreeBSD.org/ports/commit/?id=5a2bb7e61569f908f8a52dd4afd2998b86e9e54d commit 5a2bb7e61569f908f8a52dd4afd2998b86e9e54d Author: Bernard Spil <brnrd@FreeBSD.org> AuthorDate: 2024-06-16 14:21:23 +0000 Commit: Bernard Spil <brnrd@FreeBSD.org> CommitDate: 2024-06-16 14:21:23 +0000 databases/mariadb114-server: New MariaDB 11.4 port * This is an LTS version. * the mysql command now generates a warning about deprecation. to prevent these for other ports with USES=mysql Mk/Uses/mysql.mk has been patched. --- Mk/Uses/mysql.mk | 8 +- databases/Makefile | 2 + databases/mariadb114-client/Makefile | 10 + databases/mariadb114-client/pkg-plist | 263 +++++++++++++++ databases/mariadb114-server/Makefile | 291 +++++++++++++++++ databases/mariadb114-server/distinfo | 3 + .../mariadb114-server/files/client.cnf.sample.in | 52 +++ databases/mariadb114-server/files/my.cnf.sample.in | 13 + databases/mariadb114-server/files/mysql-server.in | 149 +++++++++ .../files/patch-include_my__cpu.h | 48 +++ .../files/patch-mysys__ssl_openssl.c | 14 + .../files/patch-scripts_mysql__config.sh | 10 + .../mariadb114-server/files/patch-sql_mysqld.cc | 20 ++ ...storage_rocksdb_rocksdb_port_jemalloc__helper.h | 13 + .../files/patch-tpool_CMakeLists.txt | 8 + databases/mariadb114-server/files/pkg-message.in | 28 ++ .../mariadb114-server/files/server.cnf.sample.in | 60 ++++ .../mariadb114-server/orig/client.cnf.sample.in | 52 +++ databases/mariadb114-server/orig/my.cnf.sample.in | 13 + databases/mariadb114-server/orig/mysql-server.in | 149 +++++++++ .../mariadb114-server/orig/patch-include_my__cpu.h | 48 +++ .../orig/patch-mysys__ssl_openssl.c | 14 + .../orig/patch-scripts_mysql__config.sh | 10 + .../mariadb114-server/orig/patch-sql_mysqld.cc | 20 ++ ...store_columnstore_utils_common_threadnaming.cpp | 24 ++ ...storage_rocksdb_rocksdb_port_jemalloc__helper.h | 13 + .../orig/patch-tpool_CMakeLists.txt | 8 + databases/mariadb114-server/orig/pkg-message.in | 28 ++ .../mariadb114-server/orig/server.cnf.sample.in | 60 ++++ databases/mariadb114-server/pkg-descr | 12 + databases/mariadb114-server/pkg-plist | 353 +++++++++++++++++++++ 31 files changed, 1793 insertions(+), 3 deletions(-) diff --git a/Mk/Uses/mysql.mk b/Mk/Uses/mysql.mk index 9cd094dcfc03..866906ff5d1e 100644 --- a/Mk/Uses/mysql.mk +++ b/Mk/Uses/mysql.mk @@ -63,12 +63,14 @@ MYSQL80_LIBVER= 21 MYSQL81_LIBVER= 22 MYSQL84_LIBVER= 24 -. for v in 5 6 11 -MYSQL10${v}m_LIBVER= 3 +. for v in 105 106 1011 114 +MYSQL${v}m_LIBVER= 3 . endfor # Setting/finding MySQL version we want. -. if exists(${LOCALBASE}/bin/mysql) +. if exists(${LOCALBASE}/bin/mariadb) +_MARIADB!= ${LOCALBASE}/bin/mariadb --version | ${GREP} MariaDB | wc -l +. elif exists(${LOCALBASE}/bin/mysql) _MYSQL!= ${LOCALBASE}/bin/mysql_config --version | ${SED} -e 's/\([0-9]\{1,2\}\)\.\([0-9]*\).*/\1\2/' _MARIADB!= ${LOCALBASE}/bin/mysql --version | ${GREP} MariaDB | wc -l diff --git a/databases/Makefile b/databases/Makefile index 678230f4b67c..6d79a1525eaf 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -180,6 +180,8 @@ SUBDIR += mariadb105-server SUBDIR += mariadb106-client SUBDIR += mariadb106-server + SUBDIR += mariadb114-client + SUBDIR += mariadb114-server SUBDIR += mdbtools SUBDIR += mdbx SUBDIR += mdcached diff --git a/databases/mariadb114-client/Makefile b/databases/mariadb114-client/Makefile new file mode 100644 index 000000000000..bbb0f016f24c --- /dev/null +++ b/databases/mariadb114-client/Makefile @@ -0,0 +1,10 @@ +PORTNAME= mariadb +PKGNAMESUFFIX= 114-client + +COMMENT= Multithreaded SQL database (client) + +MASTERDIR= ${.CURDIR}/../${PORTNAME}${PKGNAMESUFFIX:C/-client/-server/} + +PLIST= ${.CURDIR}/pkg-plist + +.include "${MASTERDIR}/Makefile" diff --git a/databases/mariadb114-client/pkg-plist b/databases/mariadb114-client/pkg-plist new file mode 100644 index 000000000000..7c863425749f --- /dev/null +++ b/databases/mariadb114-client/pkg-plist @@ -0,0 +1,263 @@ +bin/mariadb +bin/mariadb-access +bin/mariadb-admin +bin/mariadb-binlog +bin/mariadb-check +bin/mariadb-config +bin/mariadb-conv +bin/mariadb-convert-table-format +bin/mariadb-dump +bin/mariadb-dumpslow +bin/mariadb-find-rows +bin/mariadb-hotcopy +bin/mariadb-import +bin/mariadb-plugin +bin/mariadb-secure-installation +bin/mariadb-setpermission +bin/mariadb-show +bin/mariadb-slap +bin/mariadb-test +bin/mariadb-waitpid +bin/mariadb_config +bin/msql2mysql +bin/my_print_defaults +bin/mysql +bin/mysql_config +bin/mysql_convert_table_format +bin/mysql_find_rows +bin/mysql_plugin +bin/mysql_secure_installation +bin/mysql_setpermission +bin/mysql_waitpid +bin/mysqlaccess +bin/mysqladmin +bin/mysqlbinlog +bin/mysqlcheck +bin/mysqldump +bin/mysqldumpslow +bin/mysqlhotcopy +bin/mysqlimport +bin/mysqlshow +bin/mysqlslap +bin/mysqltest +bin/mytop +bin/replace +bin/resolve_stack_dump +%%ETCDIR%%/conf.d/client.cnf.sample +%%ETCDIR%%/my.cnf.sample +include/mysql/errmsg.h +include/mysql/ma_list.h +include/mysql/ma_pvio.h +include/mysql/ma_tls.h +include/mysql/mariadb/ma_io.h +include/mysql/mariadb_com.h +include/mysql/mariadb_ctype.h +include/mysql/mariadb_dyncol.h +include/mysql/mariadb_rpl.h +include/mysql/mariadb_stmt.h +include/mysql/mariadb_version.h +include/mysql/my_alloca.h +include/mysql/my_config.h +include/mysql/my_global.h +include/mysql/my_sys.h +include/mysql/mysql.h +include/mysql/mysql/client_plugin.h +include/mysql/mysql/plugin_auth.h +include/mysql/mysql_com.h +include/mysql/mysql_version.h +include/mysql/mysqld_error.h +%%NO_GSSAPI_NONE%%lib/mysql/plugin/auth_gssapi_client.so +lib/mysql/libmariadb.a +lib/mysql/libmariadb.so +lib/mysql/libmariadb.so.3 +lib/mysql/libmariadbclient.a +lib/mysql/libmysqlclient.a +lib/mysql/libmysqlclient.so +lib/mysql/libmysqlclient_r.a +lib/mysql/libmysqlclient_r.so +lib/mysql/libmysqlservices.a +lib/mysql/plugin/caching_sha2_password.so +lib/mysql/plugin/client_ed25519.so +lib/mysql/plugin/daemon_example.ini +lib/mysql/plugin/dialog.so +lib/mysql/plugin/mysql_clear_password.so +lib/mysql/plugin/sha256_password.so +lib/mysql/plugin/zstd.so +libdata/pkgconfig/libmariadb.pc +share/man/man1/mariadb-access.1.gz +share/man/man1/mariadb-admin.1.gz +share/man/man1/mariadb-binlog.1.gz +share/man/man1/mariadb-check.1.gz +share/man/man1/mariadb-client-test-embedded.1.gz +share/man/man1/mariadb-client-test.1.gz +share/man/man1/mariadb-convert-table-format.1.gz +share/man/man1/mariadb-dump.1.gz +share/man/man1/mariadb-dumpslow.1.gz +@comment share/man/man1/mariadb-embedded.1.gz +share/man/man1/mariadb-find-rows.1.gz +share/man/man1/mariadb-hotcopy.1.gz +share/man/man1/mariadb-import.1.gz +share/man/man1/mariadb-plugin.1.gz +share/man/man1/mariadb-secure-installation.1.gz +share/man/man1/mariadb-setpermission.1.gz +share/man/man1/mariadb-show.1.gz +share/man/man1/mariadb-slap.1.gz +share/man/man1/mariadb-test-embedded.1.gz +share/man/man1/mariadb-test.1.gz +share/man/man1/mariadb-tzinfo-to-sql.1.gz +share/man/man1/mariadb-waitpid.1.gz +share/man/man1/mariadb.1.gz +share/man/man1/mariadb_config.1.gz +share/man/man1/msql2mysql.1.gz +share/man/man1/my_print_defaults.1.gz +share/man/man1/my_safe_process.1.gz +share/man/man1/mysql-stress-test.pl.1.gz +share/man/man1/mysql-test-run.pl.1.gz +share/man/man1/mysql.1.gz +share/man/man1/mysql_client_test.1.gz +share/man/man1/mysql_client_test_embedded.1.gz +share/man/man1/mysql_config.1.gz +share/man/man1/mysql_convert_table_format.1.gz +share/man/man1/mysql_embedded.1.gz +share/man/man1/mysql_find_rows.1.gz +share/man/man1/mysql_plugin.1.gz +share/man/man1/mysql_secure_installation.1.gz +share/man/man1/mysql_setpermission.1.gz +@comment share/man/man1/mysql_tzinfo_to_sql.1.gz +share/man/man1/mysql_waitpid.1.gz +share/man/man1/mysqlaccess.1.gz +share/man/man1/mysqladmin.1.gz +share/man/man1/mysqlbinlog.1.gz +share/man/man1/mysqlcheck.1.gz +share/man/man1/mysqldump.1.gz +share/man/man1/mysqldumpslow.1.gz +share/man/man1/mysqlhotcopy.1.gz +share/man/man1/mysqlimport.1.gz +share/man/man1/mysqlshow.1.gz +share/man/man1/mysqlslap.1.gz +share/man/man1/mysqltest.1.gz +share/man/man1/mysqltest_embedded.1.gz +@comment share/man/man1/mytop.1.gz +share/man/man1/perror.1.gz +share/man/man1/replace.1.gz +share/man/man1/resolve_stack_dump.1.gz +share/man/man3/mariadb_cancel.3.gz +share/man/man3/mariadb_connection.3.gz +share/man/man3/mariadb_dyncol_check.3.gz +share/man/man3/mariadb_dyncol_column_cmp_named.3.gz +share/man/man3/mariadb_dyncol_column_count.3.gz +share/man/man3/mariadb_dyncol_create_many_named.3.gz +share/man/man3/mariadb_dyncol_create_many_num.3.gz +share/man/man3/mariadb_dyncol_exists_named.3.gz +share/man/man3/mariadb_dyncol_exists_num.3.gz +share/man/man3/mariadb_dyncol_free.3.gz +share/man/man3/mariadb_dyncol_list_named.3.gz +share/man/man3/mariadb_dyncol_list_num.3.gz +share/man/man3/mariadb_dyncol_unpack.3.gz +share/man/man3/mariadb_dyncol_update_many_named.3.gz +share/man/man3/mariadb_dyncol_update_many_num.3.gz +share/man/man3/mariadb_get_infov.3.gz +share/man/man3/mariadb_reconnect.3.gz +share/man/man3/mariadb_rpl_close.3.gz +share/man/man3/mariadb_rpl_fetch.3.gz +share/man/man3/mariadb_rpl_get_optionsv.3.gz +share/man/man3/mariadb_rpl_open.3.gz +share/man/man3/mariadb_rpl_optionsv.3.gz +share/man/man3/mariadb_stmt_execute_direct.3.gz +share/man/man3/mariadb_stmt_fetch_fields.3.gz +share/man/man3/mysql_affected_rows.3.gz +share/man/man3/mysql_autocommit.3.gz +share/man/man3/mysql_change_user.3.gz +share/man/man3/mysql_close.3.gz +share/man/man3/mysql_commit.3.gz +share/man/man3/mysql_data_seek.3.gz +share/man/man3/mysql_errno.3.gz +share/man/man3/mysql_error.3.gz +share/man/man3/mysql_fetch_field.3.gz +share/man/man3/mysql_fetch_field_direct.3.gz +share/man/man3/mysql_fetch_fields.3.gz +share/man/man3/mysql_fetch_lengths.3.gz +share/man/man3/mysql_fetch_row.3.gz +share/man/man3/mysql_field_count.3.gz +share/man/man3/mysql_field_seek.3.gz +share/man/man3/mysql_field_tell.3.gz +share/man/man3/mysql_free_result.3.gz +share/man/man3/mysql_get_character_set_info.3.gz +share/man/man3/mysql_get_client_info.3.gz +share/man/man3/mysql_get_client_version.3.gz +share/man/man3/mysql_get_host_info.3.gz +share/man/man3/mysql_get_proto_info.3.gz +share/man/man3/mysql_get_server_info.3.gz +share/man/man3/mysql_get_server_version.3.gz +share/man/man3/mysql_get_socket.3.gz +share/man/man3/mysql_get_ssl_cipher.3.gz +share/man/man3/mysql_hex_string.3.gz +share/man/man3/mysql_info.3.gz +share/man/man3/mysql_init.3.gz +share/man/man3/mysql_kill.3.gz +share/man/man3/mysql_more_results.3.gz +share/man/man3/mysql_next_result.3.gz +share/man/man3/mysql_num_fields.3.gz +share/man/man3/mysql_num_rows.3.gz +share/man/man3/mysql_options.3.gz +share/man/man3/mysql_options4.3.gz +share/man/man3/mysql_optionsv.3.gz +share/man/man3/mysql_ping.3.gz +share/man/man3/mysql_query.3.gz +share/man/man3/mysql_read_query_result.3.gz +share/man/man3/mysql_real_connect.3.gz +share/man/man3/mysql_real_escape_string.3.gz +share/man/man3/mysql_real_query.3.gz +share/man/man3/mysql_refresh.3.gz +share/man/man3/mysql_reset_connection.3.gz +share/man/man3/mysql_rollback.3.gz +share/man/man3/mysql_row_seek.3.gz +share/man/man3/mysql_row_tell.3.gz +share/man/man3/mysql_select_db.3.gz +share/man/man3/mysql_send_query.3.gz +share/man/man3/mysql_server_end.3.gz +share/man/man3/mysql_server_init.3.gz +share/man/man3/mysql_session_track_get_first.3.gz +share/man/man3/mysql_session_track_get_next.3.gz +share/man/man3/mysql_set_character_set.3.gz +share/man/man3/mysql_set_server_option.3.gz +share/man/man3/mysql_shutdown.3.gz +share/man/man3/mysql_sqlstate.3.gz +share/man/man3/mysql_ssl_set.3.gz +share/man/man3/mysql_stat.3.gz +share/man/man3/mysql_stmt_affected_rows.3.gz +share/man/man3/mysql_stmt_attr_get.3.gz +share/man/man3/mysql_stmt_attr_set.3.gz +share/man/man3/mysql_stmt_bind_param.3.gz +share/man/man3/mysql_stmt_bind_result.3.gz +share/man/man3/mysql_stmt_close.3.gz +share/man/man3/mysql_stmt_data_seek.3.gz +share/man/man3/mysql_stmt_errno.3.gz +share/man/man3/mysql_stmt_error.3.gz +share/man/man3/mysql_stmt_execute.3.gz +share/man/man3/mysql_stmt_fetch.3.gz +share/man/man3/mysql_stmt_fetch_column.3.gz +share/man/man3/mysql_stmt_field_count.3.gz +share/man/man3/mysql_stmt_free_result.3.gz +share/man/man3/mysql_stmt_init.3.gz +share/man/man3/mysql_stmt_insert_id.3.gz +share/man/man3/mysql_stmt_more_results.3.gz +share/man/man3/mysql_stmt_next_result.3.gz +share/man/man3/mysql_stmt_num_rows.3.gz +share/man/man3/mysql_stmt_param_count.3.gz +share/man/man3/mysql_stmt_param_metadata.3.gz +share/man/man3/mysql_stmt_prepare.3.gz +share/man/man3/mysql_stmt_reset.3.gz +share/man/man3/mysql_stmt_result_metadata.3.gz +share/man/man3/mysql_stmt_row_seek.3.gz +share/man/man3/mysql_stmt_row_tell.3.gz +share/man/man3/mysql_stmt_send_long_data.3.gz +share/man/man3/mysql_stmt_sqlstate.3.gz +share/man/man3/mysql_stmt_store_result.3.gz +share/man/man3/mysql_stmt_warning_count.3.gz +share/man/man3/mysql_store_result.3.gz +share/man/man3/mysql_thread_end.3.gz +share/man/man3/mysql_thread_id.3.gz +share/man/man3/mysql_thread_init.3.gz +share/man/man3/mysql_use_result.3.gz +share/man/man3/mysql_warning_count.3.gz diff --git a/databases/mariadb114-server/Makefile b/databases/mariadb114-server/Makefile new file mode 100644 index 000000000000..aedd8e523081 --- /dev/null +++ b/databases/mariadb114-server/Makefile @@ -0,0 +1,291 @@ +PORTNAME?= mariadb +PORTVERSION= 11.4.2 +CATEGORIES= databases +MASTER_SITES= https://mirror.nodesdirect.com/${SITESDIR}/ \ + https://mirror.one.com/${SITESDIR}/ \ + https://ftp.nluug.nl/db/${SITESDIR}/ \ + https://ftp.icm.edu.pl/pub/unix/database/${SITESDIR}/ \ + https://mirror.truenetwork.ru/${SITESDIR}/ \ + https://mirrors.aliyun.com/${SITESDIR}/ \ + https://ftp.ubuntu-tw.org/mirror/${SITESDIR}/ \ + https://mirror.kku.ac.th/${SITESDIR}/ \ + https://espejito.fder.edu.uy/${SITESDIR}/ \ + https://ftp.osuosl.org/pub/${SITESDIR}/ \ + https://downloads.mariadb.org/rest-api/mariadb/${PORTVERSION}/ +PKGNAMESUFFIX?= 114-server + +MAINTAINER= brnrd@FreeBSD.org +COMMENT?= Multithreaded SQL database (server) +WWW= https://mariadb.org/ + +LICENSE= GPLv2 +LICENSE_FILE?= ${WRKSRC}/COPYING + +#EXPIRATION_DATE= 2029-05-30 + +LIB_DEPENDS+= libfmt.so:devel/libfmt \ + liblz4.so:archivers/liblz4 \ + libpcre2-8.so:devel/pcre2 \ + libzstd.so:archivers/zstd + +# Ugly workaround for MariaDB/CMake library detection +LDFLAGS+= -L${LOCALBASE}/lib + +USES= bison:build cmake:insource compiler:c++11-lib cpe iconv:translit libedit ncurses shebangfix ssl + +SUB_FILES= pkg-message +PKGMESSAGE= ${WRKDIR}/pkg-message + +USE_LDCONFIG= ${PREFIX}/lib/mysql +SHEBANG_FILES?= scripts/*.sh support-files/*.sh +SITESDIR= mariadb/mariadb-${PORTVERSION}/source +DOCSDIR= ${PREFIX}/share/doc/mysql + +MARIADB_USER?= mysql +MARIADB_GROUP?= mysql +MARIADB_DBDIR?= /var/db/mysql +MARIADB_RUNDIR?= /var/run/mysql +MARIADB_SOCK?= mysql.sock +MARIADB_LOGDIR?= /var/log/mysql + +USERS= ${MARIADB_USER} +GROUPS= ${MARIADB_GROUP} + +OPTIONS_SINGLE= GSSAPI +OPTIONS_SINGLE_GSSAPI= GSSAPI_BASE GSSAPI_HEIMDAL GSSAPI_MIT GSSAPI_NONE +OPTIONS_DEFAULT= GSSAPI_BASE + +.if ${PKGNAMESUFFIX:M*-server} +# MySQL-Server options +OPTIONS_DEFAULT+= AWS_KEY_MGMT CONNECT_EXTRA HASHICORP_VAULT INNOBASE SPHINX SPIDER WSREP +OPTIONS_GROUP= COMPRESSION ENGINES GROONGA +OPTIONS_DEFINE= AWS_KEY_MGMT CONNECT_EXTRA DOCS HASHICORP_VAULT +OPTIONS_DEFINE_amd64= WSREP +OPTIONS_DEFINE_aarch64= WSREP +OPTIONS_DEFINE_powerpc64le= WSREP +OPTIONS_DEFINE_powerpc64= WSREP +OPTIONS_DEFINE_riscv64= WSREP +OPTIONS_GROUP_COMPRESSION= LZO SNAPPY +OPTIONS_GROUP_ENGINES= COLUMNSTORE INNOBASE MROONGA OQGRAPH ROCKSDB S3 SPHINX SPIDER +OPTIONS_GROUP_GROONGA= ZMQ MSGPACK +OPTIONS_EXCLUDE_i386= ROCKSDB + +AWS_KEY_MGMT_DESC= AWS Encryption Key Management Plugin +COLUMNSTORE_DESC= Columnar storage egine +CONNECT_EXTRA_DESC= Enable ODBC and XML in CONNECT engine +COMPRESSION_DESC= Optional page compression +ENGINES_DESC= Optional MariaDB storage engines +GROONGA_DESC= Optional Mroonga features +HASHICORP_VAULT_DESC= Enable HashiCorp vault key-storage plugin +INNOBASE_DESC= InnoDB default engine +MROONGA_DESC= Mroonga Full Text Search engine +MSGPACK_DESC= MsgPack support +OQGRAPH_DESC= Open Query Graph Computation engine +ROCKSDB_DESC= RocksDB LSM engine +S3_DESC= S3 storage engine (Gamma) +SPHINX_DESC= SphinxSE engine +SPIDER_DESC= Partitioning and XA-transactions engine +WSREP_DESC= Build wsrep clustering +ZMQ_DESC= ZeroMQ support +.endif + +CMAKE_ARGS+= -DCMAKE_PREFIX_PATH=${PREFIX} \ + -DINSTALL_DOCDIR="share/doc/mysql" \ + -DINSTALL_DOCREADMEDIR="share/doc/mysql" \ + -DINSTALL_INFODIR="info" \ + -DINSTALL_LIBDIR="lib/mysql" \ + -DINSTALL_MANDIR="share/man" \ + -DINSTALL_MYSQLDATADIR="${MARIADB_DBDIR}" \ + -DINSTALL_MYSQLSHAREDIR="share/mysql" \ + -DINSTALL_MYSQLTESTDIR= \ + -DINSTALL_PLUGINDIR="lib/mysql/plugin" \ + -DINSTALL_SBINDIR="libexec" \ + -DINSTALL_SCRIPTDIR="bin" \ + -DINSTALL_SQLBENCHDIR= \ + -DINSTALL_SUPPORTFILESDIR="share/mysql" \ + -DINSTALL_SYSCONFDIR="${ETCDIR}" \ + -DINSTALL_SYSCONF2DIR="${ETCDIR}/conf.d" \ + -DINSTALL_UNIX_ADDRDIR="${MARIADB_RUNDIR}/${MARIADB_SOCK}" \ + -DWITH_PCRE=system \ + -DPCRE_LIBRARY_DIRS=${PREFIX}/lib \ + -DWITH_LIBFMT=system \ + -DLIBFMT_INCLUDE_DIR=${PREFIX}/include \ + -DHAVE_SYSTEM_LIBFMT=yes \ + -DWITH_SSL="${OPENSSLBASE}" \ + -DGRN_WITH_LZ4=ON -DWITH_INNODB_LZ4=ON -DWITH_ROCKSDB_LZ4=ON \ + -DCURSES_CURSES_LIBRARY="/usr/lib/libcurses.so" \ + -DCURSES_FORM_LIBRARY="/usr/lib/libform.so" \ + -DCURSES_CURSES_LIBRARY="/usr/lib/libncurses.so" \ + -DKRB5_CONFIG="${KRB5CONFIG}" \ + -DCURSES_NCURSES_LIBRARY="${NCURSESLIB}/libncurses.so" \ + -DCOMPILATION_COMMENT="FreeBSD Ports" \ + -DPLUGIN_AUTH_TEST_PLUGIN=NO +CMAKE_OFF+= CONC_WITH_UNIT_TESTS CONNECT_WITH_MONGO WITH_UNIT_TESTS +CMAKE_ON+= WITH_LIBWRAP WITHOUT_DOCS +DISABLED_PLUGINS+= AUTH_TEST_PLUGIN DAEMON_EXAMPLE DIALOG_EXAMPLES \ + EXAMPLE EXAMPLE_KEY_MANAGEMENT FTEXAMPLE + +DATADIR= ${PREFIX}/share/mysql +ETCDIR= ${PREFIX}/etc/mysql + +CONFLICTS_INSTALL= mariadb10[0-57-9]-${PKGNAMESUFFIX:C/^[0-9]*-//}-* \ + mysql[0-9]*-${PKGNAMESUFFIX:C/^[0-9]*-//}-* \ + mysqlwsrep* \ + percona[0-9]*-${PKGNAMESUFFIX:C/^[0-9]*-//}-* + +FASTMTX_CMAKE_BOOL= WITH_FAST_MUTEXES +GSSAPI_BASE_USES= gssapi +GSSAPI_HEIMDAL_USES= gssapi:heimdal +GSSAPI_MIT_USES= gssapi:mit +GSSAPI_NONE_CMAKE_ON= -DPLUGIN_AUTH_GSSAPI_CLIENT=OFF +OPTIONS_SUB= yes +SUB_LIST+= MARIADB_RUNDIR="${MARIADB_RUNDIR}" \ + MARIADB_SOCK="${MARIADB_SOCK}" + +.if ${PKGNAMESUFFIX:M*-connector-c} +WRKSRC= ${WRKDIR}/mariadb-${PORTVERSION}/libmariadb + +.elif ${PKGNAMESUFFIX:M*-client} +# MySQL-Client part +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:114m + +USE_LDCONFIG+= ${PREFIX}/lib/mysql/plugin +USE_RC_SUBR= mysql-server + +CMAKE_ON+= CMAKE_SKIP_BUILD_RPATH WITH_EMBEDDED_SERVER +CMAKE_OFF+= WITH_CLIENT +SUB_FILES+= server.cnf.sample +SUB_LIST+= MARIADB_DBDIR="${MARIADB_DBDIR}" \ + MARIADB_LOGDIR="${MARIADB_LOGDIR}" \ + MARIADB_USER="${MARIADB_USER}" +PLIST_SUB+= MARIADB_LOGDIR="${MARIADB_LOGDIR}" \ + MARIADB_USER="${MARIADB_USER}" \ + MARIADB_GROUP="${MARIADB_GROUP}" + +.for ENGINE in ${OPTIONS_GROUP_ENGINES:NINNOBASE} +${ENGINE}_CMAKE_OFF= -DPLUGIN_${ENGINE}=NO +${ENGINE}_CMAKE_ON= -DPLUGIN_${ENGINE}=DYNAMIC +.endfor +AWS_KEY_MGMT_CMAKE_ON= -DPLUGIN_AWS_KEY_MANAGEMENT=ON +INNOBASE_VARS_OFF= disabled_plugins+=INNOBASE +#COLUMNSTORE_BROKEN= ColumnStore engine build failure "fatal error: 'sys/prctl.h' file not found" +CONNECT_EXTRA_LIB_DEPENDS= libodbc.so:databases/unixODBC +CONNECT_EXTRA_USE= gnome=libxml2 +CONNECT_EXTRA_USES= gnome +CONNECT_EXTRA_CMAKE_BOOL= CONNECT_WITH_LIBXML2 CONNECT_WITH_ODBC +GSSAPI_NONE_VARS= disabled_plugins+=AUTH_GSSAPI +HASHICORP_VAULT_CMAKE_OFF= -DPLUGIN_HASHICORP_KEY_MANAGEMENT=OFF +HASHICORP_VAULT_LIB_DEPENDS= libcurl.so:ftp/curl +LZO_CMAKE_ON= -DWITH_INNODB_LZO=ON +LZO_CMAKE_OFF= -DWITH_INNODB_LZO=OFF +LZO_LIB_DEPENDS= liblzo2.so:archivers/lzo2 +MSGPACK_LIB_DEPENDS= libmsgpackc.so:devel/msgpack-c +OQGRAPH_LIB_DEPENDS= libboost_system.so:devel/boost-libs \ + libJudy.so:devel/judy +ROCKSDB_USES= python +ROCKSDB_CMAKE_ON= -DPYTHON_SHEBANG=${PYTHON_CMD} -DWITH_ROCKSDB_zstd=ON +S3_LIB_DEPENDS= libcurl.so:ftp/curl +SNAPPY_CMAKE_ON= -DWITH_INNODB_SNAPPY=ON -DWITH_ROCKSDB_snappy=ON +SNAPPY_CMAKE_OFF= -DWITH_INNODB_SNAPPY=OFF -DWITH_ROCKSDB_snappy=OFF +SNAPPY_LIB_DEPENDS= libsnappy.so:archivers/snappy +WSREP_CMAKE_BOOL= WITH_WSREP +WSREP_LIB_DEPENDS= libgalera.so:databases/galera26 +WSREP_RUN_DEPENDS= bash:shells/bash \ + rsync:net/rsync \ + #stunnel:security/stunnel +WSREP_SHEBANG_FILES= bin/wsrep_sst_rsync +ZMQ_LIB_DEPENDS= libzmq.so:net/libzmq4 + +.for PLUGIN in ${DISABLED_PLUGINS} +CMAKE_ARGS+= -DPLUGIN_${PLUGIN}=NO +.endfor + +.endif # ${PKGNAMESUFFIX:M*-client} + +.include <bsd.port.options.mk> + +.if ${OPSYS} == FreeBSD +SUB_LIST+= LEGACY_LIMITS="@comment " MODERN_LIMITS="" +.else +SUB_LIST+= LEGACY_LIMITS="" MODERN_LIMITS="@comment " +.endif + +.if ${SSL_DEFAULT} != base && ${PORT_OPTIONS:MGSSAPI_BASE} +GSSAPI_BASE_IGNORE= GSSAPI_BASE is not compatible with OpenSSL from ports. Use other GSSAPI options or OpenSSL from base system +.endif + +.if ${SSL_DEFAULT:Mlibressl*} +CFLAGS+= -Wno-incompatible-function-pointer-types +.warning HELLO FROM MAKE LIBRESSL +.endif + +.if ${ARCH} != amd64 && ${ARCH} != aarch64 +PLIST_SUB+= WSREP="@comment " +.endif + +post-patch: +.if ${OPSYS} == DragonFly + ${CP} ${WRKSRC}/cmake/os/FreeBSD.cmake \ + ${WRKSRC}/cmake/os/DragonFly.cmake +.endif + +pre-install: + ${MKDIR} ${STAGEDIR}${ETCDIR}/conf.d + +.if ${PKGNAMESUFFIX:M*-client} +post-install: + ${INSTALL_DATA} ${WRKDIR}/my.cnf.sample ${STAGEDIR}${ETCDIR}/my.cnf.sample + ${INSTALL_DATA} ${WRKDIR}/client.cnf.sample \ + ${STAGEDIR}${ETCDIR}/conf.d/client.cnf.sample + ${RM} -r ${STAGEDIR}${DATADIR} \ + ${STAGEDIR}${PREFIX}/include/mysql/server \ + ${STAGEDIR}${ETCDIR}/init.d \ + ${STAGEDIR}${PREFIX}/lib/mysql/pkgconfig + +post-install-GSSAPI_NONE-off: + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/mysql/plugin/auth_gssapi_client.so + +.else # ! ${PKGNAMESUFFIX:M*-client} +post-install: + ${INSTALL_DATA} ${WRKDIR}/server.cnf.sample \ + ${STAGEDIR}${ETCDIR}/conf.d/server.cnf.sample + ${MV} ${STAGEDIR}${PREFIX}/share/user_map.conf \ + ${STAGEDIR}${PREFIX}/etc/mysql/user_map.conf.sample + ${MV} ${STAGEDIR}${PREFIX}/share/pam_user_map.so \ + ${STAGEDIR}${PREFIX}/lib/mysql/ + ${RM} -r ${STAGEDIR}${PREFIX}/share/mysql/policy \ + ${STAGEDIR}${PREFIX}/include/mysql/server/private \ + ${STAGEDIR}${PREFIX}/lib/mysql/pkgconfig \ + ${STAGEDIR}${PREFIX}/libexec/rcmysql \ + ${STAGEDIR}/suite \ + ${STAGEDIR}${ETCDIR}/init.d \ + ${STAGEDIR}${ETCDIR}/logrotate.d \ + ${STAGEDIR}${DOCSDIR}/COPYING + ${MKDIR} ${STAGEDIR}${MARIADB_LOGDIR} + ${SED} '/%%/d;/^@comment /d;s/^/@comment /' ${PORTSDIR}/${CATEGORIES:[1]}/${PORTNAME}${PKGNAMESUFFIX:S/-server/-client/}/pkg-plist \ + >> ${TMPPLIST} + +post-install-MROONGA-on: + ${MV} ${STAGEDIR}${PREFIX}/share/groonga/README.md ${STAGEDIR}${DOCSDIR}/README-groonga.md + ${RM} -r ${STAGEDIR}${PREFIX}/share/groonga + ${RM} ${STAGEDIR}${DATADIR}/mroonga/COPYING + +post-install-SPIDER-on: + ${MV} ${STAGEDIR}${ETCDIR}/conf.d/spider.cnf \ + ${STAGEDIR}${ETCDIR}/conf.d/spider.cnf.sample + +post-install-WSREP-on: + ${MV} ${STAGEDIR}${DATADIR}/wsrep.cnf \ + ${STAGEDIR}${ETCDIR}/conf.d/wsrep.cnf.sample + +.endif # ${PKGNAMESUFFIX:M*-client} + +.include <bsd.port.mk> diff --git a/databases/mariadb114-server/distinfo b/databases/mariadb114-server/distinfo new file mode 100644 index 000000000000..87493a0396ee --- /dev/null +++ b/databases/mariadb114-server/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1718527565 +SHA256 (mariadb-11.4.2.tar.gz) = 8c600e38adb899316c1cb11c68b87979668f4fb9d858000e347e6d8b7abe51b0 +SIZE (mariadb-11.4.2.tar.gz) = 107373265 diff --git a/databases/mariadb114-server/files/client.cnf.sample.in b/databases/mariadb114-server/files/client.cnf.sample.in new file mode 100644 index 000000000000..2513f6a04fb2 --- /dev/null +++ b/databases/mariadb114-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 # inherited from %%ETCDIR%%/my.cnf +# socket = %%MARIADB_RUNDIR%%/%%MARIADB_SOCK%% # inherited from %%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/mariadb114-server/files/my.cnf.sample.in b/databases/mariadb114-server/files/my.cnf.sample.in new file mode 100644 index 000000000000..15dbc7e64da8 --- /dev/null +++ b/databases/mariadb114-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 = %%MARIADB_RUNDIR%%/%%MARIADB_SOCK%% + +# +# include *.cnf from the config directory +# +!includedir %%ETCDIR%%/conf.d/ diff --git a/databases/mariadb114-server/files/mysql-server.in b/databases/mariadb114-server/files/mysql-server.in new file mode 100644 index 000000000000..e494dee09e92 --- /dev/null +++ b/databases/mariadb114-server/files/mysql-server.in @@ -0,0 +1,149 @@ +#!/bin/sh + +# PROVIDE: mysql +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable mysql: +# mysql_(instance_)?enable (bool): Set to "NO" by default. +# Set it to "YES" to enable MySQL. +%%LEGACY_LIMITS%%# mysql_(instance_)?limits (bool): Set to "NO" by default. +%%LEGACY_LIMITS%%# Set it to yes to run `limits -e -U mysql` +%%LEGACY_LIMITS%%# just before mysql starts. +# mysql_(instance_)?dbdir (str): Default to "%%MARIADB_DBDIR%%" +# Base database directory. +# mysql_(instance_)?args (str): Custom additional arguments to be passed +# to mysqld_safe (default empty). +# mysql_(instance_)?pidfile (str): Custom PID file path and name. +# Default to "${mysql_dbdir}/${hostname}.pid". +# mysql_(instance_)?user (str): User to run mysqld as +# Default to "%%MARIADB_USER%%" created by the port +# mysql_(instance_)?optfile (str): Server-specific option file. +# Default to "${mysql_dbdir}/my.cnf". +# mysql_(instance)?rundir (str): Default to "%%MARIADB_RUNDIR%%" +# mysql_instances (str): Set to "" by default. +# If defined, list of instances to enable + +. /etc/rc.subr + +name="mysql" +rcvar=mysql_enable + +load_rc_config $name + +: ${mysql_enable="NO"} +%%LEGACY_LIMITS%%: ${mysql_limits="NO"} +: ${mysql_user="%%MARIADB_USER%%"} +%%LEGACY_LIMITS%%mysql_limits_args="-e -U ${mysql_user}" +: ${mysql_dbdir="%%MARIADB_DBDIR%%"} +: ${mysql_optfile="%%ETCDIR%%/my.cnf"} +: ${mysql_rundir="%%MARIADB_RUNDIR%%"} + +command="/usr/sbin/daemon" +procname="%%PREFIX%%/libexec/mariadbd" +start_precmd="${name}_prestart" +start_postcmd="${name}_poststart" + +if [ -n "$2" ]; then + instance="$2" + load_rc_config ${name}_${instance} + case "$mysql_instances" in + "$2 "*|*" $2 "*|*" $2"|"$2") + eval mysql_args="\${mysql_${instance}_args:-\"${mysql_args}\"}" + eval mysql_dbdir="\${mysql_${instance}_dbdir:-\"%%MARIADB_DBDIR%%_${instance}\"}" + %%LEGACY_LIMITS%%eval mysql_limits="\${mysql_${instance}_limits:-\"${mysql_limits}\"}" + eval mysql_user="\${mysql_${instance}_user:-\"${mysql_user}\"}" + %%LEGACY_LIMITS%%eval mysql_limits_args="\${mysql_${instance}_limits_args:-\"-e -U $mysql_user\"}" + eval mysql_socket="\${mysql_${instance}_socket:-\"%%MARIADB_RUNDIR%%_${instance}/%%MARIADB_SOCK%%\"}" + eval mysql_optfile="\${mysql_${instance}_optfile:-\"%%ETCDIR%%_${instance}/my.cnf\"}" + eval mysql_pidfile="\${mysql_${instance}_pidfile:-\"%%MARIADB_RUNDIR%%_${instance}/mysqld.pid\"}" + ;; + *) + err 1 "$2 not found in mysql_instances" ;; + esac +else + if [ -n "${mysql_instances}" -a -n "$1" ]; then + for instance in ${mysql_instances}; do + eval _enable="\${mysql_${instance}_enable}" + case "${_enable:-${mysql_enable}}" in + [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0) + continue + ;; + [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) + ;; + *) + if [ -z "$_enable" ]; then + _var=mysql_enable + else + _var=mysql_${instance}_enable + fi + warn "Bad value" \ + "'${_enable:-${mysql_enable}}'" \ + "for ${_var}. " \ + "Instance ${instance} skipped." + continue + ;; + esac + echo "===> mysql instance: ${instance}" + if %%PREFIX%%/etc/rc.d/mysql-server $1 ${instance}; then + success="${instance} ${success}" + else + failed="${instance} (${retcode}) ${failed}" + fi + done + exit 0 + else + mysql_pidfile=${mysql_pidfile:-"%%MARIADB_RUNDIR%%/mysqld.pid"} + fi +fi + +pidfile=$mysql_pidfile +mysql_install_db="%%PREFIX%%/bin/mariadb-install-db" +mysql_install_db_args="--basedir=%%PREFIX%% --datadir=${mysql_dbdir} --force" +command_args="-c -f %%PREFIX%%/bin/mariadbd-safe --defaults-extra-file=${mysql_optfile} --user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysql_socket:+--socket=${mysql_socket}} ${mysql_args}" + +mysql_create_auth_tables() +{ + eval $mysql_install_db $mysql_install_db_args + [ $? -eq 0 ] && chown -R ${mysql_user}:$(id -gn $mysql_user) ${mysql_dbdir} +} + +mysql_prestart() +{ + local dir + for dir in /etc /usr/local/etc /etc/mysql /var/db/mysql; do + if [ -f "${dir}/my.cnf" ]; then + echo "Please merge existing ${dir}/my.cnf file with %%ETCDIR%%/conf.d/server.cnf" + return 1 + fi + done + if [ ! -d "${mysql_dbdir}/mysql/." ]; then + mysql_create_auth_tables || return 1 + fi + mysql_group="`/usr/bin/id -gn ${mysql_user}`" + [ "${mysql_socket}" = "" ] && mysql_rundir="%%MARIADB_RUNDIR%%" || mysql_rundir="`/usr/bin/dirname ${mysql_socket}`" + if [ ! -d "${mysql_rundir}" ]; then + install -d -o ${mysql_user} -g ${mysql_group} "${mysql_rundir}" + fi +%%LEGACY_LIMITS%% if checkyesno mysql_limits; then +%%LEGACY_LIMITS%% eval `/usr/bin/limits ${mysql_limits_args}` 2>/dev/null +%%LEGACY_LIMITS%% else +%%LEGACY_LIMITS%% return 0 +%%LEGACY_LIMITS%% fi +%%MODERN_LIMITS%% return 0 + if [ ! -d "${mysql_rundir}" ]; then + install -d -u${mysql_user} -g$(id -gn $mysql_user) -m755 ${mysql_rundir} + fi +} + +mysql_poststart() +{ + local timeout=15 + while [ ! -f "${pidfile}" -a ${timeout} -gt 0 ]; do + timeout=$(( timeout - 1 )) + sleep 1 + done + return 0 +} + +run_rc_command "$1" diff --git a/databases/mariadb114-server/files/patch-include_my__cpu.h b/databases/mariadb114-server/files/patch-include_my__cpu.h new file mode 100644 index 000000000000..3dd96615bdb9 --- /dev/null +++ b/databases/mariadb114-server/files/patch-include_my__cpu.h @@ -0,0 +1,48 @@ +--- include/my_cpu.h.orig 2024-05-26 18:15:37 UTC ++++ include/my_cpu.h +@@ -23,7 +23,8 @@ + The defines are the same ones used by the linux kernel + */ + +-#ifdef _ARCH_PWR8 ++#if defined(_ARCH_PWR8) ++#if defined(linux) + #include <sys/platform/ppc.h> + /* Very low priority */ + #define HMT_very_low() __ppc_set_ppr_very_low() +@@ -37,6 +38,22 @@ + #define HMT_medium_high() __ppc_set_ppr_med_high() + /* High priority */ + #define HMT_high() asm volatile("or 3,3,3") ++#elif defined(__FreeBSD__) ++#include <sys/types.h> ++#include <sys/sysctl.h> ++/* Very low priority */ ++#define HMT_very_low() __asm__ volatile ("or 31,31,31") ++/* Low priority */ ++#define HMT_low() __asm__ volatile ("or 1,1,1") ++/* Medium low priority */ ++#define HMT_medium_low() __asm__ volatile ("or 6,6,6") ++/* Medium priority */ ++#define HMT_medium() __asm__ volatile ("or 2,2,2") ++/* Medium high priority */ ++#define HMT_medium_high() __asm__ volatile ("or 5,5,5") ++/* High priority */ ++#define HMT_high() asm volatile("or 3,3,3") ++#endif + #else + #define HMT_very_low() + #define HMT_low() +@@ -81,7 +98,12 @@ static inline void MY_RELAX_CPU(void) + __asm__ __volatile__ ("pause"); + #endif + #elif defined(_ARCH_PWR8) ++#if defined(linux) + __ppc_get_timebase(); ++#elif defined(__FreeBSD__) ++ uint64_t __tb; ++ __asm__ volatile ("mfspr %0, 268" : "=r" (__tb)); ++#endif + #elif defined __GNUC__ && (defined __arm__ || defined __aarch64__) + /* Mainly, prevent the compiler from optimizing away delay loops */ + __asm__ __volatile__ ("":::"memory"); diff --git a/databases/mariadb114-server/files/patch-mysys__ssl_openssl.c b/databases/mariadb114-server/files/patch-mysys__ssl_openssl.c new file mode 100644 index 000000000000..dd66a716fa84 --- /dev/null +++ b/databases/mariadb114-server/files/patch-mysys__ssl_openssl.c @@ -0,0 +1,14 @@ +--- mysys_ssl/openssl.c.orig 2024-02-01 17:44:37 UTC ++++ mysys_ssl/openssl.c +@@ -30,6 +30,11 @@ int check_openssl_compatibility() + { + return 0; + } ++#elif defined(LIBRESSL_VERSION_NUMBER) ++int check_openssl_compatibility() ++{ ++ return 0; ++} + #else + #include <openssl/evp.h> + diff --git a/databases/mariadb114-server/files/patch-scripts_mysql__config.sh b/databases/mariadb114-server/files/patch-scripts_mysql__config.sh new file mode 100644 index 000000000000..f8321be63ecc --- /dev/null *** 1059 LINES SKIPPED ***