|
|
e318a3 |
#
|
|
|
e318a3 |
# All modifications and additions to the file contributed by third parties
|
|
|
e318a3 |
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
e318a3 |
# upon. The license for this file, and modifications and additions to the
|
|
|
e318a3 |
# file, is the same license as for the pristine package itself (unless the
|
|
|
e318a3 |
# license for the pristine package is not an Open Source License, in which
|
|
|
e318a3 |
# case the license is the MIT License). An "Open Source License" is a
|
|
|
e318a3 |
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
e318a3 |
# published by the Open Source Initiative.
|
|
|
e318a3 |
#
|
|
|
e318a3 |
|
|
|
e318a3 |
# Below is the script used to generate a new source file
|
|
|
e318a3 |
# from the SAPHanaSR-ScaleOut upstream git repo.
|
|
|
e318a3 |
#
|
|
|
e318a3 |
# TAG=$(git log --pretty="format:%h" -n 1)
|
|
|
e318a3 |
# distdir="SAPHanaSR-ScaleOut-${TAG}"
|
|
|
e318a3 |
# TARFILE="${distdir}.tar.gz"
|
|
|
e318a3 |
# rm -rf $TARFILE $distdir
|
|
|
e318a3 |
# git archive --prefix=$distdir/ HEAD | gzip > $TARFILE
|
|
|
e318a3 |
#
|
|
|
e318a3 |
|
|
|
e318a3 |
%global upstream_prefix ClusterLabs-resource-agents
|
|
|
e318a3 |
%global upstream_version e76b7d3a
|
|
|
e318a3 |
|
|
|
e318a3 |
%global saphana_scaleout_prefix SAPHanaSR-ScaleOut
|
|
|
e318a3 |
%global saphana_scaleout_hash b2c5218
|
|
|
e318a3 |
|
|
|
e318a3 |
# Whether this platform defaults to using systemd as an init system
|
|
|
e318a3 |
# (needs to be evaluated prior to BuildRequires being enumerated and
|
|
|
e318a3 |
# installed as it's intended to conditionally select some of these, and
|
|
|
e318a3 |
# for that there are only few indicators with varying reliability:
|
|
|
e318a3 |
# - presence of systemd-defined macros (when building in a full-fledged
|
|
|
e318a3 |
# environment, which is not the case with ordinary mock-based builds)
|
|
|
e318a3 |
# - systemd-aware rpm as manifested with the presence of particular
|
|
|
e318a3 |
# macro (rpm itself will trivially always be present when building)
|
|
|
e318a3 |
# - existence of /usr/lib/os-release file, which is something heavily
|
|
|
e318a3 |
# propagated by systemd project
|
|
|
e318a3 |
# - when not good enough, there's always a possibility to check
|
|
|
e318a3 |
# particular distro-specific macros (incl. version comparison)
|
|
|
e318a3 |
%define systemd_native (%{?_unitdir:1}%{!?_unitdir:0}%{nil \
|
|
|
e318a3 |
} || %{?__transaction_systemd_inhibit:1}%{!?__transaction_systemd_inhibit:0}%{nil \
|
|
|
e318a3 |
} || %(test -f /usr/lib/os-release; test $? -ne 0; echo $?))
|
|
|
e318a3 |
|
|
|
e318a3 |
# determine the ras-set to process based on configure invokation
|
|
|
e318a3 |
%bcond_with rgmanager
|
|
|
e318a3 |
%bcond_without linuxha
|
|
|
e318a3 |
|
|
|
e318a3 |
Name: resource-agents-sap-hana-scaleout
|
|
|
e318a3 |
Summary: SAP HANA Scale-Out cluster resource agents
|
|
|
e318a3 |
Epoch: 1
|
|
|
e318a3 |
Version: 0.164.2
|
|
|
e318a3 |
Release: 2%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}.1
|
|
|
e318a3 |
License: GPLv2+
|
|
|
e318a3 |
URL: https://github.com/SUSE/SAPHanaSR-ScaleOut
|
|
|
e318a3 |
Source0: %{upstream_prefix}-%{upstream_version}.tar.gz
|
|
|
e318a3 |
Source1: %{saphana_scaleout_prefix}-%{saphana_scaleout_hash}.tar.gz
|
|
|
e318a3 |
|
|
|
e318a3 |
BuildArch: noarch
|
|
|
e318a3 |
|
|
|
e318a3 |
# Build dependencies
|
|
|
e318a3 |
BuildRequires: make
|
|
|
e318a3 |
BuildRequires: automake autoconf pkgconfig gcc
|
|
|
e318a3 |
BuildRequires: perl-interpreter
|
|
|
e318a3 |
BuildRequires: libxslt glib2-devel
|
|
|
e318a3 |
BuildRequires: systemd
|
|
|
e318a3 |
BuildRequires: which
|
|
|
e318a3 |
|
|
|
e318a3 |
%if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 || 0%{?suse_version}
|
|
|
e318a3 |
BuildRequires: python3-devel
|
|
|
e318a3 |
%else
|
|
|
e318a3 |
BuildRequires: python-devel
|
|
|
e318a3 |
%endif
|
|
|
e318a3 |
|
|
|
e318a3 |
%if 0%{?fedora} || 0%{?centos} || 0%{?rhel}
|
|
|
e318a3 |
BuildRequires: docbook-style-xsl docbook-dtds
|
|
|
e318a3 |
%if 0%{?rhel} == 0
|
|
|
e318a3 |
BuildRequires: libnet-devel
|
|
|
e318a3 |
%endif
|
|
|
e318a3 |
%endif
|
|
|
e318a3 |
|
|
|
e318a3 |
%if 0%{?suse_version}
|
|
|
e318a3 |
BuildRequires: libnet-devel
|
|
|
e318a3 |
BuildRequires: libglue-devel
|
|
|
e318a3 |
BuildRequires: libxslt docbook_4 docbook-xsl-stylesheets
|
|
|
e318a3 |
%endif
|
|
|
e318a3 |
|
|
|
e318a3 |
Requires: resource-agents >= 4.8.0
|
|
|
e318a3 |
Conflicts: resource-agents-sap-hana
|
|
|
e318a3 |
|
|
|
e318a3 |
Requires: /bin/bash /usr/bin/grep /bin/sed /bin/gawk
|
|
|
e318a3 |
Requires: perl
|
|
|
e318a3 |
|
|
|
e318a3 |
%description
|
|
|
e318a3 |
The SAP HANA Scale-Out resource agents interface with Pacemaker
|
|
|
e318a3 |
to allow SAP HANA Scale-Out instances to be managed in a cluster
|
|
|
e318a3 |
environment.
|
|
|
e318a3 |
|
|
|
e318a3 |
%prep
|
|
|
e318a3 |
%setup -q -n %{upstream_prefix}-%{upstream_version}
|
|
|
e318a3 |
%setup -q -T -D -a 1 -n %{upstream_prefix}-%{upstream_version}
|
|
|
e318a3 |
|
|
|
e318a3 |
# add SAPHana agents to Makefile.am
|
|
|
e318a3 |
mv %{saphana_scaleout_prefix}-%{saphana_scaleout_hash}/SAPHana/ra/SAPHana* heartbeat
|
|
|
e318a3 |
sed -i -e '/ SAPInstance \\/a\ SAPHanaController \\\n SAPHanaTopology \\' heartbeat/Makefile.am
|
|
|
e318a3 |
sed -i -e '/ ocf_heartbeat_SAPInstance.7 \\/a\ ocf_heartbeat_SAPHanaController.7 \\\n ocf_heartbeat_SAPHanaTopology.7 \\' doc/man/Makefile.am
|
|
|
e318a3 |
|
|
|
e318a3 |
cp %{saphana_scaleout_prefix}-%{saphana_scaleout_hash}/SAPHana/doc/LICENSE .
|
|
|
e318a3 |
|
|
|
e318a3 |
%build
|
|
|
e318a3 |
if [ ! -f configure ]; then
|
|
|
e318a3 |
./autogen.sh
|
|
|
e318a3 |
fi
|
|
|
e318a3 |
|
|
|
e318a3 |
%if 0%{?fedora} >= 11 || 0%{?centos} > 5 || 0%{?rhel} > 5
|
|
|
e318a3 |
CFLAGS="$(echo '%{optflags}')"
|
|
|
e318a3 |
%global conf_opt_fatal "--enable-fatal-warnings=no"
|
|
|
e318a3 |
%else
|
|
|
e318a3 |
CFLAGS="${CFLAGS} ${RPM_OPT_FLAGS}"
|
|
|
e318a3 |
%global conf_opt_fatal "--enable-fatal-warnings=yes"
|
|
|
e318a3 |
%endif
|
|
|
e318a3 |
|
|
|
e318a3 |
%if %{with rgmanager}
|
|
|
e318a3 |
%global rasset rgmanager
|
|
|
e318a3 |
%endif
|
|
|
e318a3 |
%if %{with linuxha}
|
|
|
e318a3 |
%global rasset linux-ha
|
|
|
e318a3 |
%endif
|
|
|
e318a3 |
%if %{with rgmanager} && %{with linuxha}
|
|
|
e318a3 |
%global rasset all
|
|
|
e318a3 |
%endif
|
|
|
e318a3 |
|
|
|
e318a3 |
export CFLAGS
|
|
|
e318a3 |
|
|
|
e318a3 |
%configure \
|
|
|
e318a3 |
%if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 || 0%{?suse_version}
|
|
|
e318a3 |
PYTHON="%{__python3}" \
|
|
|
e318a3 |
%endif
|
|
|
e318a3 |
%{conf_opt_fatal} \
|
|
|
e318a3 |
%if %{defined _unitdir}
|
|
|
e318a3 |
--with-systemdsystemunitdir=%{_unitdir} \
|
|
|
e318a3 |
%endif
|
|
|
e318a3 |
%if %{defined _tmpfilesdir}
|
|
|
e318a3 |
--with-systemdtmpfilesdir=%{_tmpfilesdir} \
|
|
|
e318a3 |
--with-rsctmpdir=/run/resource-agents \
|
|
|
e318a3 |
%endif
|
|
|
e318a3 |
--with-pkg-name=resource-agents \
|
|
|
e318a3 |
--with-ras-set=%{rasset}
|
|
|
e318a3 |
|
|
|
e318a3 |
%if %{defined jobs}
|
|
|
e318a3 |
JFLAGS="$(echo '-j%{jobs}')"
|
|
|
e318a3 |
%else
|
|
|
e318a3 |
JFLAGS="$(echo '%{_smp_mflags}')"
|
|
|
e318a3 |
%endif
|
|
|
e318a3 |
|
|
|
e318a3 |
make $JFLAGS
|
|
|
e318a3 |
|
|
|
e318a3 |
%install
|
|
|
e318a3 |
rm -rf %{buildroot}
|
|
|
e318a3 |
make install DESTDIR=%{buildroot}
|
|
|
e318a3 |
|
|
|
e318a3 |
# remove other agents
|
|
|
e318a3 |
find %{buildroot}/usr/lib/ocf ! -type d ! -iname "SAPHana*" -exec rm {} \;
|
|
|
e318a3 |
find %{buildroot}/%{_mandir} -type f ! -iname "*SAPHana*" -exec rm {} \;
|
|
|
e318a3 |
|
|
|
e318a3 |
install -m 0755 %{saphana_scaleout_prefix}-%{saphana_scaleout_hash}/SAPHana/bin/{SAPHanaSR-monitor,SAPHanaSR-showAttr} %{buildroot}/%{_sbindir}
|
|
|
e318a3 |
mkdir %{buildroot}/%{_usr}/lib/SAPHanaSR-ScaleOut
|
|
|
e318a3 |
install -m 0444 %{saphana_scaleout_prefix}-%{saphana_scaleout_hash}/SAPHana/test/SAPHanaSRTools.pm %{buildroot}/%{_usr}/lib/SAPHanaSR-ScaleOut/SAPHanaSRTools.pm
|
|
|
e318a3 |
mkdir -p %{buildroot}/%{_datadir}/SAPHanaSR-ScaleOut/samples
|
|
|
e318a3 |
install -m 0644 %{saphana_scaleout_prefix}-%{saphana_scaleout_hash}/SAPHana/srHook/SAPHanaSR.py %{buildroot}/%{_datadir}/SAPHanaSR-ScaleOut
|
|
|
e318a3 |
install -m 0444 %{saphana_scaleout_prefix}-%{saphana_scaleout_hash}/SAPHana/crmconfig/* %{buildroot}/%{_datadir}/SAPHanaSR-ScaleOut/samples
|
|
|
e318a3 |
install -m 0444 %{saphana_scaleout_prefix}-%{saphana_scaleout_hash}/SAPHana/srHook/global.ini %{buildroot}/%{_datadir}/SAPHanaSR-ScaleOut/samples
|
|
|
e318a3 |
gzip %{saphana_scaleout_prefix}-%{saphana_scaleout_hash}/SAPHana/man/SAPHanaSR*.?
|
|
|
e318a3 |
cp %{saphana_scaleout_prefix}-%{saphana_scaleout_hash}/SAPHana/man/SAPHanaSR*.7.gz %{buildroot}/%{_mandir}/man7
|
|
|
e318a3 |
cp %{saphana_scaleout_prefix}-%{saphana_scaleout_hash}/SAPHana/man/SAPHanaSR*.8.gz %{buildroot}/%{_mandir}/man8
|
|
|
e318a3 |
|
|
|
e318a3 |
## tree fixup
|
|
|
e318a3 |
# remove docs (there is only one and they should come from doc sections in files)
|
|
|
e318a3 |
rm -rf %{buildroot}/usr/share/doc/resource-agents
|
|
|
e318a3 |
|
|
|
e318a3 |
%files
|
|
|
e318a3 |
%defattr(-,root,root)
|
|
|
e318a3 |
%license LICENSE
|
|
|
e318a3 |
%{_usr}/lib/ocf/resource.d/heartbeat/SAPHana*
|
|
|
e318a3 |
%{_mandir}/man7/*SAPHana*
|
|
|
e318a3 |
%{_mandir}/man8/*SAPHana*
|
|
|
e318a3 |
%{_sbindir}/SAPHanaSR*
|
|
|
e318a3 |
%{_usr}/lib/SAPHanaSR-ScaleOut
|
|
|
e318a3 |
%{_datadir}/SAPHanaSR-ScaleOut
|
|
|
e318a3 |
|
|
|
e318a3 |
%exclude /etc
|
|
|
e318a3 |
%exclude /usr/include
|
|
|
e318a3 |
%exclude /usr/lib/debug
|
|
|
e318a3 |
%exclude /usr/lib/systemd
|
|
|
e318a3 |
%exclude /usr/lib/tmpfiles.d
|
|
|
e318a3 |
%exclude /usr/libexec
|
|
|
e318a3 |
%exclude /usr/sbin/ldirectord
|
|
|
e318a3 |
%exclude /usr/sbin/ocf*
|
|
|
e318a3 |
%exclude /usr/share/resource-agents
|
|
|
e318a3 |
%exclude /usr/share/pkgconfig/resource-agents.pc
|
|
|
e318a3 |
|
|
|
e318a3 |
%exclude /usr/src
|
|
|
e318a3 |
|
|
|
e318a3 |
%changelog
|
|
|
e318a3 |
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1:0.164.2-2.1
|
|
|
e318a3 |
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
e318a3 |
Related: rhbz#1991688
|
|
|
e318a3 |
|
|
|
e318a3 |
* Mon Jun 14 2021 Oyvind Albrigtsen <oalbrigt@redhat.com> - 0.164.2-2
|
|
|
e318a3 |
- Add CI gating tests
|
|
|
e318a3 |
|
|
|
e318a3 |
Resolves: rhbz#1958970
|
|
|
e318a3 |
|
|
|
e318a3 |
* Mon Jun 7 2021 Oyvind Albrigtsen <oalbrigt@redhat.com> - 0.164.2-1
|
|
|
e318a3 |
- Rebase to SAPHanaSR-ScaleOut 0.164.2 upstream release.
|
|
|
e318a3 |
|
|
|
e318a3 |
* Thu Apr 30 2020 Oyvind Albrigtsen <oalbrigt@redhat.com> - 0.164.0-1
|
|
|
e318a3 |
- Set default timeouts based on recommendations and a couple of bugfixes
|
|
|
e318a3 |
|
|
|
e318a3 |
Resolves: rhbz#1827107
|
|
|
e318a3 |
|
|
|
e318a3 |
* Tue Feb 18 2020 Oyvind Albrigtsen <oalbrigt@redhat.com> - 0.163.2-6
|
|
|
e318a3 |
- Add Conflicts: to avoid future CI gating errors
|
|
|
e318a3 |
|
|
|
e318a3 |
Resolves: rhbz#1802995
|
|
|
e318a3 |
|
|
|
e318a3 |
* Thu Jun 27 2019 Oyvind Albrigtsen <oalbrigt@redhat.com> - 0.163.2-5
|
|
|
e318a3 |
- Initial build as separate package
|
|
|
e318a3 |
|
|
|
e318a3 |
Resolves: rhbz#1705765
|