Hello community, here is the log from the commit of package mariadb for openSUSE:Leap:15.2 checked in at 2020-03-06 12:35:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/mariadb (Old) and /work/SRC/openSUSE:Leap:15.2/.mariadb.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mariadb" Fri Mar 6 12:35:59 2020 rev:62 rq:779237 version:10.4.12 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/mariadb/mariadb.changes 2020-01-15 15:28:22.290675464 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.mariadb.new.26092/mariadb.changes 2020-03-06 12:36:06.442568642 +0100 @@ -1,0 +2,100 @@ +Fri Feb 21 14:21:22 UTC 2020 - Kristyna Streitova <[email protected]> + +- disable testing with rpm macros as it does not work as for 10.4, + needs to be investigated +- remove @VERSION@ from mariadb.service and [email protected] + +------------------------------------------------------------------- +Tue Feb 4 13:10:24 UTC 2020 - Kristyna Streitova <[email protected]> + +- update to 10.4.12 [jsc#SLE-8269] + * Changes & Improvements + https://mariadb.com/kb/en/changes-improvements-in-mariadb-104/ + https://mariadb.com/kb/en/changes-improvements-in-mariadb-103/ + * Fixes for the following security vulnerabilities: + CVE-2020-2574 + * don't let mysql_install_db set SUID bit for auth_pam_tool + in rpm/deb packages CVE-2020-7221 [bsc#1160868] +- pack pam_user_map.so module in the /%{_lib}/security directory + and user_map.conf configuration file in the /etc/security directory +- fix race condition with mysql_upgrade_info status file by moving + it to the location owned by root (/var/lib/misc) CVE-2019-18901 + [bsc#1160895] +- move .run-mysql_upgrade file from $datadir/.run-mysql_upgrade + to /var/lib/misc/.mariadb_run_upgrade so the mysql user can't + use it for a symlink attack [bsc#1160912] +- change -DWITH_COMMENT and -DCOMPILATION_COMMENT to be + SUSE/openSUSE independent +- enhance mariadb.service and [email protected] with various options + (Documentation=, User=, Group=, KillSignal=, SendSIGKILL=, + Restart=, RestartSec=, CapabilityBoundingSet=, ProtectSystem=, + ProtectHome=, PermissionsStartOnly= and UMask=) [bsc#1160878] +- mysql-systemd-helper: use systemd-tmpfiles instead of shell + script operations for a cleaner and safer creating of /run/mysql + [bsc#1160883] +- pack mariadb variants of the mysql binaries (e.g. mariadb-dumpslow + is a symlink to mysqldumpslow and the like) +- update suse_skipped_tests.list +- _constraints: increase physicalmemory value +- package auth_pam_tool setuid binary properly +- add cracklib-password-check subpackage but do not build it right + now (cracklib-dict-full >= 2.9.0 is not available yet) +- add rcmariadb compat link +- add mariadb-rpmlintrc file +- do not move my_safe_process to bindir but use rpmlint + arch-dependent-file-in-usr-share exception for it (this file + is used just for the testing and it doesn't have to be in bindir +- added rpm test macros: %mysql_testserver_start, + %mysql_testserver_cconf, %mysql_testserver_stop + First two consuments are python-sortinghat and python-mysqlclient. +- remove sql_mode from my.ini/my.cnf as NO_ENGINE_SUBSTITUTION and + STRICT_TRANS_TABLES are already set by default from version + 10.2.4 [bsc#1144314] +- add "BuildRequires: python3" as some tests and myrocks_hotbackup + script need python3. Make the PYTHON_SHEBANG value configurable + [bsc#1142909] +- add "Requires: python3-mysqlclient" that is needed by + myrocks_hotbackup script +- remove "innodb_file_format" option from my.ini (my.cnf) file that + was removed in MariaDB 10.3.1. Also remove "innodb_file_per_table=ON" + option that is by default ON and it's redundant now. +- Use FAT LTO objects in order to provide proper static library. +- refresh README.install and suse-test-run +- rename libmysqld subpackage (embedded library) to libmariadbd as + libmysqld.so was renamed to libmariadbd.so (MDEV-14953) +- simplify removing static libs (we don't need to have .static) +- add perl(Memoize) and perl(Symbol) to BuildRequires and Requires + that are needed for tests +- replace Requires pwdutils with shadow +- build RocksDB only for x86_64 as other platforms are not supported +- add the following patches + * add mariadb-10.2.19-link-and-enable-c++11-atomics.patch to link + against libatomic where necessary and use C++11 atomics instead + of gcc built-in atomics + * mariadb-10.4.12-harden_setuid.patch to harden auth_pam_tool + setuid-root binary [bsc#1160285] + * mariadb-10.4.12-fix-install-db.patch to improve default behaviour + of mysql_install_db. This prevents performing security sensitive + actions to be performed but instead only warns the caller + (bsc#1160868) +- refresh mariadb-10.2.4-fortify-and-O.patch +- remove the following patches: + * mysql-community-server-5.1.45-multi-configuration.patch as + we have the same configuration in /etc/my.cnf and it doesn't make + any sense to keep it twice. Moreover the patched file + support-files/my-medium.cnf.sh was removed in upstream + * mariadb-5.5.28-install_db-quiet.patch and add "--rpm" + option to the mysql_install_db script that does basically the same + [bsc#1080891] + * mariadb-5.2.3-cnf.patch as all patched files were removed + upstream + * remove mariadb-10.1.12-deharcode-libdir.patch because it's not + needed - we don't build libmariadb library in mariadb package + anymore so we don't need to take care about LIBDIR and PLUGINDIR + here. Moreover we shouldn't (and we don't) touch *_RPM + variables as they are internal) [bsc#1080891] + * mariadb-10.2.9-galera_cnf.patch as it's not clear what the + correct path to galera wsrep provider is while users can use + galera 3, galera 4 or galera compiled on their own + +------------------------------------------------------------------- Old: ---- mariadb-10.1.12-deharcode-libdir.patch mariadb-10.2.29.tar.gz mariadb-10.2.29.tar.gz.sig mariadb-10.2.9-galera_cnf.patch mariadb-5.2.3-cnf.patch mariadb-5.5.28-install_db-quiet.patch mysql-community-server-5.1.45-multi-configuration.patch New: ---- macros.mariadb-test mariadb-10.2.19-link-and-enable-c++11-atomics.patch mariadb-10.4.12-fix-install-db.patch mariadb-10.4.12-harden_setuid.patch mariadb-10.4.12.tar.gz mariadb-10.4.12.tar.gz.sig mariadb-rpmlintrc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mariadb.spec ++++++ ++++ 637 lines (skipped) ++++ between /work/SRC/openSUSE:Leap:15.2/mariadb/mariadb.spec ++++ and /work/SRC/openSUSE:Leap:15.2/.mariadb.new.26092/mariadb.spec ++++++ README.install ++++++ --- /var/tmp/diff_new_pack.6nJsAl/_old 2020-03-06 12:36:08.074569634 +0100 +++ /var/tmp/diff_new_pack.6nJsAl/_new 2020-03-06 12:36:08.074569634 +0100 @@ -1,12 +1,14 @@ -You just installed MySQL server for the first time. +You have just installed MariaDB server for the first time. -You can start it using: +You can start it via: + systemctl start mariadb +or rcmysql start -During first start empty database will be created for your automatically. +During the first start, empty database will be created for you automatically. -PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER ! -To do so, start the server, then issue the following commands: +PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER! +To do so, start the server and run the following commands: '/usr/bin/mysqladmin' -u root password 'new-password' '/usr/bin/mysqladmin' -u root -h <hostname> password 'new-password' ++++++ _constraints ++++++ --- /var/tmp/diff_new_pack.6nJsAl/_old 2020-03-06 12:36:08.130569668 +0100 +++ /var/tmp/diff_new_pack.6nJsAl/_new 2020-03-06 12:36:08.130569668 +0100 @@ -7,8 +7,11 @@ </conditions> <hardware> <physicalmemory> - <size unit="M">7000</size> + <size unit="G">10</size> </physicalmemory> + <memory> + <size unit="G">10</size> + </memory> </hardware> </overwrite> @@ -18,6 +21,9 @@ <disk> <size unit="G">13</size> </disk> + <memory> + <size unit="G">8</size> + </memory> </hardware> </overwrite> </constraints> ++++++ macros.mariadb-test ++++++ %__mysql_test_run_dir /tmp/mysql %__mysql_test_user abuild %__mysql_test_pass abuildpw %__mysql_test_cconf abuild-myclient.cnf %__mysql_test_port 63306 # # macro: mysql_testserver_start -- start a test mysqld instance # # usage: %mysql_test_start -u <user> -p <password> -t <port> # %mysql_testserver_start(u:p:t:) \ exit 0 \ TEST_RUN_DIR=%{__mysql_test_run_dir} \ TEST_USER="%{-u:%{-u*}}" \ if [ -z "$TEST_USER" ]; then \ TEST_USER='%{__mysql_test_user}' \ fi \ TEST_PASS="%{-p:%{-p*}}" \ if [ -z "$TEST_PASS" ]; then \ TEST_PASS='%{__mysql_test_pass}' \ fi \ TEST_PORT="%{-t:%{-t*}}" \ if [ -z "$TEST_PORT" ]; then \ TEST_PORT='%{__mysql_test_port}' \ fi \ \ [ -d $TEST_RUN_DIR ] && rm -r $TEST_RUN_DIR \ mkdir -p $TEST_RUN_DIR/datadir{,-private} \ \ cat << EOF > $TEST_RUN_DIR/my.cnf \ [client] \ socket = $TEST_RUN_DIR/mysql.sock \ port = $TEST_PORT \ [mysqld] \ user = $TEST_USER \ log-error = $TEST_RUN_DIR/mysqld.log \ secure_file_priv = $TEST_RUN_DIR/datadir-private \ datadir = $TEST_RUN_DIR/datadir \ server-id = 1 \ socket = $TEST_RUN_DIR/mysql.sock \ port = $TEST_PORT \ sql_mode = '' \ EOF\ \ echo '>>> Initializing databases' \ mysql_install_db --defaults-file=$TEST_RUN_DIR/my.cnf \ \ echo '>>> Invoking mysqld' \ /usr/sbin/mysqld --defaults-file=$TEST_RUN_DIR/my.cnf& \ sleep 2 \ \ echo '>>> Creating authentication database' \ mysqladmin --defaults-file=$TEST_RUN_DIR/my.cnf --user root password 'roots_secret' \ mysqladmin --defaults-file=$TEST_RUN_DIR/my.cnf --user root --password='roots_secret' create testhat \ mysql --defaults-file=$TEST_RUN_DIR/my.cnf --user root --password='roots_secret' -e "CREATE USER '$TEST_USER'@'localhost' IDENTIFIED BY '$TEST_PASS'" \ mysql --defaults-file=$TEST_RUN_DIR/my.cnf --user root --password='roots_secret' -e "GRANT ALL PRIVILEGES ON * . * TO '$TEST_USER'@'localhost'" \ mysql --defaults-file=$TEST_RUN_DIR/my.cnf --user root --password='roots_secret' -e "FLUSH PRIVILEGES" \ %nil # # macro mysql_testserver_cconf -- generate client access conf # %mysql_testserver_cconf(n:t:) \ TEST_RUN_DIR=%{__mysql_test_run_dir} \ TEST_CCONF="%{-n:%{-n*}}" \ if [ -z "$TEST_CCONF" ]; then \ TEST_CCONF='%{__mysql_test_cconf}' \ fi \ TEST_PORT="%{-t:%{-t*}}" \ if [ -z "$TEST_PORT" ]; then \ TEST_PORT='%{__mysql_test_port}' \ fi \ cat << EOF > $TEST_CCONF \ [client] \ user = abuild \ password = abuildpw \ database = test \ socket = $TEST_RUN_DIR/mysql.sock \ port = $TEST_PORT \ EOF\ %nil # # macro: mysql_testserver_stop -- start a test mysqld instance # # usage: %mysql_test_stop # %mysql_testserver_stop() \ TEST_RUN_DIR=%{__mysql_test_run_dir} \ echo '>>> Shutting the mysql server down' \ cat << EOF > $TEST_RUN_DIR/shutdown.sql \ SHUTDOWN; \ EOF\ mysql --defaults-file=$TEST_RUN_DIR/my.cnf --user root --password='roots_secret' < $TEST_RUN_DIR/shutdown.sql \ %nil ++++++ mariadb-10.2.19-link-and-enable-c++11-atomics.patch ++++++ Author: Vicențiu Ciorbaru <[email protected]> Date: Fri Dec 21 19:14:04 2018 +0200 Link with libatomic to enable C11 atomics support Some architectures (mips) require libatomic to support proper atomic operations. Check first if support is available without linking, otherwise use the library. --- a/configure.cmake +++ b/configure.cmake @@ -926,7 +926,25 @@ int main() long long int *ptr= &var; return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST); }" -HAVE_GCC_C11_ATOMICS) +HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC) +IF (HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC) + SET(HAVE_GCC_C11_ATOMICS True) +ELSE() + SET(OLD_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}) + LIST(APPEND CMAKE_REQUIRED_LIBRARIES "atomic") + CHECK_CXX_SOURCE_COMPILES(" + int main() + { + long long int var= 1; + long long int *ptr= &var; + return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST); + }" + HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) + IF(HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) + SET(HAVE_GCC_C11_ATOMICS True) + ENDIF() + SET(CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQUIRED_LIBRARIES}) +ENDIF() IF(WITH_VALGRIND) SET(HAVE_valgrind 1) --- a/mysys/CMakeLists.txt +++ b/mysys/CMakeLists.txt @@ -78,6 +78,10 @@ TARGET_LINK_LIBRARIES(mysys dbug strings ${LIBNSL} ${LIBM} ${LIBRT} ${LIBDL} ${LIBSOCKET} ${LIBEXECINFO} ${CRC32_LIBRARY}) DTRACE_INSTRUMENT(mysys) +IF (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) + TARGET_LINK_LIBRARIES(mysys atomic) +ENDIF() + IF(HAVE_BFD_H) TARGET_LINK_LIBRARIES(mysys bfd) ENDIF(HAVE_BFD_H) --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -178,6 +178,10 @@ ELSE() SET(MYSQLD_SOURCE main.cc ${DTRACE_PROBES_ALL}) ENDIF() +IF (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) + TARGET_LINK_LIBRARIES(sql atomic) +ENDIF() + IF(MSVC AND NOT WITHOUT_DYNAMIC_PLUGINS) ++++++ mariadb-10.2.4-fortify-and-O.patch ++++++ --- /var/tmp/diff_new_pack.6nJsAl/_old 2020-03-06 12:36:08.298569770 +0100 +++ /var/tmp/diff_new_pack.6nJsAl/_new 2020-03-06 12:36:08.298569770 +0100 @@ -9,14 +9,14 @@ =================================================================== --- CMakeLists.txt.orig +++ CMakeLists.txt -@@ -224,7 +224,6 @@ IF(SECURITY_HARDENED) +@@ -238,7 +238,6 @@ IF(SECURITY_HARDENED AND NOT WITH_ASAN A MY_CHECK_AND_SET_COMPILER_FLAG("-pie -fPIC") MY_CHECK_AND_SET_COMPILER_FLAG("-Wl,-z,relro,-z,now") MY_CHECK_AND_SET_COMPILER_FLAG("-fstack-protector --param=ssp-buffer-size=4") - MY_CHECK_AND_SET_COMPILER_FLAG("-D_FORTIFY_SOURCE=2" RELEASE RELWITHDEBINFO) ENDIF() - # Always enable debug sync for debug builds. + INCLUDE(wsrep) Index: storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake =================================================================== --- storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake.orig @@ -33,7 +33,7 @@ ) endif () -@@ -111,23 +109,23 @@ set_cflags_if_supported( +@@ -102,23 +100,23 @@ set_cflags_if_supported( set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions") ## set extra debugging flags and preprocessor definitions @@ -65,7 +65,7 @@ else () if (APPLE) set(FLTO_OPTS "-fwhole-program") -@@ -135,10 +133,10 @@ else () +@@ -126,10 +124,10 @@ else () set(FLTO_OPTS "-fuse-linker-plugin") endif() # we overwrite this because the default passes -DNDEBUG and we don't want that ++++++ mariadb-10.4.12-fix-install-db.patch ++++++ 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 ++++++ mariadb-10.4.12-harden_setuid.patch ++++++ SUSE specific patch that hardens the auth_pam_tool setuid-root binary. Matthias Gerstner wants it as a prerequisite for allowing auth_pam_tool setuid-root binary in [bsc#1160285]. Index: mariadb-10.4.12/plugin/auth_pam/auth_pam_base.c =================================================================== --- mariadb-10.4.12.orig/plugin/auth_pam/auth_pam_base.c +++ mariadb-10.4.12/plugin/auth_pam/auth_pam_base.c @@ -149,6 +149,12 @@ static int pam_auth_base(struct param *p const char *service = info->auth_string && info->auth_string[0] ? info->auth_string : "mysql"; + if( strcmp(service, "mysql") != 0 ) + { + PAM_DEBUG((stderr, "PAM: rejecting non-standard PAM service %s\n", service)); + return CR_ERROR; + } + param->ptr = param->buf + 1; PAM_DEBUG((stderr, "PAM: pam_start(%s, %s)\n", service, info->user_name)); ++++++ mariadb-10.2.29.tar.gz -> mariadb-10.4.12.tar.gz ++++++ /work/SRC/openSUSE:Leap:15.2/mariadb/mariadb-10.2.29.tar.gz /work/SRC/openSUSE:Leap:15.2/.mariadb.new.26092/mariadb-10.4.12.tar.gz differ: char 5, line 1 ++++++ mariadb-rpmlintrc ++++++ # This file contains a list of exceptions for rpmlint checker # Zero-length # Some test results can be zero-length files addFilter(r'(zero-length|pem-certificate) /usr/share/mysql-test/*') # Permissions # wsrep_sst_common # It contains a parser of arguments for other sst scripts. # It is meant to be sourced, not to be executed alone. # So it correctly does not have shebang nor executable bit. addFilter(r'non-executable-in-bin /usr/bin/wsrep_sst_common 644') addFilter(r'script-without-shebang /usr/bin/wsrep_sst_common') # Wrong location # wsrep_check_version is a wsrep version check utility. Used in testing only. addFilter(r'arch-dependent-file-in-usr-share .* /usr/share/mysql-test/lib/My/SafeProcess/wsrep_check_version') # my_safe_process is an utility that encapsulates process creation, monitoring and cleanup. Used in testing only. addFilter(r'arch-dependent-file-in-usr-share .* /usr/share/mysql-test/lib/My/SafeProcess/my_safe_process') # pam_mariadb_mtr.so is a pam module to test pam authentication plugin. Used in pam.test only. addFilter(r'arch-dependent-file-in-usr-share .* /usr/share/mysql-test/suite/plugins/pam/pam_mariadb_mtr.so') ++++++ mariadb.service ++++++ --- /var/tmp/diff_new_pack.6nJsAl/_old 2020-03-06 12:36:08.370569814 +0100 +++ /var/tmp/diff_new_pack.6nJsAl/_new 2020-03-06 12:36:08.374569816 +0100 @@ -20,21 +20,53 @@ # EOF [Unit] -Description=MySQL server +Description=MariaDB database server +Documentation=man:mysqld(8) +Documentation=https://mariadb.com/kb/en/library/systemd/ Wants=basic.target Conflicts=mariadb.target After=basic.target network.target +[Install] +WantedBy=multi-user.target +Alias=mysql.service + [Service] -Restart=on-abort -Type=notify ExecStartPre=/usr/lib/mysql/mysql-systemd-helper install ExecStartPre=/usr/lib/mysql/mysql-systemd-helper upgrade ExecStart=/usr/lib/mysql/mysql-systemd-helper start +Type=notify +User=mysql +Group=mysql + +KillSignal=SIGTERM + +# Don't want to see an automated SIGKILL ever +SendSIGKILL=no + +# Restart crashed server only, on-failure would also restart, for example, when +# my.cnf contains unknown option +Restart=on-abort +RestartSec=5s + # Configures the time to wait for start-up/stop TimeoutSec=300 -[Install] -WantedBy=multi-user.target -Alias=mysql.service +# CAP_IPC_LOCK To allow memlock to be used as non-root user +# CAP_DAC_OVERRIDE To allow auth_pam_tool (which is SUID root) to read /etc/shadow when it's chmod 0 +# does nothing for non-root, not needed if /etc/shadow is u+r +# CAP_AUDIT_WRITE auth_pam_tool needs it on Debian for whatever reason +CapabilityBoundingSet=CAP_IPC_LOCK CAP_DAC_OVERRIDE CAP_AUDIT_WRITE + +# Prevent writes to /usr, /boot, and /etc +ProtectSystem=full + +# Prevent accessing /home, /root and /run/user +ProtectHome=true + +# Execute pre and post scripts as root, otherwise it does it as User= +PermissionsStartOnly=true + +UMask=007 + ++++++ [email protected] ++++++ --- /var/tmp/diff_new_pack.6nJsAl/_old 2020-03-06 12:36:08.398569831 +0100 +++ /var/tmp/diff_new_pack.6nJsAl/_new 2020-03-06 12:36:08.398569831 +0100 @@ -20,21 +20,53 @@ # EOF [Unit] -Description=MySQL server - %I instance +Description=MariaDB database server - %I instance +Documentation=man:mysqld(8) +Documentation=https://mariadb.com/kb/en/library/systemd/ Wants=basic.target PartOf=mariadb.target After=basic.target network.target +[Install] +WantedBy=multi-user.target +Alias=mysql.service + [Service] -Restart=on-abort -Type=notify ExecStartPre=/usr/lib/mysql/mysql-systemd-helper install %i ExecStartPre=/usr/lib/mysql/mysql-systemd-helper upgrade %i ExecStart=/usr/lib/mysql/mysql-systemd-helper start %i +Type=notify +User=mysql +Group=mysql + +KillSignal=SIGTERM + +# Don't want to see an automated SIGKILL ever +SendSIGKILL=no + +# Restart crashed server only, on-failure would also restart, for example, when +# my.cnf contains unknown option +Restart=on-abort +RestartSec=5s + # Configures the time to wait for start-up/stop TimeoutSec=300 -[Install] -WantedBy=multi-user.target -Alias=mysql.service +# CAP_IPC_LOCK To allow memlock to be used as non-root user +# CAP_DAC_OVERRIDE To allow auth_pam_tool (which is SUID root) to read /etc/shadow when it's chmod 0 +# does nothing for non-root, not needed if /etc/shadow is u+r +# CAP_AUDIT_WRITE auth_pam_tool needs it on Debian for whatever reason +CapabilityBoundingSet=CAP_IPC_LOCK CAP_DAC_OVERRIDE CAP_AUDIT_WRITE + +# Prevent writes to /usr, /boot, and /etc +ProtectSystem=full + +# Prevent accessing /home, /root and /run/user +ProtectHome=true + +# Execute pre and post scripts as root, otherwise it does it as User= +PermissionsStartOnly=true + +UMask=007 + ++++++ my.ini ++++++ --- /var/tmp/diff_new_pack.6nJsAl/_old 2020-03-06 12:36:08.418569843 +0100 +++ /var/tmp/diff_new_pack.6nJsAl/_new 2020-03-06 12:36:08.418569843 +0100 @@ -30,12 +30,6 @@ # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. # innodb_buffer_pool_size = 128M -# Using newer file format that supports dynamic and compressed row formats. -# If you are using replication you have to make sure, that these options are -# set everywhere the same way (probably comment them out is the easiest way) -innodb_file_format=Barracuda -innodb_file_per_table=ON - # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. # log_bin=mysql-bin @@ -65,8 +59,6 @@ # ssl-cert=/etc/mysql/ssl/server-cert.pem # ssl-key=/etc/mysql/ssl/server-key.pem -sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES - [mysqld_multi] mysqld = /usr/bin/mysqld_safe mysqladmin = /usr/bin/mysqladmin ++++++ mysql-systemd-helper ++++++ --- /var/tmp/diff_new_pack.6nJsAl/_old 2020-03-06 12:36:08.426569848 +0100 +++ /var/tmp/diff_new_pack.6nJsAl/_new 2020-03-06 12:36:08.426569848 +0100 @@ -10,6 +10,9 @@ MYSQLVER="$(echo @MYSQLVER@ | sed 's|\.[0-9]\+$||')" mysql_daemon_user=mysql mysql_daemon_group=mysql + # status information directory (e.g. info about a necessity of upgrade, current version etc) + mariadb_status_dir="/var/lib/misc" + if [[ -z "$INSTANCE" ]]; then datadir=/var/lib/mysql socket="/run/mysql/mysql.sock" @@ -52,10 +55,9 @@ mysql_install() { if [[ ! -d "$datadir/mysql" ]]; then echo "Creating MySQL privilege database... " - mysql_install_db --user="$mysql_daemon_user" --datadir="$datadir" || \ - die "Creation of MySQL databse in $datadir failed" - echo -n "$MYSQLVER" > "$datadir"/mysql_upgrade_info - chmod 640 "$datadir/mysql_upgrade_info" + mysql_install_db --rpm --user="$mysql_daemon_user" --datadir="$datadir" || \ + die "Creation of MySQL database in $datadir failed" + echo -n "$MYSQLVER" > "$mariadb_status_dir"/mariadb_upgrade_info fi } @@ -63,7 +65,7 @@ mysql_upgrade() { # Run mysql_upgrade on every package install/upgrade. Not always # necessary, but doesn't do any harm. - if [[ -f "$datadir/.run-mysql_upgrade" ]]; then + if [[ -f "$mariadb_status_dir/.mariadb_run_upgrade" ]]; then echo "Checking MySQL configuration for obsolete options..." sed -i -e 's|^\([[:blank:]]*\)skip-locking|\1skip-external-locking|' \ -e 's|^\([[:blank:]]*skip-federated\)|#\1|' /etc/my.cnf @@ -116,10 +118,9 @@ if /usr/bin/mysql_upgrade --no-defaults --force --socket="$protected/mysql.sock"; then echo "Everything upgraded successfully" up_ok="" - rm -f "$datadir/.run-mysql_upgrade" - [[ $(grep -q "^$MYSQLVER" "$datadir/mysql_upgrade_info" 2> /dev/null) ]] || \ - echo -n "$MYSQLVER" > "$datadir/mysql_upgrade_info" - chmod 640 "$datadir/mysql_upgrade_info" + rm -f "$mariadb_status_dir/.mariadb_run_upgrade" + [[ $(grep -q "^$MYSQLVER" "$mariadb_status_dir/mariadb_upgrade_info" 2> /dev/null) ]] || \ + echo -n "$MYSQLVER" > "$mariadb_status_dir/mariadb_upgrade_info" else echo "Upgrade failed" up_ok="false" @@ -178,10 +179,8 @@ INSTANCE="$2" read_config -mkdir -p /run/mysql -# fix permissions for /run/mysql (bsc#1038740) -chmod 755 /run/mysql -chown --no-dereference "$mysql_daemon_user:$mysql_daemon_group" /run/mysql +# Make sure that /run/mysql is created and has correct permissions (bsc#1038740) +systemd-tmpfiles --create /usr/lib/tmpfiles.d/mariadb.conf case "$1" in install) mysql_install ;; ++++++ mysql.SuSEfirewall2 ++++++ --- /var/tmp/diff_new_pack.6nJsAl/_old 2020-03-06 12:36:08.442569857 +0100 +++ /var/tmp/diff_new_pack.6nJsAl/_new 2020-03-06 12:36:08.442569857 +0100 @@ -4,3 +4,4 @@ # space separated list of allowed TCP ports TCP="3306" + ++++++ suse-test-run ++++++ --- /var/tmp/diff_new_pack.6nJsAl/_old 2020-03-06 12:36:08.450569862 +0100 +++ /var/tmp/diff_new_pack.6nJsAl/_new 2020-03-06 12:36:08.450569862 +0100 @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# Test the SUSE mysql package using the MySQL testsuite +# Test the SUSE mariadb package using the mysql-test framework my $id = getpwnam("mysql") or die "can't find user \"mysql\": $!"; my $dir = "/usr/share/mysql-test/"; ++++++ suse_skipped_tests.list ++++++ --- /var/tmp/diff_new_pack.6nJsAl/_old 2020-03-06 12:36:08.470569875 +0100 +++ /var/tmp/diff_new_pack.6nJsAl/_new 2020-03-06 12:36:08.470569875 +0100 @@ -2,8 +2,7 @@ # The SSL tests that are failing correctly main.ssl_7937 : bsc#937835, MDEV-8404 -main.ssl_crl_clients : bsc#937835, MDEV-8404 -main.ssl_cert_verify : bsc#937835, MDEV-8404 +main.ssl_crl : bsc#937835, MDEV-8404 main.ssl_8k_key : bsc#937835, MDEV-8404 # Main and perfschema tests @@ -12,70 +11,41 @@ perfschema.socket_summary_by_event_name_func : bsc#937836, MDEV-8446 perfschema.socket_summary_by_instance_func : bsc#937836, MDEV-8446 -# It's not a critical test. The problem is that it's not easy to -# unify the correct number of the repetition in the test for all -# various platforms (fails for s390x) -main.func_regexp_pcre : bsc#1058722 comment 11 - # Failing because of "Self Signed Certificate in the Certificate Chain" perfschema.cnf_option : all rpl.rpl_row_img_blobs : all MDEV-13875 rpl.rpl_row_img_eng_min : all MDEV-13875 rpl.rpl_row_img_eng_noblob : all MDEV-13875 -#---------------------------------------------------------------- +# The tests of plugins we don't build +main.plugin_auth : since 10.4.10 - all, we don't build mysql_clear_password plugin +plugins.auth_ed25519 : since 10.4.10 - all, we don't build client_ed25519 plugin +plugins.multiauth : since 10.4.10 - all, we don't build client_ed25519 plugin +unit.ed25519 : since 10.4.12 - ppc, we don't build client_ed25519 plugin -# Failing with OpenSSL 1.1.1. -main.ssl_cipher : MDEV-17184 -main.openssl_6975 : MDEV-17184 -main.ssl : MDEV-17184 +#---------------------------------------------------------------- # Needs to be investigated (issues trackers will be added) -sys_vars.slave_parallel_threads_basic : all -main.mysqldump : all MDEV-14800 -unit.lf : all -unit.my_atomic : all -main.gis_notembedded : all (fails when latin1 is not set) - -mariabackup.huge_lsn : x86_64 MDEV-15662 -rocksdb.deadlock : x86_64 - -# all rocksdb tests are currently considered unstable -rocksdb.2pc_group_commit : aarch64, ppc64le, x86_64, armv7l -rocksdb.read_only_tx : aarch64, ppc64le, x86_64, armv7l -rocksdb.shutdown : aarch64, ppc64le, x86_64, armv7l -rocksdb.index_merge_rocksdb : aarch64, ppc64le, x86_64, armv7l - -main.ps : ppc64le -main.type_ranges : ppc64le -main.select : ppc64le -main.select_jcl6 : ppc64le -main.derived_cond_pushdown : ppc64le -main.select_pkeycache : ppc64le -main.sp : ppc64le -main.type_float : ppc64le -main.type_newdecimal : ppc64le -rocksdb.type_float : ppc64le -rocksdb.col_opt_not_null : ppc64le -rocksdb.col_opt_null : ppc64le -rocksdb.col_opt_unsigned : ppc64le -innodb.temporary_table_optimization : ppc64le - -rocksdb.bulk_load_errors : armv7l -encryption.innodb-encryption-alter : armv7l MDEV-13566 -plugins.processlist : armv7l MDEV-16574 -rocksdb.add_index_inplace : armv7l -rocksdb.bulk_load_unsorted : armv7l -rocksdb.bulk_load_unsorted_rev : armv7l -rocksdb.commit_in_the_middle_ddl : armv7l -rocksdb.concurrent_alter : armv7l -rocksdb.drop_index_inplace : armv7l MDEV-14162 -rocksdb.rocksdb : armv7l -rocksdb_sys_vars.rocksdb_merge_buf_size_basic : armv7l -rocksdb_sys_vars.rocksdb_merge_combine_read_size_basic : armv7l -rocksdb_sys_vars.rocksdb_merge_tmp_file_removal_delay_ms_basic : armv7l -rocksdb.unique_sec : armv7l - -unit.conc_connection : aarch64 - -sys_vars.innodb_ft_result_cache_limit_32 : s390 +sys_vars.slave_parallel_threads_basic : since 10.3.16 - x86_64, i386, s390x, armv7l, aarch64, ppc64, ppc64le +main.gis_notembedded : since 10.3.16 - x86_64, i386, s390x, armv7l, aarch64, ppc64, ppc64le +versioning.partition : since 10.3.16 - armv7l +innodb.innodb-page_compression_lzma : since 10.3.20 - armv7l +sys_vars.sysvars_wsrep : since 10.4.12 - ppc +rpl.rpl_ip_mix : since 10.4.10 - all +rpl.rpl_ip_mix2 : since 10.4.10 - all +rpl.rpl_ipv4_as_ipv6 : since 10.4.10 - all +rpl.rpl_ipv6 : since 10.4.10 - all +perfschema.socket_instances_func : since 10.4.10 - all +main.ipv4_and_ipv6 : since 10.4.10 - all +main.ipv4_as_ipv6 : since 10.4.10 - all +main.ipv6 : since 10.4.10 - all +main.information_schema : since 10.4.10 - all +main.system_mysql_db : since 10.4.10 - all +main.gis_notembedded : since 10.4.10 - all +funcs_1.is_columns_mysql : since 10.4.10 - all +sys_vars.tcp_nodelay : since 10.4.10 - all +binlog_encryption.rpl_cant_read_event_incident : since 10.4.12 - s390x +encryption.innodb-page_encryption_compression : since 10.4.12 - s390x +encryption.innodb-bad-key-change : since 10.4.12 - s390x +rpl.rpl_report_port : since 10.4.12 - s390x +rpl.rpl_reset_slave_fail : since 10.4.12 - s390x
