From e8511740313028c806c477a59296a1413bb0f0039825316aac502ef3bb2c5433 Mon Sep 17 00:00:00 2001
From: Philipp Seiler
Date: Thu, 2 Feb 2017 08:40:56 +0000
Subject: [PATCH] Accepting request 450971 from home:eeich:branches:hardware
- Added support for snmp, tcpwrappers and genders to be compatible
with the powerman package from openHPC.community (latter one is
currently disabled).
To use tcpwrappers, they need to be enabled in /etc/powerman/powerman.conf
- the default is 'off'.
- Don't create /run/powerman - systemd will do this for us.
OBS-URL: https://build.opensuse.org/request/show/450971
OBS-URL: https://build.opensuse.org/package/show/hardware/powerman?expand=0&rev=29
---
powerman.changes | 10 ++++++++++
powerman.spec | 24 +++++++++++++++++++-----
2 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/powerman.changes b/powerman.changes
index 0eae024..44a5bcb 100644
--- a/powerman.changes
+++ b/powerman.changes
@@ -1,3 +1,13 @@
+-------------------------------------------------------------------
+Wed Jan 4 18:16:09 UTC 2017 - eich@suse.com
+
+- Added support for snmp, tcpwrappers and genders to be compatible
+ with the powerman package from openHPC.community (latter one is
+ currently disabled).
+ To use tcpwrappers, they need to be enabled in /etc/powerman/powerman.conf
+ - the default is 'off'.
+- Don't create /run/powerman - systemd will do this for us.
+
-------------------------------------------------------------------
Fri Nov 13 18:40:43 UTC 2015 - mpluskal@suse.com
diff --git a/powerman.spec b/powerman.spec
index c56f598..d963c16 100644
--- a/powerman.spec
+++ b/powerman.spec
@@ -1,7 +1,7 @@
#
# spec file for package powerman
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,6 +16,11 @@
#
+#
+%define _with_snmppower 1
+%define _with_tcp_wrappers 1
+%undefine _with_genders
+
Name: powerman
Version: 2.3.24
Release: 0
@@ -23,12 +28,18 @@ Summary: Centralized Power Control for Clusters
License: GPL-2.0+
Group: Productivity/Clustering/HA
Url: https://github.com/chaos/powerman
-Source0: https://github.com/chaos/powerman/releases/download/%{version}/%{name}-%{version}.tar.gz
+Source0: https://github.com/chaos/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: ncurses-devel
BuildRequires: pkg-config
BuildRequires: tcpd-devel
BuildRequires: pkgconfig(libcurl)
+%if 0%{?_with_snmppower}
+BuildRequires: net-snmp-devel
+%endif
+%if 0%{?_with_genders}
+BuildRequires: genders
+%endif
BuildRequires: pkgconfig(systemd)
%{?systemd_requires}
@@ -50,7 +61,7 @@ Group: Development/Libraries/C and C++
Requires: libpowerman0 = %{version}
%description devel
-A header file and static library for developing applications using PowerMan.
+Header files, pkg-config file and man pages for developing applications using PowerMan.
%prep
%setup -q
@@ -58,7 +69,11 @@ A header file and static library for developing applications using PowerMan.
%build
%configure \
--disable-static\
- --with-httppower
+ --with-httppower \
+%{?_with_snmppower:--with-snmppower} \
+%{?_with_genders:--with-genders} \
+%{?_with_tcp_wrappers:--with-tcp-wrappers} \
+
make %{?_smp_mflags}
%install
@@ -89,7 +104,6 @@ rm -r %{buildroot}%{_libdir}/stonith
%defattr(-,root,root)
%doc AUTHORS DISCLAIMER COPYING NEWS README TODO
%{_bindir}/*
-%dir %attr(0755,daemon,root) %ghost /run/powerman
%{_mandir}/man?/*.*
%exclude %{_mandir}/man3/*.*
%{_sbindir}/*