Blame SPECS/resource-agents-sap.spec

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