Accepting request 457112 from network:ha-clustering:Factory
- Downgrade some agent-specific dependencies to recommends (bsc#1025149) * Add 0010-Make-pywsman-dependency-optional.patch OBS-URL: https://build.opensuse.org/request/show/457112 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/fence-agents?expand=0&rev=30
This commit is contained in:
commit
b8d8bfe57e
81
0010-Make-pywsman-dependency-optional.patch
Normal file
81
0010-Make-pywsman-dependency-optional.patch
Normal file
@ -0,0 +1,81 @@
|
||||
From dc8cc03057f3c4ac809689fd95a06da1e64dcb8f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <krig@koru.se>
|
||||
Date: Tue, 14 Feb 2017 15:32:39 +0100
|
||||
Subject: [PATCH] Make pywsman dependency optional
|
||||
|
||||
If the pywsman python library is only imported when it is actually used,
|
||||
it becomes possible to generate the man pages for the fence_amt_ws agent
|
||||
even if it is not installed. That then means that there is no need to
|
||||
require pywsman for the whole fence-agents package to be installable.
|
||||
|
||||
In our (SLE) case, pywsman is only available in the SDK module, so we
|
||||
can't have a hard require on it in order to build or install the
|
||||
fence-agents package for HA.
|
||||
---
|
||||
configure.ac | 1 -
|
||||
fence/agents/amt_ws/fence_amt_ws.py | 9 ++++++++-
|
||||
2 files changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 4efa041..e17b95c 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -163,7 +163,6 @@ AC_PYTHON_MODULE(suds, 1)
|
||||
AC_PYTHON_MODULE(pexpect, 1)
|
||||
AC_PYTHON_MODULE(pycurl, 1)
|
||||
AC_PYTHON_MODULE(requests, 1)
|
||||
-AC_PYTHON_MODULE(pywsman, 1)
|
||||
|
||||
## path to 3rd-party binaries
|
||||
AC_PATH_PROG([IPMITOOL_PATH], [ipmitool], [/usr/bin/ipmitool])
|
||||
diff --git a/fence/agents/amt_ws/fence_amt_ws.py b/fence/agents/amt_ws/fence_amt_ws.py
|
||||
index 5284a77..b4343bb 100755
|
||||
--- a/fence/agents/amt_ws/fence_amt_ws.py
|
||||
+++ b/fence/agents/amt_ws/fence_amt_ws.py
|
||||
@@ -24,7 +24,6 @@ sys.path.append("@FENCEAGENTSLIBDIR@")
|
||||
from fencing import *
|
||||
from fencing import run_delay, fail_usage, fail, EC_STATUS
|
||||
|
||||
-import pywsman
|
||||
from xml.etree import ElementTree
|
||||
|
||||
|
||||
@@ -63,6 +62,8 @@ def xml_find(doc, namespace, item):
|
||||
return tree.find(query)
|
||||
|
||||
def _generate_power_action_input(action):
|
||||
+ import pywsman
|
||||
+
|
||||
method_input = "RequestPowerStateChange_INPUT"
|
||||
address = 'http://schemas.xmlsoap.org/ws/2004/08/addressing'
|
||||
anonymous = ('http://schemas.xmlsoap.org/ws/2004/08/addressing/'
|
||||
@@ -87,6 +88,8 @@ def _generate_power_action_input(action):
|
||||
return doc
|
||||
|
||||
def get_power_status(_, options):
|
||||
+ import pywsman
|
||||
+
|
||||
client = pywsman.Client(options["--ip"], int(options["--ipport"]), \
|
||||
'/wsman', 'http', 'admin', options["--password"])
|
||||
namespace = CIM_AssociatedPowerManagementService
|
||||
@@ -114,6 +117,8 @@ def get_power_status(_, options):
|
||||
fail(EC_STATUS)
|
||||
|
||||
def set_power_status(_, options):
|
||||
+ import pywsman
|
||||
+
|
||||
client = pywsman.Client(options["--ip"], int(options["--ipport"]), \
|
||||
'/wsman', 'http', 'admin', options["--password"])
|
||||
|
||||
@@ -142,6 +147,8 @@ def set_power_status(_, options):
|
||||
fail(EC_STATUS)
|
||||
|
||||
def set_boot_order(_, client, options):
|
||||
+ import pywsman
|
||||
+
|
||||
method_input = "ChangeBootOrder_INPUT"
|
||||
address = 'http://schemas.xmlsoap.org/ws/2004/08/addressing'
|
||||
anonymous = ('http://schemas.xmlsoap.org/ws/2004/08/addressing/'
|
||||
--
|
||||
2.10.1
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 14 14:21:12 UTC 2017 - kgronlund@suse.com
|
||||
|
||||
- Downgrade some agent-specific dependencies to recommends (bsc#1025149)
|
||||
* Add 0010-Make-pywsman-dependency-optional.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 01 16:49:43 UTC 2017 - kgronlund@suse.com
|
||||
|
||||
|
@ -42,6 +42,8 @@ Patch6: 0006-fence_compute-Fix-fix_plug_name-when-looking-if-plug.patch
|
||||
Patch7: 0007-fence_compute-Remove-duplicate-check-for-binary-name.patch
|
||||
# PATCH-FIX-UPSTREAM: fence_compute: Fix disabling force_down on node when action is on
|
||||
Patch9: 0009-fence_compute-Fix-disabling-force_down-on-node-when-.patch
|
||||
# PATCH-FIX-SLE: Make pywsman dependency optional (bsc#1025149)
|
||||
Patch10: 0010-Make-pywsman-dependency-optional.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: autoconf
|
||||
@ -53,7 +55,6 @@ BuildRequires: libxml2-tools
|
||||
BuildRequires: libxslt
|
||||
BuildRequires: mozilla-nspr-devel
|
||||
BuildRequires: mozilla-nss-devel
|
||||
BuildRequires: openwsman-python
|
||||
BuildRequires: perl
|
||||
BuildRequires: perl-Net-Telnet
|
||||
BuildRequires: pkg-config
|
||||
@ -67,7 +68,6 @@ BuildRequires: xz
|
||||
|
||||
Requires: net-snmp
|
||||
Requires: openssh
|
||||
Requires: openwsman-python
|
||||
Requires: perl-Net-Telnet
|
||||
Requires: python-curl
|
||||
Requires: python-openssl
|
||||
@ -76,13 +76,16 @@ Requires: python-requests
|
||||
Requires: python-suds
|
||||
Requires: sg3_utils
|
||||
Requires: telnet
|
||||
|
||||
# This is required by fence_virsh. Per discussion on fedora-devel
|
||||
# switching from package to file based require.
|
||||
Requires: /usr/bin/virsh
|
||||
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.
|
||||
Requires: /usr/bin/ipmitool
|
||||
Recommends: /usr/bin/ipmitool
|
||||
|
||||
Recommends: openwsman-python
|
||||
|
||||
%if 0%{?with_regression_tests}
|
||||
BuildRequires: time
|
||||
@ -112,6 +115,7 @@ fence agents only suitable for development.
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
|
||||
%build
|
||||
CFLAGS="${CFLAGS} ${RPM_OPT_FLAGS}"
|
||||
|
Loading…
Reference in New Issue
Block a user