Blame SPECS/resource-agents-sap.spec

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