From 4033f2d9a1225061dc795daee239cc15090585ed Mon Sep 17 00:00:00 2001 From: jperkin Date: Tue, 7 Mar 2023 10:28:02 +0000 Subject: [PATCH] mariadb105: Various SunOS fixes. --- databases/mariadb105-client/Makefile.common | 6 +----- databases/mariadb105-client/distinfo | 9 +++++++-- .../patch-include_mysql_service__encryption.h | 15 ++++++++++++++ ...ugin_auth__pam_testing_pam__mariadb__mtr.c | 16 +++++++++++++++ .../patch-plugin_auth__socket_CMakeLists.txt | 10 +++++----- .../patch-storage_columnstore_CMakeLists.txt | 14 +++++++++++++ .../patch-storage_rocksdb_CMakeLists.txt | 15 ++++++++++++++ .../patch-storage_tokudb_CMakeLists.txt | 14 +++++++++++++ databases/mariadb105-server/Makefile | 11 ++++------ databases/mariadb105-server/PLIST | 20 +++++++++---------- 10 files changed, 101 insertions(+), 29 deletions(-) create mode 100644 databases/mariadb105-client/patches/patch-include_mysql_service__encryption.h create mode 100644 databases/mariadb105-client/patches/patch-plugin_auth__pam_testing_pam__mariadb__mtr.c create mode 100644 databases/mariadb105-client/patches/patch-storage_columnstore_CMakeLists.txt create mode 100644 databases/mariadb105-client/patches/patch-storage_rocksdb_CMakeLists.txt create mode 100644 databases/mariadb105-client/patches/patch-storage_tokudb_CMakeLists.txt diff --git a/databases/mariadb105-client/Makefile.common b/databases/mariadb105-client/Makefile.common index ddeea5f3347f..601048f17d61 100644 --- a/databases/mariadb105-client/Makefile.common +++ b/databases/mariadb105-client/Makefile.common @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.18 2022/11/27 23:34:48 nia Exp $ +# $NetBSD: Makefile.common,v 1.19 2023/03/07 10:28:02 jperkin Exp $ # # used by databases/mariadb105-client/Makefile # used by databases/mariadb105-server/Makefile @@ -56,10 +56,6 @@ CMAKE_ARGS+= -DINSTALL_SUPPORTFILESDIR="share/mysql" CMAKE_ARGS+= -DINSTALL_SYSCONFDIR="${PKG_SYSCONFDIR}" CMAKE_ARGS+= -DMYSQL_DATADIR=${MARIADB_DATADIR} -.if ${OPSYS} == "SunOS" -CMAKE_ARGS+= -DWITH_MARIABACKUP=OFF -.endif - CMAKE_ARGS+= -DWITH_UNIT_TESTS=OFF CMAKE_ARGS+= -DWITH_LIBWRAP=ON CMAKE_ARGS+= -DWITH_PCRE="system" diff --git a/databases/mariadb105-client/distinfo b/databases/mariadb105-client/distinfo index 5a69e0b4966c..89b85e230ea2 100644 --- a/databases/mariadb105-client/distinfo +++ b/databases/mariadb105-client/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.16 2022/11/27 23:34:48 nia Exp $ +$NetBSD: distinfo,v 1.17 2023/03/07 10:28:02 jperkin Exp $ BLAKE2s (mariadb-10.5.18.tar.gz) = fed6b47a5fa140311a20a0c1f87ff04713dcfd51939dc71defed248755160c41 SHA512 (mariadb-10.5.18.tar.gz) = 1fe13db1c0b66d2bc0c4d80e2c278f6e64027aaeebebfa5a179bd8ca92ae135ae53b72ed26c9b6d35b35fd2ad2a3cb390fd5ee0715b22d4bfafe773f950d804c @@ -8,16 +8,21 @@ SHA1 (patch-CMakeLists.txt) = 574131db46854715758c60ba5f026498f5b29564 SHA1 (patch-client_CMakeLists.txt) = 8fdd8a182304f0b84e120ce95334ace23d02ce88 SHA1 (patch-client_mysql.cc) = 89fe80fb66b8791131a8c6d1b209e57082804a01 SHA1 (patch-include_my__global.h) = a3b831f91ba2efea9f78e70ab4f706da23b80403 +SHA1 (patch-include_mysql_service__encryption.h) = bfc2fcba9f33cc58b726f8645dc5400a0df27bd9 SHA1 (patch-mysys_my__context.c) = f9c7e6b3b68b857e7781cf5f36c49e88051cfb66 SHA1 (patch-mysys_my__gethwaddr.c) = f4fd827617697ff386099defc839fe8d082e6c3e -SHA1 (patch-plugin_auth__socket_CMakeLists.txt) = 00cfaf5826cc97084bc77033985e6686e1ce1628 +SHA1 (patch-plugin_auth__pam_testing_pam__mariadb__mtr.c) = 5c7978b5bec79bbc09d3ebeb69dd85f3e6f8a423 +SHA1 (patch-plugin_auth__socket_CMakeLists.txt) = 11f52f5335ac56888d8a367caa03c68059eb61c9 SHA1 (patch-plugin_auth__socket_auth__socket.c) = 850e94faff382a7e962f6d4d6ff960ddddc624c4 SHA1 (patch-scripts_CMakeLists.txt) = 54591a4d255a8133e06ab5d52bad262acffcddda SHA1 (patch-scripts_mysqld__safe.sh) = 4124e4c8df1527049f5eec9f3d2d4bbe80e7c33f SHA1 (patch-sql_mysqld.cc) = 19d325124cde1b45376c9710cdd104dc460f4bea +SHA1 (patch-storage_columnstore_CMakeLists.txt) = cd5ceb1802831910c6cfa5950c52f5af8eb7dcaa SHA1 (patch-storage_connect_tabvct.cpp) = 2e3c7cd7e4b0a86d443da47d3cc514b8b276d836 +SHA1 (patch-storage_rocksdb_CMakeLists.txt) = 2ab237df750cc18facf92c6ad997469f5e43c63f SHA1 (patch-storage_rocksdb_rdb__io__watchdog.cc) = 85ee5007cfda0d3070ec20b2b774738b01f8e083 SHA1 (patch-storage_rocksdb_rdb__io__watchdog.h) = d790c092d7d35d014c5ef209635c18614c3a8301 SHA1 (patch-storage_rocksdb_rocksdb_Makefile) = 67ea4d154f4f623fdca739f50b236c973e118a12 SHA1 (patch-storage_rocksdb_rocksdb_build__tools_fb__compile__mongo.sh) = 3b632521c23765c39f4638dc7a80d04b9e1d58bd +SHA1 (patch-storage_tokudb_CMakeLists.txt) = 9abea512e0d92667bfdf94fb83850de4b80b781f SHA1 (patch-support-files_mysql.server.sh) = a98d82cdda1dbd5ef8ebb7e457bb51661b5fd275 diff --git a/databases/mariadb105-client/patches/patch-include_mysql_service__encryption.h b/databases/mariadb105-client/patches/patch-include_mysql_service__encryption.h new file mode 100644 index 000000000000..6d852efb6f81 --- /dev/null +++ b/databases/mariadb105-client/patches/patch-include_mysql_service__encryption.h @@ -0,0 +1,15 @@ +$NetBSD: patch-include_mysql_service__encryption.h,v 1.1 2023/03/07 10:28:02 jperkin Exp $ + +SunOS always needs alloca.h. + +--- include/mysql/service_encryption.h.orig 2022-11-02 12:37:17.000000000 +0000 ++++ include/mysql/service_encryption.h +@@ -36,7 +36,7 @@ extern "C" { + #endif + #else + #include +-#ifdef HAVE_ALLOCA_H ++#if defined(HAVE_ALLOCA_H) || defined(__sun) + #include + #endif + #endif diff --git a/databases/mariadb105-client/patches/patch-plugin_auth__pam_testing_pam__mariadb__mtr.c b/databases/mariadb105-client/patches/patch-plugin_auth__pam_testing_pam__mariadb__mtr.c new file mode 100644 index 000000000000..f26e9cfce0fb --- /dev/null +++ b/databases/mariadb105-client/patches/patch-plugin_auth__pam_testing_pam__mariadb__mtr.c @@ -0,0 +1,16 @@ +$NetBSD: patch-plugin_auth__pam_testing_pam__mariadb__mtr.c,v 1.1 2023/03/07 10:28:02 jperkin Exp $ + +pam_appl.h must come before pam_modules.h. + +--- plugin/auth_pam/testing/pam_mariadb_mtr.c.orig 2022-11-02 12:37:20.000000000 +0000 ++++ plugin/auth_pam/testing/pam_mariadb_mtr.c +@@ -10,8 +10,8 @@ + + #include + #include +-#include + #include ++#include + + #define N 3 + diff --git a/databases/mariadb105-client/patches/patch-plugin_auth__socket_CMakeLists.txt b/databases/mariadb105-client/patches/patch-plugin_auth__socket_CMakeLists.txt index 3d1455f3a00a..5d953b0f0ac0 100644 --- a/databases/mariadb105-client/patches/patch-plugin_auth__socket_CMakeLists.txt +++ b/databases/mariadb105-client/patches/patch-plugin_auth__socket_CMakeLists.txt @@ -1,9 +1,9 @@ -$NetBSD: patch-plugin_auth__socket_CMakeLists.txt,v 1.1 2021/08/04 15:52:10 nia Exp $ +$NetBSD: patch-plugin_auth__socket_CMakeLists.txt,v 1.2 2023/03/07 10:28:02 jperkin Exp $ Add SO_PEERCRED definitions for NetBSD. https://github.com/MariaDB/server/pull/1884 ---- plugin/auth_socket/CMakeLists.txt.orig 2021-06-18 10:19:11.000000000 +0000 +--- plugin/auth_socket/CMakeLists.txt.orig 2022-11-02 12:37:20.000000000 +0000 +++ plugin/auth_socket/CMakeLists.txt @@ -57,6 +57,21 @@ IF (HAVE_XUCRED) SET(ok 1) @@ -27,11 +27,11 @@ https://github.com/MariaDB/server/pull/1884 # illumos, is that you? CHECK_CXX_SOURCE_COMPILES( "#include -@@ -104,6 +119,7 @@ ENDIF() +@@ -102,6 +117,7 @@ ELSE() ENDIF() ENDIF() ENDIF() +ENDIF() + ENDIF() + ENDIF() - IF(ok) - MYSQL_ADD_PLUGIN(auth_socket auth_socket.c DEFAULT) diff --git a/databases/mariadb105-client/patches/patch-storage_columnstore_CMakeLists.txt b/databases/mariadb105-client/patches/patch-storage_columnstore_CMakeLists.txt new file mode 100644 index 000000000000..039e65936289 --- /dev/null +++ b/databases/mariadb105-client/patches/patch-storage_columnstore_CMakeLists.txt @@ -0,0 +1,14 @@ +$NetBSD: patch-storage_columnstore_CMakeLists.txt,v 1.1 2023/03/07 10:28:02 jperkin Exp $ + +Support SunOS. + +--- storage/columnstore/CMakeLists.txt.orig 2022-11-02 12:37:21.000000000 +0000 ++++ storage/columnstore/CMakeLists.txt +@@ -12,6 +12,7 @@ macro(APPEND_FOR_CPACK V) + endmacro() + + IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR ++ CMAKE_SYSTEM_NAME STREQUAL "SunOS" OR + CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64") + add_subdirectory(columnstore) + diff --git a/databases/mariadb105-client/patches/patch-storage_rocksdb_CMakeLists.txt b/databases/mariadb105-client/patches/patch-storage_rocksdb_CMakeLists.txt new file mode 100644 index 000000000000..c7754d6cad6f --- /dev/null +++ b/databases/mariadb105-client/patches/patch-storage_rocksdb_CMakeLists.txt @@ -0,0 +1,15 @@ +$NetBSD: patch-storage_rocksdb_CMakeLists.txt,v 1.1 2023/03/07 10:28:02 jperkin Exp $ + +Support SunOS. + +--- storage/rocksdb/CMakeLists.txt.orig 2022-11-02 12:37:22.000000000 +0000 ++++ storage/rocksdb/CMakeLists.txt +@@ -32,7 +32,7 @@ ENDIF() + + # We've had our builders hang during the build process. This prevents MariaRocks + # to be built on 32 bit intel OS kernels. +-IF(CMAKE_SYSTEM_PROCESSOR MATCHES "i[36]86") ++IF(CMAKE_SYSTEM_PROCESSOR MATCHES "i[36]86" AND NOT CMAKE_SYSTEM_NAME STREQUAL "SunOS") + SKIP_ROCKSDB_PLUGIN("Intel 32 bit not supported.") + ENDIF() + diff --git a/databases/mariadb105-client/patches/patch-storage_tokudb_CMakeLists.txt b/databases/mariadb105-client/patches/patch-storage_tokudb_CMakeLists.txt new file mode 100644 index 000000000000..b5aa2919c793 --- /dev/null +++ b/databases/mariadb105-client/patches/patch-storage_tokudb_CMakeLists.txt @@ -0,0 +1,14 @@ +$NetBSD: patch-storage_tokudb_CMakeLists.txt,v 1.1 2023/03/07 10:28:02 jperkin Exp $ + +Support SunOS. + +--- storage/tokudb/CMakeLists.txt.orig 2022-11-02 12:37:23.000000000 +0000 ++++ storage/tokudb/CMakeLists.txt +@@ -16,6 +16,7 @@ ELSEIF(PLUGIN_PERFSCHEMA MATCHES "^NO$") + MESSAGE(STATUS "Performance Schema is required by TokuDB") + RETURN() + ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR ++ CMAKE_SYSTEM_NAME STREQUAL "SunOS" OR + CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64") + # tokudb requires F_NOCACHE or O_DIRECT, and designated initializers + CHECK_CXX_SOURCE_COMPILES( diff --git a/databases/mariadb105-server/Makefile b/databases/mariadb105-server/Makefile index 4f729312f256..867db7612927 100644 --- a/databases/mariadb105-server/Makefile +++ b/databases/mariadb105-server/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.31 2023/01/22 16:28:21 ryoon Exp $ +# $NetBSD: Makefile,v 1.32 2023/03/07 10:28:02 jperkin Exp $ PKGNAME= ${DISTNAME:S/-/-server-/} PKGREVISION= 1 @@ -9,16 +9,13 @@ CONFLICTS= mysql-server-[0-9]* .include "../../databases/mariadb105-client/Makefile.common" BUILD_DEFS+= VARBASE +PLIST_VARS+= disks .include "../../mk/bsd.fast.prefs.mk" -# mariabackup is not built on SunOS due to symbol resolution problems -# auth_pam is not built on SunOS due to lack of getgrouplist - -PLIST_VARS+= auth_pam mariabackup +# Requires getmntinfo .if ${OPSYS} != "SunOS" -PLIST.auth_pam= yes -PLIST.mariabackup= yes +PLIST.disks= yes .endif MARIADB_USER?= ${MYSQL_USER:Umariadb} diff --git a/databases/mariadb105-server/PLIST b/databases/mariadb105-server/PLIST index 498eb63d08c4..004c187b1281 100644 --- a/databases/mariadb105-server/PLIST +++ b/databases/mariadb105-server/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.11 2022/12/15 09:18:20 wiz Exp $ +@comment $NetBSD: PLIST,v 1.12 2023/03/07 10:28:02 jperkin Exp $ bin/aria_chk bin/aria_dump_log bin/aria_ftdump @@ -6,8 +6,8 @@ bin/aria_pack bin/aria_read_log bin/aria_s3_copy bin/innochecksum -${PLIST.mariabackup}bin/mariabackup -${PLIST.mariabackup}bin/mariadb-backup +bin/mariabackup +bin/mariadb-backup bin/mariadb-client-test ${PLIST.embedded}bin/mariadb-client-test-embedded bin/mariadb-dumpslow @@ -21,7 +21,7 @@ bin/mariadb-waitpid bin/mariadbd-multi bin/mariadbd-safe bin/mariadbd-safe-helper -${PLIST.mariabackup}bin/mbstream +bin/mbstream bin/my_print_defaults bin/myisam_ftdump bin/myisamchk @@ -306,14 +306,14 @@ lib/mysql/plugin/adt_null.so lib/mysql/plugin/auth_0x0100.so lib/mysql/plugin/auth_ed25519.so lib/mysql/plugin/auth_gssapi.so -${PLIST.auth_pam}lib/mysql/plugin/auth_pam.so -${PLIST.auth_pam}lib/mysql/plugin/auth_pam_tool_dir/auth_pam_tool -${PLIST.auth_pam}lib/mysql/plugin/auth_pam_v1.so +lib/mysql/plugin/auth_pam.so +lib/mysql/plugin/auth_pam_tool_dir/auth_pam_tool +lib/mysql/plugin/auth_pam_v1.so lib/mysql/plugin/auth_test_plugin.so lib/mysql/plugin/daemon_example.ini lib/mysql/plugin/debug_key_management.so lib/mysql/plugin/dialog_examples.so -lib/mysql/plugin/disks.so +${PLIST.disks}lib/mysql/plugin/disks.so lib/mysql/plugin/example_key_management.so lib/mysql/plugin/file_key_management.so lib/mysql/plugin/func_test.so @@ -346,7 +346,7 @@ lib/mysql/plugin/test_versioning.so lib/mysql/plugin/type_mysql_json.so lib/mysql/plugin/type_test.so lib/mysql/plugin/wsrep_info.so -${PLIST.auth_pam}lib/security/pam_user_map.so +lib/security/pam_user_map.so sbin/mariadbd sbin/mysqld share/doc/mysql/COPYING @@ -355,7 +355,7 @@ share/doc/mysql/INSTALL-BINARY share/doc/mysql/README-wsrep share/doc/mysql/README.md share/doc/mysql/THIRDPARTY -${PLIST.auth_pam}share/examples/mariadb_auth_pam/user_map.conf +share/examples/mariadb_auth_pam/user_map.conf share/mysql/bulgarian/errmsg.sys share/mysql/charsets/Index.xml share/mysql/charsets/README