From cc480b61e6f52ae99566c0cb25f7047ccef967c0f901f50f2a4078a93499091d Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Tue, 16 Sep 2014 06:39:59 +0000 Subject: [PATCH 1/2] - Little polishing of rc script OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=155 --- configuration-tweaks.tar.bz2 | 4 ++-- mariadb.changes | 5 +++++ mariadb.spec | 2 +- rc.mysql.systemd | 33 ++++++++++++++++----------------- 4 files changed, 24 insertions(+), 20 deletions(-) diff --git a/configuration-tweaks.tar.bz2 b/configuration-tweaks.tar.bz2 index ae23d94..6ebc763 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:10d34094de047645360cc0a2bf1c5d61a53eb626916d52e6c85ad8e2dc994104 -size 216 +oid sha256:b37a73dc9a052dfd53b58786e29b64618371b26991029e8960669bb50abf2540 +size 222 diff --git a/mariadb.changes b/mariadb.changes index 6782f44..3944291 100644 --- a/mariadb.changes +++ b/mariadb.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Sep 16 06:37:15 UTC 2014 - michal.hrusecky@opensuse.org + +- Little polishing of rc script + ------------------------------------------------------------------- Wed Sep 3 12:26:08 UTC 2014 - kstreitova@novell.com diff --git a/mariadb.spec b/mariadb.spec index ae16241..b3512d2 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -42,7 +42,7 @@ License: SUSE-GPL-2.0-with-FLOSS-exception Group: Productivity/Databases/Servers Version: 10.0.13 Release: 0 -%define srv_vers 5.6.17 +%define srv_vers 5.6.19 Url: https://www.mariadb.org Source: mariadb-%{version}.tar.bz2 Source2: baselibs.conf diff --git a/rc.mysql.systemd b/rc.mysql.systemd index d0456e0..5ef8f45 100644 --- a/rc.mysql.systemd +++ b/rc.mysql.systemd @@ -35,9 +35,9 @@ rc_check () { _rc_status_ret=$? - test "$_rc_status_ret" || _rc_status_ret=0 - test $_rc_status_ret -eq 0 || _rc_status=$_rc_status_ret - test $_rc_status -eq 0 || _rc_status_all=$_rc_status + test "$_rc_status_ret" || _rc_status_ret=0 + test 0$_rc_status_ret -eq 0 || _rc_status=$_rc_status_ret + test 0$_rc_status -eq 0 || _rc_status_all=$_rc_status return 0$_rc_status_ret } @@ -45,21 +45,20 @@ rc_status () { rc_check _rc_status_ret=$_rc_status - local i - for i ; do - case "$i" in - -v|-v[1-9]|-v[1-9][0-9]) - case "$_rc_status" in - 0) echo "Everything is Ok" ;; # success - *) echo "Something went wrong" ;; # failed - esac + if [ "$1" ]; then + case "$1" in + -v|-v[1-9]|-v[1-9][0-9]) + case "$_rc_status" in + 0) echo "Everything is Ok" ;; # success + *) echo "Something went wrong" ;; # failed + esac - # reset _rc_status to 0 after verbose case - _rc_status=0 ;; - -r) rc_reset ;; - *) echo "rc_status: Usage: [-v[] [-r]]" 1>&2 ; return 0 ;; - esac - done + # reset _rc_status to 0 after verbose case + _rc_status=0 ;; + -r) rc_reset ;; + *) echo "rc_status: Usage: [-v[] [-r]]" 1>&2 ; return 0 ;; + esac + fi return $_rc_status_ret } From 2d950ab4719f4888e56e8bf94700f979e06f2b42b4958b424ac54e1208b54b1a Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Fri, 19 Sep 2014 17:45:25 +0000 Subject: [PATCH 2/2] - Get rid of error during update OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=156 --- configuration-tweaks.tar.bz2 | 2 +- mariadb.changes | 5 +++++ mariadb.spec | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/configuration-tweaks.tar.bz2 b/configuration-tweaks.tar.bz2 index 6ebc763..6337976 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:b37a73dc9a052dfd53b58786e29b64618371b26991029e8960669bb50abf2540 +oid sha256:8ec50f340dbc624772923a07c72a66867b26ba2482cb2a9a4fe547e78a1cf89f size 222 diff --git a/mariadb.changes b/mariadb.changes index 3944291..3033a8a 100644 --- a/mariadb.changes +++ b/mariadb.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Sep 19 17:41:26 UTC 2014 - michal.hrusecky@opensuse.org + +- Get rid of error during update + ------------------------------------------------------------------- Tue Sep 16 06:37:15 UTC 2014 - michal.hrusecky@opensuse.org diff --git a/mariadb.spec b/mariadb.spec index b3512d2..d426211 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -476,8 +476,8 @@ done # start mysql again if it should run if [ "`ls /etc/rc.d/rc*.d/S*mysql 2> /dev/null`" ] || [ -d %{_rundir}/mysql/restart ]; then [ -x /usr/sbin/rcmysql ] && /usr/sbin/rcmysql start - rmdir %{_rundir}/mysql/restart || : - rmdir %{_rundir}/mysql || : + # Might not be there, so ignoring errors + rmdir %{_rundir}/mysql/restart 2> /dev/null || : fi # warn on first run datadir="/var/lib/mysql"