|
|
b0a533 |
#
|
|
|
b0a533 |
# All modifications and additions to the file contributed by third parties
|
|
|
b0a533 |
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
b0a533 |
# upon. The license for this file, and modifications and additions to the
|
|
|
b0a533 |
# file, is the same license as for the pristine package itself (unless the
|
|
|
b0a533 |
# license for the pristine package is not an Open Source License, in which
|
|
|
b0a533 |
# case the license is the MIT License). An "Open Source License" is a
|
|
|
b0a533 |
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
b0a533 |
# published by the Open Source Initiative.
|
|
|
b0a533 |
#
|
|
|
b0a533 |
|
|
|
b0a533 |
# Below is the script used to generate a new source file
|
|
|
b0a533 |
# from the resource-agent upstream git repo.
|
|
|
b0a533 |
#
|
|
|
b0a533 |
# TAG=$(git log --pretty="format:%h" -n 1)
|
|
|
b0a533 |
# distdir="ClusterLabs-resource-agents-${TAG}"
|
|
|
b0a533 |
# TARFILE="${distdir}.tar.gz"
|
|
|
b0a533 |
# rm -rf $TARFILE $distdir
|
|
|
b0a533 |
# git archive --prefix=$distdir/ HEAD | gzip > $TARFILE
|
|
|
b0a533 |
#
|
|
|
b0a533 |
|
|
|
b0a533 |
%global upstream_prefix ClusterLabs-resource-agents
|
|
|
b0a533 |
%global upstream_version e711383f
|
|
|
b0a533 |
|
|
|
b0a533 |
%global sap_script_prefix sap_cluster_connector
|
|
|
b0a533 |
%global sap_script_hash 0015fe2
|
|
|
b0a533 |
|
|
|
b0a533 |
Name: resource-agents-sap
|
|
|
b0a533 |
Summary: SAP cluster resource agents
|
|
|
b0a533 |
Version: 4.1.1
|
|
|
c8f5e6 |
Release: 30%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
|
|
|
b0a533 |
License: GPLv2+
|
|
|
b0a533 |
URL: https://github.com/ClusterLabs/resource-agents
|
|
|
b0a533 |
%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel}
|
|
|
b0a533 |
Group: System Environment/Base
|
|
|
b0a533 |
%else
|
|
|
b0a533 |
Group: Productivity/Clustering/HA
|
|
|
b0a533 |
%endif
|
|
|
b0a533 |
Source0: %{upstream_prefix}-%{upstream_version}.tar.gz
|
|
|
b0a533 |
Source1: %{sap_script_prefix}-%{sap_script_hash}.tar.gz
|
|
|
c98ed0 |
Patch0: bz1751949-1-SAPInstance-add-reload-action.patch
|
|
|
c98ed0 |
Patch1: bz1751949-2-SAPInstance-improve-profile-detection.patch
|
|
|
c98ed0 |
Patch2: bz1751949-3-SAPInstance-metadata-improvements.patch
|
|
|
c8f5e6 |
Patch3: bz1817439-use-safe-temp-file-location.patch
|
|
|
b0a533 |
|
|
|
b0a533 |
BuildArch: noarch
|
|
|
b0a533 |
|
|
|
b0a533 |
BuildRequires: automake autoconf gcc
|
|
|
b0a533 |
BuildRequires: perl-interpreter python3-devel
|
|
|
b0a533 |
BuildRequires: libxslt glib2-devel
|
|
|
b0a533 |
|
|
|
b0a533 |
%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel}
|
|
|
b0a533 |
BuildRequires: docbook-style-xsl docbook-dtds
|
|
|
b0a533 |
%endif
|
|
|
b0a533 |
|
|
|
b0a533 |
Requires: resource-agents >= 4.1.1
|
|
|
b0a533 |
|
|
|
b0a533 |
Requires: /bin/bash /usr/bin/grep /bin/sed /bin/gawk
|
|
|
b0a533 |
|
|
|
b0a533 |
%description
|
|
|
b0a533 |
The SAP resource agents interface with Pacemaker to allow
|
|
|
b0a533 |
SAP instances to be managed in a cluster environment.
|
|
|
b0a533 |
|
|
|
b0a533 |
%prep
|
|
|
b0a533 |
%setup -q -n %{upstream_prefix}-%{upstream_version}
|
|
|
c98ed0 |
%setup -q -T -D -a 1 -n %{upstream_prefix}-%{upstream_version}
|
|
|
c98ed0 |
%patch0 -p1
|
|
|
c98ed0 |
%patch1 -p1
|
|
|
c98ed0 |
%patch2 -p1
|
|
|
c8f5e6 |
%patch3 -p1
|
|
|
b0a533 |
|
|
|
b0a533 |
%build
|
|
|
b0a533 |
if [ ! -f configure ]; then
|
|
|
b0a533 |
./autogen.sh
|
|
|
b0a533 |
fi
|
|
|
b0a533 |
|
|
|
b0a533 |
%global rasset linux-ha
|
|
|
b0a533 |
|
|
|
b0a533 |
%configure BASH_SHELL="/bin/bash" \
|
|
|
b0a533 |
PYTHON="%{__python3}" \
|
|
|
b0a533 |
%{conf_opt_fatal} \
|
|
|
b0a533 |
%if %{defined _unitdir}
|
|
|
b0a533 |
--with-systemdsystemunitdir=%{_unitdir} \
|
|
|
b0a533 |
%endif
|
|
|
b0a533 |
%if %{defined _tmpfilesdir}
|
|
|
b0a533 |
--with-systemdtmpfilesdir=%{_tmpfilesdir} \
|
|
|
b0a533 |
--with-rsctmpdir=/run/resource-agents \
|
|
|
b0a533 |
%endif
|
|
|
b0a533 |
--with-pkg-name=%{name} \
|
|
|
b0a533 |
--with-ras-set=%{rasset}
|
|
|
b0a533 |
|
|
|
b0a533 |
%if %{defined jobs}
|
|
|
b0a533 |
JFLAGS="$(echo '-j%{jobs}')"
|
|
|
b0a533 |
%else
|
|
|
b0a533 |
JFLAGS="$(echo '%{_smp_mflags}')"
|
|
|
b0a533 |
%endif
|
|
|
b0a533 |
|
|
|
b0a533 |
make $JFLAGS
|
|
|
b0a533 |
|
|
|
b0a533 |
%install
|
|
|
b0a533 |
make install DESTDIR=%{buildroot}
|
|
|
b0a533 |
|
|
|
b0a533 |
# remove other agents
|
|
|
b0a533 |
find %{buildroot}/usr/lib/ocf ! -type d ! -iname "SAP*" -exec rm {} \;
|
|
|
b0a533 |
find %{buildroot}/%{_mandir} -type f ! -iname "*SAP*" -exec rm {} \;
|
|
|
b0a533 |
|
|
|
b0a533 |
cp %{sap_script_prefix}-%{sap_script_hash}/redhat/sap_redhat_cluster_connector %{buildroot}/%{_sbindir}/sap_redhat_cluster_connector
|
|
|
b0a533 |
|
|
|
b0a533 |
## tree fixup
|
|
|
b0a533 |
# remove docs (there is only one and they should come from doc sections in files)
|
|
|
b0a533 |
rm -rf %{buildroot}/usr/share/doc/resource-agents
|
|
|
b0a533 |
|
|
|
b0a533 |
%clean
|
|
|
b0a533 |
rm -rf %{buildroot}
|
|
|
b0a533 |
|
|
|
b0a533 |
%files
|
|
|
b0a533 |
%defattr(-,root,root)
|
|
|
b0a533 |
/usr/lib/ocf/resource.d/heartbeat/SAP*
|
|
|
b0a533 |
/usr/lib/ocf/lib/heartbeat/sap*
|
|
|
b0a533 |
%{_mandir}/man7/*SAP*
|
|
|
b0a533 |
%{_sbindir}/sap_redhat_cluster_connector
|
|
|
b0a533 |
|
|
|
b0a533 |
%exclude /etc
|
|
|
b0a533 |
%exclude /usr/include
|
|
|
b0a533 |
%exclude /usr/lib/debug
|
|
|
b0a533 |
%exclude /usr/lib/systemd
|
|
|
b0a533 |
%exclude /usr/lib/tmpfiles.d
|
|
|
b0a533 |
%exclude /usr/libexec/heartbeat
|
|
|
b0a533 |
%exclude /usr/sbin/ldirectord
|
|
|
b0a533 |
%exclude /usr/sbin/ocf*
|
|
|
b0a533 |
%exclude /usr/share/%{name}
|
|
|
b0a533 |
%exclude /usr/src
|
|
|
b0a533 |
|
|
|
b0a533 |
%changelog
|
|
|
c8f5e6 |
* Fri Apr 17 2020 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.1.1-30
|
|
|
c8f5e6 |
- use safe temp file location
|
|
|
c8f5e6 |
|
|
|
c8f5e6 |
Resolves: rhbz#1817439
|
|
|
c8f5e6 |
|
|
|
c98ed0 |
* Thu Jan 23 2020 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.1.1-29
|
|
|
c98ed0 |
- SAPInstance: add reload-action
|
|
|
c98ed0 |
|
|
|
c98ed0 |
Resolves: rhbz#1751949
|
|
|
c98ed0 |
|
|
|
b0a533 |
* Tue Jun 18 2019 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.1.1-28
|
|
|
b0a533 |
- Initial build as separate package
|
|
|
b0a533 |
|
|
|
b0a533 |
Resolves: rhbz#1688341
|