pkgsrc-Changes archive

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

CVS commit: pkgsrc/databases



Module Name:    pkgsrc
Committed By:   abs
Date:           Sun Feb  6 17:52:25 UTC 2022

Modified Files:
        pkgsrc/databases/mariadb104-server: Makefile
        pkgsrc/databases/mariadb104-server/files: mariadb.sh
        pkgsrc/databases/mariadb105-server: Makefile
        pkgsrc/databases/mariadb105-server/files: mariadb.sh
        pkgsrc/databases/mariadb106-server: Makefile
        pkgsrc/databases/mariadb106-server/files: mariadb.sh

Log Message:
Allow overriding mariadb_datadir in rc.conf

Bump PKGREVISION


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 pkgsrc/databases/mariadb104-server/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/databases/mariadb104-server/files/mariadb.sh
cvs rdiff -u -r1.21 -r1.22 pkgsrc/databases/mariadb105-server/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/databases/mariadb105-server/files/mariadb.sh
cvs rdiff -u -r1.10 -r1.11 pkgsrc/databases/mariadb106-server/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/databases/mariadb106-server/files/mariadb.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/databases/mariadb104-server/Makefile
diff -u pkgsrc/databases/mariadb104-server/Makefile:1.18 pkgsrc/databases/mariadb104-server/Makefile:1.19
--- pkgsrc/databases/mariadb104-server/Makefile:1.18    Mon Jan 10 01:46:27 2022
+++ pkgsrc/databases/mariadb104-server/Makefile Sun Feb  6 17:52:24 2022
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.18 2022/01/10 01:46:27 ryoon Exp $
+# $NetBSD: Makefile,v 1.19 2022/02/06 17:52:24 abs Exp $
 
 PKGNAME=       ${DISTNAME:S/-/-server-/}
-PKGREVISION=   4
+PKGREVISION=   5
 COMMENT=       MariaDB 10.4, a free MySQL compatible database (server)
 
 CONFLICTS=     mysql-server-[0-9]*

Index: pkgsrc/databases/mariadb104-server/files/mariadb.sh
diff -u pkgsrc/databases/mariadb104-server/files/mariadb.sh:1.2 pkgsrc/databases/mariadb104-server/files/mariadb.sh:1.3
--- pkgsrc/databases/mariadb104-server/files/mariadb.sh:1.2     Tue May 11 17:26:50 2021
+++ pkgsrc/databases/mariadb104-server/files/mariadb.sh Sun Feb  6 17:52:24 2022
@@ -1,11 +1,14 @@
 #!/bin/sh
 #
-# $NetBSD: mariadb.sh,v 1.2 2021/05/11 17:26:50 nia Exp $
+# $NetBSD: mariadb.sh,v 1.3 2022/02/06 17:52:24 abs Exp $
 #
 # PROVIDE: mariadb mysqld
 # REQUIRE: DAEMON LOGIN mountall
 # KEYWORD: shutdown
 #
+# Optional rc.conf variables:
+#      mariadb_flags=""                   # additional mariadb startup flags
+#      mariadb_datadir="/path/to/datadir" # path to mariadb datadir
 
 if [ -f /etc/rc.subr ]
 then
@@ -14,19 +17,24 @@ fi
 
 name="mariadb"
 rcvar=${name}
+
+load_rc_config $name
+: ${mariadb_datadir:=@MARIADB_DATADIR@}
+
 procname="@PREFIX@/sbin/mysqld"
 command="@PREFIX@/bin/mariadbd-safe"
 command_args="--pid-file=@VARBASE@/run/mariadb/mariadb.pid"
 command_args="${command_args} --user=@MARIADB_USER@"
-command_args="${command_args} --datadir=@MARIADB_DATADIR@"
-command_args="${command_args} --log-error=@VARBASE@/log/mariadb/error.log &"
+command_args="${command_args} --datadir=$mariadb_datadir"
+command_args="${command_args} --log-error=@VARBASE@/log/mariadb/error.log"
+command_args="${command_args} ${mariadb_flags} &"
 extra_commands="initdb"
 initdb_cmd="mariadb_initdb"
 start_precmd="mariadb_prestart"
 pidfile="@VARBASE@/run/mariadb/mariadb.pid"
 
 mariadb_initdb() {
-        if [ -f @MARIADB_DATADIR@/mysql/user.frm ]; then
+        if [ -f $mariadb_datadir/mysql/user.frm ]; then
                 echo "The MariaDB database has already been initialized."
                 echo "Skipping database initialization."
         else
@@ -34,20 +42,19 @@ mariadb_initdb() {
                sh @PREFIX@/bin/mysql_install_db --force \
                        --auth-root-authentication-method=normal \
                        --user=@MARIADB_USER@ \
-                       --datadir=@MARIADB_DATADIR@
-               if [ -d @MARIADB_DATADIR@ ]; then
+                       --datadir=$mariadb_datadir
+               if [ -d $mariadb_datadir ]; then
                        /usr/sbin/chown -R @MARIADB_USER@:@MARIADB_GROUP@ \
-                               @MARIADB_DATADIR@
+                               $mariadb_datadir
                 fi
        fi
 }
 
 mariadb_prestart() {
-       if ! [ -f @MARIADB_DATADIR@/mysql/user.frm ]; then
+       if ! [ -f $mariadb_datadir/mysql/user.frm ]; then
                mariadb_initdb
        fi
        ulimit -n 4096
 }
 
-load_rc_config $name
 run_rc_command "$1"

Index: pkgsrc/databases/mariadb105-server/Makefile
diff -u pkgsrc/databases/mariadb105-server/Makefile:1.21 pkgsrc/databases/mariadb105-server/Makefile:1.22
--- pkgsrc/databases/mariadb105-server/Makefile:1.21    Mon Jan 10 01:46:27 2022
+++ pkgsrc/databases/mariadb105-server/Makefile Sun Feb  6 17:52:24 2022
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.21 2022/01/10 01:46:27 ryoon Exp $
+# $NetBSD: Makefile,v 1.22 2022/02/06 17:52:24 abs Exp $
 
 PKGNAME=       ${DISTNAME:S/-/-server-/}
-PKGREVISION=   2
+PKGREVISION=   3
 COMMENT=       MariaDB 10.5, a free MySQL compatible database (server)
 
 CONFLICTS=     mysql-server-[0-9]*

Index: pkgsrc/databases/mariadb105-server/files/mariadb.sh
diff -u pkgsrc/databases/mariadb105-server/files/mariadb.sh:1.3 pkgsrc/databases/mariadb105-server/files/mariadb.sh:1.4
--- pkgsrc/databases/mariadb105-server/files/mariadb.sh:1.3     Thu Aug 12 10:51:31 2021
+++ pkgsrc/databases/mariadb105-server/files/mariadb.sh Sun Feb  6 17:52:24 2022
@@ -1,11 +1,14 @@
 #!/bin/sh
 #
-# $NetBSD: mariadb.sh,v 1.3 2021/08/12 10:51:31 nia Exp $
+# $NetBSD: mariadb.sh,v 1.4 2022/02/06 17:52:24 abs Exp $
 #
 # PROVIDE: mariadb mysqld
 # REQUIRE: DAEMON LOGIN mountall
 # KEYWORD: shutdown
 #
+# Optional rc.conf variables:
+#      mariadb_flags=""                   # additional mariadb startup flags
+#      mariadb_datadir="/path/to/datadir" # path to mariadb datadir
 
 if [ -f /etc/rc.subr ]
 then
@@ -14,35 +17,40 @@ fi
 
 name="mariadb"
 rcvar=${name}
+
+load_rc_config $name
+: ${mariadb_datadir:=@MARIADB_DATADIR@}
+
 procname="@PREFIX@/sbin/mariadbd"
 command="@PREFIX@/bin/mariadbd-safe"
 command_args="--pid-file=@VARBASE@/run/mariadb/mariadb.pid"
 command_args="${command_args} --user=@MARIADB_USER@"
-command_args="${command_args} --datadir=@MARIADB_DATADIR@"
-command_args="${command_args} --log-error=@VARBASE@/log/mariadb/error.log &"
+command_args="${command_args} --datadir=$mariadb_datadir"
+command_args="${command_args} --log-error=@VARBASE@/log/mariadb/error.log"
+command_args="${command_args} ${mariadb_flags} &"
 extra_commands="initdb"
 initdb_cmd="mariadb_initdb"
 start_precmd="mariadb_prestart"
 pidfile="@VARBASE@/run/mariadb/mariadb.pid"
 
 mariadb_initdb() {
-        if [ -f @MARIADB_DATADIR@/mysql/user.frm ]; then
+        if [ -f $mariadb_datadir/mysql/user.frm ]; then
                 echo "The MariaDB database has already been initialized."
                 echo "Skipping database initialization."
         else
                echo "Initializing MariaDB database system tables."
                sh @PREFIX@/bin/mysql_install_db --force \
                        --user=@MARIADB_USER@ \
-                       --datadir=@MARIADB_DATADIR@
-               if [ -d @MARIADB_DATADIR@ ]; then
+                       --datadir=$mariadb_datadir
+               if [ -d $mariadb_datadir ]; then
                        /usr/sbin/chown -R @MARIADB_USER@:@MARIADB_GROUP@ \
-                               @MARIADB_DATADIR@
+                               $mariadb_datadir
                 fi
        fi
 }
 
 mariadb_prestart() {
-       if ! [ -f @MARIADB_DATADIR@/mysql/user.frm ]; then
+       if ! [ -f $mariadb_datadir/mysql/user.frm ]; then
                mariadb_initdb
        fi
        rundir=$(dirname "${pidfile}")
@@ -53,5 +61,4 @@ mariadb_prestart() {
        ulimit -n 4096
 }
 
-load_rc_config $name
 run_rc_command "$1"

Index: pkgsrc/databases/mariadb106-server/Makefile
diff -u pkgsrc/databases/mariadb106-server/Makefile:1.10 pkgsrc/databases/mariadb106-server/Makefile:1.11
--- pkgsrc/databases/mariadb106-server/Makefile:1.10    Mon Jan 10 01:46:27 2022
+++ pkgsrc/databases/mariadb106-server/Makefile Sun Feb  6 17:52:25 2022
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.10 2022/01/10 01:46:27 ryoon Exp $
+# $NetBSD: Makefile,v 1.11 2022/02/06 17:52:25 abs Exp $
 
 PKGNAME=       ${DISTNAME:S/-/-server-/}
-PKGREVISION=   2
+PKGREVISION=   3
 COMMENT=       MariaDB 10.6, a free MySQL compatible database (server)
 
 CONFLICTS=     mysql-server-[0-9]*

Index: pkgsrc/databases/mariadb106-server/files/mariadb.sh
diff -u pkgsrc/databases/mariadb106-server/files/mariadb.sh:1.2 pkgsrc/databases/mariadb106-server/files/mariadb.sh:1.3
--- pkgsrc/databases/mariadb106-server/files/mariadb.sh:1.2     Thu Aug 12 10:51:32 2021
+++ pkgsrc/databases/mariadb106-server/files/mariadb.sh Sun Feb  6 17:52:25 2022
@@ -1,11 +1,14 @@
 #!/bin/sh
 #
-# $NetBSD: mariadb.sh,v 1.2 2021/08/12 10:51:32 nia Exp $
+# $NetBSD: mariadb.sh,v 1.3 2022/02/06 17:52:25 abs Exp $
 #
 # PROVIDE: mariadb mysqld
 # REQUIRE: DAEMON LOGIN mountall
 # KEYWORD: shutdown
 #
+# Optional rc.conf variables:
+#      mariadb_flags=""                   # additional mariadb startup flags
+#      mariadb_datadir="/path/to/datadir" # path to mariadb datadir
 
 if [ -f /etc/rc.subr ]
 then
@@ -14,35 +17,40 @@ fi
 
 name="mariadb"
 rcvar=${name}
+
+load_rc_config $name
+: ${mariadb_datadir:=@MARIADB_DATADIR@}
+
 procname="@PREFIX@/sbin/mariadbd"
 command="@PREFIX@/bin/mariadbd-safe"
 command_args="--pid-file=@VARBASE@/run/mariadb/mariadb.pid"
 command_args="${command_args} --user=@MARIADB_USER@"
-command_args="${command_args} --datadir=@MARIADB_DATADIR@"
-command_args="${command_args} --log-error=@VARBASE@/log/mariadb/error.log &"
+command_args="${command_args} --datadir=$mariadb_datadir"
+command_args="${command_args} --log-error=@VARBASE@/log/mariadb/error.log"
+command_args="${command_args} ${mariadb_flags} &"
 extra_commands="initdb"
 initdb_cmd="mariadb_initdb"
 start_precmd="mariadb_prestart"
 pidfile="@VARBASE@/run/mariadb/mariadb.pid"
 
 mariadb_initdb() {
-        if [ -f @MARIADB_DATADIR@/mysql/user.frm ]; then
+        if [ -f $mariadb_datadir/mysql/user.frm ]; then
                 echo "The MariaDB database has already been initialized."
                 echo "Skipping database initialization."
         else
                echo "Initializing MariaDB database system tables."
                sh @PREFIX@/bin/mysql_install_db --force \
                        --user=@MARIADB_USER@ \
-                       --datadir=@MARIADB_DATADIR@
-               if [ -d @MARIADB_DATADIR@ ]; then
+                       --datadir=$mariadb_datadir
+               if [ -d $mariadb_datadir ]; then
                        /usr/sbin/chown -R @MARIADB_USER@:@MARIADB_GROUP@ \
-                               @MARIADB_DATADIR@
+                               $mariadb_datadir
                 fi
        fi
 }
 
 mariadb_prestart() {
-       if ! [ -f @MARIADB_DATADIR@/mysql/user.frm ]; then
+       if ! [ -f $mariadb_datadir/mysql/user.frm ]; then
                mariadb_initdb
        fi
        rundir=$(dirname "${pidfile}")
@@ -53,5 +61,4 @@ mariadb_prestart() {
        ulimit -n 4096
 }
 
-load_rc_config $name
 run_rc_command "$1"



Home | Main Index | Thread Index | Old Index