|
|
d4ebfc |
diff --color -uNr a/agents/azure_arm/fence_azure_arm.py b/agents/azure_arm/fence_azure_arm.py
|
|
|
d4ebfc |
--- a/agents/azure_arm/fence_azure_arm.py 2020-06-30 11:26:43.000000000 +0200
|
|
|
d4ebfc |
+++ b/agents/azure_arm/fence_azure_arm.py 2021-06-03 13:16:16.547120822 +0200
|
|
|
d4ebfc |
@@ -1,6 +1,11 @@
|
|
|
d4ebfc |
#!@PYTHON@ -tt
|
|
|
d4ebfc |
|
|
|
d4ebfc |
-import sys, re, pexpect
|
|
|
d4ebfc |
+import sys, re
|
|
|
d4ebfc |
+sys.path.insert(0, '/usr/lib/fence-agents/support/common')
|
|
|
d4ebfc |
+try:
|
|
|
d4ebfc |
+ import pexpect
|
|
|
d4ebfc |
+except:
|
|
|
d4ebfc |
+ pass
|
|
|
d4ebfc |
import logging
|
|
|
d4ebfc |
import atexit
|
|
|
d4ebfc |
import xml.etree.ElementTree as ET
|
|
|
d4ebfc |
diff --color -uNr a/agents/hpblade/fence_hpblade.py b/agents/hpblade/fence_hpblade.py
|
|
|
d4ebfc |
--- a/agents/hpblade/fence_hpblade.py 2019-08-16 10:55:11.000000000 +0200
|
|
|
d4ebfc |
+++ b/agents/hpblade/fence_hpblade.py 2021-06-03 13:16:16.547120822 +0200
|
|
|
d4ebfc |
@@ -8,7 +8,11 @@
|
|
|
d4ebfc |
#####
|
|
|
d4ebfc |
|
|
|
d4ebfc |
import sys, re
|
|
|
d4ebfc |
-import pexpect
|
|
|
d4ebfc |
+sys.path.insert(0, '/usr/lib/fence-agents/support/common')
|
|
|
d4ebfc |
+try:
|
|
|
d4ebfc |
+ import pexpect
|
|
|
d4ebfc |
+except:
|
|
|
d4ebfc |
+ pass
|
|
|
d4ebfc |
import atexit
|
|
|
d4ebfc |
sys.path.append("@FENCEAGENTSLIBDIR@")
|
|
|
d4ebfc |
from fencing import *
|
|
|
d4ebfc |
diff --color -uNr a/agents/ilo/fence_ilo.py b/agents/ilo/fence_ilo.py
|
|
|
d4ebfc |
--- a/agents/ilo/fence_ilo.py 2019-02-04 09:45:05.000000000 +0100
|
|
|
d4ebfc |
+++ b/agents/ilo/fence_ilo.py 2021-06-03 13:16:16.547120822 +0200
|
|
|
d4ebfc |
@@ -11,7 +11,12 @@
|
|
|
d4ebfc |
## iLO2 / firmware 1.50 / RIBCL 2.22
|
|
|
d4ebfc |
#####
|
|
|
d4ebfc |
|
|
|
d4ebfc |
-import sys, re, pexpect
|
|
|
d4ebfc |
+import sys, re
|
|
|
d4ebfc |
+sys.path.insert(0, '/usr/lib/fence-agents/support/common')
|
|
|
d4ebfc |
+try:
|
|
|
d4ebfc |
+ import pexpect
|
|
|
d4ebfc |
+except:
|
|
|
d4ebfc |
+ pass
|
|
|
d4ebfc |
import atexit
|
|
|
d4ebfc |
from xml.sax.saxutils import quoteattr
|
|
|
d4ebfc |
sys.path.append("@FENCEAGENTSLIBDIR@")
|
|
|
d4ebfc |
diff --color -uNr a/agents/ldom/fence_ldom.py b/agents/ldom/fence_ldom.py
|
|
|
d4ebfc |
--- a/agents/ldom/fence_ldom.py 2019-02-04 09:45:05.000000000 +0100
|
|
|
d4ebfc |
+++ b/agents/ldom/fence_ldom.py 2021-06-03 13:16:16.547120822 +0200
|
|
|
d4ebfc |
@@ -7,7 +7,12 @@
|
|
|
d4ebfc |
##
|
|
|
d4ebfc |
#####
|
|
|
d4ebfc |
|
|
|
d4ebfc |
-import sys, re, pexpect
|
|
|
d4ebfc |
+import sys, re
|
|
|
d4ebfc |
+sys.path.insert(0, '/usr/lib/fence-agents/support/common')
|
|
|
d4ebfc |
+try:
|
|
|
d4ebfc |
+ import pexpect
|
|
|
d4ebfc |
+except:
|
|
|
d4ebfc |
+ pass
|
|
|
d4ebfc |
import atexit
|
|
|
d4ebfc |
sys.path.append("@FENCEAGENTSLIBDIR@")
|
|
|
d4ebfc |
from fencing import *
|
|
|
d4ebfc |
diff --color -uNr a/agents/Makefile.am b/agents/Makefile.am
|
|
|
d4ebfc |
--- a/agents/Makefile.am 2021-03-16 12:26:37.000000000 +0100
|
|
|
d4ebfc |
+++ b/agents/Makefile.am 2021-06-03 13:16:16.547120822 +0200
|
|
|
d4ebfc |
@@ -112,10 +112,10 @@
|
|
|
d4ebfc |
cisco_mds/fence_cisco_mds.delay-check: cisco_mds/fence_cisco_mds
|
|
|
d4ebfc |
$(eval INPUT=$(subst .delay-check,,$@))
|
|
|
d4ebfc |
FENCE_TEST_ARGS_CISCO_MDS=$$(printf '$(FENCE_TEST_ARGS)' | sed 's#port=1#port=fc1/1#'); \
|
|
|
d4ebfc |
- test `PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib /usr/bin/time -p \
|
|
|
d4ebfc |
+ test `PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib:$(abs_top_builddir)/support/common /usr/bin/time -p \
|
|
|
d4ebfc |
sh -c "printf 'delay=10\n $$FENCE_TEST_ARGS_CISCO_MDS' | $(PYTHON) ./$(INPUT)" 2>&1 |\
|
|
|
d4ebfc |
awk -F"[. ]" -vOFS= '/real/ {print $$2,$$3}'` -ge 1000 || ( \
|
|
|
d4ebfc |
- PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib /usr/bin/time -p \
|
|
|
d4ebfc |
+ PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib:$(abs_top_builddir)/support/common /usr/bin/time -p \
|
|
|
d4ebfc |
sh -c "printf "delay=0\n $$FENCE_TEST_ARGS_CISCO_MDS" | $(PYTHON) ./$(INPUT)"; false )
|
|
|
d4ebfc |
|
|
|
d4ebfc |
include $(top_srcdir)/make/fencebuild.mk
|
|
|
d4ebfc |
diff --color -uNr a/agents/netio/fence_netio.py b/agents/netio/fence_netio.py
|
|
|
d4ebfc |
--- a/agents/netio/fence_netio.py 2019-02-04 09:45:05.000000000 +0100
|
|
|
d4ebfc |
+++ b/agents/netio/fence_netio.py 2021-06-03 13:16:16.547120822 +0200
|
|
|
d4ebfc |
@@ -1,6 +1,11 @@
|
|
|
d4ebfc |
#!@PYTHON@ -tt
|
|
|
d4ebfc |
|
|
|
d4ebfc |
-import sys, re, pexpect
|
|
|
d4ebfc |
+import sys, re
|
|
|
d4ebfc |
+sys.path.insert(0, '/usr/lib/fence-agents/support/common')
|
|
|
d4ebfc |
+try:
|
|
|
d4ebfc |
+ import pexpect
|
|
|
d4ebfc |
+except:
|
|
|
d4ebfc |
+ pass
|
|
|
d4ebfc |
import atexit
|
|
|
d4ebfc |
sys.path.append("@FENCEAGENTSLIBDIR@")
|
|
|
d4ebfc |
from fencing import *
|
|
|
d4ebfc |
diff --color -uNr a/agents/raritan/fence_raritan.py b/agents/raritan/fence_raritan.py
|
|
|
d4ebfc |
--- a/agents/raritan/fence_raritan.py 2019-08-16 10:55:11.000000000 +0200
|
|
|
d4ebfc |
+++ b/agents/raritan/fence_raritan.py 2021-06-03 13:16:16.547120822 +0200
|
|
|
d4ebfc |
@@ -1,6 +1,11 @@
|
|
|
d4ebfc |
#!@PYTHON@ -tt
|
|
|
d4ebfc |
|
|
|
d4ebfc |
-import sys, re, pexpect
|
|
|
d4ebfc |
+import sys, re
|
|
|
d4ebfc |
+sys.path.insert(0, '/usr/lib/fence-agents/support/common')
|
|
|
d4ebfc |
+try:
|
|
|
d4ebfc |
+ import pexpect
|
|
|
d4ebfc |
+except:
|
|
|
d4ebfc |
+ pass
|
|
|
d4ebfc |
import atexit
|
|
|
d4ebfc |
sys.path.append("@FENCEAGENTSLIBDIR@")
|
|
|
d4ebfc |
from fencing import *
|
|
|
d4ebfc |
diff --color -uNr a/agents/sanbox2/fence_sanbox2.py b/agents/sanbox2/fence_sanbox2.py
|
|
|
d4ebfc |
--- a/agents/sanbox2/fence_sanbox2.py 2019-02-11 13:05:48.000000000 +0100
|
|
|
d4ebfc |
+++ b/agents/sanbox2/fence_sanbox2.py 2021-06-03 13:16:16.547120822 +0200
|
|
|
d4ebfc |
@@ -8,7 +8,12 @@
|
|
|
d4ebfc |
## +-----------------+---------------------------+
|
|
|
d4ebfc |
#####
|
|
|
d4ebfc |
|
|
|
d4ebfc |
-import sys, re, pexpect
|
|
|
d4ebfc |
+import sys, re
|
|
|
d4ebfc |
+sys.path.insert(0, '/usr/lib/fence-agents/support/common')
|
|
|
d4ebfc |
+try:
|
|
|
d4ebfc |
+ import pexpect
|
|
|
d4ebfc |
+except:
|
|
|
d4ebfc |
+ pass
|
|
|
d4ebfc |
import logging
|
|
|
d4ebfc |
import atexit
|
|
|
d4ebfc |
sys.path.append("@FENCEAGENTSLIBDIR@")
|
|
|
d4ebfc |
diff --color -uNr a/agents/vmware/fence_vmware.py b/agents/vmware/fence_vmware.py
|
|
|
d4ebfc |
--- a/agents/vmware/fence_vmware.py 2019-02-04 09:45:05.000000000 +0100
|
|
|
d4ebfc |
+++ b/agents/vmware/fence_vmware.py 2021-06-03 13:16:16.547120822 +0200
|
|
|
d4ebfc |
@@ -22,7 +22,12 @@
|
|
|
d4ebfc |
# VMware vCenter 4.0.0
|
|
|
d4ebfc |
#
|
|
|
d4ebfc |
|
|
|
d4ebfc |
-import sys, re, pexpect
|
|
|
d4ebfc |
+import sys, re
|
|
|
d4ebfc |
+sys.path.insert(0, '/usr/lib/fence-agents/support/common')
|
|
|
d4ebfc |
+try:
|
|
|
d4ebfc |
+ import pexpect
|
|
|
d4ebfc |
+except:
|
|
|
d4ebfc |
+ pass
|
|
|
d4ebfc |
import logging
|
|
|
d4ebfc |
import atexit
|
|
|
d4ebfc |
sys.path.append("@FENCEAGENTSLIBDIR@")
|
|
|
d4ebfc |
diff --color -uNr a/agents/wti/fence_wti.py b/agents/wti/fence_wti.py
|
|
|
d4ebfc |
--- a/agents/wti/fence_wti.py 2019-02-04 09:45:05.000000000 +0100
|
|
|
d4ebfc |
+++ b/agents/wti/fence_wti.py 2021-06-03 13:17:33.435380703 +0200
|
|
|
d4ebfc |
@@ -11,12 +11,21 @@
|
|
|
d4ebfc |
## WTI IPS-800-CE v1.40h (no username) ('list' tested)
|
|
|
d4ebfc |
#####
|
|
|
d4ebfc |
|
|
|
d4ebfc |
-import sys, re, pexpect
|
|
|
d4ebfc |
+import sys, re
|
|
|
d4ebfc |
+sys.path.insert(0, '/usr/lib/fence-agents/support/common')
|
|
|
d4ebfc |
+try:
|
|
|
d4ebfc |
+ import pexpect
|
|
|
d4ebfc |
+except:
|
|
|
d4ebfc |
+ pass
|
|
|
d4ebfc |
import atexit
|
|
|
d4ebfc |
import time
|
|
|
d4ebfc |
sys.path.append("@FENCEAGENTSLIBDIR@")
|
|
|
d4ebfc |
from fencing import *
|
|
|
d4ebfc |
-from fencing import fspawn, fail, fail_usage, EC_LOGIN_DENIED
|
|
|
d4ebfc |
+from fencing import fail, fail_usage, EC_LOGIN_DENIED
|
|
|
d4ebfc |
+try:
|
|
|
d4ebfc |
+ from fencing import fspawn
|
|
|
d4ebfc |
+except ImportError:
|
|
|
d4ebfc |
+ pass
|
|
|
d4ebfc |
|
|
|
d4ebfc |
def get_listing(conn, options, listing_command):
|
|
|
d4ebfc |
listing = ""
|
|
|
d4ebfc |
diff --color -uNr a/lib/fencing.py.py b/lib/fencing.py.py
|
|
|
d4ebfc |
--- a/lib/fencing.py.py 2021-06-03 10:34:00.000000000 +0200
|
|
|
d4ebfc |
+++ b/lib/fencing.py.py 2021-06-03 13:16:16.548120826 +0200
|
|
|
d4ebfc |
@@ -1,7 +1,12 @@
|
|
|
d4ebfc |
#!@PYTHON@ -tt
|
|
|
d4ebfc |
|
|
|
d4ebfc |
import sys, getopt, time, os, uuid, pycurl, stat
|
|
|
d4ebfc |
-import pexpect, re, syslog
|
|
|
d4ebfc |
+sys.path.insert(0, '/usr/lib/fence-agents/support/common')
|
|
|
d4ebfc |
+try:
|
|
|
d4ebfc |
+ import pexpect
|
|
|
d4ebfc |
+except:
|
|
|
d4ebfc |
+ pass
|
|
|
d4ebfc |
+import re, syslog
|
|
|
d4ebfc |
import logging
|
|
|
d4ebfc |
import subprocess
|
|
|
d4ebfc |
import threading
|
|
|
d4ebfc |
@@ -491,29 +496,32 @@
|
|
|
d4ebfc |
"snmpset_path", "snmpget_path", "snmpwalk_path"]
|
|
|
d4ebfc |
}
|
|
|
d4ebfc |
|
|
|
d4ebfc |
-class fspawn(pexpect.spawn):
|
|
|
d4ebfc |
- def __init__(self, options, command, **kwargs):
|
|
|
d4ebfc |
- if sys.version_info[0] > 2:
|
|
|
d4ebfc |
- kwargs.setdefault('encoding', 'utf-8')
|
|
|
d4ebfc |
- logging.info("Running command: %s", command)
|
|
|
d4ebfc |
- pexpect.spawn.__init__(self, command, **kwargs)
|
|
|
d4ebfc |
- self.opt = options
|
|
|
d4ebfc |
-
|
|
|
d4ebfc |
- def log_expect(self, pattern, timeout):
|
|
|
d4ebfc |
- result = self.expect(pattern, timeout if timeout != 0 else None)
|
|
|
d4ebfc |
- logging.debug("Received: %s", self.before + self.after)
|
|
|
d4ebfc |
- return result
|
|
|
d4ebfc |
-
|
|
|
d4ebfc |
- def read_nonblocking(self, size, timeout):
|
|
|
d4ebfc |
- return pexpect.spawn.read_nonblocking(self, size=100, timeout=timeout if timeout != 0 else None)
|
|
|
d4ebfc |
-
|
|
|
d4ebfc |
- def send(self, message):
|
|
|
d4ebfc |
- logging.debug("Sent: %s", message)
|
|
|
d4ebfc |
- return pexpect.spawn.send(self, message)
|
|
|
d4ebfc |
-
|
|
|
d4ebfc |
- # send EOL according to what was detected in login process (telnet)
|
|
|
d4ebfc |
- def send_eol(self, message):
|
|
|
d4ebfc |
- return self.send(message + self.opt["eol"])
|
|
|
d4ebfc |
+try:
|
|
|
d4ebfc |
+ class fspawn(pexpect.spawn):
|
|
|
d4ebfc |
+ def __init__(self, options, command, **kwargs):
|
|
|
d4ebfc |
+ if sys.version_info[0] > 2:
|
|
|
d4ebfc |
+ kwargs.setdefault('encoding', 'utf-8')
|
|
|
d4ebfc |
+ logging.info("Running command: %s", command)
|
|
|
d4ebfc |
+ pexpect.spawn.__init__(self, command, **kwargs)
|
|
|
d4ebfc |
+ self.opt = options
|
|
|
d4ebfc |
+
|
|
|
d4ebfc |
+ def log_expect(self, pattern, timeout):
|
|
|
d4ebfc |
+ result = self.expect(pattern, timeout if timeout != 0 else None)
|
|
|
d4ebfc |
+ logging.debug("Received: %s", self.before + self.after)
|
|
|
d4ebfc |
+ return result
|
|
|
d4ebfc |
+
|
|
|
d4ebfc |
+ def read_nonblocking(self, size, timeout):
|
|
|
d4ebfc |
+ return pexpect.spawn.read_nonblocking(self, size=100, timeout=timeout if timeout != 0 else None)
|
|
|
d4ebfc |
+
|
|
|
d4ebfc |
+ def send(self, message):
|
|
|
d4ebfc |
+ logging.debug("Sent: %s", message)
|
|
|
d4ebfc |
+ return pexpect.spawn.send(self, message)
|
|
|
d4ebfc |
+
|
|
|
d4ebfc |
+ # send EOL according to what was detected in login process (telnet)
|
|
|
d4ebfc |
+ def send_eol(self, message):
|
|
|
d4ebfc |
+ return self.send(message + self.opt["eol"])
|
|
|
d4ebfc |
+except:
|
|
|
d4ebfc |
+ pass
|
|
|
d4ebfc |
|
|
|
d4ebfc |
def frun(command, timeout=30, withexitstatus=False, events=None,
|
|
|
d4ebfc |
extra_args=None, logfile=None, cwd=None, env=None, **kwargs):
|
|
|
d4ebfc |
diff --color -uNr a/lib/fencing_snmp.py.py b/lib/fencing_snmp.py.py
|
|
|
d4ebfc |
--- a/lib/fencing_snmp.py.py 2019-02-04 09:45:05.000000000 +0100
|
|
|
d4ebfc |
+++ b/lib/fencing_snmp.py.py 2021-06-03 13:16:16.548120826 +0200
|
|
|
d4ebfc |
@@ -2,7 +2,13 @@
|
|
|
d4ebfc |
|
|
|
d4ebfc |
# For example of use please see fence_cisco_mds
|
|
|
d4ebfc |
|
|
|
d4ebfc |
-import re, pexpect
|
|
|
d4ebfc |
+import sys
|
|
|
d4ebfc |
+sys.path.insert(0, '/usr/lib/fence-agents/support/common')
|
|
|
d4ebfc |
+try:
|
|
|
d4ebfc |
+ import pexpect
|
|
|
d4ebfc |
+except:
|
|
|
d4ebfc |
+ pass
|
|
|
d4ebfc |
+import re
|
|
|
d4ebfc |
import logging
|
|
|
d4ebfc |
from fencing import *
|
|
|
d4ebfc |
from fencing import fail, fail_usage, EC_TIMED_OUT, run_delay, frun
|
|
|
d4ebfc |
diff --color -uNr a/make/agentpycheck.mk b/make/agentpycheck.mk
|
|
|
d4ebfc |
--- a/make/agentpycheck.mk 2020-06-30 11:26:43.000000000 +0200
|
|
|
d4ebfc |
+++ b/make/agentpycheck.mk 2021-06-03 13:16:16.548120826 +0200
|
|
|
d4ebfc |
@@ -9,34 +9,34 @@
|
|
|
d4ebfc |
|
|
|
d4ebfc |
%.xml-check: %.8
|
|
|
d4ebfc |
$(eval INPUT=$(subst .xml-check,,$(@F)))
|
|
|
d4ebfc |
- for x in $(INPUT) `PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$(INPUT) -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \
|
|
|
d4ebfc |
+ for x in $(INPUT) `PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib:$(abs_top_builddir)/support/common $(PYTHON) $(@D)/$(INPUT) -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \
|
|
|
d4ebfc |
TEMPFILE=$$(mktemp); \
|
|
|
d4ebfc |
- PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$$x -o metadata | $(AWK) $(AWK_VAL) > $$TEMPFILE && \
|
|
|
d4ebfc |
+ PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib:$(abs_top_builddir)/support/common $(PYTHON) $(@D)/$$x -o metadata | $(AWK) $(AWK_VAL) > $$TEMPFILE && \
|
|
|
d4ebfc |
diff $$TEMPFILE $(DATADIR)/$$x.xml || exit 1 && \
|
|
|
d4ebfc |
rm $$TEMPFILE; \
|
|
|
d4ebfc |
done
|
|
|
d4ebfc |
|
|
|
d4ebfc |
%.xml-upload: %.8
|
|
|
d4ebfc |
$(eval INPUT=$(subst .xml-upload,,$(@F)))
|
|
|
d4ebfc |
- for x in $(INPUT) `PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$(INPUT) -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \
|
|
|
d4ebfc |
- PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$$x -o metadata | $(AWK) $(AWK_VAL) > $(DATADIR)/$$x.xml; \
|
|
|
d4ebfc |
+ for x in $(INPUT) `PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib:$(abs_top_builddir)/support/common $(PYTHON) $(@D)/$(INPUT) -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \
|
|
|
d4ebfc |
+ PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib:$(abs_top_builddir)/support/common $(PYTHON) $(@D)/$$x -o metadata | $(AWK) $(AWK_VAL) > $(DATADIR)/$$x.xml; \
|
|
|
d4ebfc |
done
|
|
|
d4ebfc |
|
|
|
d4ebfc |
# If test will fail, rerun fence agents to show problems
|
|
|
d4ebfc |
%.delay-check: %
|
|
|
d4ebfc |
$(eval INPUT=$(subst .delay-check,,$(@F)))
|
|
|
d4ebfc |
- for x in $(INPUT) `PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$(INPUT) -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \
|
|
|
d4ebfc |
- test `PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib /usr/bin/time -p \
|
|
|
d4ebfc |
+ for x in $(INPUT) `PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib:$(abs_top_builddir)/support/common $(PYTHON) $(@D)/$(INPUT) -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \
|
|
|
d4ebfc |
+ test `PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib:$(abs_top_builddir)/support/common /usr/bin/time -p \
|
|
|
d4ebfc |
sh -c "printf 'delay=10\n $(FENCE_TEST_ARGS)' | $(PYTHON) $(@D)/$$x" 2>&1 |\
|
|
|
d4ebfc |
awk -F"[. ]" -vOFS= '/real/ {print $$2,$$3}'` -ge 1000 || ( \
|
|
|
d4ebfc |
- PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib /usr/bin/time -p \
|
|
|
d4ebfc |
+ PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib:$(abs_top_builddir)/support/common /usr/bin/time -p \
|
|
|
d4ebfc |
sh -c "printf 'delay=0\n $(FENCE_TEST_ARGS)' | $(PYTHON) $(@D)/$$x"; false ); \
|
|
|
d4ebfc |
done
|
|
|
d4ebfc |
|
|
|
d4ebfc |
%.rng-check: %
|
|
|
d4ebfc |
$(eval INPUT=$(subst .rng-check,,$(@F)))
|
|
|
d4ebfc |
- for x in $(INPUT) `PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$(INPUT) -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \
|
|
|
d4ebfc |
- PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$$x -o metadata | \
|
|
|
d4ebfc |
+ for x in $(INPUT) `PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib:$(abs_top_builddir)/support/common $(PYTHON) $(@D)/$(INPUT) -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \
|
|
|
d4ebfc |
+ PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib:$(abs_top_builddir)/support/common $(PYTHON) $(@D)/$$x -o metadata | \
|
|
|
d4ebfc |
xsltproc ${abs_top_srcdir}/lib/fence2rng.xsl - | \
|
|
|
d4ebfc |
sed -e 's/ rha:description=/ description=/g' -e 's/ rha:name=/ name=/g' | \
|
|
|
d4ebfc |
xmllint --nsclean --noout -; \
|
|
|
d4ebfc |
diff --color -uNr a/make/fencebuild.mk b/make/fencebuild.mk
|
|
|
d4ebfc |
--- a/make/fencebuild.mk 2021-03-16 09:32:22.000000000 +0100
|
|
|
d4ebfc |
+++ b/make/fencebuild.mk 2021-06-03 13:16:16.548120826 +0200
|
|
|
d4ebfc |
@@ -34,10 +34,10 @@
|
|
|
d4ebfc |
> $@
|
|
|
d4ebfc |
|
|
|
d4ebfc |
if [ 0 -eq `echo "$(@)" | grep fence_ > /dev/null 2>&1; echo $$?` ]; then \
|
|
|
d4ebfc |
- PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(top_srcdir)/lib/check_used_options.py $@; \
|
|
|
d4ebfc |
+ PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib:$(abs_top_builddir)/support/common $(PYTHON) $(top_srcdir)/lib/check_used_options.py $@; \
|
|
|
d4ebfc |
else true ; fi
|
|
|
d4ebfc |
|
|
|
d4ebfc |
- for x in `PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@) -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \
|
|
|
d4ebfc |
+for x in `PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib:$(abs_top_builddir)/support/common $(PYTHON) $(@) -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \
|
|
|
d4ebfc |
cp -f $(@) $(@D)/$$x; \
|
|
|
d4ebfc |
$(MAKE) $(@D)/$$x.8; \
|
|
|
d4ebfc |
done
|
|
|
d4ebfc |
@@ -64,7 +64,7 @@
|
|
|
d4ebfc |
fi
|
|
|
d4ebfc |
for p in $(TARGET); do \
|
|
|
d4ebfc |
dir=`dirname $$p`; \
|
|
|
d4ebfc |
- for x in `PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $$p -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \
|
|
|
d4ebfc |
+ for x in `PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib:$(abs_top_builddir)/support/common $(PYTHON) $$p -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \
|
|
|
d4ebfc |
echo " $(INSTALL_SCRIPT) $$dir/$$x '$(DESTDIR)$(sbindir)'"; \
|
|
|
d4ebfc |
$(INSTALL_SCRIPT) $$dir/$$x "$(DESTDIR)$(sbindir)" || exit $$?; \
|
|
|
d4ebfc |
echo " $(INSTALL_DATA) '$$dir/$$x.8' '$(DESTDIR)$(man8dir)'"; \
|
|
|
d4ebfc |
@@ -74,7 +74,7 @@
|
|
|
d4ebfc |
|
|
|
d4ebfc |
uninstall-hook: $(TARGET)
|
|
|
d4ebfc |
files=`for p in $(TARGET); do \
|
|
|
d4ebfc |
- for x in \`PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $$p -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"\`; do \
|
|
|
d4ebfc |
+ for x in \`PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib:$(abs_top_builddir)/support/common $(PYTHON) $$p -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"\`; do \
|
|
|
d4ebfc |
echo " rm -f '$(DESTDIR)$(sbindir)/$$x'"; \
|
|
|
d4ebfc |
rm -f "$(DESTDIR)$(sbindir)/$$x"; \
|
|
|
d4ebfc |
echo " rm -f '$(DESTDIR)$(man8dir)/$$x.8'"; \
|
|
|
d4ebfc |
diff --color -uNr a/make/fenceman.mk b/make/fenceman.mk
|
|
|
d4ebfc |
--- a/make/fenceman.mk 2021-03-11 16:10:15.000000000 +0100
|
|
|
d4ebfc |
+++ b/make/fenceman.mk 2021-06-03 13:16:16.548120826 +0200
|
|
|
d4ebfc |
@@ -1,6 +1,6 @@
|
|
|
d4ebfc |
%.8: % $(top_srcdir)/lib/fence2man.xsl
|
|
|
d4ebfc |
set -e && \
|
|
|
d4ebfc |
- PYTHONPATH=$(abs_srcdir)/lib:$(abs_builddir)/../lib:$(abs_builddir)/lib \
|
|
|
d4ebfc |
+ PYTHONPATH=$(abs_srcdir)/lib:$(abs_builddir)/../lib:$(abs_builddir)/lib:$(abs_top_builddir)/support/common \
|
|
|
d4ebfc |
$(PYTHON) $* -o manpage > $(@D)/.$(@F).tmp && \
|
|
|
d4ebfc |
xmllint --noout --relaxng $(top_srcdir)/lib/metadata.rng $(@D)/.$(@F).tmp && \
|
|
|
d4ebfc |
xsltproc $(top_srcdir)/lib/fence2man.xsl $(@D)/.$(@F).tmp > $@
|