Accepting request 159514 from server:database
- systemd awareness for openSUSE >= 12.1 (forwarded request 158708 from tpaszkowski) OBS-URL: https://build.opensuse.org/request/show/159514 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mariadb?expand=0&rev=28
This commit is contained in:
commit
cf6cd9a335
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 12 16:03:07 UTC 2013 - tpaszkowski@suse.com
|
||||
|
||||
- systemd awareness for openSUSE >= 12.1
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Mar 3 21:32:37 UTC 2013 - schwab@suse.de
|
||||
|
||||
|
25
mariadb.spec
25
mariadb.spec
@ -77,6 +77,9 @@ BuildRequires: fdupes
|
||||
%if 0%{?fedora_version} > 11
|
||||
BuildRequires: sqlite
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1210
|
||||
BuildRequires: systemd
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1030
|
||||
Recommends: logrotate
|
||||
%else
|
||||
@ -86,6 +89,10 @@ Requires: logrotate
|
||||
Requires: %{name}-client
|
||||
Requires: %{name}-errormessages = %version
|
||||
Requires: perl-base
|
||||
# systemd requirements for openSUSE >= 12.1
|
||||
%if 0%{?suse_version} >= 1210
|
||||
%{?systemd_requires}
|
||||
%endif
|
||||
Provides: mysql = %{srv_vers}
|
||||
Provides: mysql-Max = %{srv_vers}
|
||||
%if 0%{?use_extra_provides} > 0
|
||||
@ -373,12 +380,26 @@ rm -f mysql-test/t/file_contents.test mysql-test/r/file_contents.result
|
||||
/usr/sbin/useradd -r -o -g mysql -u 60 -c "MySQL database admin" \
|
||||
-s /bin/false -d /var/lib/mysql mysql 2> /dev/null || :
|
||||
/usr/sbin/usermod -g mysql -s /bin/false mysql || :
|
||||
# systemd requirment
|
||||
%if 0%{?suse_version} >= 1210
|
||||
%service_add_pre mysql.service
|
||||
%endif
|
||||
|
||||
%post
|
||||
# systemd requirment
|
||||
%if 0%{?suse_version} >= 1210
|
||||
%service_add_post mysql.service
|
||||
%endif
|
||||
|
||||
#######################################################################
|
||||
# preun and posttran takes care of restart #
|
||||
#######################################################################
|
||||
%preun
|
||||
[ $1 = 1 ] || /usr/sbin/rcmysql stop
|
||||
# systemd requirment
|
||||
%if 0%{?suse_version} >= 1210
|
||||
%service_del_preun mysql.service
|
||||
%endif
|
||||
|
||||
%pretrans -p <lua>
|
||||
if posix.access("/usr/sbin/rcmysql", "x") then
|
||||
@ -443,6 +464,10 @@ if [ $1 = 0 ]; then
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/mysql.info.*
|
||||
%{insserv_cleanup}
|
||||
fi
|
||||
# systemd requirment
|
||||
%if 0%{?suse_version} >= 1210
|
||||
%service_del_postun mysql.service
|
||||
%endif
|
||||
|
||||
#######################################################################
|
||||
# Files section #
|
||||
|
Loading…
Reference in New Issue
Block a user