pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/databases mariadb105: Add support for auth_socket on N...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/28730cbffbe1
branches:  trunk
changeset: 456623:28730cbffbe1
user:      nia <nia%pkgsrc.org@localhost>
date:      Wed Aug 04 15:52:10 2021 +0000

description:
mariadb105: Add support for auth_socket on NetBSD.

diffstat:

 databases/mariadb105-client/distinfo                                         |   5 +-
 databases/mariadb105-client/patches/patch-plugin_auth__socket_CMakeLists.txt |  37 ++++++++++
 databases/mariadb105-client/patches/patch-plugin_auth__socket_auth__socket.c |  21 +++++
 databases/mariadb105-client/patches/patch-scripts_mysql__install__db.sh      |  15 ----
 databases/mariadb105-server/Makefile                                         |   3 +-
 5 files changed, 63 insertions(+), 18 deletions(-)

diffs (117 lines):

diff -r dcab96fd6b94 -r 28730cbffbe1 databases/mariadb105-client/distinfo
--- a/databases/mariadb105-client/distinfo      Wed Aug 04 15:48:04 2021 +0000
+++ b/databases/mariadb105-client/distinfo      Wed Aug 04 15:52:10 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.3 2021/07/24 10:10:03 nia Exp $
+$NetBSD: distinfo,v 1.4 2021/08/04 15:52:10 nia Exp $
 
 SHA1 (mariadb-10.5.11.tar.gz) = f62668be013b1ab51ab7e001d026e17257ad8d30
 RMD160 (mariadb-10.5.11.tar.gz) = 9f0cbcfdc07c7015d4b054e40b08f93179aa3b0c
@@ -12,8 +12,9 @@
 SHA1 (patch-mysys_crc32_crc32__arm64.c) = 0a479d4e9c6a186c631f3c0f99d15f633c8a484a
 SHA1 (patch-mysys_my__context.c) = f9c7e6b3b68b857e7781cf5f36c49e88051cfb66
 SHA1 (patch-plugin_auth__pam_CMakeLists.txt) = 033f01c64014c0e61bc635d5fbe686f7a4b7f317
+SHA1 (patch-plugin_auth__socket_CMakeLists.txt) = 00cfaf5826cc97084bc77033985e6686e1ce1628
+SHA1 (patch-plugin_auth__socket_auth__socket.c) = 850e94faff382a7e962f6d4d6ff960ddddc624c4
 SHA1 (patch-scripts_CMakeLists.txt) = b11f36e845716fccd455832b648f20413cd9de1f
-SHA1 (patch-scripts_mysql__install__db.sh) = adf20e80a9881db97f3d2dd8279e52bcedf0bead
 SHA1 (patch-scripts_mysqld__safe.sh) = 4124e4c8df1527049f5eec9f3d2d4bbe80e7c33f
 SHA1 (patch-storage_connect_ioapi.c) = 804e2d9d3722fbe4d5ed773cc98a4114fe4cf8a3
 SHA1 (patch-storage_connect_tabvct.cpp) = 2e3c7cd7e4b0a86d443da47d3cc514b8b276d836
diff -r dcab96fd6b94 -r 28730cbffbe1 databases/mariadb105-client/patches/patch-plugin_auth__socket_CMakeLists.txt
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mariadb105-client/patches/patch-plugin_auth__socket_CMakeLists.txt      Wed Aug 04 15:52:10 2021 +0000
@@ -0,0 +1,37 @@
+$NetBSD: patch-plugin_auth__socket_CMakeLists.txt,v 1.1 2021/08/04 15:52:10 nia 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
+@@ -57,6 +57,21 @@ IF (HAVE_XUCRED)
+   SET(ok 1)
+ ELSE()
+ 
++# NetBSD, is that you?
++CHECK_CXX_SOURCE_COMPILES(
++"#include <sys/un.h>
++#include <sys/socket.h>
++int main() {
++  struct unpcbid unp;
++  socklen_t unpl = sizeof(unp);
++  getsockopt(0, 0, LOCAL_PEEREID, &unp, &unpl);
++  }" HAVE_UNPCBID)
++
++IF (HAVE_UNPCBID)
++  ADD_DEFINITIONS(-DHAVE_UNPCBID)
++  SET(ok 1)
++ELSE()
++
+ # illumos, is that you?
+ CHECK_CXX_SOURCE_COMPILES(
+ "#include <ucred.h>
+@@ -104,6 +119,7 @@ ENDIF()
+ ENDIF()
+ ENDIF()
+ ENDIF()
++ENDIF()
+ 
+ IF(ok)
+   MYSQL_ADD_PLUGIN(auth_socket auth_socket.c DEFAULT)
diff -r dcab96fd6b94 -r 28730cbffbe1 databases/mariadb105-client/patches/patch-plugin_auth__socket_auth__socket.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mariadb105-client/patches/patch-plugin_auth__socket_auth__socket.c      Wed Aug 04 15:52:10 2021 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-plugin_auth__socket_auth__socket.c,v 1.1 2021/08/04 15:52:10 nia Exp $
+
+Add SO_PEERCRED definitions for NetBSD.
+https://github.com/MariaDB/server/pull/1884
+
+--- plugin/auth_socket/auth_socket.c.orig      2021-06-18 10:19:11.000000000 +0000
++++ plugin/auth_socket/auth_socket.c
+@@ -47,6 +47,13 @@
+ #define uid cr_uid
+ #define ucred xucred
+ 
++#elif defined HAVE_UNPCBID
++#include <sys/un.h>
++#define level 0
++#define SO_PEERCRED LOCAL_PEEREID
++#define uid unp_euid
++#define ucred unpcbid
++
+ #elif defined HAVE_GETPEERUCRED
+ #include <ucred.h>
+ 
diff -r dcab96fd6b94 -r 28730cbffbe1 databases/mariadb105-client/patches/patch-scripts_mysql__install__db.sh
--- a/databases/mariadb105-client/patches/patch-scripts_mysql__install__db.sh   Wed Aug 04 15:48:04 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-$NetBSD: patch-scripts_mysql__install__db.sh,v 1.1 2021/05/23 15:32:47 nia Exp $
-
-NetBSD does not have SO_PEERCRED, so there is no auth_socket.
-
---- scripts/mysql_install_db.sh.orig   2021-02-18 23:22:29.000000000 +0000
-+++ scripts/mysql_install_db.sh
-@@ -37,7 +37,7 @@ force=0
- in_rpm=0
- ip_only=0
- cross_bootstrap=0
--auth_root_authentication_method=socket
-+auth_root_authentication_method=normal
- auth_root_socket_user=""
- skip_test_db=0
- 
diff -r dcab96fd6b94 -r 28730cbffbe1 databases/mariadb105-server/Makefile
--- a/databases/mariadb105-server/Makefile      Wed Aug 04 15:48:04 2021 +0000
+++ b/databases/mariadb105-server/Makefile      Wed Aug 04 15:52:10 2021 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.10 2021/07/24 10:10:03 nia Exp $
+# $NetBSD: Makefile,v 1.11 2021/08/04 15:52:10 nia Exp $
 
 PKGNAME=       ${DISTNAME:S/-/-server-/}
+PKGREVISION=   1
 COMMENT=       MariaDB 10.5, a free MySQL compatible database (server)
 
 CONFLICTS=     mysql-server-[0-9]*



Home | Main Index | Thread Index | Old Index