2019-11-12 16:27:54 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
|
|
|
|
# Below is the script used to generate a new source file
|
|
|
|
# from the SAPHanaSR upstream git repo.
|
|
|
|
#
|
|
|
|
# TAG=$(git log --pretty="format:%h" -n 1)
|
|
|
|
# distdir="SAPHanaSR-${TAG}"
|
|
|
|
# TARFILE="${distdir}.tar.gz"
|
|
|
|
# rm -rf $TARFILE $distdir
|
|
|
|
# git archive --prefix=$distdir/ HEAD | gzip > $TARFILE
|
|
|
|
#
|
|
|
|
|
|
|
|
%global upstream_prefix ClusterLabs-resource-agents
|
|
|
|
%global upstream_version e711383f
|
|
|
|
|
|
|
|
%global saphana_prefix SAPHanaSR
|
2020-04-28 09:32:02 +00:00
|
|
|
%global saphana_version d1dde99
|
2019-11-12 16:27:54 +00:00
|
|
|
|
|
|
|
Name: resource-agents-sap-hana
|
|
|
|
Summary: SAP HANA cluster resource agents
|
|
|
|
Epoch: 1
|
2020-04-28 09:32:02 +00:00
|
|
|
Version: 0.154.0
|
2021-12-21 09:13:30 +00:00
|
|
|
Release: 3%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}.1
|
2019-11-12 16:27:54 +00:00
|
|
|
License: GPLv2+
|
2020-04-28 09:32:02 +00:00
|
|
|
URL: https://github.com/SUSE/SAPHanaSR
|
2019-11-12 16:27:54 +00:00
|
|
|
%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel}
|
|
|
|
Group: System Environment/Base
|
|
|
|
%else
|
|
|
|
Group: Productivity/Clustering/HA
|
|
|
|
%endif
|
|
|
|
Source0: %{upstream_prefix}-%{upstream_version}.tar.gz
|
2020-04-28 09:32:02 +00:00
|
|
|
Source1: %{saphana_prefix}-%{saphana_version}.tar.gz
|
2021-11-09 09:45:48 +00:00
|
|
|
Patch0: bz1855885-SAPHana-use-actual-mode.patch
|
2021-12-21 09:13:30 +00:00
|
|
|
Patch1: bz2027456-1-SAPHana-remove-HANA_CALL_TIMEOUT-parameter.patch
|
|
|
|
Patch2: bz2027456-2-SAPHanaTopology-remove-HANA_CALL_TIMEOUT-parameter.patch
|
2019-11-12 16:27:54 +00:00
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
BuildRequires: automake autoconf gcc
|
|
|
|
BuildRequires: perl-interpreter python3-devel
|
|
|
|
BuildRequires: libxslt glib2-devel
|
|
|
|
|
|
|
|
%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel}
|
|
|
|
BuildRequires: docbook-style-xsl docbook-dtds
|
|
|
|
%endif
|
|
|
|
|
|
|
|
Requires: resource-agents >= 4.1.1
|
2020-04-28 09:32:02 +00:00
|
|
|
Conflicts: %{name}-scaleout
|
2019-11-12 16:27:54 +00:00
|
|
|
|
|
|
|
Requires: /bin/bash /usr/bin/grep /bin/sed /bin/gawk
|
|
|
|
Requires: perl
|
|
|
|
|
|
|
|
%description
|
|
|
|
The SAP HANA resource agents interface with Pacemaker to allow
|
|
|
|
SAP instances to be managed in a cluster environment.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{upstream_prefix}-%{upstream_version}
|
2020-04-28 09:32:02 +00:00
|
|
|
%setup -q -T -D -a 1 -n %{upstream_prefix}-%{upstream_version}
|
2019-11-12 16:27:54 +00:00
|
|
|
|
|
|
|
# add SAPHana agents to Makefile.am
|
2020-04-28 09:32:02 +00:00
|
|
|
mv %{saphana_prefix}-%{saphana_version}/ra/SAPHana* heartbeat
|
2019-11-12 16:27:54 +00:00
|
|
|
sed -i -e '/ SAPInstance \\/a\ SAPHana \\\n SAPHanaTopology \\' heartbeat/Makefile.am
|
|
|
|
sed -i -e '/ ocf_heartbeat_SAPInstance.7 \\/a\ ocf_heartbeat_SAPHana.7 \\\n ocf_heartbeat_SAPHanaTopology.7 \\' doc/man/Makefile.am
|
|
|
|
|
2020-04-28 09:32:02 +00:00
|
|
|
# change provider company
|
|
|
|
sed -i -e 's/\("provider_company": \)"SUSE"/\1"Red Hat"/g' %{saphana_prefix}-%{saphana_version}/srHook/SAPHanaSR.py
|
|
|
|
|
2021-08-10 12:11:33 +00:00
|
|
|
%patch0 -p1
|
2021-12-21 09:13:30 +00:00
|
|
|
%patch1 -p1
|
|
|
|
%patch2 -p1
|
2021-08-10 12:11:33 +00:00
|
|
|
|
2019-11-12 16:27:54 +00:00
|
|
|
%build
|
|
|
|
if [ ! -f configure ]; then
|
|
|
|
./autogen.sh
|
|
|
|
fi
|
|
|
|
|
|
|
|
%global rasset linux-ha
|
|
|
|
|
|
|
|
%configure BASH_SHELL="/bin/bash" \
|
|
|
|
PYTHON="%{__python3}" \
|
|
|
|
%{conf_opt_fatal} \
|
|
|
|
--with-pkg-name=%{name} \
|
|
|
|
--with-ras-set=%{rasset}
|
|
|
|
|
|
|
|
%if %{defined jobs}
|
|
|
|
JFLAGS="$(echo '-j%{jobs}')"
|
|
|
|
%else
|
|
|
|
JFLAGS="$(echo '%{_smp_mflags}')"
|
|
|
|
%endif
|
|
|
|
|
|
|
|
make $JFLAGS
|
|
|
|
|
|
|
|
%install
|
|
|
|
make install DESTDIR=%{buildroot}
|
|
|
|
|
|
|
|
# remove other agents
|
|
|
|
find %{buildroot}/usr/lib/ocf ! -type d ! -iname "SAPHana*" -exec rm {} \;
|
|
|
|
find %{buildroot}/%{_mandir} -type f ! -iname "*SAPHana*" -exec rm {} \;
|
|
|
|
|
2020-04-28 09:32:02 +00:00
|
|
|
mkdir %{buildroot}/%{_datadir}/SAPHanaSR
|
|
|
|
cp -r %{saphana_prefix}-%{saphana_version}/srHook %{buildroot}/%{_datadir}/SAPHanaSR
|
|
|
|
|
2019-11-12 16:27:54 +00:00
|
|
|
## tree fixup
|
|
|
|
# remove docs (there is only one and they should come from doc sections in files)
|
|
|
|
rm -rf %{buildroot}/usr/share/doc/resource-agents
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_usr}/lib/ocf/resource.d/heartbeat/SAPHana*
|
|
|
|
%{_mandir}/man7/*SAP*
|
2020-04-28 09:32:02 +00:00
|
|
|
%{_datadir}/SAPHanaSR
|
2019-11-12 16:27:54 +00:00
|
|
|
|
|
|
|
%exclude /etc
|
|
|
|
%exclude /usr/include
|
|
|
|
%exclude /usr/lib/debug
|
|
|
|
%exclude /usr/lib/systemd
|
|
|
|
%exclude /usr/lib/tmpfiles.d
|
|
|
|
%exclude /usr/libexec
|
|
|
|
%exclude /usr/sbin
|
|
|
|
%exclude /usr/share/%{name}
|
|
|
|
%exclude /usr/src
|
|
|
|
|
|
|
|
%changelog
|
2021-12-21 09:13:30 +00:00
|
|
|
* Tue Nov 30 2021 Oyvind Albrigtsen <oalbrigt@redhat.com> - 0.154.0-3.1
|
|
|
|
- SAPHana/SAPHanaTopology: remove HANA_CALL_TIMEOUT parameter from
|
|
|
|
metadata
|
|
|
|
|
|
|
|
Resolves: rhbz#2027456
|
|
|
|
|
2021-11-09 09:45:48 +00:00
|
|
|
* Thu Jul 22 2021 Oyvind Albrigtsen <oalbrigt@redhat.com> - 0.154.0-3
|
2021-08-10 12:11:33 +00:00
|
|
|
- SAPHana: use actual_mode from global.ini and fallback to mode when
|
|
|
|
it's not set
|
|
|
|
|
2021-11-09 09:45:48 +00:00
|
|
|
Resolves: rhbz#1855885
|
2021-08-10 12:11:33 +00:00
|
|
|
|
2020-04-28 09:32:02 +00:00
|
|
|
* Fri Feb 14 2020 Oyvind Albrigtsen <oalbrigt@redhat.com> - 0.154.0-2
|
|
|
|
- Rebase to SAPHanaSR 0.154.0 upstream release.
|
|
|
|
|
|
|
|
Resolves: rhbz#1802104
|
|
|
|
|
2019-11-12 16:27:54 +00:00
|
|
|
* Fri Sep 6 2019 Oyvind Albrigtsen <oalbrigt@redhat.com> - 0.152.22-1
|
|
|
|
- SAPHanaTopology: make multi instance aware (MCOS)
|
|
|
|
|
|
|
|
Resolves: rhbz#1738205
|
|
|
|
|
|
|
|
* Tue Jul 30 2019 Oyvind Albrigtsen <oalbrigt@redhat.com> - 0.152.21-4
|
|
|
|
- Initial build as separate package
|
|
|
|
|
|
|
|
Resolves: rhbz#1688344
|