diff --git a/.gitignore b/.gitignore index 9449fea..f18cf35 100644 --- a/.gitignore +++ b/.gitignore @@ -1,34 +1,4 @@ -fence-agents-3.0.13.tar.bz2 -fence-agents-3.0.14.tar.bz2 -/fence-agents-3.0.16.tar.bz2 -/fence-agents-3.0.17.tar.bz2 -/fence-agents-3.1.0.tar.xz -/fence-agents-3.1.1.tar.xz -/fence-agents-3.1.2.tar.xz -/fence-agents-3.1.3.tar.xz -/fence-agents-3.1.4.tar.xz -/fence-agents-3.1.5.tar.xz -/fence-agents-3.1.6.tar.bz2 -/fence-agents-3.1.6.tar.xz -/fence-agents-3.1.7.tar.xz -/fence-agents-3.1.8.tar.xz -/fence-agents-3.1.9.tar.xz -/fence-agents-3.1.10.tar.xz -/fence-agents-3.1.11.tar.xz -/fence-agents-3.1.12.tar.xz -/fence-agents-4.0.0.tar.xz -/fence-agents-4.0.1.tar.xz -/fence-agents-4.0.3.tar.xz -/fence-agents-4.0.4.tar.xz -/fence-agents-4.0.6.tar.xz -/fence-agents-4.0.7.tar.xz -/fence-agents-4.0.8.tar.xz -/fence-agents-4.0.9.tar.xz -/fence-agents-4.0.10.tar.xz -/fence-agents-4.0.11.tar.xz -/fence-agents-4.0.14.tar.xz -/fence-agents-4.0.15.tar.xz -/fence-agents-4.0.16.tar.xz -/fence-agents-4.0.20.tar.xz -/fence-agents-4.0.23.tar.xz -/fence-agents-4.0.24.tar.xz +/fence-agents-*.tar.?z +/fence-agents-*.src.rpm +/.build-*.log +/*/ diff --git a/bz1473908-fix-pexpect-encoding.patch b/bz1473908-fix-pexpect-encoding.patch deleted file mode 100644 index a066c3f..0000000 --- a/bz1473908-fix-pexpect-encoding.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 48c9a45ce3c2fbf40b087a581b4670f75df8f4c7 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 27 Jul 2017 12:39:29 +0200 -Subject: [PATCH] Fix encoding for pexpect with Python 3.6 - ---- - fence/agents/lib/fencing.py.py | 15 +++++++++++++-- - fence/agents/lib/fencing_snmp.py.py | 4 ++-- - fence/agents/vmware/fence_vmware.py | 4 ++-- - 3 files changed, 17 insertions(+), 6 deletions(-) - -diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py -index 4001787d..d2b7f033 100644 ---- a/fence/agents/lib/fencing.py.py -+++ b/fence/agents/lib/fencing.py.py -@@ -472,9 +472,11 @@ - } - - class fspawn(pexpect.spawn): -- def __init__(self, options, command): -+ def __init__(self, options, command, **kwargs): -+ if sys.version_info[0] > 2: -+ kwargs.setdefault('encoding', 'utf-8') - logging.info("Running command: %s", command) -- pexpect.spawn.__init__(self, command) -+ pexpect.spawn.__init__(self, command, **kwargs) - self.opt = options - - def log_expect(self, pattern, timeout): -@@ -490,6 +492,15 @@ def send(self, message): - def send_eol(self, message): - return self.send(message + self.opt["eol"]) - -+def frun(command, timeout=30, withexitstatus=False, events=None, -+ extra_args=None, logfile=None, cwd=None, env=None, **kwargs): -+ if sys.version_info[0] > 2: -+ kwargs.setdefault('encoding', 'utf-8') -+ return pexpect.run(command, timeout=timeout, -+ withexitstatus=withexitstatus, events=events, -+ extra_args=extra_args, logfile=logfile, cwd=cwd, -+ env=env, **kwargs) -+ - def atexit_handler(): - try: - sys.stdout.close() -diff --git a/fence/agents/lib/fencing_snmp.py.py b/fence/agents/lib/fencing_snmp.py.py -index 9aaf52be..6d9e2110 100644 ---- a/fence/agents/lib/fencing_snmp.py.py -+++ b/fence/agents/lib/fencing_snmp.py.py -@@ -5,7 +5,7 @@ - import re, pexpect - import logging - from fencing import * --from fencing import fail, fail_usage, EC_TIMED_OUT, run_delay -+from fencing import fail, fail_usage, EC_TIMED_OUT, run_delay, frun - - __all__ = ['FencingSnmp'] - -@@ -87,7 +87,7 @@ def run_command(self, command, additional_timemout=0): - try: - logging.debug("%s\n", command) - -- (res_output, res_code) = pexpect.run(command, -+ (res_output, res_code) = frun(command, - int(self.options["--shell-timeout"]) + - int(self.options["--login-timeout"]) + - additional_timemout, True) -diff --git a/fence/agents/vmware/fence_vmware.py b/fence/agents/vmware/fence_vmware.py -index 8bb061e4..6b60b5e5 100644 ---- a/fence/agents/vmware/fence_vmware.py -+++ b/fence/agents/vmware/fence_vmware.py -@@ -27,7 +27,7 @@ - import atexit - sys.path.append("@FENCEAGENTSLIBDIR@") - from fencing import * --from fencing import fail, fail_usage, EC_TIMED_OUT, run_delay -+from fencing import fail, fail_usage, EC_TIMED_OUT, run_delay, frun - - #BEGIN_VERSION_GENERATION - RELEASE_VERSION="VMware Agent using VI Perl API and/or VIX vmrun command" -@@ -146,7 +146,7 @@ def vmware_run_command(options, add_login_params, additional_params, additional_ - try: - logging.debug("%s\n", command) - -- (res_output, res_code) = pexpect.run(command, -+ (res_output, res_code) = frun(command, - int(options["--shell-timeout"]) + int(options["--login-timeout"]) + additional_timeout, True) - - if res_code == None: diff --git a/fence-agents.spec b/fence-agents.spec index 1eec9d8..1247d86 100644 --- a/fence-agents.spec +++ b/fence-agents.spec @@ -15,19 +15,16 @@ Name: fence-agents Summary: Fence Agents for Red Hat Cluster -Version: 4.0.24 -Release: 15%{?alphatag:.%{alphatag}}%{?dist} +Version: 4.1.0 +Release: 2%{?alphatag:.%{alphatag}}%{?dist} License: GPLv2+ and LGPLv2+ Group: System Environment/Base -URL: http://sourceware.org/cluster/wiki/ +URL: https://github.com/ClusterLabs/fence-agents Source0: https://fedorahosted.org/releases/f/e/fence-agents/%{name}-%{version}.tar.xz -Patch0: python3.patch -Patch1: bz1473908-fix-pexpect-encoding.patch -Patch2: fence_zvm-fix-uintptr_t-undeclared.patch %if 0%{?fedora} || 0%{?rhel} > 7 %global testagents zvm virsh raritan rcd_serial -%global allfenceagents fence-agents-alom fence-agents-amt fence-agents-amt-ws fence-agents-apc fence-agents-apc-snmp fence-agents-bladecenter fence-agents-brocade fence-agents-cisco-mds fence-agents-cisco-ucs fence-agents-compute fence-agents-docker fence-agents-drac fence-agents-drac5 fence-agents-eaton-snmp fence-agents-emerson fence-agents-eps fence-agents-hds-cb fence-agents-hpblade fence-agents-ibmblade fence-agents-ifmib fence-agents-ilo2 fence-agents-ilo-mp fence-agents-ilo-ssh fence-agents-ilo-moonshot fence-agents-mpath fence-agents-intelmodular fence-agents-ipdu fence-agents-ipmilan fence-agents-kdump fence-agents-ldom fence-agents-lpar fence-agents-netio fence-agents-ovh fence-agents-rhevm fence-agents-rsa fence-agents-rsb fence-agents-sanbox2 fence-agents-sbd fence-agents-scsi fence-agents-vbox fence-agents-vmware fence-agents-vmware-soap fence-agents-wti fence-agents-xenapi fence-agents-zvm +%global allfenceagents fence-agents-alom fence-agents-amt fence-agents-amt-ws fence-agents-apc fence-agents-apc-snmp fence-agents-aws fence-agents-azure-arm fence-agents-bladecenter fence-agents-brocade fence-agents-cisco-mds fence-agents-cisco-ucs fence-agents-compute fence-agents-docker fence-agents-drac fence-agents-drac5 fence-agents-eaton-snmp fence-agents-emerson fence-agents-eps fence-agents-gce fence-agents-hds-cb fence-agents-heuristics-ping fence-agents-hpblade fence-agents-ibmblade fence-agents-ifmib fence-agents-ilo2 fence-agents-ilo-mp fence-agents-ilo-ssh fence-agents-ilo-moonshot fence-agents-mpath fence-agents-intelmodular fence-agents-ipdu fence-agents-ipmilan fence-agents-ironic fence-agents-kdump fence-agents-ldom fence-agents-lpar fence-agents-netio fence-agents-ovh fence-agents-rhevm fence-agents-rsa fence-agents-rsb fence-agents-sanbox2 fence-agents-sbd fence-agents-scsi fence-agents-vbox fence-agents-vmware fence-agents-vmware-rest fence-agents-vmware-soap fence-agents-vmware-vcloud fence-agents-wti fence-agents-xenapi fence-agents-zvm %endif ## Setup/build bits @@ -38,7 +35,7 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: glibc-devel BuildRequires: gnutls-utils BuildRequires: libxslt -BuildRequires: python3-pexpect python3-pycurl python3-suds python3-requests openwsman-python3 +BuildRequires: python3-pexpect python3-pycurl python3-suds python3-requests openwsman-python3 python3-boto3 python3-google-api-client BuildRequires: autoconf automake libtool %prep @@ -89,6 +86,8 @@ Red Hat Fence Agents is a collection of scripts and libraries to handle remote p %exclude %{_mandir}/man8/fence_ack_manual.8* %exclude %{_sbindir}/fence_dummy %exclude %{_mandir}/man8/fence_dummy.8* +%exclude %{_sbindir}/fence_powerman +%exclude %{_mandir}/man8/fence_powerman.8* %exclude %{_sbindir}/fence_zvm %exclude %{_mandir}/man8/fence_zvm.8* @@ -173,6 +172,34 @@ The fence-agents-amt-ws package contains a fence agent for AMT (WS-Man) devices. %{_sbindir}/fence_amt_ws %{_mandir}/man8/fence_amt_ws.8* +%package aws +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for Amazon AWS +Requires: fence-agents-common >= %{version}-%{release} +Requires: python3-boto3 +Obsoletes: fence-agents +%description aws +The fence-agents-aws package contains a fence agent for Amazon AWS instances. +%files aws +%defattr(-,root,root,-) +%{_sbindir}/fence_aws +%{_mandir}/man8/fence_aws.8* + +%package azure-arm +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for Azure Resource Manager +Requires: fence-agents-common >= %{version}-%{release} +Requires: python3-azure-sdk +Obsoletes: fence-agents +%description azure-arm +The fence-agents-azure-arm package contains a fence agent for Azure Resource Manager instances. +%files azure-arm +%defattr(-,root,root,-) +%{_sbindir}/fence_azure_arm +%{_mandir}/man8/fence_azure_arm.8* + %package bladecenter License: GPLv2+ and LGPLv2+ Group: System Environment/Base @@ -236,7 +263,9 @@ The fence-agents-compute package contains a fence agent for Nova compute nodes. %files compute %defattr(-,root,root,-) %{_sbindir}/fence_compute +%{_sbindir}/fence_evacuate %{_mandir}/man8/fence_compute.8* +%{_mandir}/man8/fence_evacuate.8* %package docker License: GPLv2+ and LGPLv2+ @@ -316,6 +345,35 @@ The fence-agents-eps package contains a fence agent for ePowerSwitch 8M+ power s %{_sbindir}/fence_eps %{_mandir}/man8/fence_eps.8* +%if 0%{?fedora} || 0%{?rhel} > 7 +%package gce +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for GCE (Google Cloud Engine) +Requires: fence-agents-common >= %{version}-%{release} +Requires: python3-google-api-client +Obsoletes: fence-agents +%description gce +The fence-agents-gce package contains a fence agent for GCE (Google Cloud Engine) instances. +%files gce +%defattr(-,root,root,-) +%{_sbindir}/fence_gce +%{_mandir}/man8/fence_gce.8* +%endif + +%package heuristics-ping +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent used to control other fence agents based on ping-heuristics +Requires: fence-agents-common >= %{version}-%{release} +Obsoletes: fence-agents +%description heuristics-ping +The fence-agents-heuristics-ping package contains fence agent used to control other fence agents based on ping-heuristics +%files heuristics-ping +%defattr(-,root,root,-) +%{_sbindir}/fence_heuristics_ping +%{_mandir}/man8/fence_heuristics_ping.8* + %package hpblade License: GPLv2+ and LGPLv2+ Group: System Environment/Base @@ -475,6 +533,21 @@ The fence-agents-ipmilan package contains a fence agent for devices with IPMI in %{_sbindir}/fence_imm %{_mandir}/man8/fence_imm.8* +%if 0%{?fedora} || 0%{?rhel} > 7 +%package ironic +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for OpenStack's Ironic (Bare Metal as a service) +Requires: /usr/bin/openstack +Requires: fence-agents-common = %{version}-%{release} +%description ironic +The fence-agents-ironic package contains a fence agent for OpenStack's Ironic (Bare Metal as a service) service. +%files ironic +%defattr(-,root,root,-) +%{_sbindir}/fence_ironic +%{_mandir}/man8/fence_ironic.8* +%endif + %package kdump License: GPLv2+ and LGPLv2+ Group: System Environment/Base @@ -727,6 +800,19 @@ The fence-agents-vmware package contains a fence agent for VMWare accessed with %{_mandir}/man8/fence_vmware.8* %endif +%package vmware-rest +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for VMWare with REST API +Requires: fence-agents-common >= %{version}-%{release} +Obsoletes: fence-agents +%description vmware-rest +The fence-agents-vmware-rest package contains a fence agent for VMWare with REST API +%files vmware-rest +%defattr(-,root,root,-) +%{_sbindir}/fence_vmware_rest +%{_mandir}/man8/fence_vmware_rest.8* + %package vmware-soap License: GPLv2+ and LGPLv2+ Group: System Environment/Base @@ -740,6 +826,21 @@ The fence-agents-vmware-soap package contains a fence agent for VMWare with SOAP %{_sbindir}/fence_vmware_soap %{_mandir}/man8/fence_vmware_soap.8* +%if 0%{?fedora} || 0%{?rhel} > 7 +%package vmware-vcloud +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for VMWare vCloud Director +Requires: fence-agents-common >= %{version}-%{release} +Obsoletes: fence-agents +%description vmware-vcloud +The fence-agents-vmware-vcloud package contains a fence agent for VMWare vCloud Director +%files vmware-vcloud +%defattr(-,root,root,-) +%{_sbindir}/fence_vmware_vcloud +%{_mandir}/man8/fence_vmware_vcloud.8* +%endif + %package wti License: GPLv2+ and LGPLv2+ Group: System Environment/Base @@ -781,6 +882,9 @@ The fence-agents-zvm package contains a fence agent for IBM z/VM over IP. %{_mandir}/man8/fence_zvmip.8* %changelog +* Fri Feb 9 2018 Oyvind Albrigtsen - 4.1.0-2 +- new upstream release + * Wed Feb 07 2018 Fedora Release Engineering - 4.0.24-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/fence_zvm-fix-uintptr_t-undeclared.patch b/fence_zvm-fix-uintptr_t-undeclared.patch deleted file mode 100644 index 2af06a3..0000000 --- a/fence_zvm-fix-uintptr_t-undeclared.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -uNr a/fence/agents/zvm/fence_zvm.c b/fence/agents/zvm/fence_zvm.c ---- a/fence/agents/zvm/fence_zvm.c 2016-08-22 14:33:34.000000000 +0200 -+++ b/fence/agents/zvm/fence_zvm.c 2017-08-03 13:34:08.750277394 +0200 -@@ -25,6 +25,7 @@ - #ifdef __s390__ - #include - #include -+#include - #include - #include - #include diff --git a/python3.patch b/python3.patch deleted file mode 100644 index 281fe36..0000000 --- a/python3.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -uNr a/fence/agents/lib/check_used_options.py b/fence/agents/lib/check_used_options.py ---- a/fence/agents/lib/check_used_options.py 2016-08-22 14:33:34.000000000 +0200 -+++ b/fence/agents/lib/check_used_options.py 2016-12-23 10:58:41.653592220 +0100 -@@ -1,5 +1,3 @@ --#!/usr/bin/python -tt -- - ## Check if fence agent uses only options["--??"] which are defined in fencing library or - ## fence agent itself - ## -diff -uNr a/make/fencebuild.mk b/make/fencebuild.mk ---- a/make/fencebuild.mk 2016-08-22 14:33:36.000000000 +0200 -+++ b/make/fencebuild.mk 2016-12-23 10:42:57.712668560 +0100 -@@ -31,7 +31,7 @@ - > $@ - - if [ 0 -eq `echo "$(@)" | grep fence_ &> /dev/null; echo $$?` ]; then \ -- PYTHONPATH=$(abs_srcdir)/lib:$(abs_builddir)/lib $(top_srcdir)/fence/agents/lib/check_used_options.py $@; \ -+ PYTHONPATH=$(abs_srcdir)/lib:$(abs_builddir)/lib $(PYTHON) $(top_srcdir)/fence/agents/lib/check_used_options.py $@; \ - else true ; fi - - for x in `PYTHONPATH=$(abs_srcdir)/lib:$(abs_builddir)/lib $(PYTHON) $(@) -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \ diff --git a/sources b/sources index 9eb111b..6f48abd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -161195adb0c125bbbbc1440920a2ff28 fence-agents-4.0.24.tar.xz +SHA512 (fence-agents-4.1.0.tar.xz) = 53e0a9148e01d8b9d35b8e6da0fba362e218a29de0ddbb3626434c1708671ce31d0e081bcddaa5c3ca423aea4b70806409498af30de59e192e9be888540e5323