Two /usr/libexec/ helper scripts for mariadb-server: * mariadb-check-socket * mariadb-prepare-db-dir contain the sourcing line: source ./mariadb-scripts-common I don't see how that can work as "source" normally relies on the PATH variable to find scripts being sourced. I would think you need the full pathname here, as in: source /usr/libexec/mariadb-scripts-common or something equivalent. If I make that fix, then things appear to work properly. And while I'm here, that "mariadb-scripts-common" script would probably look better if it was marked executable, but that't not critical.
Whoops, forgot to mention that /usr/libexec/mariadb-wait-ready has same issue.
hi guys, same issue here with an fully updated rawhide installation. the workaround mentioned by Robert is working fine.
Thanks for reporting, will fix asap.
Should be fixed now. I've used this: source "`dirname ${BASH_SOURCE[0]}`/mariadb-scripts-common" because I don't like hard-coded paths.
I'm curious ... how did this bug come to be? It seems so odd that one suspects there might be other instances of it in other packages. What is the standard way of doing this in other Red Hat packages?
(In reply to Robert P. J. Day from comment #5) > I'm curious ... how did this bug come to be? It seems so odd that one > suspects there might be other instances of it in other packages. What is the > standard way of doing this in other Red Hat packages? I may not follow you, since it's more about how this is done in Bash, I'd say. At least in case I don't want to use hard-coded full path, which would be more straightforward solution, but wouldn't work for SCL at least. Anyway, if I want to source some file from relative path in Bash (the same directory in this case), I need to use dirname ${BASH_SOURCE[0]} -- at least that's what I learnt from the source(1) man page: source filename [arguments] Read and execute commands from filename in the current shell environment and return the exit status of the last command executed from filename. If filename does not contain a slash, file names in PATH are used to find the directory containing filename. The file searched for in PATH need not be executable. When bash is not in posix mode, the current directory is searched if no file is found in PATH. If the sourcepath option to the shopt builtin command is turned off, the PATH is not searched. If any arguments are supplied, they become the positional parameters when filename is executed. Otherwise the positional parameters are unchanged. The return status is the status of the last command exited within the script (0 if no commands are executed), and false if filename is not found or cannot be read. Any more pretty ideas are welcome of course.