UPDATE: databases/mariadb 10.9.8 -> 11.4.4

This commit is contained in:
purplerain 2025-01-21 19:15:58 +00:00
parent 08e19bea27
commit 9b4bbf16fe
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
22 changed files with 1394 additions and 833 deletions

View file

@ -1,56 +1,82 @@
Index: scripts/wsrep_sst_common.sh
--- scripts/wsrep_sst_common.sh.orig
+++ scripts/wsrep_sst_common.sh
@@ -23,6 +23,11 @@ trap 'exit 3' INT QUIT TERM
# Setting the path for some utilities on CentOS
export PATH="$PATH:/usr/sbin:/usr/bin:/sbin:/bin"
@@ -79,6 +79,16 @@ wsrep_log_info()
wsrep_log "[INFO] $*"
}
+find()
+{
+ gfind "$@"
+}
+
+du()
+{
+ gdu "$@"
+}
+
trim_string()
{
if [ -n "$BASH_VERSION" ]; then
@@ -1166,9 +1171,9 @@ is_local_ip()
# the domain name check:
if [ "${2:-0}" -eq 0 ]; then
# We consider all the names of a given host to be local addresses:
- [ "$1" = "$(hostname -s)" -o \
- "$1" = "$(hostname -f)" -o \
- "$1" = "$(hostname -d)" ] && return 0
+ [ "$1" = "$(hostname -s 2>/dev/null)" -o \
+ "$1" = "$(hostname -f 2>/dev/null)" -o \
+ "$1" = "$(hostname -d 2>/dev/null)" ] && return 0
fi
# If the address contains anything other than digits
# and separators, it is not a local address:
@@ -1199,14 +1204,17 @@ check_sockets_utils()
@@ -1212,6 +1222,7 @@ check_sockets_utils()
lsof_available=0
sockstat_available=0
ss_available=0
+ fstat_available=0
[ -n "$(commandex lsof)" ] && lsof_available=1
[ -n "$(commandex sockstat)" ] && sockstat_available=1
[ -n "$(commandex ss)" ] && ss_available=1
+ [ -n "$(commandex fstat)" ] && fstat_available=1
if [ $lsof_available -eq 0 -a \
$sockstat_available -eq 0 -a \
- $ss_available -eq 0 ]
+ $ss_available -eq 0 -a \
+ $fstat_available -eq 0 ]
then
wsrep_log_error "Neither lsof, nor sockstat or ss tool was found in" \
"the PATH. Make sure you have it installed."
@@ -1249,6 +1257,8 @@ check_port()
elif [ $ss_available -ne 0 ]; then
ss -nlpH "( sport = :$port )" 2>/dev/null | \
grep -q -E "users:\\(.*\\(\"($utils)[^[:space:]]*\"[^)]*,pid=$pid(,[^)]*)?\\)" && rc=0
socket_utility="$(commandex ss)"
if [ -n "$socket_utility" ]; then
@@ -1236,23 +1247,30 @@ check_sockets_utils()
sockstat_opts='-46lq -P tcp -p'
fi
else
- socket_utility="$(commandex lsof)"
+ socket_utility="$(commandex fstat)"
if [ -n "$socket_utility" ]; then
- socket_uname='lsof'
- lsof_available=1
- lsof_opts='-Pnl'
- # Let's check that lsof has an option to bypass blocking:
- if $socket_utility -h 2>&1 | grep -qw -F -- '-b'; then
- lsof_available=2
- lsof_opts="$lsof_opts -b -w"
+ socket_uname='fstat'
+ fstat_available=1
+ fstat_opts='-n'
+ else
+ socket_utility="$(commandex lsof)"
+ if [ -n "$socket_utility" ]; then
+ socket_uname='lsof'
+ lsof_available=1
+ lsof_opts='-Pnl'
+ # Let's check that lsof has an option to bypass blocking:
+ if $socket_utility -h 2>&1 | grep -qw -F -- '-b'; then
+ lsof_available=2
+ lsof_opts="$lsof_opts -b -w"
+ else
+ lsof_opts="$lsof_opts -S 10"
+ fi
else
- lsof_opts="$lsof_opts -S 10"
+ wsrep_log_error "Neither lsof, nor sockstat, nor ss, nor fstat tool" \
+ "were found in the path. Make sure you have" \
+ "at least one of them installed."
+ exit 2 # ENOENT
fi
- else
- wsrep_log_error "Neither lsof, nor sockstat, nor ss tool" \
- "were found in the path. Make sure you have" \
- "at least one of them installed."
- exit 2 # ENOENT
fi
fi
fi
@@ -1302,6 +1320,8 @@ check_port()
$socket_utility $sockstat_opts "$port" 2>/dev/null | \
grep -q -E "^[^[:space:]]+[[:space:]]+($utils)[^[:space:]]*[[:space:]]+$pid([[:space:]].+)?[[:space:]]LISTEN([[:space:]]|\$)" && rc=0
fi
+ elif [ $fstat_available -ne 0 ]; then
+ fstat -n 2>/dev/null | grep -q -E ".*$pid.*:$port\$" && rc=0
else
wsrep_log_error "Unknown sockets utility"
exit 2 # ENOENT
+ $socket_utility $fstat_opts 2>/dev/null | grep -q -E ".*$pid.*:$port\$" && rc=0
elif [ $lsof_available -ne 0 ]; then
$socket_utility $lsof_opts -i ":$port" 2>/dev/null | \
grep -q -E "^($utils)[^[:space:]]*[[:space:]]+$pid([[:space:]].+)?[[:space:]]\\(LISTEN\\)([[:space:]]|\$)" && rc=0