diff --git a/resource-agents-sap.spec b/resource-agents-sap.spec index c1b2d33..850e43e 100644 --- a/resource-agents-sap.spec +++ b/resource-agents-sap.spec @@ -60,7 +60,7 @@ Name: resource-agents-sap Summary: SAP cluster resource agents Version: 4.15.1 -Release: 0%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}.1 +Release: 1%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} License: GPLv2+ URL: https://github.com/ClusterLabs/resource-agents Source0: %{upstream_prefix}-%{upstream_version}.tar.gz @@ -98,6 +98,8 @@ BuildRequires: libglue-devel BuildRequires: libxslt docbook_4 docbook-xsl-stylesheets %endif +BuildRequires: python3-psutil + Requires: resource-agents >= 4.8.0 Requires(post): systemd Requires(preun): systemd @@ -114,6 +116,23 @@ SAP instances to be managed in a cluster environment. %setup -q -n %{upstream_prefix}-%{upstream_version} %setup -q -T -D -a 1 -n %{upstream_prefix}-%{upstream_version} +# Move the agent to the others for the ClusterLabs included processing. +mv %{sapstart_prefix}-%{sapstart_version}/ra/SAPStartSrv.in heartbeat + +# Find the existing SAPInstance entry in the list and add 2 new after in corresponding formatting. +# heartbeat/Makefile.am indents by 3 tabs in the target list +# Skip the .in suffix, the agent is renamed in the process. +sed -i -e 's/\(\t\tSAPInstance\t\t\\\)/\1\n\t\t\tSAPStartSrv\t\t\\/' heartbeat/Makefile.am + +# Find the existing SAPInstance entry in the list and add 2 new after in corresponding formatting. +# doc/man/Makefile.am indents by 26 spaces in the target list +sed -i -e 's/\( \{26\}ocf_heartbeat_SAPInstance.7 \\\)/\1\n'\ +' ocf_heartbeat_SAPStartSrv.7 \\/' doc/man/Makefile.am + +# Add RA to configure.ac for processing during compilation. +# - renames python files after shebang fixup +# - enables man page creation +sed -i -e 's/\(AC_CONFIG_FILES..heartbeat.SysInfo.*\)/AC_CONFIG_FILES([heartbeat\/SAPStartSrv], [chmod +x heartbeat\/SAPStartSrv])\n\1/' configure.ac %build if [ ! -f configure ]; then @@ -166,11 +185,6 @@ find %{buildroot}/usr/lib/ocf ! -type d ! -iname "SAP*" -exec rm {} \; find %{buildroot}%{_mandir} -type f ! -iname "*SAP*" -exec rm {} \; find %{buildroot}%{_unitdir} -type f ! -iname "sap*" -exec rm {} \; -# Resource agent from Source1. -# Python script cannot be used for automatic man page creation during prep. -install -m 0755 %{sapstart_prefix}-%{sapstart_version}/ra/SAPStartSrv.in \ - %{buildroot}%{_usr}/lib/ocf/resource.d/heartbeat/SAPStartSrv - # Service units and script called by services. install -D -m 0644 %{sapstart_prefix}-%{sapstart_version}/sbin/sapservices-move.in \ %{buildroot}%{_bindir}/sapservices-move @@ -181,9 +195,7 @@ install -D -m 0644 %{sapstart_prefix}-%{sapstart_version}/service/* \ sed -i -e 's|%{_sbindir}|%{_bindir}|g' %{buildroot}%{_unitdir}/sap* # Fix python shebang. -sed -i -e 's|@PYTHON@ -tt|%{__python3}|g' \ - %{buildroot}%{_usr}/lib/ocf/resource.d/heartbeat/SAPStartSrv -sed -i -e 's|@PYTHON@ -tt|%{__python3}|g' %{buildroot}%{_bindir}/sapservices-move +sed -i -e 's|@PYTHON@|%{__python3}|g' %{buildroot}%{_bindir}/sapservices-move # License mkdir -p %{buildroot}%{_defaultlicensedir}/%{name} @@ -228,6 +240,10 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents %exclude /usr/src %changelog +* Fri Jan 10 2025 Janine Fuchs - 4.15.1-1 +- Include generated man page for SAPStartSrv + Resolves: RHEL-73496 + * Tue Oct 29 2024 Troy Dawson - 4.15.1-0.1 - Bump release for October 2024 mass rebuild: Resolves: RHEL-64018