Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
10.6.18
-
None
Description
Most of the POSTIN script uses the datadir setting from the MariaDB configuration files, so this can be set to a different path before installing the MariaDB-server RPM.
At the end of the POSTIN script we have the /var/lib/mysql data directory path hardcoded though:
if [ -x /sbin/restorecon ] ; then
|
/sbin/restorecon -R /var/lib/mysql
|
fi
|
so with a changed datadir setting these log messages are issued:
/sbin/restorecon: lstat(/var/lib/mysql) failed: No such file or directory
|
warning: %post(MariaDB-server-10.6.18-1.el8.x86_64) scriptlet failed, exit status 255
|
 |
Error in POSTIN scriptlet in rpm package MariaDB-server
|
Not critical as the MariaDB-server package gets fully installed nonetheless, but it raises questions.
No harm done by not actually running restorecon on the non-standard datadir either, as our SElinux policies would only have context for the default datadir anyway.
Maybe we should just add a simple
if test -d /var/lib/mysql
|
condition to that last code block