From 9e2f158d0c1ae64015d037983fda71ecd13f6a8842c192af81431deb37f6bbdf Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Fri, 30 Aug 2013 09:26:18 +0000 Subject: [PATCH] merge OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=134 --- configuration-tweaks.tar.bz2 | 4 ++-- install.inc | 2 ++ mariadb.spec | 20 +++++++++++++++++--- my.ini | 1 - mysql-patches.tar.bz2 | 4 ++-- rc.mysql-multi | 3 ++- 6 files changed, 25 insertions(+), 9 deletions(-) diff --git a/configuration-tweaks.tar.bz2 b/configuration-tweaks.tar.bz2 index 9273f85..ab1a3f8 100644 --- a/configuration-tweaks.tar.bz2 +++ b/configuration-tweaks.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a5824b02d7cfe00333ac4adfec1856311fd27fafea7affc1656c5543a44db4a6 -size 318 +oid sha256:86e1bfe8b10e10548aa46c47b28d8bf85dcce2d7e65078f6e449d52a2d4f0bd1 +size 311 diff --git a/install.inc b/install.inc index f34f681..f6c2da5 100644 --- a/install.inc +++ b/install.inc @@ -145,7 +145,9 @@ fi rm -rf '%buildroot'/etc/my.cnf.d mkdir -p '%buildroot'/etc/my.cnf.d bzip2 -cd '%_sourcedir'/configuration-tweaks.tar.bz2 | tar -C '%buildroot'/etc/my.cnf.d -xvf - +%if %have_info < 1 [ -z "`ls '%buildroot'/usr/share/info/mysql.info* 2> /dev/null`" ] || rm -f '%buildroot'/usr/share/info/mysql.info* +%endif if [ "`ls '%buildroot'%_libdir/mysql/plugin/dialog*.so 2> /dev/null`" ]; then echo '%%dir %%_libdir/mysql' >> mysql-client.files echo '%%dir %%_libdir/mysql/plugin' >> mysql-client.files diff --git a/mariadb.spec b/mariadb.spec index 57df737..ade6019 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -16,9 +16,10 @@ # # Few definitions which will alter build -%define prefered 1 -%define use_cmake 1 -%define cluster 0 +%define prefered 01 +%define use_cmake 01 +%define cluster 00 +%define have_info 0 %define builtin_plugins partition,csv,heap,aria,pbxt,myisam,myisammrg,xtradb %define use_extra_provides 1 %define extra_provides mariadb_55 @@ -54,6 +55,9 @@ Source14: my.ini BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} PreReq: pwdutils +%if %have_info +PreReq: %install_info_prereq %insserv_prereq +%endif %endif BuildRequires: autoconf BuildRequires: automake @@ -445,6 +449,10 @@ if posix.access("/usr/sbin/rcmysql", "x") then end %posttrans +%if %have_info +[ -z "`ls %{_infodir}/mysql.info.* 2> /dev/null`" ] || \ +%install_info --info-dir=%{_infodir} %{_infodir}/mysql.info.* +%endif if [ -d /var/lib/mysql ]; then touch /var/lib/mysql/.run-mysql_upgrade chown -R --no-dereference mysql:mysql /var/lib/mysql @@ -484,6 +492,9 @@ fi %postun if [ $1 = 0 ]; then + %if %have_info + %install_info_delete --info-dir=%{_infodir} %{_infodir}/mysql.info.* + %endif %{insserv_cleanup} rm -f "/var/lib/systemd/migrated/mysql.service" if [ -x /usr/bin/systemctl ]; then @@ -502,6 +513,9 @@ fi %config(noreplace) %attr(0640, root, mysql) /etc/my.cnf.d/* %config /etc/logrotate.d/mysql %doc %{_defaultdocdir}/%{name} +%if %have_info +%doc %{_infodir}/mysql.info.* +%endif /etc/init.d/mysql /usr/sbin/rcmysql %dir /usr/share/%{name} diff --git a/my.ini b/my.ini index 31853c2..634bada 100644 --- a/my.ini +++ b/my.ini @@ -98,6 +98,5 @@ log = /var/log/mysqld_multi.log # socket = /var/lib/mysql-databases/mysqld6/mysql.sock # user = mysql -!includedir /etc/mysql !includedir /etc/my.cnf.d diff --git a/mysql-patches.tar.bz2 b/mysql-patches.tar.bz2 index 6da9945..38474c7 100644 --- a/mysql-patches.tar.bz2 +++ b/mysql-patches.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:166945cf5ab12a72f10c01211781dc3da69d71e6d24e55756220d2865af8654e -size 13346 +oid sha256:d3d3c1953efc32f5010b3dc1ba1eaa3ae1ad12bde4220f24c267ee33ab1bbdce +size 13333 diff --git a/rc.mysql-multi b/rc.mysql-multi index 72cf61f..07e1bc7 100644 --- a/rc.mysql-multi +++ b/rc.mysql-multi @@ -334,7 +334,7 @@ else chown -R --no-dereference mysql:mysql "$log_dir" done - MYSQLVER="`mysqld --version | sed 's|.*Ver\ *\([^\ ]*\)\.[0-9]\+[\-\ ].*|\1|'`" + MYSQLVER="`mysqld --no-defaults --version | sed 's|.*Ver\ *\([^\ ]*\)\.[0-9]\+[\-\ ].*|\1|'`" # We assume a fresh install if the directory $datadir/mysql # does not exist and create the privilege database @@ -351,6 +351,7 @@ else # user confirmation. if [ -f "/var/lib/mysql/.run-mysql_upgrade" ]; then if [ \! -f "/var/lib/mysql/.force_upgrade" ] && \ + [ -f "$datadir/mysql_upgrade_info" ] && \ [ -z "`grep "^$MYSQLVER" "$datadir/mysql_upgrade_info" 2> /dev/null`" ]; then echo echo "You are upgrading from different stable version of MySQL!"