114 lines
7.4 KiB
Diff
114 lines
7.4 KiB
Diff
|
diff --color -uNr a/agents/Makefile.am b/agents/Makefile.am
|
||
|
--- a/agents/Makefile.am 2021-07-08 13:09:05.000000000 +0200
|
||
|
+++ b/agents/Makefile.am 2024-03-14 12:26:11.186502759 +0100
|
||
|
@@ -112,10 +112,10 @@
|
||
|
cisco_mds/fence_cisco_mds.delay-check: cisco_mds/fence_cisco_mds
|
||
|
$(eval INPUT=$(subst .delay-check,,$@))
|
||
|
FENCE_TEST_ARGS_CISCO_MDS=$$(printf '$(FENCE_TEST_ARGS)' | sed 's#port=1#port=fc1/1#'); \
|
||
|
- test `PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib /usr/bin/time -p \
|
||
|
+ test `PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib /usr/bin/time -p \
|
||
|
sh -c "printf 'delay=10\n $$FENCE_TEST_ARGS_CISCO_MDS' | $(PYTHON) ./$(INPUT)" 2>&1 |\
|
||
|
awk -F"[. ]" -vOFS= '/real/ {print $$2,$$3}'` -ge 1000 || ( \
|
||
|
- PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib /usr/bin/time -p \
|
||
|
+ PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib /usr/bin/time -p \
|
||
|
sh -c "printf "delay=0\n $$FENCE_TEST_ARGS_CISCO_MDS" | $(PYTHON) ./$(INPUT)"; false )
|
||
|
|
||
|
include $(top_srcdir)/make/fencebuild.mk
|
||
|
diff --color -uNr a/make/agentpycheck.mk b/make/agentpycheck.mk
|
||
|
--- a/make/agentpycheck.mk 2023-10-09 09:53:21.000000000 +0200
|
||
|
+++ b/make/agentpycheck.mk 2024-03-14 11:52:48.045134164 +0100
|
||
|
@@ -10,38 +10,38 @@
|
||
|
|
||
|
%.xml-check: %.8
|
||
|
$(eval INPUT=$(subst .xml-check,,$(@F)))
|
||
|
- 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 \
|
||
|
+ for x in $(INPUT) `PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$(INPUT) -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \
|
||
|
TEMPFILE=$$(mktemp); \
|
||
|
- PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$$x -o metadata | $(AWK) $(AWK_VAL) > $$TEMPFILE && \
|
||
|
+ PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$$x -o metadata | $(AWK) $(AWK_VAL) > $$TEMPFILE && \
|
||
|
diff $$TEMPFILE $(DATADIR)/$$x.xml || exit 1 && \
|
||
|
rm $$TEMPFILE; \
|
||
|
done
|
||
|
|
||
|
%.xml-upload: %.8
|
||
|
$(eval INPUT=$(subst .xml-upload,,$(@F)))
|
||
|
- 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 \
|
||
|
- PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$$x -o metadata | $(AWK) $(AWK_VAL) > $(DATADIR)/$$x.xml; \
|
||
|
+ for x in $(INPUT) `PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$(INPUT) -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \
|
||
|
+ PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$$x -o metadata | $(AWK) $(AWK_VAL) > $(DATADIR)/$$x.xml; \
|
||
|
done
|
||
|
|
||
|
# If test will fail, rerun fence agents to show problems
|
||
|
%.delay-check: %
|
||
|
$(eval INPUT=$(subst .delay-check,,$(@F)))
|
||
|
- 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 \
|
||
|
- test `PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib /usr/bin/time -p \
|
||
|
+ for x in $(INPUT) `PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$(INPUT) -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \
|
||
|
+ test `PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib /usr/bin/time -p \
|
||
|
sh -c "printf 'delay=10\n $(FENCE_TEST_ARGS)' | $(PYTHON) $(@D)/$$x" 2>&1 |\
|
||
|
awk -F"[. ]" -vOFS= '/real/ {print $$2,$$3}'` -ge 1000 || ( \
|
||
|
- PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib /usr/bin/time -p \
|
||
|
+ PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib /usr/bin/time -p \
|
||
|
sh -c "printf 'delay=0\n $(FENCE_TEST_ARGS)' | $(PYTHON) $(@D)/$$x"; false ); \
|
||
|
done
|
||
|
|
||
|
%.rng-check: %
|
||
|
$(eval INPUT=$(subst .rng-check,,$(@F)))
|
||
|
- 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 \
|
||
|
- PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$$x -o metadata | \
|
||
|
+ for x in $(INPUT) `PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$(INPUT) -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \
|
||
|
+ PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$$x -o metadata | \
|
||
|
xsltproc ${abs_top_srcdir}/lib/fence2rng.xsl - | \
|
||
|
sed -e 's/ rha:description=/ description=/g' -e 's/ rha:name=/ name=/g' | \
|
||
|
xmllint --nsclean --noout -; \
|
||
|
done
|
||
|
|
||
|
test-fencing:
|
||
|
- PYTHONPATH=$(abs_top_builddir)/lib $(PYTHON) $(abs_top_srcdir)/lib/tests/test_fencing.py
|
||
|
+ PYTHONPATH=$(PYTHONPATH):$(abs_top_builddir)/lib $(PYTHON) $(abs_top_srcdir)/lib/tests/test_fencing.py
|
||
|
diff --color -uNr a/make/fencebuild.mk b/make/fencebuild.mk
|
||
|
--- a/make/fencebuild.mk 2022-10-24 11:02:10.000000000 +0200
|
||
|
+++ b/make/fencebuild.mk 2024-03-14 11:33:24.688964424 +0100
|
||
|
@@ -35,10 +35,10 @@
|
||
|
> $@
|
||
|
|
||
|
if [ 0 -eq `echo "$(@)" | grep fence_ > /dev/null 2>&1; echo $$?` ]; then \
|
||
|
- PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(top_srcdir)/lib/check_used_options.py $@; \
|
||
|
+ PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(top_srcdir)/lib/check_used_options.py $@; \
|
||
|
else true ; fi
|
||
|
|
||
|
- for x in `PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@) -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \
|
||
|
+ for x in `PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@) -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \
|
||
|
cp -f $(@) $(@D)/$$x; \
|
||
|
$(MAKE) $(@D)/$$x.8; \
|
||
|
done
|
||
|
@@ -65,7 +65,7 @@
|
||
|
fi
|
||
|
for p in $(TARGET); do \
|
||
|
dir=`dirname $$p`; \
|
||
|
- 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 \
|
||
|
+ for x in `PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $$p -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \
|
||
|
echo " $(INSTALL_SCRIPT) $$dir/$$x '$(DESTDIR)$(sbindir)'"; \
|
||
|
$(INSTALL_SCRIPT) $$dir/$$x "$(DESTDIR)$(sbindir)" || exit $$?; \
|
||
|
echo " $(INSTALL_DATA) '$$dir/$$x.8' '$(DESTDIR)$(man8dir)'"; \
|
||
|
@@ -75,7 +75,7 @@
|
||
|
|
||
|
uninstall-hook: $(TARGET)
|
||
|
files=`for p in $(TARGET); do \
|
||
|
- 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 \
|
||
|
+ for x in \`PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $$p -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"\`; do \
|
||
|
echo " rm -f '$(DESTDIR)$(sbindir)/$$x'"; \
|
||
|
rm -f "$(DESTDIR)$(sbindir)/$$x"; \
|
||
|
echo " rm -f '$(DESTDIR)$(man8dir)/$$x.8'"; \
|
||
|
diff --color -uNr a/make/fenceman.mk b/make/fenceman.mk
|
||
|
--- a/make/fenceman.mk 2021-07-08 13:09:05.000000000 +0200
|
||
|
+++ b/make/fenceman.mk 2024-03-14 11:32:55.075320897 +0100
|
||
|
@@ -1,6 +1,6 @@
|
||
|
%.8: % $(top_srcdir)/lib/fence2man.xsl
|
||
|
set -e && \
|
||
|
- PYTHONPATH=$(abs_srcdir)/lib:$(abs_builddir)/../lib:$(abs_builddir)/lib \
|
||
|
+ PYTHONPATH=$(PYTHONPATH):$(abs_srcdir)/lib:$(abs_builddir)/../lib:$(abs_builddir)/lib \
|
||
|
$(PYTHON) $* -o manpage > $(@D)/.$(@F).tmp && \
|
||
|
xmllint --noout --relaxng $(top_srcdir)/lib/metadata.rng $(@D)/.$(@F).tmp && \
|
||
|
xsltproc $(top_srcdir)/lib/fence2man.xsl $(@D)/.$(@F).tmp > $@
|