Created attachment 194968 [details]
Attached is my patch to make wsrep_sst_mariabackup run on FreeBSD.
There are two main problems with the original one.
1. FreeBSD does not have 'ss' command
2. FreBSD 'find' command use a different syntax for regex
Are there any bashisms in that script?
Your patch would require adding runtime dependencies on both lsof and bash, which I'd rather not have.
I've submitted fixes to these scripts earlier. Can you please see if you can provide a similar fix as https://jira.mariadb.org/browse/MDEV-10432 ?
If you feel uncomfortable with upstreaming the fix, I can help when the patch is OK.
I don't like the dependencies either.
I would prefer sockstat to lsof.
Also, mariadb is moving alway wsrep_sst_mariabackup. They've accepted some of my other commits and merged them to wsrep_sst_xtrabackup-v2.sh
From my testing, none of the wsrep* scripts worked without hacking the script.
> #!/bin/sh -ue
which is no longer a bashism.
Created attachment 195112 [details]
Can you see if this works for you? Might be some rough edges...
Think the RC and RC[@] need refactoring, sh does not have PIPELINESTATUS or arrays.
Created attachment 195113 [details]
Now includes a fix for the PIPELINESTATUS Array that will surely throw errors in POSIX sh.
Mind you, this just reports an error on fail, not the part of the pipeline where it failed!
Please test and let me know.
Dang! Didn't know we have `timeout` on FreeBSD...