- Update to version 4.15.0+git.1719822011.7a2c0a7f:

* all agents: dont use Deprecated logging.warn()
  * symlinked agents: set agent_name to use when generating manpages
  * fence2man.xsl: improve text for symlinked agents
  * fence_sbd: --sbd-path defaults to /usr/sbin/sbd
  * configure: check additional paths for programs
  * fence_aws: log error if unknown state returned
  * fence_aws: improve list, list-status and status actions
  * fencing: use formatted strings to avoid failing when plug is int
  * fence_azure: fix pinning client api versions for compatibility across different azure sdk versions
  * fence_docker: Connect to Docker via a UNIX socket
  * fence_hpblade/fence_mpath/fence_scsi: use r"" for all regular expressions to avoid SyntaxWarning errors
  * fence_aws: fixes to not fail CI, and dont use boto3 buildreq on CI nodes where it's not installed
  * fence_eps: add fence_epsr2 for ePowerSwitch R2 and newer
  * fencing: add support for docs["agent_name"] to use the main agent name when generating manpages
  * spec: only require python3-azure-sdk for RHEL < 9
  * spec: remove old python3-azure-sdk dependency
  * fence_aliyun: update order for new parameters
  * fence_aliyun: add credentials file support
  * lib/all agents: use r"" for all regular expressions to avoid SyntaxWarning errors

OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/fence-agents?expand=0&rev=175
This commit is contained in:
Peter Varkoly 2024-07-03 18:28:49 +00:00 committed by Git OBS Bridge
commit 40fc951301
8 changed files with 1600 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,176 @@
From cb2c637fa006c566af05ae84b5085c9a9b14541d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <krig@koru.se>
Date: Wed, 20 Jun 2018 11:12:56 +0200
Subject: [PATCH] Use Python 3 for all scripts (bsc#1065966)
---
agents/autodetect/autodetect.py | 2 +-
agents/autodetect/autodetect_test.py | 2 +-
agents/autodetect/fence_apc.py | 2 +-
agents/autodetect/fence_bladecenter.py | 2 +-
agents/autodetect/fence_brocade.py | 2 +-
agents/autodetect/fence_ilo_moonshot.py | 2 +-
agents/autodetect/fence_lpar.py | 2 +-
agents/autodetect/fencing.py | 2 +-
lib/tests/test_fencing.py | 2 +-
tests/fence_testing_test.py | 2 +-
tests/test-apc2.py | 2 +-
tests/test-apc5.py | 2 +-
tests/test-drac4.py | 2 +-
tests/test-multi-apc2.py | 2 +-
tests/test.py | 2 +-
15 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/agents/autodetect/autodetect.py b/agents/autodetect/autodetect.py
index 24d9a731..366e5212 100755
--- a/agents/autodetect/autodetect.py
+++ b/agents/autodetect/autodetect.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import pexpect
import re
diff --git a/agents/autodetect/autodetect_test.py b/agents/autodetect/autodetect_test.py
index a18aaed0..462c469d 100755
--- a/agents/autodetect/autodetect_test.py
+++ b/agents/autodetect/autodetect_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import unittest
import autodetect as detect
diff --git a/agents/autodetect/fence_apc.py b/agents/autodetect/fence_apc.py
index c6dd106e..935f18e8 100644
--- a/agents/autodetect/fence_apc.py
+++ b/agents/autodetect/fence_apc.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/python3 -tt
#####
##
diff --git a/agents/autodetect/fence_bladecenter.py b/agents/autodetect/fence_bladecenter.py
index d72c07f1..dbcdb0d8 100644
--- a/agents/autodetect/fence_bladecenter.py
+++ b/agents/autodetect/fence_bladecenter.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/python3 -tt
#####
##
diff --git a/agents/autodetect/fence_brocade.py b/agents/autodetect/fence_brocade.py
index 5257bccb..f1df7a23 100644
--- a/agents/autodetect/fence_brocade.py
+++ b/agents/autodetect/fence_brocade.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/python3 -tt
import sys, re
import atexit
diff --git a/agents/autodetect/fence_ilo_moonshot.py b/agents/autodetect/fence_ilo_moonshot.py
index e161ac65..a7e827bb 100644
--- a/agents/autodetect/fence_ilo_moonshot.py
+++ b/agents/autodetect/fence_ilo_moonshot.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/python3 -tt
import sys
import atexit
diff --git a/agents/autodetect/fence_lpar.py b/agents/autodetect/fence_lpar.py
index 6676e1c6..59cc2213 100644
--- a/agents/autodetect/fence_lpar.py
+++ b/agents/autodetect/fence_lpar.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/python3 -tt
#####
##
diff --git a/agents/autodetect/fencing.py b/agents/autodetect/fencing.py
index ea21ace1..5d891eee 100644
--- a/agents/autodetect/fencing.py
+++ b/agents/autodetect/fencing.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/python3 -tt
import sys, getopt, time, os, uuid, pycurl, stat
import pexpect, re, syslog
diff --git a/lib/tests/test_fencing.py b/lib/tests/test_fencing.py
index 6ee93858..389e9746 100644
--- a/lib/tests/test_fencing.py
+++ b/lib/tests/test_fencing.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import unittest
import sys
diff --git a/tests/fence_testing_test.py b/tests/fence_testing_test.py
index 36b2a5e0..9da9d0cf 100755
--- a/tests/fence_testing_test.py
+++ b/tests/fence_testing_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import unittest
import fence_testing
diff --git a/tests/test-apc2.py b/tests/test-apc2.py
index bb5aefd8..d4325b9d 100755
--- a/tests/test-apc2.py
+++ b/tests/test-apc2.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from fence_testing import test_action
diff --git a/tests/test-apc5.py b/tests/test-apc5.py
index 6cea3b1c..2679b15b 100755
--- a/tests/test-apc5.py
+++ b/tests/test-apc5.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from fence_testing import test_action
diff --git a/tests/test-drac4.py b/tests/test-drac4.py
index 75c24c51..b750f0f3 100755
--- a/tests/test-drac4.py
+++ b/tests/test-drac4.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from fence_testing import test_action
diff --git a/tests/test-multi-apc2.py b/tests/test-multi-apc2.py
index 7ab9754d..e06e3d97 100755
--- a/tests/test-multi-apc2.py
+++ b/tests/test-multi-apc2.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from fence_testing import test_action
diff --git a/tests/test.py b/tests/test.py
index 8e82ed98..a39822ec 100755
--- a/tests/test.py
+++ b/tests/test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from fence_testing import test_action
--
2.17.1

21
_service Normal file
View File

@ -0,0 +1,21 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="url">https://github.com/ClusterLabs/fence-agents</param>
<param name="scm">git</param>
<param name="exclude">.git</param>
<param name="filename">fence-agents</param>
<param name="versionformat">@PARENT_TAG@+git.%ct.%h</param>
<param name="versionrewrite-pattern">v(.*)</param>
<param name="revision">main</param>
<param name="changesgenerate">enable</param>
</service>
<service name="recompress" mode="disabled">
<param name="file">fence-agents*.tar</param>
<param name="compression">xz</param>
</service>
<service name="set_version" mode="disabled">
<param name="basename">fence-agents</param>
</service>
</services>

6
_servicedata Normal file
View File

@ -0,0 +1,6 @@
<servicedata>
<service name="tar_scm">
<param name="url">git://github.com/ClusterLabs/fence-agents.git</param>
<param name="changesrevision">8d746be92f191aa289f13a3703031c122a5e6cf3</param></service><service name="tar_scm">
<param name="url">https://github.com/ClusterLabs/fence-agents</param>
<param name="changesrevision">74e56b9ea5465ee0b703eb145a286b6a2458ba1d</param></service></servicedata>

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:06645c6830fce2e4c561a748dfb15afb9788bde30eb3d6fa973766b684a079db
size 339460

1198
fence-agents.changes Normal file

File diff suppressed because it is too large Load Diff

172
fence-agents.spec Normal file
View File

@ -0,0 +1,172 @@
#
# spec file for package fence-agents
#
# Copyright (c) 2024 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/
#
%define python_version python3
%global plugin_dir %{_libdir}/stonith/plugins/rhcs
%define agent_list aliyun alom amt amt_ws apc apc_snmp aws azure_arm bladecenter brocade cisco_mds cisco_ucs compute docker drac5 dummy eaton_snmp emerson eps evacuate gce hds_cb hpblade ibmblade ibm_powervs ibm_vpc ibmz 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
Version: 4.15.0+git.1719822011.7a2c0a7f
Release: 0
URL: https://github.com/ClusterLabs/fence-agents
Source0: %{name}-%{version}.tar.xz
Patch1: 0001-Use-Python-3-for-all-scripts-bsc-1065966.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: %{python_version}
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: fdupes
BuildRequires: glibc-devel
BuildRequires: libtool
BuildRequires: libxml2-devel
BuildRequires: libxml2-tools
BuildRequires: libxslt
BuildRequires: mozilla-nspr-devel
BuildRequires: mozilla-nss-devel
BuildRequires: perl
BuildRequires: perl-Net-Telnet
BuildRequires: pkg-config
BuildRequires: python3-google-api-python-client
BuildRequires: python3-keystoneclient
BuildRequires: python3-novaclient
BuildRequires: python3-openwsman
BuildRequires: python3-pexpect
BuildRequires: python3-pycurl
BuildRequires: python3-requests
BuildRequires: python3-xml
BuildRequires: xz
Requires: net-snmp
Requires: openssh
Requires: perl-Net-Telnet
Requires: python3-pexpect
Requires: python3-pycurl
Requires: python3-requests
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
Recommends: python3-openwsman
%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
%autosetup -p1 -n %{name}-%{version}
%build
CFLAGS="${CFLAGS} ${RPM_OPT_FLAGS}"
export CFLAGS
PYTHON="%{_bindir}/python3"
export PYTHON
echo "%{version}" >.tarball-version
./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_*
%files amt_ws
%{_sbindir}/fence_amt_ws
%{_mandir}/man8/fence_amt_ws*
%files devel
/usr/share/pkgconfig/fence-agents.pc
%{_sbindir}/fence_dummy
%{_mandir}/man8/fence_dummy*
%changelog