From 24515065154725ba029b5ca73961e34314e301a9 Mon Sep 17 00:00:00 2001 From: Oyvind Albrigtsen Date: Fri, 23 Dec 2016 11:05:22 +0100 Subject: [PATCH] - Fix to build in Python 3 only environment --- fence-agents.spec | 6 +++++- python3.patch | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 python3.patch diff --git a/fence-agents.spec b/fence-agents.spec index dac2d79..6b1dac9 100644 --- a/fence-agents.spec +++ b/fence-agents.spec @@ -16,11 +16,12 @@ Name: fence-agents Summary: Fence Agents for Red Hat Cluster Version: 4.0.24 -Release: 4%{?alphatag:.%{alphatag}}%{?dist} +Release: 5%{?alphatag:.%{alphatag}}%{?dist} License: GPLv2+ and LGPLv2+ Group: System Environment/Base URL: http://sourceware.org/cluster/wiki/ Source0: https://fedorahosted.org/releases/f/e/fence-agents/%{name}-%{version}.tar.xz +Patch0: python3.patch %if 0%{?fedora} %global testagents zvm virsh raritan rcd_serial @@ -776,6 +777,9 @@ The fence-agents-zvm package contains a fence agent for IBM z/VM over IP. %{_mandir}/man8/fence_zvmip.8* %changelog +* Fri Dec 23 2016 Oyvind Albrigtsen - 4.0.24-5 +- Fix to build in Python 3 only environment + * Mon Dec 19 2016 Miro HronĨok - 4.0.24-4 - Rebuild for Python 3.6 diff --git a/python3.patch b/python3.patch new file mode 100644 index 0000000..281fe36 --- /dev/null +++ b/python3.patch @@ -0,0 +1,21 @@ +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 \