codership / galera

Synchronous multi-master replication library
GNU General Public License v2.0
447 stars 177 forks source link

wsrep_sst_mariabackup FreeBSD failure #600

Open bit0mike opened 3 years ago

bit0mike commented 3 years ago

On FreeBSD 13.0, with MariaDB 10.5.11 and Galera 26.4.8 installed from ports, wsrep_sst_mariabackup fails because of a "mktemp -d --tmpdir=$tmpdir" call. --tmpdir is Linux specific and not supported on FreeBSD.

Here is a patch that works for me. Maybe it could be improved.

935,941c935
<             if [ "$OS" = 'FreeBSD' ]; then
<                TMPDIR=$tmpdir; export TMPDIR
<                xtmpdir="$(mktemp -d)"
<             else
<                xtmpdir=$(mktemp '-d' "--tmpdir=$tmpdir")
<             fi
---
>             xtmpdir=$(mktemp '-d' "--tmpdir=$tmpdir")