-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathsapstartsrv-resource-agents.spec
More file actions
111 lines (95 loc) · 3.08 KB
/
Copy pathsapstartsrv-resource-agents.spec
File metadata and controls
111 lines (95 loc) · 3.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#
# spec file for package sapstartsrv-resource-agents
#
# Copyright (c) 2020-2025 SUSE LLC.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
%if 0%{?suse_version} < 1600
%bcond_with test
%else
%bcond_without test
%endif
Name: sapstartsrv-resource-agents
License: GPL-2.0
Group: Productivity/Clustering/HA
Summary: Resource agent for SAP instance specific sapstartsrv service
Version: 0
Release: 0
URL: https://github.com/SUSE/SAPStartSrv-resourceAgent
Source0: %{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: resource-agents
Requires: resource-agents
Requires: pacemaker > 1.1.1
Requires: python3
Requires: python3-psutil
Recommends: supportutils-plugin-ha-sap
%if %{with test}
BuildRequires: python3-pytest
BuildRequires: python3-psutil
%endif
%define raname SAPStartSrv
%define srvname sapservices-move
%define ocf_dir %{_prefix}/lib/ocf
%description
This is a resource agent for the instance specific SAP start framework.
It controls the instance specific sapstartsrv process which provides the
API to start, stop and check an SAP instance.
Authors:
--------
Fabian Herschel
Lars Pinne
Xabier Arbulu
%prep
%setup -q
%build
gzip man/*
%install
install -D -m 0755 ra/%{raname}.in %{buildroot}%{ocf_dir}/resource.d/suse/%{raname}
install -d %{buildroot}%{_mandir}/man7
install -d %{buildroot}%{_mandir}/man8
install -m 0444 man/*.7.gz %{buildroot}%{_mandir}/man7
install -m 0444 man/*.8.gz %{buildroot}%{_mandir}/man8
install -D -m 0644 sbin/%{srvname}.in %{buildroot}%{_sbindir}/%{srvname}
install -d %{buildroot}%{_unitdir}
install -m 0644 service/* %{buildroot}%{_unitdir}
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcsapping
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcsappong
sed -i 's+@PYTHON@+%{_bindir}/python3+' %{buildroot}%{ocf_dir}/resource.d/suse/%{raname}
sed -i 's+@PYTHON@+%{_bindir}/python3+' %{buildroot}%{_sbindir}/%{srvname}
%if %{with test}
%check
pytest tests
%endif
%pre
%service_add_pre sapping.service sappong.service
%post
%service_add_post sapping.service sappong.service
%preun
%service_del_preun sapping.service sappong.service
%postun
%service_del_postun sapping.service sappong.service
%files
%defattr(-,root,root)
%license LICENSE
%doc README.md
%{_mandir}/man7/*.7.gz
%{_mandir}/man8/*.8.gz
%dir %{ocf_dir}
%dir %{ocf_dir}/resource.d
%dir %{ocf_dir}/resource.d/suse
%defattr(755,root,root,-)
%{ocf_dir}/resource.d/suse/%{raname}
%{_sbindir}/*
%defattr(644,root,root,-)
%{_unitdir}/*
%changelog