From: Eric Bollengier Date: Tue, 13 Feb 2024 14:18:52 +0000 (+0100) Subject: rpms: update cloud plugin X-Git-Tag: Release-15.0.2~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78d84d0a21249fd0ae0161a8adf45e69012049a0;p=thirdparty%2Fbacula.git rpms: update cloud plugin --- diff --git a/bacula/platforms/rpms/redhat/bacula-cloud.spec.in b/bacula/platforms/rpms/redhat/bacula-cloud.spec.in index 105ff1c71..7977a3659 100644 --- a/bacula/platforms/rpms/redhat/bacula-cloud.spec.in +++ b/bacula/platforms/rpms/redhat/bacula-cloud.spec.in @@ -46,6 +46,18 @@ %define depkgs ../depkgs %define depkgs_was ../depkgs-was +%define rhel9 0 +%{?build_rhel9:%define rhel9 1} +%{?build_el8:%define rhel9 1} + +%define rhel8 0 +%{?build_rhel8:%define rhel8 1} +%{?build_el8:%define rhel8 1} + +%define rhel7 0 +%{?build_rhel7:%define rhel7 1} +%{?build_el7:%define rhel7 1} + #-------------------------------------------------------------------------- # it should not be necessary to change anything below here for a release # except for patch macros in the setup section @@ -74,6 +86,20 @@ Distribution: Bacula Cloud Storage Source0: http://www.prdownloads.sourceforge.net/bacula/depkgs-%{depkgs_version}.tar.gz Source1: https://www.bacula.org/downloads/bacula-%{_version}.tar.gz +%if %{rhel7} == 1 +Requires: bacula-sd, %{base_package_name}-libs = %{_version}, libcurl +%else +Requires: bacula-sd, %{base_package_name}-libs = %{_version}, (libcurl or libcurl4) +%endif + +%if %{rhel8} == 1 || %{rhel9} == 1 +BuildRequires: python3-Cython +%endif + +%if %{rhel7} == 1 +BuildRequires: Cython +%endif + Requires: bacula-sd, %{base_package_name}-libs = %{_version}, libcurl, awscli BuildRequires: libcurl-devel @@ -104,6 +130,13 @@ cd .. cd $cwd cd ../bacula-%{_version} + +%if %{rhel8} == 1 || %{rhel9} == 1 +# Pool RHEL8 management of python programs, not the same PYTHONPATH through SSH and for commands +export PATH=$PATH:/usr/local/bin +export PYTHONPATH=$HOME/.local/lib64/python3.6/site-packages:$HOME/.local/lib/python3.6/site-packages:/usr/local/lib64/python3.6/site-packages/:/usr/local/lib/python3.6/site-packages/ +%endif + ./configure \ --prefix=%{_prefix} \ --sbindir=%{_sbindir} \ @@ -140,7 +173,16 @@ cd ../bacula-%{_version} --with-mon-fd-password="XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX" \ --with-mon-sd-password="XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX" \ --with-openssl \ - --with-cython=cython-3.8 +%if %{rhel8} == 1 || %{rhel9} == 1 + --with-cython=/usr/local/bin/cython3 +%endif + +# Make sure libs3 is built correctly or die +grep "S3 support:" config.out | grep yes +if [ $? != 0 ] ; then + echo "libs3 not found" + exit 1 +fi make