diff --git a/mariadb.changes b/mariadb.changes index 7ddfcb9..ffc263e 100644 --- a/mariadb.changes +++ b/mariadb.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 14 05:45:51 UTC 2014 - coolo@suse.com + +- use %_rundir if available + ------------------------------------------------------------------- Wed Nov 13 17:40:37 UTC 2013 - klaussfreire@gmail.com diff --git a/mariadb.spec b/mariadb.spec index 1216a8f..b1318be 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -24,6 +24,10 @@ %define use_extra_provides 1 %define extra_provides mariadb_55 +%if ! %{defined _rundir} +%define _rundir %{_localstatedir}/run +%endif + %if %{?rel:0}%{!?rel:1} %define rel 1 %endif @@ -451,7 +455,7 @@ if posix.access("/usr/sbin/rcmysql", "x") then os.execute("/usr/sbin/rcmysql stop") if restart == 0 then - os.execute("/bin/mkdir -p /var/run/mysql/restart") + os.execute("/bin/mkdir -p %{_rundir}/mysql/restart") end end @@ -468,9 +472,9 @@ for i in /var/lib/mysql/{.protected,.tmp}; do ( [ -d "$i" ] && rmdir "$i" ) || : done # start mysql again if it should run -if [ "`ls /etc/rc.d/rc*.d/S*mysql 2> /dev/null`" ] || [ -d /var/run/mysql/restart ]; then +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 /var/run/mysql/restart || : + rmdir %{_rundir}/mysql/restart || : fi ####################################################################### @@ -529,7 +533,7 @@ fi %dir /usr/share/mysql /usr/share/%{name}/charsets/ /usr/share/%{name}/*.sql -%ghost %dir %attr(755,mysql,mysql)/var/run/mysql +%ghost %dir %attr(755,mysql,mysql)%{_rundir}/mysql %dir %{_libdir}/mysql %{_libdir}/mysql/mysqld.sym %config /etc/sysconfig/SuSEfirewall2.d/services/mysql