Index | Thread | Search

From:
Thomas Frohwein <tfrohwein@fastmail.com>
Subject:
databased/mariadb: getexecpath
To:
ports@openbsd.org, Brad Smith <brad@comstyle.com>
Date:
Fri, 18 Sep 2026 14:53:19 -0700

Download raw body.

Thread
Hi,

Found that mariadb also could make use of getexecpath here instead of
defaulting to returning 1 for failure. Slight wrinkle that with this
1-liner, failure returns -1 now, but this is still within the spec:

@return 0, for successful filling of buf, non-zero for failure. */

ok?


Index: Makefile
===================================================================
RCS file: /cvs/ports/databases/mariadb/Makefile,v
diff -u -p -r1.169 Makefile
--- Makefile	9 Sep 2026 12:22:59 -0000	1.169
+++ Makefile	18 Sep 2026 21:43:06 -0000
@@ -8,6 +8,7 @@ VERSION=	12.3.3
 DISTNAME=	mariadb-${VERSION}
 PKGNAME-main=	mariadb-client-${VERSION}
 EPOCH=		1
+REVISION=	0
 
 CATEGORIES=	databases
 SITES=		https://archive.mariadb.org/${DISTNAME}/source/ \
Index: patches/patch-mysys_my_getexe_c
===================================================================
RCS file: /cvs/ports/databases/mariadb/patches/patch-mysys_my_getexe_c,v
diff -u -p -r1.1 patch-mysys_my_getexe_c
--- patches/patch-mysys_my_getexe_c	6 Mar 2025 11:47:18 -0000	1.1
+++ patches/patch-mysys_my_getexe_c	18 Sep 2026 21:43:06 -0000
@@ -1,5 +1,3 @@
-Do not try getting the executable path of our own pid.
-
 Index: mysys/my_getexe.c
 --- mysys/my_getexe.c.orig
 +++ mysys/my_getexe.c
@@ -8,7 +6,7 @@ Index: mysys/my_getexe.c
    if (sysctl(mib, 4, buf, &size, NULL, 0) == 0)
      return 0;
 +#elif defined(__OpenBSD__)
-+  return 1;
++  return getexecpath(buf, size);
  #endif
  
    if (argv0)