pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/databases/mariadb105-server databases/mariadb105-serve...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/67c1e625f75c
branches:  trunk
changeset: 456094:67c1e625f75c
user:      taca <taca%pkgsrc.org@localhost>
date:      Mon Jul 19 14:41:44 2021 +0000

description:
databases/mariadb105-server: fix startup script

Fix startup problem of mariadb.

* Remove creating ${VARBASE}/run/mariadb with OWN_DIRS_PERMS since
  ${VARBASE}/run will be cleared on system start up.
* Create ${VARBASE}/run/mariadb in startup script with sutable owner.

Bump PKGREVISION.

diffstat:

 databases/mariadb105-server/Makefile         |  5 ++---
 databases/mariadb105-server/files/mariadb.sh |  7 ++++++-
 2 files changed, 8 insertions(+), 4 deletions(-)

diffs (44 lines):

diff -r 578a8fc85748 -r 67c1e625f75c databases/mariadb105-server/Makefile
--- a/databases/mariadb105-server/Makefile      Mon Jul 19 13:55:37 2021 +0000
+++ b/databases/mariadb105-server/Makefile      Mon Jul 19 14:41:44 2021 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.8 2021/07/12 22:40:00 nia Exp $
+# $NetBSD: Makefile,v 1.9 2021/07/19 14:41:44 taca Exp $
 
 PKGNAME=       ${DISTNAME:S/-/-server-/}
-PKGREVISION=   5
+PKGREVISION=   6
 COMMENT=       MariaDB 10.5, a free MySQL compatible database (server)
 
 CONFLICTS=     mysql-server-[0-9]*
@@ -35,7 +35,6 @@
 BUILD_DEFS+=           MARIADB_DATADIR
 
 OWN_DIRS_PERMS+=       ${MARIADB_DATADIR} ${MARIADB_USER} ${MARIADB_GROUP} 0700
-OWN_DIRS_PERMS+=       ${VARBASE}/run/mariadb ${MARIADB_USER} ${MARIADB_GROUP} 0700
 OWN_DIRS_PERMS+=       ${VARBASE}/log/mariadb ${MARIADB_USER} ${MARIADB_GROUP} 0700
 
 USE_TOOLS=             bash:run perl:run
diff -r 578a8fc85748 -r 67c1e625f75c databases/mariadb105-server/files/mariadb.sh
--- a/databases/mariadb105-server/files/mariadb.sh      Mon Jul 19 13:55:37 2021 +0000
+++ b/databases/mariadb105-server/files/mariadb.sh      Mon Jul 19 14:41:44 2021 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: mariadb.sh,v 1.1 2021/05/23 15:32:48 nia Exp $
+# $NetBSD: mariadb.sh,v 1.2 2021/07/19 14:41:44 taca Exp $
 #
 # PROVIDE: mariadb mysqld
 # REQUIRE: DAEMON LOGIN mountall
@@ -46,6 +46,11 @@
        if ! [ -f @MARIADB_DATADIR@/mysql/user.frm ]; then
                mariadb_initdb
        fi
+       rundir=$(dirname "${pidfile}")
+       if ! [ -d "${rundir}" ]; then
+               mkdir -p "${rundir}"
+               chown @MARIADB_USER@:@MARIADB_GROUP@ "${rundir}"
+       fi
        ulimit -n 4096
 }
 



Home | Main Index | Thread Index | Old Index