Hello community, here is the log from the commit of package mariadb for openSUSE:Factory checked in at 2018-01-13 21:34:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mariadb (Old) and /work/SRC/openSUSE:Factory/.mariadb.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mariadb" Sat Jan 13 21:34:26 2018 rev:64 rq:563277 version:10.2.12 Changes: -------- --- /work/SRC/openSUSE:Factory/mariadb/mariadb.changes 2018-01-02 16:32:27.031239869 +0100 +++ /work/SRC/openSUSE:Factory/.mariadb.new/mariadb.changes 2018-01-13 21:34:29.462876288 +0100 @@ -1,0 +2,60 @@ +Fri Jan 5 12:23:20 UTC 2018 - [email protected] + +- update to 10.2.12 GA + * release notes and changelog: + https://mariadb.com/kb/en/library/mariadb-10212-release-notes/ + https://mariadb.com/kb/en/library/mariadb-10212-changelog/ +- remove mysql-community-server-5.5.6-safe-process-in-bin.patch + becuase this moving is done in the specfile +- get rid of the archive with patches (remove mysql-patches.tar.xz + and series files), handle patches in the standard way + mysql-community-server-5.1.45-multi-configuration.patch + mariadb-10.2.4-logrotate.patch + mariadb-5.5.28-install_db-quiet.patch + mariadb-10.1.1-mysqld_multi-features.patch + mariadb-5.2.3-cnf.patch + mariadb-10.2.3-group.patch + mariadb-10.1.12-deharcode-libdir.patch + mariadb-10.0.15-logrotate-su.patch + mariadb-10.2.4-fortify-and-O.patch + mariadb-10.2.8-systemd-cmake.patch + mariadb-10.2.3-mysql_install_db-mariadb_dirs.patch + mariadb-10.2.9-galera_cnf.patch + mariadb-10.2.10-disable_openssl_compatibility_check.patch +- add comments to the section with removing unused files (based on + https://lists.launchpad.net/maria-developers/msg11028.html) +- put rm statements together +- install the new upstream systemd-tmpfiles configuration file + 'tmpfiles.conf' and rename it to 'mariadb.conf' in order to + follow the manual +- remove the new upstream systemd-sysusers configuration file as + we handle creating of mysql user in the specfile +- mysql.service: remove calling of the wait function and let + systemd to do this job. Switch from 'Type=simple' to + 'Type=notify' and add TimeoutSec=300 +- rename unit files from mysql to mariadb and add mysql alias for + the backward compatibility [bsc#1067443] + * mysql.service -> mariadb.service + * mysql.target -> mariadb.target + * [email protected] -> [email protected] +- remove configuration-tweaks.tar.xz and move configuration to + my.ini/my.cnf file (omit default_plugins.cnf as all + configuration here was commented out) +- add a numeric prefix for galera.cnf file in order to allow users + to speficy in which order the configs will be loaded within the + my.cnf.d directory [bsc#1055268] +- add 'bind-address = 127.0.0.1' as a default option to my.cnf file + for security reasons (disable MariaDB to listen for TCP/IP + connections by default) [bsc#1058374] +- update my.cnf file and add a section with SSL configuration + [bsc#1058374] + +------------------------------------------------------------------- +Tue Jan 2 14:04:21 UTC 2018 - [email protected] + +- switch from deprecated 'net-tools' to 'iproute2' for + mariadb-galera subpackage. This dependency switch is sufficient + for making wsrep_sst_rsync.sh script to use 'ip' instead of + 'ifconfig' command + +------------------------------------------------------------------- Old: ---- configuration-tweaks.tar.xz mariadb-10.2.11.tar.gz mariadb-10.2.11.tar.gz.sig mysql-patches.tar.xz mysql.service mysql.target [email protected] series New: ---- mariadb-10.0.15-logrotate-su.patch mariadb-10.1.1-mysqld_multi-features.patch mariadb-10.1.12-deharcode-libdir.patch mariadb-10.2.10-disable_openssl_compatibility_check.patch mariadb-10.2.12.tar.gz mariadb-10.2.12.tar.gz.sig mariadb-10.2.3-group.patch mariadb-10.2.3-mysql_install_db-mariadb_dirs.patch mariadb-10.2.4-fortify-and-O.patch mariadb-10.2.4-logrotate.patch mariadb-10.2.8-systemd-cmake.patch mariadb-10.2.9-galera_cnf.patch mariadb-5.2.3-cnf.patch mariadb-5.5.28-install_db-quiet.patch mariadb.service mariadb.target [email protected] mysql-community-server-5.1.45-multi-configuration.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mariadb.spec ++++++ --- /var/tmp/diff_new_pack.VeCaqG/_old 2018-01-13 21:34:31.986758125 +0100 +++ /var/tmp/diff_new_pack.VeCaqG/_new 2018-01-13 21:34:31.990757937 +0100 @@ -49,7 +49,7 @@ %define with_mroonga 0 %endif Name: mariadb -Version: 10.2.11 +Version: 10.2.12 Release: 0 Summary: Server part of MariaDB License: SUSE-GPL-2.0-with-FLOSS-exception @@ -62,15 +62,25 @@ Source5: suse-test-run Source6: mysql.SuSEfirewall2 Source7: README.install -Source9: mysql-patches.tar.xz -Source12: series -Source13: configuration-tweaks.tar.xz Source14: my.ini -Source15: mysql.service -Source16: mysql.target +Source15: mariadb.service +Source16: mariadb.target Source17: mysql-systemd-helper -Source18: [email protected] +Source18: [email protected] Source50: suse_skipped_tests.list +Patch0: mysql-community-server-5.1.45-multi-configuration.patch +Patch1: mariadb-10.2.4-logrotate.patch +Patch2: mariadb-5.5.28-install_db-quiet.patch +Patch3: mariadb-10.1.1-mysqld_multi-features.patch +Patch4: mariadb-5.2.3-cnf.patch +Patch5: mariadb-10.2.3-group.patch +Patch6: mariadb-10.1.12-deharcode-libdir.patch +Patch7: mariadb-10.0.15-logrotate-su.patch +Patch8: mariadb-10.2.4-fortify-and-O.patch +Patch9: mariadb-10.2.8-systemd-cmake.patch +Patch10: mariadb-10.2.3-mysql_install_db-mariadb_dirs.patch +Patch11: mariadb-10.2.9-galera_cnf.patch +Patch12: mariadb-10.2.10-disable_openssl_compatibility_check.patch BuildRequires: bison BuildRequires: cmake BuildRequires: dos2unix @@ -218,7 +228,7 @@ # galera-3 is not in openSUSE:Factory now #Requires: galera-3 >= 25.3.18 Requires: lsof -Requires: net-tools +Requires: iproute2 Requires: rsync Requires: socat Requires: xtrabackup @@ -315,12 +325,22 @@ applications with MariaDB. %prep -%setup -q -n mariadb-%{version} -D -a 9 -cp %{_sourcedir}/suse-test-run . +%setup -q +%patch0 -p0 +%patch1 -p0 +%patch2 -p0 +%patch3 -p0 +%patch4 -p0 +%patch5 -p0 +%patch6 -p0 +%patch7 -p0 +%patch8 -p0 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 -# Apply patches from series -mysql-patches/tools/quilt-setup.sh "%{SOURCE12}" -mysql-patches/tools/apply-series.sh "%{SOURCE12}" +cp %{_sourcedir}/suse-test-run . # Remove unneeded manpages ('make install' basically installs everything under # man/*) @@ -463,27 +483,23 @@ # INFO_SRC binary install -p -m 644 build/Docs/INFO_SRC %{buildroot}%{_libdir}/mysql/ -# Remove debug management for keys Mariadb 101+ -rm -f %{buildroot}%{_libdir}/mysql/plugin/debug_key_management.so - # Remove most static libs (FIXME: don't build them at all...) [ \! -f "%{buildroot}%{_libdir}/"libmysqld.a ] || mv "%{buildroot}%{_libdir}/"libmysqld.a "%{buildroot}%{_libdir}/"libmysqld.static rm -f %{buildroot}%{_libdir}/*.a [ \! -f "%{buildroot}%{_libdir}/"libmysqld.static ] || mv "%{buildroot}%{_libdir}/"libmysqld.static "%{buildroot}%{_libdir}/"libmysqld.a -# Remove mytop utility that is packaged separately -rm %{buildroot}%{_bindir}/mytop - -# Remove few configure/examples -rm -f %{buildroot}%{_datadir}/mysql/{binary-configure,errmsg-utf8.txt,magic,mysql-log-rotate,mysql*.server} +# Remove unused stuff +rm -f %{buildroot}%{_datadir}/mysql/{errmsg-utf8.txt,mysql-log-rotate} rm -f %{buildroot}%{_libdir}/mysql/plugin/daemon_example.ini - -# mysql-test includes my_safe_process executable that should be moved to /usr/bin -mv %{buildroot}%{_datadir}/mysql-test/lib/My/SafeProcess/my_safe_process %{buildroot}%{_bindir} -ln -s ../../../../../bin/my_safe_process %{buildroot}%{_datadir}/mysql-test/lib/My/SafeProcess/my_safe_process - -# Rename the wsrep README so it corresponds with the other README names -cp Docs/README-wsrep Docs/README.wsrep +# binary-configure creates the MySQL system tables and starts the server (not used) +rm -f %{buildroot}%{_datadir}/mysql/binary-configure +# FS files first-bytes recoginiton (not updated by upstream since nobody realy use that) +rm -f %{buildroot}%{_datadir}/mysql/magic +# Upstream ships them because of MDEV-10797 (we don't need them as we use our own systemd scripts) +rm -f %{buildroot}%{_datadir}/mysql/mysql.server +rm -f %{buildroot}%{_datadir}/mysql/mysqld_multi.server +# The old fork of mytop utility (we ship it as a separate package) +rm -f %{buildroot}%{_bindir}/mytop # Remove *.jar files from mysql-test rm -r %{buildroot}%{_datadir}/mysql-test/plugin/connect/connect/std_data/JdbcMariaDB.jar @@ -495,6 +511,12 @@ rm -f %{buildroot}'%{_unitdir}/[email protected]' rm -f %{buildroot}'%{_unitdir}/[email protected]/use_galera_new_cluster.conf' +# Remove systemd-sysusers conf file for creating of mysql user (we do it in the specfile) +rm -f %{buildroot}%{_sysusersdir}/sysusers.conf + +# Remove debug management for keys Mariadb 101+ +rm -f %{buildroot}%{_libdir}/mysql/plugin/debug_key_management.so + # Remove client libraries that are now provided in mariadb-connector-c # Client library and links rm %{buildroot}%{_libdir}/libmariadb*.so.* @@ -511,6 +533,13 @@ rm %{buildroot}%{_mandir}/man1/mysql_config*.1* rm -r %{buildroot}%{_includedir}/mysql +# mysql-test includes my_safe_process executable that should be moved to /usr/bin +mv %{buildroot}%{_datadir}/mysql-test/lib/My/SafeProcess/my_safe_process %{buildroot}%{_bindir} +ln -s ../../../../../bin/my_safe_process %{buildroot}%{_datadir}/mysql-test/lib/My/SafeProcess/my_safe_process + +# Rename the wsrep README so it corresponds with the other README names +cp Docs/README-wsrep Docs/README.wsrep + # Generate various filelists (binaries and manpages) # mariadb.files filelist mariabackup mbstream innochecksum mariadb-service-convert my_print_defaults myisam_ftdump myisamchk myisamlog myisampack mysql_fix_extensions mysql_install_db mysql_secure_installation mysql_upgrade mysqld mysqld_multi mysqld_safe mysqlbinlog mysqldumpslow resolve_stack_dump resolveip {m,}aria_chk {m,}aria_dump_log {m,}aria_ftdump {m,}aria_pack {m,}aria_read_log tokuft_logprint tokuft_logdump tokuftdump mysql_ldb sst_dump >mariadb.files @@ -568,15 +597,22 @@ install -D -m 755 %{_sourcedir}/mysql-systemd-helper '%{buildroot}'%{_libexecdir}/mysql/mysql-systemd-helper sed -i 's|@MYSQLVER@|%{version}|' '%{buildroot}'%{_libexecdir}/mysql/mysql-systemd-helper ln -sf service '%{buildroot}'%{_sbindir}/rcmysql -install -D -m 644 %{_sourcedir}/mysql.service '%{buildroot}'%{_unitdir}/mysql.service -install -D -m 644 %{_sourcedir}/[email protected] '%{buildroot}'%{_unitdir}/[email protected] -install -D -m 644 %{_sourcedir}/mysql.target '%{buildroot}'%{_unitdir}/mysql.target rm -rf '%{buildroot}'%{_sysconfdir}/init.d +install -D -m 644 %{_sourcedir}/mariadb.service '%{buildroot}'%{_unitdir}/mariadb.service +install -D -m 644 %{_sourcedir}/[email protected] '%{buildroot}'%{_unitdir}/[email protected] +install -D -m 644 %{_sourcedir}/mariadb.target '%{buildroot}'%{_unitdir}/mariadb.target +# Aliases for the backward compatibility. Create symlinks from the alias to the existing one +# We can't use 'Alias=' option only because it's effective only when the unit is enabled +ln -sf %{_unitdir}/mariadb.service %{buildroot}%{_unitdir}/mysql.service +ln -sf %{_unitdir}/[email protected] %{buildroot}%{_unitdir}/[email protected] + +# Rename systemd-tmpfiles conf file because each systemd-tmpfiles file shall be named in the style of package.conf or package-part.conf +mv %{buildroot}%{_tmpfilesdir}/tmpfiles.conf %{buildroot}%{_tmpfilesdir}/mariadb.conf # Tmpfiles file to exclude mysql tempfiles that are auto-cleaned up # bnc#852451 mkdir -p %{buildroot}%{_tmpfilesdir} -cat > %{buildroot}%{_tmpfilesdir}/mysql.conf <<EOF +cat >> %{buildroot}%{_tmpfilesdir}/mariadb.conf <<EOF x %{_localstatedir}/tmp/mysql.* EOF @@ -608,10 +644,9 @@ # Use our configuration stuff instead of upstream one rm -rf '%{buildroot}'%{_sysconfdir}/my.cnf.d install -d -m 755 '%{buildroot}'%{_sysconfdir}/my.cnf.d -tar -C '%{buildroot}'%{_sysconfdir}/my.cnf.d -xvf %{SOURCE13} # Install galera config file and script -install -p -m 644 build/support-files/wsrep.cnf %{buildroot}%{_sysconfdir}/my.cnf.d/galera.cnf +install -p -m 644 build/support-files/wsrep.cnf %{buildroot}%{_sysconfdir}/my.cnf.d/50-galera.cnf install -p -m 755 build/scripts/galera_new_cluster %{buildroot}%{_bindir}/galera_new_cluster # Documentation that was copied to wrong folder @@ -669,11 +704,11 @@ id -Gn mysql | grep '\bmysql\b' &>/dev/null || usermod -g mysql mysql getent passwd mysql | cut -d: -f7 | grep '\b/bin/false\b' &>/dev/null || usermod -s /bin/false mysql -%service_add_pre mysql.service +%service_add_pre mariadb.service %post -%service_add_post mysql.service -%tmpfiles_create %{_tmpfilesdir}/mysql.conf +%service_add_post mariadb.service +%tmpfiles_create %{_tmpfilesdir}/mariadb.conf # SLE11 Migration support for i in protected tmp; do @@ -728,10 +763,10 @@ exit 0 %preun -%service_del_preun mysql.service +%service_del_preun mariadb.service %postun -%service_del_postun mysql.service +%service_del_postun mariadb.service %post -n libmysqld%{soname} -p /sbin/ldconfig %postun -n libmysqld%{soname} -p /sbin/ldconfig @@ -740,16 +775,18 @@ %config(noreplace) %attr(0644, root, mysql) %{_sysconfdir}/my.cnf %dir %attr(0755, root, mysql) %{_sysconfdir}/my.cnf.d %config(noreplace) %attr(0644, root, mysql) %{_sysconfdir}/my.cnf.d/* -%exclude %{_sysconfdir}/my.cnf.d/galera.cnf +%exclude %{_sysconfdir}/my.cnf.d/50-galera.cnf %config %{_sysconfdir}/logrotate.d/%{name} %doc %{_defaultdocdir}/%{name} %dir %{_libexecdir}/mysql %dir %attr(0700, mysql, mysql) %{_localstatedir}/log/mysql %{_libexecdir}/mysql/mysql-systemd-helper +%{_unitdir}/mariadb.service +%{_unitdir}/[email protected] +%{_unitdir}/mariadb.target %{_unitdir}/mysql.service %{_unitdir}/[email protected] -%{_unitdir}/mysql.target -%{_tmpfilesdir}/mysql.conf +%{_tmpfilesdir}/mariadb.conf %{_sbindir}/rcmysql %dir %{_datadir}/%{name} %dir %{_datadir}/mysql @@ -799,7 +836,7 @@ %files galera -f mariadb-galera.files %doc Docs/README.wsrep -%config(noreplace) %{_sysconfdir}/my.cnf.d/galera.cnf +%config(noreplace) %{_sysconfdir}/my.cnf.d/50-galera.cnf %{_datadir}/mysql/systemd/use_galera_new_cluster.conf %{_datadir}/mysql/wsrep_notify ++++++ mariadb-10.0.15-logrotate-su.patch ++++++ PATCH-P0-SUSE: Fix for logrorate config This patch fixes the logrotarte config file for mariadb. Read more at https://www.novell.com/support/kb/doc.php?id=7005219 Index: support-files/mysql-log-rotate.sh =================================================================== --- support-files/mysql-log-rotate.sh.orig +++ support-files/mysql-log-rotate.sh @@ -20,6 +20,7 @@ /var/log/mysql/mysqld.log { # create 600 mysql mysql + su mysql mysql notifempty daily rotate 3 ++++++ mariadb-10.1.1-mysqld_multi-features.patch ++++++ PATCH-P0-FEATURE-UPSTREAM: Add more functionality to mysqld_multi script Adds reload funcionality to mysqld_multi.sh perl script and adds --datadir support. Maintainer: Michal Hrusecky <[email protected]> Index: scripts/mysqld_multi.sh =================================================================== --- scripts/mysqld_multi.sh.orig +++ scripts/mysqld_multi.sh @@ -36,6 +36,7 @@ use Getopt::Long; use POSIX qw(strftime getcwd); +use File::Path qw(mkpath); $|=1; $VER="2.20"; @@ -162,6 +163,7 @@ sub main usage() if (!defined($ARGV[0]) || (!($ARGV[0] =~ m/^start$/i) && !($ARGV[0] =~ m/^stop$/i) && + !($ARGV[0] =~ m/^reload$/i) && !($ARGV[0] =~ m/^report$/i))); if (!$opt_no_log) @@ -175,7 +177,7 @@ sub main print strftime "%a %b %e %H:%M:%S %Y", localtime; print "\n"; } - if ($ARGV[0] =~ m/^start$/i) + if (($ARGV[0] =~ m/^start$/i) || ($ARGV[0] =~ m/^reload$/i)) { if (!defined(($mysqld= my_which($opt_mysqld))) && $opt_verbose) { @@ -184,7 +186,11 @@ sub main print "This is OK, if you are using option \"mysqld=...\" in "; print "groups [mysqldN] separately for each.\n\n"; } - start_mysqlds(); + if ($ARGV[0] =~ m/^start$/i) { + start_mysqlds(); + } elsif ($ARGV[0] =~ m/^reload$/i) { + reload_mysqlds(); + } } else { @@ -344,6 +350,39 @@ sub start_mysqlds() $com= "$mysqld"; for ($j = 0, $tmp= ""; defined($options[$j]); $j++) { + if ("--datadir=" eq substr($options[$j], 0, 10)) { + $datadir = $options[$j]; + $datadir =~ s/\-\-datadir\=//; + eval { mkpath($datadir) }; + if ($@) { + print "FATAL ERROR: Cannot create data directory $datadir: $!\n"; + exit(1); + } + if (! -d $datadir."/mysql") { + if (-w $datadir) { + print "\n\nInstalling new database in $datadir\n\n"; + $install_cmd="@bindir@/mysql_install_db "; + $install_cmd.="--user=mysql "; + $install_cmd.="--datadir=$datadir"; + system($install_cmd); + } else { + print "\n"; + print "FATAL ERROR: Tried to create mysqld under group [$groups[$i]],\n"; + print "but the data directory is not writable.\n"; + print "data directory used: $datadir\n"; + exit(1); + } + } + + if (! -d $datadir."/mysql") { + print "\n"; + print "FATAL ERROR: Tried to start mysqld under group [$groups[$i]],\n"; + print "but no data directory was found or could be created.\n"; + print "data directory used: $datadir\n"; + exit(1); + } + } + if ("--mysqladmin=" eq substr($options[$j], 0, 13)) { # catch this and ignore @@ -408,6 +447,58 @@ sub start_mysqlds() } #### +#### reload multiple servers +#### + +sub reload_mysqlds() +{ + my (@groups, $com, $tmp, $i, @options, $j); + + if (!$opt_no_log) + { + w2log("\nReloading MySQL servers\n","$opt_log",0,0); + } + else + { + print "\nReloading MySQL servers\n"; + } + @groups = &find_groups($groupids); + for ($i = 0; defined($groups[$i]); $i++) + { + $mysqld_server = $mysqld; + @options = defaults_for_group($groups[$i]); + + for ($j = 0, $tmp= ""; defined($options[$j]); $j++) + { + if ("--mysqladmin=" eq substr($options[$j], 0, 13)) + { + # catch this and ignore + } + elsif ("--mysqld=" eq substr($options[$j], 0, 9)) + { + $options[$j] =~ s/\-\-mysqld\=//; + $mysqld_server = $options[$j]; + } + elsif ("--pid-file=" eq substr($options[$j], 0, 11)) + { + $options[$j] =~ s/\-\-pid-file\=//; + $pid_file = $options[$j]; + } + } + $com = "killproc -p $pid_file -HUP $mysqld_server"; + system($com); + + $com = "touch $pid_file"; + system($com); + } + if (!$i && !$opt_no_log) + { + w2log("No MySQL servers to be reloaded (check your GNRs)", + "$opt_log", 0, 0); + } +} + +### #### stop multiple servers #### @@ -770,7 +861,7 @@ sub usage $my_progname version $VER by Jani Tolonen Description: -$my_progname can be used to start, or stop any number of separate +$my_progname can be used to start, reload, or stop any number of separate mysqld processes running in different TCP/IP ports and UNIX sockets. $my_progname can read group [mysqld_multi] from my.cnf file. You may @@ -788,16 +879,16 @@ integer starting from 1. These groups sh [mysqld] group, but with those port, socket and any other options that are to be used with each separate mysqld process. The number in the group name has another function; it can be used for starting, -stopping, or reporting any specific mysqld server. +reloading, stopping, or reporting any specific mysqld server. -Usage: $my_progname [OPTIONS] {start|stop|report} [GNR,GNR,GNR...] -or $my_progname [OPTIONS] {start|stop|report} [GNR-GNR,GNR,GNR-GNR,...] +Usage: $my_progname [OPTIONS] {start|reload|stop|report} [GNR,GNR,GNR...] +or $my_progname [OPTIONS] {start|reload|stop|report} [GNR-GNR,GNR,GNR-GNR,...] -The GNR means the group number. You can start, stop or report any GNR, +The GNR means the group number. You can start, reload, stop or report any GNR, or several of them at the same time. (See --example) The GNRs list can be comma separated or a dash combined. The latter means that all the GNRs between GNR1-GNR2 will be affected. Without GNR argument all the -groups found will either be started, stopped, or reported. Note that +groups found will either be started, reloaded, stopped, or reported. Note that syntax for specifying GNRs must appear without spaces. Options: ++++++ mariadb-10.1.12-deharcode-libdir.patch ++++++ PATCH-P0-FIX-SUSE: dehardcode libdir Don't expect libdir is set to lib64 on x86_64 only. There is other occurances like ppc64 and aarch64. Use %{_libdir} macro instead Maintainer: Dinar Valeev <[email protected]> Index: cmake/install_layout.cmake =================================================================== --- cmake/install_layout.cmake.orig +++ cmake/install_layout.cmake @@ -137,14 +137,6 @@ SET(INSTALL_SCRIPTDIR_RPM SET(INSTALL_SYSCONFDIR_RPM "/etc") SET(INSTALL_SYSCONF2DIR_RPM "/etc/my.cnf.d") # -IF(CMAKE_SIZEOF_VOID_P EQUAL 8) - SET(INSTALL_LIBDIR_RPM "lib64") - SET(INSTALL_PLUGINDIR_RPM "lib64/mysql/plugin") -ELSE() - SET(INSTALL_LIBDIR_RPM "lib") - SET(INSTALL_PLUGINDIR_RPM "lib/mysql/plugin") -ENDIF() -# SET(INSTALL_INCLUDEDIR_RPM "include/mysql") # SET(INSTALL_DOCDIR_RPM "share/doc") ++++++ mariadb-10.2.10-disable_openssl_compatibility_check.patch ++++++ PATCH-P1-SUSE: Fix running with our patched openssl - Disable openssl compatibility checking * the check uses CRYPTO_set_mem_functions() to set debugging memory allocation function. The setting only succeeds if no allocation was done before. Our fips self-tests, which are run from the library constructor, however, do allocate memory, so the subsequent call to CRYPTO_set_mem_functions causes the compatibility check to fail Maintainer: Vitezslav Cizek <[email protected]> Index: mariadb-10.2.10/mysys_ssl/openssl.c =================================================================== --- mariadb-10.2.10.orig/mysys_ssl/openssl.c 2017-10-30 09:10:45.000000000 +0100 +++ mariadb-10.2.10/mysys_ssl/openssl.c 2017-11-29 13:43:20.022236791 +0100 @@ -47,26 +47,6 @@ static void *coc_malloc(size_t size, con int check_openssl_compatibility() { - EVP_CIPHER_CTX *evp_ctx; - EVP_MD_CTX *md5_ctx; - - if (!CRYPTO_set_mem_functions(coc_malloc, NULL, NULL)) - return 1; - - testing= 1; - alloc_size= alloc_count= 0; - evp_ctx= EVP_CIPHER_CTX_new(); - EVP_CIPHER_CTX_free(evp_ctx); - if (alloc_count != 1 || !alloc_size || alloc_size > EVP_CIPHER_CTX_SIZE) - return 1; - - alloc_size= alloc_count= 0; - md5_ctx= EVP_MD_CTX_create(); - EVP_MD_CTX_destroy(md5_ctx); - if (alloc_count != 1 || !alloc_size || alloc_size > EVP_MD_CTX_SIZE) - return 1; - - testing= 0; return 0; } #endif ++++++ mariadb-10.2.11.tar.gz -> mariadb-10.2.12.tar.gz ++++++ /work/SRC/openSUSE:Factory/mariadb/mariadb-10.2.11.tar.gz /work/SRC/openSUSE:Factory/.mariadb.new/mariadb-10.2.12.tar.gz differ: char 5, line 1 ++++++ mariadb-10.2.3-group.patch ++++++ PATCH-P0-FEATURE-UPSTREAM: Adds group option This patch let's you specify not only user to use but also group that MySQL should use. Maintainer: Michal Hrusecky <[email protected]> Index: scripts/mysqld_safe.sh =================================================================== --- scripts/mysqld_safe.sh.orig +++ scripts/mysqld_safe.sh @@ -28,6 +28,7 @@ logging=init want_syslog=0 syslog_tag= user='@MYSQLD_USER@' +group='@MYSQLD_GROUP@' pid_file= err_log= err_log_base= @@ -300,6 +301,7 @@ parse_arguments() { --pid[-_]file=*) pid_file="$val" ;; --plugin[-_]dir=*) PLUGIN_DIR="$val" ;; --user=*) user="$val"; SET_USER=1 ;; + --group=*) group="$val"; SET_USER=1 ;; --log[-_]basename=*|--hostname=*|--loose[-_]log[-_]basename=*) pid_file="$val.pid"; err_log_base="$val"; @@ -713,6 +715,7 @@ then if test "$user" != "root" -o $SET_USER = 1 then USER_OPTION="--user=$user" + GROUP_OPTION="--group=$group" fi if test -n "$open_files" then @@ -735,7 +738,12 @@ then log_error "Fatal error Can't create database directory '$mysql_unix_port'" exit 1 fi - chown $user $mysql_unix_port_dir + if [ "$user" -a "$group" ]; then + chown $user:$group $mysql_unix_port_dir + else + [ "$user" ] && chown $user $mysql_unix_port_dir + [ "$group" ] && chgrp $group $mysql_unix_port_dir + fi chmod 755 $mysql_unix_port_dir fi Index: scripts/mysql_install_db.sh =================================================================== --- scripts/mysql_install_db.sh.orig +++ scripts/mysql_install_db.sh @@ -29,6 +29,7 @@ args="" defaults="" mysqld_opt="" user="" +group="" silent_startup="--silent-startup" force=0 @@ -89,6 +90,11 @@ Usage: $0 [OPTIONS] user. You must be root to use this option. By default mysqld runs using your current login name and files and directories that it creates will be owned by you. + --group=group_name The login group to use for running mysqld. Files and + directories created by mysqld will be owned by this + group. You must be root to use this option. By default + mysqld runs using your current group and files and + directories that it creates will be owned by you. All other options are passed to the mysqld program @@ -136,11 +142,11 @@ parse_arguments() --builddir=*) builddir=`parse_arg "$arg"` ;; --srcdir=*) srcdir=`parse_arg "$arg"` ;; --ldata=*|--datadir=*|--data=*) ldata=`parse_arg "$arg"` ;; - --user=*) # Note that the user will be passed to mysqld so that it runs # as 'user' (crucial e.g. if log-bin=/some_other_path/ # where a chown of datadir won't help) - user=`parse_arg "$arg"` ;; + --user=*) user=`parse_arg "$arg"` ;; + --group=*) group=`parse_arg "$arg"` ;; --skip-name-resolve) ip_only=1 ;; --verbose) verbose=1 ; silent_startup="" ;; --rpm) in_rpm=1 ;; @@ -421,7 +427,12 @@ do fi if test -n "$user" then - chown $user "$dir" + if test -z "$group" + then + chown $user $dir + else + chown $user:$group $dir + fi if test $? -ne 0 then echo "Cannot change ownership of the database directories to the '$user'" @@ -436,6 +447,11 @@ then args="$args --user=$user" fi +if test -n "$group" +then + args="$args --group=$group" +fi + # When doing a "cross bootstrap" install, no reference to the current # host should be added to the system tables. So we filter out any # lines which contain the current host name. Index: scripts/CMakeLists.txt =================================================================== --- scripts/CMakeLists.txt.orig +++ scripts/CMakeLists.txt @@ -134,6 +134,7 @@ ENDIF() SET(HOSTNAME "hostname") SET(MYSQLD_USER "mysql") +SET(MYSQLD_GROUP "mysql") ENDIF(UNIX) # Really ugly, one script, "mysql_install_db", needs prefix set to ".", Index: support-files/CMakeLists.txt =================================================================== --- support-files/CMakeLists.txt.orig +++ support-files/CMakeLists.txt @@ -29,6 +29,7 @@ ELSE() SET(CFLAGS ${CMAKE_C_FLAGS}) SET(CXXFLAGS ${CMAKE_CXX_FLAGS}) SET(MYSQLD_USER "mysql") + SET(MYSQLD_GROUP "mysql") SET(ini_file_extension "cnf") SET(HOSTNAME "hostname") ENDIF() ++++++ mariadb-10.2.3-mysql_install_db-mariadb_dirs.patch ++++++ PATCH-P1-FIX-UPSTREAM: Fix mysql_install_db to find data files in mariadb directories Fix mysql_install_db.sh script to find data files in mariadb directories when a user uses "--basedir" option [bsc#1006539] Maintainer: Kristyna Streitova <[email protected]> Index: mariadb-10.2.10/scripts/CMakeLists.txt =================================================================== --- mariadb-10.2.10.orig/scripts/CMakeLists.txt +++ mariadb-10.2.10/scripts/CMakeLists.txt @@ -188,8 +188,8 @@ ENDIF() SET(resolveip_locations "$basedir/${INSTALL_BINDIR} $basedir/bin") SET(mysqld_locations "$basedir/${INSTALL_SBINDIR} $basedir/libexec $basedir/sbin $basedir/bin") -SET(errmsg_locations "$basedir/${INSTALL_MYSQLSHAREDIR}/english $basedir/share/english $basedir/share/mysql/english") -SET(pkgdata_locations "$basedir/${INSTALL_MYSQLSHAREDIR} $basedir/share $basedir/share/mysql") +SET(errmsg_locations "$basedir/${INSTALL_MYSQLSHAREDIR}/english $basedir/share/english $basedir/share/mysql/english $basedir/share/mariadb/english") +SET(pkgdata_locations "$basedir/${INSTALL_MYSQLSHAREDIR} $basedir/share $basedir/share/mysql $basedir/share/mariadb") IF(UNIX) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_install_db.sh ++++++ mariadb-10.2.4-fortify-and-O.patch ++++++ PATCH-P0-FIX-HACK: Not enforcing specific flags Useing some CFLAGS from distribution and some enforced can and leads to the conflicts like FORTIFY and -O0. Removing hardcoded options. Maintainer: Michal Hrusecky <[email protected]> Index: CMakeLists.txt =================================================================== --- CMakeLists.txt.orig +++ CMakeLists.txt @@ -217,7 +217,6 @@ IF(SECURITY_HARDENED) 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. Index: storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake =================================================================== --- storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake.orig +++ storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake @@ -26,11 +26,9 @@ endif () if (CMAKE_VERSION VERSION_LESS 3.0) set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG TOKU_PTHREAD_DEBUG=1 TOKU_DEBUG_TXN_SYNC=1) set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DRD TOKU_PTHREAD_DEBUG=1 TOKU_DEBUG_TXN_SYNC=1) - set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DRD _FORTIFY_SOURCE=2) else () set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<OR:$<CONFIG:DEBUG>,$<CONFIG:DRD>>:TOKU_PTHREAD_DEBUG=1 TOKU_DEBUG_TXN_SYNC=1> - $<$<CONFIG:DRD>:_FORTIFY_SOURCE=2> ) endif () @@ -102,23 +100,23 @@ set_cflags_if_supported( ) ## set extra debugging flags and preprocessor definitions -set(CMAKE_C_FLAGS_DEBUG "-g3 -O0 ${CMAKE_C_FLAGS_DEBUG}") -set(CMAKE_CXX_FLAGS_DEBUG "-g3 -O0 ${CMAKE_CXX_FLAGS_DEBUG}") +set(CMAKE_C_FLAGS_DEBUG "-g3 ${CMAKE_C_FLAGS_DEBUG}") +set(CMAKE_CXX_FLAGS_DEBUG "-g3 ${CMAKE_CXX_FLAGS_DEBUG}") ## flags to use when we want to run DRD on the resulting binaries ## DRD needs debugging symbols. ## -O0 makes it too slow, and -O2 inlines too much for our suppressions to work. -O1 is just right. -set(CMAKE_C_FLAGS_DRD "-g3 -O1 ${CMAKE_C_FLAGS_DRD}") -set(CMAKE_CXX_FLAGS_DRD "-g3 -O1 ${CMAKE_CXX_FLAGS_DRD}") +set(CMAKE_C_FLAGS_DRD "-g3 ${CMAKE_C_FLAGS_DRD}") +set(CMAKE_CXX_FLAGS_DRD "-g3 ${CMAKE_CXX_FLAGS_DRD}") ## set extra release flags ## need to set flags for RelWithDebInfo as well because we want the MySQL/MariaDB builds to use them if (CMAKE_CXX_COMPILER_ID STREQUAL Clang) # have tried -flto and -O4, both make our statically linked executables break apple's linker - set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -g -O3 -UNDEBUG") - set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g -O3 -UNDEBUG") - set(CMAKE_C_FLAGS_RELEASE "-g -O3 ${CMAKE_C_FLAGS_RELEASE} -UNDEBUG") - set(CMAKE_CXX_FLAGS_RELEASE "-g -O3 ${CMAKE_CXX_FLAGS_RELEASE} -UNDEBUG") + set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -g -UNDEBUG") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g -UNDEBUG") + set(CMAKE_C_FLAGS_RELEASE "-g ${CMAKE_C_FLAGS_RELEASE} -UNDEBUG") + set(CMAKE_CXX_FLAGS_RELEASE "-g ${CMAKE_CXX_FLAGS_RELEASE} -UNDEBUG") else () if (APPLE) set(FLTO_OPTS "-fwhole-program") @@ -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 - set(CMAKE_C_FLAGS_RELWITHDEBINFO "-flto ${FLTO_OPTS} ${CMAKE_C_FLAGS_RELWITHDEBINFO} -g -O3 -UNDEBUG") - set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-flto ${FLTO_OPTS} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g -O3 -UNDEBUG") - set(CMAKE_C_FLAGS_RELEASE "-g -O3 -flto ${FLTO_OPTS} ${CMAKE_C_FLAGS_RELEASE} -UNDEBUG") - set(CMAKE_CXX_FLAGS_RELEASE "-g -O3 -flto ${FLTO_OPTS} ${CMAKE_CXX_FLAGS_RELEASE} -UNDEBUG") + set(CMAKE_C_FLAGS_RELWITHDEBINFO "-flto ${FLTO_OPTS} ${CMAKE_C_FLAGS_RELWITHDEBINFO} -g -UNDEBUG") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-flto ${FLTO_OPTS} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g -UNDEBUG") + set(CMAKE_C_FLAGS_RELEASE "-g -flto ${FLTO_OPTS} ${CMAKE_C_FLAGS_RELEASE} -UNDEBUG") + set(CMAKE_CXX_FLAGS_RELEASE "-g -flto ${FLTO_OPTS} ${CMAKE_CXX_FLAGS_RELEASE} -UNDEBUG") set(CMAKE_EXE_LINKER_FLAGS "-g ${FLTO_OPTS} ${CMAKE_EXE_LINKER_FLAGS}") set(CMAKE_SHARED_LINKER_FLAGS "-g ${FLTO_OPTS} ${CMAKE_SHARED_LINKER_FLAGS}") endif () ++++++ mariadb-10.2.4-logrotate.patch ++++++ PATCH-P0-FIX-SUSE: Fix log file path for logrotate In SUSE we've got MySQL log in different directory. It's located in /var/log/mysql by default. It also adds some extra error message. Maintainer: Michal Hrusecky <[email protected]> Index: support-files/mysql-log-rotate.sh =================================================================== --- support-files/mysql-log-rotate.sh.orig +++ support-files/mysql-log-rotate.sh @@ -18,7 +18,7 @@ # ATTENTION: This /root/.my.cnf should be readable ONLY # for root ! -@localstatedir@/mysqld.log { +/var/log/mysql/mysqld.log { # create 600 mysql mysql notifempty daily @@ -32,6 +32,14 @@ then @bindir@/mysqladmin --local flush-error-log \ flush-engine-log flush-general-log flush-slow-log + ret=$? + if test $ret -ne 0 + then + echo "/etc/logrotate.d/mariadb failed, probably because" >&2 + echo "the root acount is protected by password." >&2 + echo "See comments in /etc/logrotate.d/mariadb on how to fix this" >&2 + exit $ret + fi fi endscript } ++++++ mariadb-10.2.8-systemd-cmake.patch ++++++ PATCH-P1-FIX-HACK: Allow more case-insensitive values for 'WITH_SYSTEMD' Remove 'IF(WITH_SYSTEMD STREQUAL "yes")' and use 'IF(WITH_SYSTEMD)' expression in order to allow more case-insensitive values to be used here (1, ON, YES, TRUE or Y). Maintainer: Kristyna Streitova <[email protected]> Index: mariadb-10.2.9/cmake/systemd.cmake =================================================================== --- mariadb-10.2.9.orig/cmake/systemd.cmake +++ mariadb-10.2.9/cmake/systemd.cmake @@ -18,9 +18,9 @@ MACRO(CHECK_SYSTEMD) INCLUDE(FindPkgConfig) # http://www.cmake.org/cmake/help/v3.0/module/FindPkgConfig.html SET(WITH_SYSTEMD "auto" CACHE STRING "Enable systemd scripts and notification support") - IF(WITH_SYSTEMD STREQUAL "yes" OR WITH_SYSTEMD STREQUAL "auto") + IF(WITH_SYSTEMD OR WITH_SYSTEMD STREQUAL "auto") IF(PKG_CONFIG_FOUND) - IF(WITH_SYSTEMD STREQUAL "yes") + IF(WITH_SYSTEMD) pkg_search_module(LIBSYSTEMD REQUIRED libsystemd libsystemd-daemon) ELSE() pkg_search_module(LIBSYSTEMD libsystemd libsystemd-daemon) @@ -68,7 +68,7 @@ MACRO(CHECK_SYSTEMD) UNSET(HAVE_SYSTEMD_SD_NOTIFY) UNSET(HAVE_SYSTEMD_SD_NOTIFYF) MESSAGE_ONCE(systemd "Systemd features not enabled") - IF(WITH_SYSTEMD STREQUAL "yes") + IF(WITH_SYSTEMD ) MESSAGE(FATAL_ERROR "Requested WITH_SYSTEMD=yes however no dependencies installed/found") ENDIF() ENDIF() ++++++ mariadb-10.2.9-galera_cnf.patch ++++++ PATCH-P1-FIX-FEATURE: Enhance wsrep.cnf (galera configuration file) wsrep_on option defines whether or not wsrep replication is enabled. It's set to OFF by default since MariaDB 10.1 but we want to mention this option explicitly in galera configuration file in order to bring it to the user's attention. Set the location of the wsrep library (wsrep_provider option). Maintainer: Kristyna Streitova <[email protected]> Index: mariadb-10.2.9/support-files/wsrep.cnf.sh =================================================================== --- mariadb-10.2.9.orig/support-files/wsrep.cnf.sh +++ mariadb-10.2.9/support-files/wsrep.cnf.sh @@ -30,8 +30,11 @@ bind-address=0.0.0.0 ## WSREP options ## +# Whether or not wsrep replication is enabled +wsrep_on=OFF + # Full path to wsrep provider library or 'none' -wsrep_provider=none +wsrep_provider=%{_libdir}/galera/libgalera_smm.so # Provider specific configuration options #wsrep_provider_options= ++++++ mariadb-5.2.3-cnf.patch ++++++ PATCH-P0-FIX-SUSE: Tweak default configuration This patch adds log file locations and socket location as they should be in SuSE to the default configuration files. Maintainer: Michal Hrusecky <[email protected]> Index: support-files/my-huge.cnf.sh =================================================================== --- support-files/my-huge.cnf.sh.orig +++ support-files/my-huge.cnf.sh @@ -131,7 +131,15 @@ server-id = 1 #innodb_flush_log_at_trx_commit = 1 #innodb_lock_wait_timeout = 50 +# The safe_mysqld script +[safe_mysqld] +log-error=/var/log/mysql/mysqld.log +socket = @MYSQL_UNIX_ADDR@ + +!includedir /etc/mysql + [mysqldump] +socket = @MYSQL_UNIX_ADDR@ quick max_allowed_packet = 16M Index: support-files/my-large.cnf.sh =================================================================== --- support-files/my-large.cnf.sh.orig +++ support-files/my-large.cnf.sh @@ -131,7 +131,15 @@ server-id = 1 #innodb_flush_log_at_trx_commit = 1 #innodb_lock_wait_timeout = 50 +# The safe_mysqld script +[safe_mysqld] +log-error=/var/log/mysql/mysqld.log +socket = @MYSQL_UNIX_ADDR@ + +!includedir /etc/mysql + [mysqldump] +socket = @MYSQL_UNIX_ADDR@ quick max_allowed_packet = 16M Index: support-files/my-medium.cnf.sh =================================================================== --- support-files/my-medium.cnf.sh.orig +++ support-files/my-medium.cnf.sh @@ -26,6 +26,8 @@ socket = @MYSQL_UNIX_ADDR@ [mysqld] port = @MYSQL_TCP_PORT@ socket = @MYSQL_UNIX_ADDR@ +# Change following line if you want to store your database elsewhere +datadir = /var/lib/mysql skip-external-locking key_buffer_size = 16M max_allowed_packet = 1M @@ -129,7 +131,15 @@ server-id = 1 #innodb_flush_log_at_trx_commit = 1 #innodb_lock_wait_timeout = 50 +# The safe_mysqld script +[safe_mysqld] +log-error = /var/log/mysql/mysqld.log +socket = @MYSQL_UNIX_ADDR@ + +!includedir /etc/mysql + [mysqldump] +socket = @MYSQL_UNIX_ADDR@ quick max_allowed_packet = 16M Index: support-files/my-small.cnf.sh =================================================================== --- support-files/my-small.cnf.sh.orig +++ support-files/my-small.cnf.sh @@ -65,7 +65,15 @@ server-id = 1 #innodb_flush_log_at_trx_commit = 1 #innodb_lock_wait_timeout = 50 +# The safe_mysqld script +[safe_mysqld] +log-error = /var/log/mysql/mysqld.log +socket = @MYSQL_UNIX_ADDR@ + +!includedir /etc/mysql + [mysqldump] +socket = @MYSQL_UNIX_ADDR@ quick max_allowed_packet = 16M ++++++ mariadb-5.5.28-install_db-quiet.patch ++++++ PATCH-P0-FEATURE-SUSE: Use better comments in install_db We ship init script so we don't need to warn user to install one and we also have a testsuite in separate packege. Maintainer: Michal Hrusecky <[email protected]> Index: scripts/mysql_install_db.sh =================================================================== --- scripts/mysql_install_db.sh.orig +++ scripts/mysql_install_db.sh @@ -473,9 +473,10 @@ fi # the screen. if test "$cross_bootstrap" -eq 0 && test -z "$srcdir" then - s_echo - s_echo "To start mysqld at boot time you have to copy" - s_echo "support-files/mysql.server to the right place for your system" +# Output disabled, since the SUSE RPM comes with an init script installed +# s_echo +# s_echo "To start mysqld at boot time you have to copy" +# s_echo "support-files/mysql.server to the right place for your system" echo echo "PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !" @@ -498,10 +499,9 @@ then then echo echo "You can start the MariaDB daemon with:" - echo "cd '$basedir' ; $bindir/mysqld_safe --datadir='$ldata'" + echo "rcmysql start" echo - echo "You can test the MariaDB daemon with mysql-test-run.pl" - echo "cd '$basedir/mysql-test' ; perl mysql-test-run.pl" + echo "You can test the MariaDB daemon with mariadb-test package" fi echo ++++++ mariadb.service ++++++ # It's not recommended to modify this unit file because your changes # would be overwritten during the package update. # # However, there are 2 methods how to customize this unit file: # # 1) Copy this unit file from /usr/lib/systemd/system to # /etc/systemd/system and modify the chosen settings. # # 2) Create a directory named mariadb.service.d/ within /etc/systemd/system # and place a drop-in file name.conf there that only changes the specific # settings one is interested in. # # see systemd.unit(5) for details # # Example - increasing of the TimeoutSec= limit # mkdir /etc/systemd/system/mariadb.service.d # cat > /etc/systemd/system/mariadb.service.d/timeout.conf << EOF # [Service] # TimeoutSec=600 # EOF [Unit] Description=MySQL server Wants=basic.target Conflicts=mariadb.target After=basic.target network.target [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 # Configures the time to wait for start-up/stop TimeoutSec=300 [Install] WantedBy=multi-user.target Alias=mysql.service ++++++ mariadb.target ++++++ [Unit] Description=MySQL target allowing to control multi setup ++++++ [email protected] ++++++ # It's not recommended to modify this unit file because your changes # would be overwritten during the package update. # # However, there are 2 methods how to customize this unit file: # # 1) Copy this unit file from /usr/lib/systemd/system to # /etc/systemd/system and modify the chosen settings. # # 2) Create a directory named mariadb.service.d/ within /etc/systemd/system # and place a drop-in file name.conf there that only changes the specific # settings one is interested in. # # see systemd.unit(5) for details # # Example - increasing of the TimeoutSec= limit # mkdir /etc/systemd/system/mariadb.service.d # cat > /etc/systemd/system/mariadb.service.d/timeout.conf << EOF # [Service] # TimeoutSec=600 # EOF [Unit] Description=MySQL server - %I instance Wants=basic.target PartOf=mariadb.target After=basic.target network.target [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 # Configures the time to wait for start-up/stop TimeoutSec=300 [Install] WantedBy=multi-user.target Alias=mysql.service ++++++ my.ini ++++++ --- /var/tmp/diff_new_pack.VeCaqG/_old 2018-01-13 21:34:32.326742207 +0100 +++ /var/tmp/diff_new_pack.VeCaqG/_new 2018-01-13 21:34:32.330742019 +0100 @@ -1,8 +1,4 @@ -# This is default example of MySQL/MariaDB configuration provided with openSUSE package -# It is based on upstream defaults with some additional examples. - - -# The following options will be passed to all MySQL/MariaDB clients +# The following options will be passed to all MariaDB clients [client] # Please note that storing the password in this file is not safe. For this # purpose you can, for example, list your password in the [client] section @@ -11,10 +7,20 @@ # port = 3306 # socket = /run/mysql/mysql.sock +# The MariaDB server [mysqld] -# Remove leading # if you don't want to listen on network (only socket - safer) -# skip-networking +# For security reasons, bind to 127.0.0.1 by default to enable networking +# only on the loopback interface. +bind-address = 127.0.0.1 + +# If log-error is not set, mysqld will write to "/var/lib/mysql/$HOSTNAME.err" +# which is not beneficial for rotating the log file if it grows in size. +log-error = /var/log/mysql/mysqld.log + +# Operations 'LOAD DATA', 'SELECT ... INTO' and 'LOAD FILE()' will only +# work with files in the specified directory +secure_file_priv = /var/lib/mysql-files # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. @@ -43,14 +49,6 @@ # port = 3306 # socket = /run/mysql/mysql.sock -# Don't listen on a TCP/IP port at all. This can be a security enhancement, -# if all processes that need to connect to mysqld run on the same host. -# All interaction with mysqld must be made via Unix sockets or named pipes. -# Note that using this option without enabling named pipes on Windows -# (via the "enable-named-pipe" option) will render mysqld useless! -# -# skip-networking - # Remove leading # to set options mainly useful for reporting servers. # The server defaults are faster for transactions and fast SELECTs. # Adjust sizes as needed, experiment to find the optimal values. @@ -58,6 +56,11 @@ # sort_buffer_size = 2M # read_rnd_buffer_size = 2M +# Configure the MariaDB server to use SSL +# ssl-ca=/etc/mysql/ssl/ca-cert.pem +# 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] ++++++ mysql-community-server-5.1.45-multi-configuration.patch ++++++ PATCH-P0-FEATURE-SUSE: Add multi configuration This patch adds example of how to setup multiple running MySQL servers. It is by default commented out, but it can be used as an example and help people start with new configuration. Maintainer: Michal Hrusecky <[email protected]> Index: support-files/my-medium.cnf.sh =================================================================== --- support-files/my-medium.cnf.sh.orig +++ support-files/my-medium.cnf.sh @@ -154,3 +154,46 @@ write_buffer = 2M [mysqlhotcopy] interactive-timeout + +[mysqld_multi] +mysqld = /usr/bin/mysqld_safe +mysqladmin = /usr/bin/mysqladmin +log = /var/log/mysqld_multi.log +# user = multi_admin +# password = secret + +# If you want to use mysqld_multi uncomment 1 or more mysqld sections +# below or add your own ones. + +# WARNING +# -------- +# If you uncomment mysqld1 than make absolutely sure, that database mysql, +# configured above, is not started. This may result in corrupted data! +# [mysqld1] +# port = @MYSQL_TCP_PORT@ +# datadir = /var/lib/mysql +# pid-file = /var/lib/mysql/mysqld.pid +# socket = /var/lib/mysql/mysql.sock +# user = mysql + +# [mysqld2] +# port = 3307 +# datadir = /var/lib/mysql-databases/mysqld2 +# pid-file = /var/lib/mysql-databases/mysqld2/mysql.pid +# socket = /var/lib/mysql-databases/mysqld2/mysql.sock +# user = mysql + +# [mysqld3] +# port = 3308 +# datadir = /var/lib/mysql-databases/mysqld3 +# pid-file = /var/lib/mysql-databases/mysqld3/mysql.pid +# socket = /var/lib/mysql-databases/mysqld3/mysql.sock +# user = mysql + +# [mysqld6] +# port = 3309 +# datadir = /var/lib/mysql-databases/mysqld6 +# pid-file = /var/lib/mysql-databases/mysqld6/mysql.pid +# socket = /var/lib/mysql-databases/mysqld6/mysql.sock +# user = mysql +
