pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/databases/mariadb55-client Fix server startup failure ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a06e96acb511
branches:  trunk
changeset: 311209:a06e96acb511
user:      manu <manu%pkgsrc.org@localhost>
date:      Sun Aug 05 15:59:26 2018 +0000

description:
Fix server startup failure on NetBSD.

>From upstream https://github.com/MariaDB/server/pull/838

diffstat:

 databases/mariadb55-client/distinfo                         |   3 +-
 databases/mariadb55-client/patches/patch-mysys_my_symlink.c |  31 +++++++++++++
 2 files changed, 33 insertions(+), 1 deletions(-)

diffs (52 lines):

diff -r cdd19954221a -r a06e96acb511 databases/mariadb55-client/distinfo
--- a/databases/mariadb55-client/distinfo       Sun Aug 05 15:02:36 2018 +0000
+++ b/databases/mariadb55-client/distinfo       Sun Aug 05 15:59:26 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2017/08/08 11:23:38 fhajny Exp $
+$NetBSD: distinfo,v 1.9 2018/08/05 15:59:26 manu Exp $
 
 SHA1 (mariadb-5.5.57.tar.gz) = 2e2d48179b770940f053bb37c72c7ea42aea46ca
 RMD160 (mariadb-5.5.57.tar.gz) = 332179a8f94eb6d467021b2095d1c004cb7dc5b0
@@ -29,6 +29,7 @@
 SHA1 (patch-include_violite.h) = 31555632c2f48ae2cf9670f94a8233bfcad25083
 SHA1 (patch-libmysql_CMakeLists.txt) = bca5243b76ea783e5b39e619528b28095aa1392a
 SHA1 (patch-mysys_my__getopt.c) = 76ed2ffb774a7171bb547b3098db148329cbe21d
+SHA1 (patch-mysys_my_symlink.c) = d88553afa2ca97370d307092fedf6c8c53f63b02
 SHA1 (patch-mysys_stacktrace.c) = 9f18875126208c30d41f896f0e6edc7000df0c73
 SHA1 (patch-plugin_handler__socket_libhsclient_socket.cpp) = 4fe680a207162c750ca4a6107bfbaa912e93d5d0
 SHA1 (patch-scripts_CMakeLists.txt) = 5e30442df51009fd253b0f3c99526b587b2626ff
diff -r cdd19954221a -r a06e96acb511 databases/mariadb55-client/patches/patch-mysys_my_symlink.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mariadb55-client/patches/patch-mysys_my_symlink.c       Sun Aug 05 15:59:26 2018 +0000
@@ -0,0 +1,31 @@
+$NetBSD: patch-mysys_my_symlink.c,v 1.1 2018/08/05 15:59:26 manu Exp $
+
+Fix server startup failure on NetBSD. From upstream
+https://github.com/MariaDB/server/pull/838
+
+--- mysys/my_symlink.c.orig    2018-08-05 09:34:34.048086306 +0000
++++ mysys/my_symlink.c 2018-08-05 12:19:23.894217529 +0000
+@@ -235,9 +236,22 @@
+       *pdfd= dfd;
+       return pathname + (s - buf);
+     }
+ 
+-    fd = openat(dfd, s, O_NOFOLLOW | O_PATH);
++    /*
++     * Linux accepts dfd = -1 for root, but this is not a standard
++     * behavior documented by OpenGroup XSH
++     * http://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html
++     * At least on NetBSD, calling openat() with dfd = -1 fails with EBADF.
++     * Since s has been tested to be an absolute parth, just use open()
++     * on non Linux systems for the same result.
++     */
++#ifndef linux
++    if (dfd == -1)
++      fd = open(s, O_NOFOLLOW | O_PATH);
++    else
++#endif
++      fd = openat(dfd, s, O_NOFOLLOW | O_PATH);
+     if (fd < 0)
+       goto err;
+ 
+     if (dfd >= 0)



Home | Main Index | Thread Index | Old Index