forked from pool/ocfs2-tools
Accepting request 629233 from network:ha-clustering:Factory
- fix pre/post/preun/postun scripts when systemd_enabled - insserv_prereq is only needed when !systemd_enabled - run fillup to actually provision /etc/sysconfig/o2cb OBS-URL: https://build.opensuse.org/request/show/629233 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ocfs2-tools?expand=0&rev=71
This commit is contained in:
commit
a805c979a6
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 30 13:49:06 UTC 2018 - crrodriguez@opensuse.org
|
||||||
|
|
||||||
|
- fix pre/post/preun/postun scripts when systemd_enabled
|
||||||
|
- insserv_prereq is only needed when !systemd_enabled
|
||||||
|
- run fillup to actually provision /etc/sysconfig/o2cb
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Dec 13 03:11:37 UTC 2017 - lchen@suse.com
|
Wed Dec 13 03:11:37 UTC 2017 - lchen@suse.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package ocfs2-tools
|
# spec file for package ocfs2-tools
|
||||||
#
|
#
|
||||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -37,7 +37,7 @@ Name: ocfs2-tools
|
|||||||
Version: 1.8.5
|
Version: 1.8.5
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Oracle Cluster File System 2 Core Tools
|
Summary: Oracle Cluster File System 2 Core Tools
|
||||||
License: GPL-2.0
|
License: GPL-2.0-only
|
||||||
Group: System/Filesystems
|
Group: System/Filesystems
|
||||||
Url: https://ocfs2.wiki.kernel.org/
|
Url: https://ocfs2.wiki.kernel.org/
|
||||||
Source: ocfs2-tools-%{version}.tar.gz
|
Source: ocfs2-tools-%{version}.tar.gz
|
||||||
@ -72,7 +72,6 @@ BuildRequires: update-desktop-files
|
|||||||
BuildRequires: pkgconfig(glib-2.0)
|
BuildRequires: pkgconfig(glib-2.0)
|
||||||
BuildRequires: pkgconfig(libxml-2.0)
|
BuildRequires: pkgconfig(libxml-2.0)
|
||||||
Requires(pre): %fillup_prereq
|
Requires(pre): %fillup_prereq
|
||||||
Requires(pre): %insserv_prereq
|
|
||||||
Requires: /sbin/chkconfig
|
Requires: /sbin/chkconfig
|
||||||
Requires: e2fsprogs
|
Requires: e2fsprogs
|
||||||
Requires: glib2 >= 2.2.3
|
Requires: glib2 >= 2.2.3
|
||||||
@ -81,9 +80,10 @@ Requires: net-tools
|
|||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
Recommends: ocfs2-kmp
|
Recommends: ocfs2-kmp
|
||||||
%if 0%{?suse_version} >= 1315
|
%if 0%{?suse_version} >= 1315
|
||||||
%define systemd_enabled 1
|
%define systemd_enabled 1
|
||||||
%else
|
%else
|
||||||
%define systemd_enabled 0
|
%define systemd_enabled 0
|
||||||
|
Requires(pre): %insserv_prereq
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -224,14 +224,34 @@ chmod a-x %{buildroot}/%{_libdir}/libocfs2.a
|
|||||||
%if 0%{_ocfs2console} == 1
|
%if 0%{_ocfs2console} == 1
|
||||||
python -c "import compileall; compileall.compile_dir('%{buildroot}/%{py_sitedir}/ocfs2interface', ddir='%{py_sitedir}/ocfs2interface')"
|
python -c "import compileall; compileall.compile_dir('%{buildroot}/%{py_sitedir}/ocfs2interface', ddir='%{py_sitedir}/ocfs2interface')"
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{systemd_enabled}
|
||||||
|
%pre o2cb
|
||||||
|
%service_add_pre ocfs2.service o2cb.service
|
||||||
|
%endif
|
||||||
|
|
||||||
%preun o2cb
|
%preun o2cb
|
||||||
|
%if %{systemd_enabled}
|
||||||
|
%service_del_preun ocfs2.service o2cb.service
|
||||||
|
%else
|
||||||
%stop_on_removal ocfs2
|
%stop_on_removal ocfs2
|
||||||
%stop_on_removal o2cb
|
%stop_on_removal o2cb
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%post o2cb
|
||||||
|
%fillup_only -n o2cb
|
||||||
|
%if %{systemd_enabled}
|
||||||
|
%service_add_post ocfs2.service o2cb.service
|
||||||
|
%endif
|
||||||
|
|
||||||
%postun o2cb
|
%postun o2cb
|
||||||
|
%if %{systemd_enabled}
|
||||||
|
%service_del_postun ocfs2.service o2cb.service
|
||||||
|
%else
|
||||||
%{insserv_cleanup}
|
%{insserv_cleanup}
|
||||||
%restart_on_update ocfs2
|
%restart_on_update ocfs2
|
||||||
%restart_on_update o2cb
|
%restart_on_update o2cb
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
Loading…
Reference in New Issue
Block a user