Do not use login shell for mysql user

This commit is contained in:
Honza Horák 2013-07-30 23:25:34 +02:00
parent 3318b49773
commit d9b4c2f8e2
2 changed files with 16 additions and 11 deletions

View File

@ -1,9 +1,9 @@
Improve the documentation that will be installed in the mysql-test RPM.
diff -up mariadb-5.5.28a/mysql-test/README.p3 mariadb-5.5.28a/mysql-test/README
--- mariadb-5.5.28a/mysql-test/README.p3 2012-12-17 16:18:20.824636407 +0100
+++ mariadb-5.5.28a/mysql-test/README 2012-12-17 16:21:21.598707120 +0100
@@ -1,15 +1,26 @@
diff -up mariadb-5.5.32/mysql-test/README.p3 mariadb-5.5.32/mysql-test/README
--- mariadb-5.5.32/mysql-test/README.p3 2013-07-17 16:51:29.000000000 +0200
+++ mariadb-5.5.32/mysql-test/README 2013-07-30 23:22:54.959494478 +0200
@@ -1,15 +1,28 @@
-This directory contains a test suite for the MySQL daemon. To run
-the currently existing test cases, simply execute ./mysql-test-run in
-this directory. It will fire up the newly built mysqld and test it.
@ -21,9 +21,11 @@ diff -up mariadb-5.5.28a/mysql-test/README.p3 mariadb-5.5.28a/mysql-test/README
+this directory.
+
+For use in Red Hat distributions, you should run the script as user mysql,
+so the best bet is something like
+ cd /usr/share/mysql-test
+ sudo -u mysql ./mysql-test-run --skip-test-list=rh-skipped-tests.list
+who is created with nologin shell however, so the best bet is something like
+ $ su -
+ # cd /usr/share/mysql-test
+ # su -s /bin/bash mysql -c "./mysql-test-run --skip-test-list=rh-skipped-tests.list"
+
+This will use the installed mysql executables, but will run a private copy
+of the server process (using data files within /usr/share/mysql-test),
+so you need not start the mysqld service beforehand.
@ -35,14 +37,14 @@ diff -up mariadb-5.5.28a/mysql-test/README.p3 mariadb-5.5.28a/mysql-test/README
+rh-skipped-tests.list.
+
+To clean up afterwards, remove the created "var" subdirectory, eg
+ sudo -u mysql rm -rf /usr/share/mysql-test/var
+ # su -s /bin/bash - mysql -c "rm -rf /usr/share/mysql-test/var"
+
+If one or more tests fail on your system, please read the following manual
+section for instructions on how to report the problem:
http://kb.askmonty.org/v/reporting-bugs
@@ -26,7 +37,8 @@ other relevant options.
@@ -26,7 +39,8 @@ other relevant options.
With no test cases named on the command line, mysql-test-run falls back
to the normal "non-extern" behavior. The reason for this is that some

View File

@ -3,7 +3,7 @@
Name: mariadb
Version: 5.5.32
Release: 6%{?dist}
Release: 7%{?dist}
Epoch: 1
Summary: A community developed branch of MySQL
@ -517,7 +517,7 @@ rm -rf ${RPM_BUILD_ROOT}%{_datadir}/mysql/solaris/
%pre server
/usr/sbin/groupadd -g 27 -o -r mysql >/dev/null 2>&1 || :
/usr/sbin/useradd -M -N -g mysql -o -r -d /var/lib/mysql -s /bin/bash \
/usr/sbin/useradd -M -N -g mysql -o -r -d /var/lib/mysql -s /sbin/nologin \
-c "MariaDB Server" -u 27 mysql >/dev/null 2>&1 || :
# Explicitly enable mysqld if it was enabled in the beggining
@ -752,6 +752,9 @@ fi
%{_mandir}/man1/mysql_client_test.1*
%changelog
* Wed Jul 31 2013 Honza Horak <hhorak@redhat.com> 5.5.32-7
- Do not use login shell for mysql user
* Tue Jul 30 2013 Honza Horak <hhorak@redhat.com> 5.5.32-6
- Remove unneeded systemd-sysv requires
- Provide mysql-compat-server symbol