fence-agents/fence-agents.spec

205 lines
6.3 KiB
RPMSpec
Raw Normal View History

#
# spec file for package fence-agents
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%if 0%{?suse_version} == 1315
%define python_version python2
%else
%define python_version python3
%endif
%global plugin_dir %{_libdir}/stonith/plugins/rhcs
%define agent_list aliyun alom amt amt_ws apc apc_snmp azure_arm bladecenter brocade cisco_mds cisco_ucs compute docker drac5 dummy eaton_snmp emerson eps evacuate gce hds_cb hpblade ibmblade ifmib ilo ilo_moonshot ilo_mp ilo_ssh intelmodular ipdu ipmilan ironic kdump ldom lpar mpath netio openstack powerman pve raritan rcd_serial redfish rhevm rsa rsb sanbox2 sbd scsi vbox virsh vmware vmware_rest wti xenapi zvm
Name: fence-agents
Summary: Fence Agents for High Availability
License: GPL-2.0-only AND LGPL-2.1-only
Group: Productivity/Clustering/HA
Accepting request 868865 from network:ha-clustering:Unstable - Adds service account authentication to GCE fence agent - Update to version 4.7.0+git.1607346448.17bd8552: * fence_mpath, fence_scsi: Improve logging for failed res/key get * fence_mpath, fence_scsi: Capture stderr in run_cmd() * build: depend on config changes to rebuild when running make after running ./configure * fence_redfish: Fix typo in help. * fence_aws: add support for IMDSv2 * spec: add pkg-config file, and set version for obsoletes to avoid failing to build on Fedora 33 * Add pkg-config file * fence_scsi: dont write key to device if it's already registered, and open file correctly to avoid using regex against end-of-file * fencing: fix run_command() to allow timeout=0 to mean forever * fencing: fix to make timeout(s)=0 be treated as forever for agents using pexpect - Update to version 4.6.0+git.1603723121.a17eb9d4: * Add a fence_crosslink agent * fencing: fix power-timeout when using new disable-timeout parameter * metadata: update for disable_timeout parameter * fencing: add disable-timeout parameter, and make it default when run from Pacemaker (at least 2.0+) * spec: make telnet a weak dependency * Adds baremetal support to GCE fence agent and API call retries (#355) * spec: add -aws and -gce dependency to -all subpackage * spec: fix ibmz subpackage referring to fence_z instead of fence_ibmz * fence_lpar: Reduce code duplication in get_lpar_list OBS-URL: https://build.opensuse.org/request/show/868865 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/fence-agents?expand=0&rev=120
2021-02-03 10:10:32 +01:00
Version: 4.7.0+git.1607346448.17bd8552
Release: 0
URL: https://github.com/ClusterLabs/fence-agents
- Update to version 4.0.24+git.1480563949.e67fcd4: * fence_azure_arm: add fencing agent for Azure Resource Manager * fence_lpar: Add support for IVM * fence_lpar: Handle exceptions when invalid output is read * fence_zvmip: Update XML metadata * fence_compute: fix ConnectionError by using full module name * fence_powerman: add fence agent for powerman * Suppress InsecureRequestWarning when ssl_insecure is given * compute: Correctly handle installations without tagged flavours * compute: Use the best available nova API version * compute: correctly implement 'on' when the force-down API call is available * compute: Correctly identify when the nodename already includes the supplied domain * compute: Ensure we can connect to nova when fixing the plug name * compute: Simpler check for nova force down compatibility - Rebase and remove merged patches: * Remove 0001-fence_compute-Create-nova-client-with-API-2.11.patch * Remove 0002-fence_compute-Keep-compatibility-with-python-novacli.patch * Remove 0003-fence_compute-Only-list-nova-compute-services-when-g.patch * Remove 0004-fence_compute-Don-t-list-hypervisors-but-nova-comput.patch * Remove 0005-fence_compute-Do-not-override-domain-if-it-is-alread.patch * Remove 0006-fence_compute-Fix-use-of-undefined-variable.patch * Remove 0007-fence_compute-Fix-fix_domain-to-not-return-too-early.patch * Remove 0008-fence_compute-Fix-fix_plug_name-when-looking-if-plug.patch * Add 0001-fence_compute-Only-list-nova-compute-services-when-g.patch * Add 0002-fence_compute-Don-t-list-hypervisors-but-nova-comput.patch * Add 0003-fence_compute-Do-not-override-domain-if-it-is-alread.patch * Add 0004-fence_compute-Fix-handling-of-domain-None.patch * Add 0005-fence_compute-Fix-fix_domain-to-not-return-too-early.patch * Add 0006-fence_compute-Fix-fix_plug_name-when-looking-if-plug.patch * Add 0007-fence_compute-Remove-duplicate-check-for-binary-name.patch OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/fence-agents?expand=0&rev=56
2016-12-01 14:22:57 +01:00
Source0: %{name}-%{version}.tar.xz
Patch1: 0001-Use-Python-3-for-all-scripts-bsc-1065966.patch
Patch2: 0001-Adds-service-account-authentication-to-GCE-fence-age.patch
2014-09-16 09:48:32 +02:00
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: %{python_version}
%if "%{python_version}" == "python3"
BuildRequires: python3-google-api-python-client
BuildRequires: python3-keystoneclient
BuildRequires: python3-novaclient
BuildRequires: python3-oauth2client
BuildRequires: python3-openwsman
BuildRequires: python3-pexpect
BuildRequires: python3-pycurl
BuildRequires: python3-requests
BuildRequires: python3-xml
%else
BuildRequires: python-google-api-python-client
BuildRequires: python-keystoneclient
BuildRequires: python-novaclient
BuildRequires: python-oauth2client
BuildRequires: python-pexpect
BuildRequires: python-pycurl
BuildRequires: python-requests
BuildRequires: python-xml
%endif
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: fdupes
BuildRequires: glibc-devel
BuildRequires: libtool
BuildRequires: libxml2-tools
BuildRequires: libxslt
BuildRequires: mozilla-nspr-devel
BuildRequires: mozilla-nss-devel
BuildRequires: perl
BuildRequires: perl-Net-Telnet
BuildRequires: pkg-config
BuildRequires: xz
%if "%{python_version}" == "python3"
Requires: python3-pexpect
Requires: python3-pycurl
Requires: python3-requests
%else
Requires: python-pexpect
Requires: python-pycurl
Requires: python-requests
%endif
Requires: net-snmp
Requires: openssh
Requires: perl-Net-Telnet
Requires: sg3_utils
Requires: telnet
# This is required by fence_virsh. Per discussion on fedora-devel
# switching from package to file based require.
Recommends: /usr/bin/virsh
# This is required by fence_ipmilan. it appears that the packages
# have changed Requires around. Make sure to get the right one.
Recommends: /usr/bin/ipmitool
%if "%{python_version}" == "python3"
Recommends: python3-openwsman
%endif
%if 0%{?with_regression_tests}
BuildRequires: time
%endif
%description
Fence agents are device drivers able to prevent computers from
destroying data on shared storage. Their aim is to isolate a
corrupted computer by controlling power, network or storage
configuration. This package provides both a Python API for
creating agents as well as a collection of existing agents.
%package amt_ws
Summary: Fence Agent for Intel AMT (WS)
License: Apache-2.0
Group: Productivity/Clustering/HA
Requires: %{name} = %{version}
%description amt_ws
Fence agents are device drivers able to prevent computers from
destroying data on shared storage. Their aim is to isolate a
corrupted computer by controlling power, network or storage
configuration. This packages provides an agent for Intel AMT (WS).
%package devel
Summary: Fence Agents for High Availability
License: GPL-2.0-only AND LGPL-2.1-only
Group: Development/Tools/Other
Requires: %{name} = %{version}
%description devel
Fence agents are device drivers able to prevent computers from
destroying data on shared storage. Their aim is to isolate a
corrupted computer by controlling power, network or storage
configuration. This package provides agents suitable only for
development.
%prep
%setup -q -n %{name}-%{version}
%if "%{python_version}" == "python3"
%patch1 -p1
%endif
Accepting request 868865 from network:ha-clustering:Unstable - Adds service account authentication to GCE fence agent - Update to version 4.7.0+git.1607346448.17bd8552: * fence_mpath, fence_scsi: Improve logging for failed res/key get * fence_mpath, fence_scsi: Capture stderr in run_cmd() * build: depend on config changes to rebuild when running make after running ./configure * fence_redfish: Fix typo in help. * fence_aws: add support for IMDSv2 * spec: add pkg-config file, and set version for obsoletes to avoid failing to build on Fedora 33 * Add pkg-config file * fence_scsi: dont write key to device if it's already registered, and open file correctly to avoid using regex against end-of-file * fencing: fix run_command() to allow timeout=0 to mean forever * fencing: fix to make timeout(s)=0 be treated as forever for agents using pexpect - Update to version 4.6.0+git.1603723121.a17eb9d4: * Add a fence_crosslink agent * fencing: fix power-timeout when using new disable-timeout parameter * metadata: update for disable_timeout parameter * fencing: add disable-timeout parameter, and make it default when run from Pacemaker (at least 2.0+) * spec: make telnet a weak dependency * Adds baremetal support to GCE fence agent and API call retries (#355) * spec: add -aws and -gce dependency to -all subpackage * spec: fix ibmz subpackage referring to fence_z instead of fence_ibmz * fence_lpar: Reduce code duplication in get_lpar_list OBS-URL: https://build.opensuse.org/request/show/868865 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/fence-agents?expand=0&rev=120
2021-02-03 10:10:32 +01:00
%patch2 -p1
%build
CFLAGS="${CFLAGS} ${RPM_OPT_FLAGS}"
export CFLAGS
%if "%{python_version}" == "python3"
PYTHON="%{_bindir}/python3"
%else
PYTHON="%{_bindir}/python2"
%endif
export PYTHON
./autogen.sh
%{configure} --with-agents='%{agent_list}'
make
%install
make install DESTDIR=%{buildroot}
## tree fix up
# fix libfence permissions
chmod 0755 %{buildroot}%{_datadir}/fence/fenc*.py
# remove docs
rm -rf %{buildroot}/usr/share/doc/fence-agents
# create links to agents in the plugins dir
mkdir -p %{buildroot}%{plugin_dir}
ln -s %{_sbindir}/fence_cisco_ucs %{buildroot}%{plugin_dir}
%fdupes %buildroot%{_sbindir}
%fdupes %buildroot%{_datadir}/cluster
%if 0%{?with_regression_tests}
%check
make check
PYTHONPATH=fence/agents/lib "%{python_version}" fence/agents/lib/tests/test_fencing.py
%endif
%files
%defattr(-,root,root,-)
%license doc/COPYING.* doc/COPYRIGHT doc/README.licence
%dir %{plugin_dir}
%dir %{_libdir}/stonith/plugins
%dir %{_libdir}/stonith
%{_datadir}/fence
%{_datadir}/cluster
%{plugin_dir}/fence_cisco_ucs
%{_sbindir}/fence_*
%exclude %{_sbindir}/fence_amt_ws
%exclude %{_mandir}/man8/fence_amt_ws*
%exclude %{_sbindir}/fence_dummy
%exclude %{_mandir}/man8/fence_dummy*
%{_mandir}/man8/fence_*
%{_libexecdir}/fence_*
Accepting request 868865 from network:ha-clustering:Unstable - Adds service account authentication to GCE fence agent - Update to version 4.7.0+git.1607346448.17bd8552: * fence_mpath, fence_scsi: Improve logging for failed res/key get * fence_mpath, fence_scsi: Capture stderr in run_cmd() * build: depend on config changes to rebuild when running make after running ./configure * fence_redfish: Fix typo in help. * fence_aws: add support for IMDSv2 * spec: add pkg-config file, and set version for obsoletes to avoid failing to build on Fedora 33 * Add pkg-config file * fence_scsi: dont write key to device if it's already registered, and open file correctly to avoid using regex against end-of-file * fencing: fix run_command() to allow timeout=0 to mean forever * fencing: fix to make timeout(s)=0 be treated as forever for agents using pexpect - Update to version 4.6.0+git.1603723121.a17eb9d4: * Add a fence_crosslink agent * fencing: fix power-timeout when using new disable-timeout parameter * metadata: update for disable_timeout parameter * fencing: add disable-timeout parameter, and make it default when run from Pacemaker (at least 2.0+) * spec: make telnet a weak dependency * Adds baremetal support to GCE fence agent and API call retries (#355) * spec: add -aws and -gce dependency to -all subpackage * spec: fix ibmz subpackage referring to fence_z instead of fence_ibmz * fence_lpar: Reduce code duplication in get_lpar_list OBS-URL: https://build.opensuse.org/request/show/868865 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/fence-agents?expand=0&rev=120
2021-02-03 10:10:32 +01:00
/usr/share/pkgconfig/fence-agents.pc
%files amt_ws
%{_sbindir}/fence_amt_ws
%{_mandir}/man8/fence_amt_ws*
%files devel
%{_sbindir}/fence_dummy
%{_mandir}/man8/fence_dummy*
%changelog