From 07c40cf7665bb6f8019061583239e3551dce679b Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 23 2020 23:01:20 +0000 Subject: import resource-agents-sap-hana-scaleout-0.163.2-6.el8 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a8de35a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SOURCES/ClusterLabs-resource-agents-e711383f.tar.gz +SOURCES/SAPHanaSR-ScaleOut-a77e8c6.tar.gz diff --git a/.resource-agents-sap-hana-scaleout.metadata b/.resource-agents-sap-hana-scaleout.metadata new file mode 100644 index 0000000..ef42400 --- /dev/null +++ b/.resource-agents-sap-hana-scaleout.metadata @@ -0,0 +1,2 @@ +0358e1cb7fe86b2105bd2646cbe86f3c0273844a SOURCES/ClusterLabs-resource-agents-e711383f.tar.gz +e5624e3028720d0d55ab3d598655a1938042e26c SOURCES/SAPHanaSR-ScaleOut-a77e8c6.tar.gz diff --git a/SOURCES/SAPHanaSR-monitor-fix-tolower-error.patch b/SOURCES/SAPHanaSR-monitor-fix-tolower-error.patch new file mode 100644 index 0000000..57e0a6f --- /dev/null +++ b/SOURCES/SAPHanaSR-monitor-fix-tolower-error.patch @@ -0,0 +1,23 @@ +From 9eafa6e3dd9735bdd1e4e447d9e8c3d4da1e9c30 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Thu, 27 Jun 2019 10:38:46 +0200 +Subject: [PATCH] SAPHanaSR-monitor: fix tolower() issue, which seems to be an + artifact from a2p (Awk to Perl) + +--- + SAPHana/bin/SAPHanaSR-monitor | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/SAPHanaSR-ScaleOut-a77e8c6/SAPHana/bin/SAPHanaSR-monitor b/SAPHanaSR-ScaleOut-a77e8c6/SAPHana/bin/SAPHanaSR-monitor +index 737545c..da6bf08 100755 +--- a/SAPHanaSR-ScaleOut-a77e8c6/SAPHana/bin/SAPHanaSR-monitor ++++ b/SAPHanaSR-ScaleOut-a77e8c6/SAPHana/bin/SAPHanaSR-monitor +@@ -219,7 +219,7 @@ sub processMonitor() { + # + $sid=$sids[0]; # currently ony one sid is supported + ( $sid, $ino ) = split(":", $sid); +- $sid=tolower("$sid"); ++ $sid=lc("$sid"); + get_hana_attributes($sid, \%Host, \%HName, \%Global, \%GName, \%Site, \%SName); + if ( keys(%Host) == 0 ) { + printf "No attributes found for SID=%s\n", $sid; diff --git a/SPECS/resource-agents-sap-hana-scaleout.spec b/SPECS/resource-agents-sap-hana-scaleout.spec new file mode 100644 index 0000000..19f268d --- /dev/null +++ b/SPECS/resource-agents-sap-hana-scaleout.spec @@ -0,0 +1,161 @@ +# +# 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-ScaleOut upstream git repo. +# +# TAG=$(git log --pretty="format:%h" -n 1) +# distdir="SAPHanaSR-ScaleOut-${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_scaleout_prefix SAPHanaSR-ScaleOut +%global saphana_scaleout_hash a77e8c6 + +Name: resource-agents-sap-hana-scaleout +Summary: SAP HANA Scale-Out cluster resource agents +Epoch: 1 +Version: 0.163.2 +Release: 6%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} +License: GPLv2+ +URL: https://github.com/SUSE/SAPHanaSR-ScaleOut +%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 +Source1: %{saphana_scaleout_prefix}-%{saphana_scaleout_hash}.tar.gz +Patch0: SAPHanaSR-monitor-fix-tolower-error.patch + +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 +Conflicts: resource-agents-sap-hana + +Requires: /bin/bash /usr/bin/grep /bin/sed /bin/gawk +Requires: perl + +%description +The SAP HANA Scale-Out resource agents interface with Pacemaker +to allow SAP HANA Scale-Out instances to be managed in a cluster +environment. + +%prep +%setup -q -n %{upstream_prefix}-%{upstream_version} +%setup -q -T -D -a 1 -n %{upstream_prefix}-%{upstream_version} + +%patch0 -p1 + +# add SAPHana agents to Makefile.am +mv %{saphana_scaleout_prefix}-%{saphana_scaleout_hash}/SAPHana/ra/SAPHana* heartbeat +sed -i -e '/ SAPInstance \\/a\ SAPHanaController \\\n SAPHanaTopology \\' heartbeat/Makefile.am +sed -i -e '/ ocf_heartbeat_SAPInstance.7 \\/a\ ocf_heartbeat_SAPHanaController.7 \\\n ocf_heartbeat_SAPHanaTopology.7 \\' doc/man/Makefile.am + +cp %{saphana_scaleout_prefix}-%{saphana_scaleout_hash}/SAPHana/doc/LICENSE . + +%build +if [ ! -f configure ]; then + ./autogen.sh +fi + +%global rasset linux-ha + +%configure BASH_SHELL="/bin/bash" \ + PYTHON="%{__python3}" \ + %{conf_opt_fatal} \ +%if %{defined _unitdir} + --with-systemdsystemunitdir=%{_unitdir} \ +%endif +%if %{defined _tmpfilesdir} + --with-systemdtmpfilesdir=%{_tmpfilesdir} \ + --with-rsctmpdir=/run/resource-agents \ +%endif + --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 {} \; + +install -m 0755 %{saphana_scaleout_prefix}-%{saphana_scaleout_hash}/SAPHana/bin/{SAPHanaSR-monitor,SAPHanaSR-showAttr} %{buildroot}/%{_sbindir} +mkdir %{buildroot}/%{_usr}/lib/SAPHanaSR-ScaleOut +install -m 0444 %{saphana_scaleout_prefix}-%{saphana_scaleout_hash}/SAPHana/test/SAPHanaSRTools.pm %{buildroot}/%{_usr}/lib/SAPHanaSR-ScaleOut/SAPHanaSRTools.pm +mkdir -p %{buildroot}/%{_datadir}/SAPHanaSR-ScaleOut/samples +install -m 0644 %{saphana_scaleout_prefix}-%{saphana_scaleout_hash}/SAPHana/srHook/SAPHanaSR.py %{buildroot}/%{_datadir}/SAPHanaSR-ScaleOut +install -m 0444 %{saphana_scaleout_prefix}-%{saphana_scaleout_hash}/SAPHana/crmconfig/* %{buildroot}/%{_datadir}/SAPHanaSR-ScaleOut/samples +install -m 0444 %{saphana_scaleout_prefix}-%{saphana_scaleout_hash}/SAPHana/srHook/global.ini %{buildroot}/%{_datadir}/SAPHanaSR-ScaleOut/samples +gzip %{saphana_scaleout_prefix}-%{saphana_scaleout_hash}/SAPHana/man/SAPHanaSR*.? +cp %{saphana_scaleout_prefix}-%{saphana_scaleout_hash}/SAPHana/man/SAPHanaSR*.7.gz %{buildroot}/%{_mandir}/man7 +cp %{saphana_scaleout_prefix}-%{saphana_scaleout_hash}/SAPHana/man/SAPHanaSR*.8.gz %{buildroot}/%{_mandir}/man8 + +## 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) +%license LICENSE +%{_usr}/lib/ocf/resource.d/heartbeat/SAPHana* +%{_mandir}/man7/*SAPHana* +%{_mandir}/man8/*SAPHana* +%{_sbindir}/SAPHanaSR* +%{_usr}/lib/SAPHanaSR-ScaleOut +%{_datadir}/SAPHanaSR-ScaleOut + +%exclude /etc +%exclude /usr/include +%exclude /usr/lib/debug +%exclude /usr/lib/systemd +%exclude /usr/lib/tmpfiles.d +%exclude /usr/libexec +%exclude /usr/sbin/ldirectord +%exclude /usr/sbin/ocf* +%exclude /usr/share/%{name} +%exclude /usr/src + +%changelog +* Tue Feb 18 2020 Oyvind Albrigtsen - 0.163.2-6 +- Add Conflicts: to avoid future CI gating errors + + Resolves: rhbz#1802995 + +* Thu Jun 27 2019 Oyvind Albrigtsen - 0.163.2-5 +- Initial build as separate package + + Resolves: rhbz#1705765