mirror of
https://abf.rosa.ru/djam/mariadb.git
synced 2025-02-23 22:52:48 +00:00

This package in ROSA was maintained quite poorly, had only a few users and lacked such important features as running multiple instances of MySQL server (mysqld@.service) and scripts for automatic upgrade to newer versions. Also upstream has renamed libraries, now there is mysql-connector-c with devel parts. /srv/mysql is also rather strange, /var/lib/mysql is more common. Let's rebase to a well-maintained package from openSUSE. It is being done in a not released platform without any compatibility for smooth upgrades fromt he old package. The new one has a lower epoch, automatic upgrades won't be done. High epoch is not needed anymore: mysql-community has not been merged from abf.io/rosaserver to abf.io/import, and now the library in mariadb is called libmariadbclient, not libmysqlclient (but compatibility symlinks do exist), so there are no duplicated provides and so there is no need in a high epoch. This commits just imports from openSUSE's SRPM without any changes, the following one will adapt it for ROSA. It will allow to easily see the diff against the openSUSE's package to easify further syncs and contibuting back to SUSE (https://bugzilla.opensuse.org/show_bug.cgi?id=1182218)
37 lines
1.8 KiB
Diff
37 lines
1.8 KiB
Diff
Index: mariadb-10.4.12/scripts/mysql_install_db.sh
|
|
===================================================================
|
|
--- mariadb-10.4.12.orig/scripts/mysql_install_db.sh
|
|
+++ mariadb-10.4.12/scripts/mysql_install_db.sh
|
|
@@ -482,20 +482,22 @@ if test -n "$user"
|
|
then
|
|
if test -z "$srcdir" -a "$in_rpm" -eq 0
|
|
then
|
|
- chown 0 "$pamtooldir/auth_pam_tool_dir/auth_pam_tool" && \
|
|
- chmod 04755 "$pamtooldir/auth_pam_tool_dir/auth_pam_tool"
|
|
- if test $? -ne 0
|
|
+ tool_ownership=`stat -c "%U:%G" "$pamtooldir/auth_pam_tool_dir/auth_pam_tool"`
|
|
+ tool_mode=`stat -c "%a" "$pamtooldir/auth_pam_tool_dir/auth_pam_tool"`
|
|
+
|
|
+ if test "$tool_ownership" != "root:root" -o "$tool_mode" != "4755"
|
|
then
|
|
- echo "Couldn't set an owner to '$pamtooldir/auth_pam_tool_dir/auth_pam_tool'."
|
|
- echo "It must be root, the PAM authentication plugin doesn't work otherwise.."
|
|
+ echo "Permissions/ownership of the '$pamtooldir/auth_pam_tool_dir/auth_pam_tool' file are bad."
|
|
+ echo "It must be owned by root:root and have mode 4750."
|
|
echo
|
|
fi
|
|
- chown $user "$pamtooldir/auth_pam_tool_dir" && \
|
|
- chmod 0700 "$pamtooldir/auth_pam_tool_dir"
|
|
- if test $? -ne 0
|
|
+
|
|
+ dir_ownership=`stat -c "%U:%G" "$pamtooldir/auth_pam_tool_dir"`
|
|
+ dir_mode=`stat -c "%a" "$pamtooldir/auth_pam_tool_dir"`
|
|
+ if test "$dir_ownership" != "root:mysql" -o "$dir_mode" != "750"
|
|
then
|
|
- echo "Cannot change ownership of the '$pamtooldir/auth_pam_tool_dir' directory"
|
|
- echo "to the '$user' user. Check that you have the necessary permissions and try again."
|
|
+ echo "Permissions/ownership of the '$pamtooldir/auth_pam_tool_dir' directory are bad."
|
|
+ echo "It must be owned by root:mysql and have mode 0750, the PAM authentication plugin doesn't work otherwise.."
|
|
echo
|
|
fi
|
|
fi
|