diff --git a/resource-agents-sap-hana-scaleout.spec b/resource-agents-sap-hana-scaleout.spec index bf4cfce..e6cbe0d 100644 --- a/resource-agents-sap-hana-scaleout.spec +++ b/resource-agents-sap-hana-scaleout.spec @@ -63,9 +63,12 @@ Source1: %{saphana_prefix}-%{saphana_hash}.tar.gz BuildArch: noarch # Build dependencies -BuildRequires: automake autoconf gcc -BuildRequires: perl-interpreter perl-generators -BuildRequires: libxslt glib2-devel +BuildRequires: make +BuildRequires: automake autoconf pkgconfig gcc +BuildRequires: perl-interpreter perl-generators +BuildRequires: libxslt glib2-devel libqb-devel +BuildRequires: systemd +BuildRequires: which %if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 || 0%{?suse_version} BuildRequires: python3-devel @@ -126,10 +129,30 @@ if [ ! -f configure ]; then ./autogen.sh fi -%global rasset linux-ha +%if 0%{?fedora} >= 11 || 0%{?centos} > 5 || 0%{?rhel} > 5 +CFLAGS="$(echo '%{optflags}')" +%global conf_opt_fatal "--enable-fatal-warnings=no" +%else +CFLAGS="${CFLAGS} ${RPM_OPT_FLAGS}" +%global conf_opt_fatal "--enable-fatal-warnings=yes" +%endif -%configure BASH_SHELL="/bin/bash" \ +%if %{with rgmanager} +%global rasset rgmanager +%endif +%if %{with linuxha} +%global rasset linux-ha +%endif +%if %{with rgmanager} && %{with linuxha} +%global rasset all +%endif + +export CFLAGS + +%configure \ +%if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 || 0%{?suse_version} PYTHON="%{__python3}" \ +%endif %{conf_opt_fatal} \ %if %{defined _unitdir} --with-systemdsystemunitdir=%{_unitdir} \ @@ -138,16 +161,11 @@ fi --with-systemdtmpfilesdir=%{_tmpfilesdir} \ --with-rsctmpdir=/run/resource-agents \ %endif - --with-pkg-name=%{name} \ + --with-pkg-name=resource-agents \ --with-ras-set=%{rasset} -%if %{defined jobs} -JFLAGS="$(echo '-j%{jobs}')" -%else -JFLAGS="$(echo '%{_smp_mflags}')" -%endif +make %{_smp_mflags} -make $JFLAGS %install make install DESTDIR=%{buildroot} @@ -224,10 +242,12 @@ rm -rf %{buildroot} %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/share/resource-agents %exclude /usr/src # Exclude new man pages that were not part of previous packages. %exclude %{_mandir}/man7/SAPHanaSR_upgrade_to_angi.7.gz @@ -242,11 +262,9 @@ rm -rf %{buildroot} - Rebase to SAPHanaSR-ScaleOut 0.185.3 upstream and include the optional hook scripts for hanging HDBindexserver services and improved multi-target functionality. - Resolves: RHEL-48224 - Change perl dependency to perl-interpreter. - Resolves: RHEL-53818 * Thu Feb 3 2022 Oyvind Albrigtsen - 0.180.0-4