# fixme: # powerman.x86_64: E: incorrect-fsf-address /usr/share/doc/powerman-2.3.24/COPYING # powerman.x86_64: E: incorrect-fsf-address /usr/share/doc/powerman-2.3.24/DISCLAIMER %{!?el6:%global have_systemd 1} Name: powerman Version: 2.3.26 Release: 1%{?dist} Summary: Centralized power control for clusters License: GPLv2+ Url: http://github.com/chaos/powerman Source0: https://github.com/chaos/powerman/releases/download/%version/powerman-%version.tar.gz Patch0: powerman.init.patch Patch1: powerman-multilib.patch %if 0%{?el6}%{?el7} # Removed in el8 and recent Fedora BuildRequires: tcp_wrappers-devel %endif BuildRequires: libcurl-devel BuildRequires: ncurses-devel BuildRequires: libgenders-devel BuildRequires: net-snmp-devel BuildRequires: gcc %if 0%{?have_systemd} BuildRequires: systemd Requires(preun): systemd Requires(post): systemd Requires(postun): systemd %endif %description PowerMan is a tool for manipulating remote power control (RPC) devices from a central location. Several RPC varieties are supported natively by PowerMan and Expect-like configurability simplifies the addition of new devices. %package devel Summary: Development files for Powerman Requires: powerman = %{version}-%{release} Requires: pkgconfig %description devel Development files for Powerman %prep %setup -q %patch0 -p1 -b .initpatch %patch1 -p1 -b .multilibpatch %build sed -i 's/@PACKAGE_VERSION/%{version}/' -i libpowerman/libpowerman.pc.in %configure --with-httppower --with-genders --disable-silent-rules \ %{?_unitdir:--with-systemdsystemunitdir=%{_unitdir}} \ --with-snmppower # parallel makes often fail make -e VERSION=%{version} EXTRA_CFLAGS="$RPM_OPT_FLAGS" %install %make_install # work around a problem in the install make file target ln -sf powerman $RPM_BUILD_ROOT/%{_bindir}/pm pushd $RPM_BUILD_ROOT/%{_mandir}/man1 # Don't assume it's .1.gz ln -sf powerman.1* pm$(expr substr powerman.1* 9 99) popd # install a default config file #cp examples/%{name}.conf-small \ # $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf # get rid of execute bit on powerman script files to fix rpmlint errror chmod -x $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/* mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/%{name} %check # Seem to be broken tests (mostly missing files): t50 t53 t56-t59 # https://github.com/chaos/powerman/issues/10 make check TESTS='t00 t01 t02 t03 t04 t05 t06 t07 t08 t09 t10 t11 t12 t13'\ ' t14 t15 t16 t17 t18 t19 t20 t21 t22 t23 t24 t25 t26 t27'\ ' t28 t29 t30 t31 t32 t33 t34 t35 t36 t37 t38 t39 t40 t41'\ ' t42 t43 t44 t45 t46 t47 t48 t49 t51 t52 t54 t55' %post %ldconfig %if 0%{?have_systemd} %systemd_post powerman.service %else /sbin/chkconfig --add powerman %endif %preun %if 0%{?have_systemd} %systemd_preun powerman.service %else if [ "$1" = 0 ]; then # No conditional stop provided. :( /sbin/service powerman status if [ "$?" -eq 0 ]; then /sbin/service powerman stop fi /sbin/chkconfig --del powerman fi %endif %postun %ldconfig %if 0%{?have_systemd} %systemd_postun_with_restart powerman.service %endif %files %license COPYING DISCLAIMER # README not useful %doc NEWS TODO AUTHORS %{_bindir}/powerman %{_bindir}/pm %{_sbindir}/plmpower %{_sbindir}/powermand %{_sbindir}/httppower %{_sbindir}/snmppower %{_sbindir}/vpcd %dir %{_sysconfdir}/%{name}/ %config(noreplace) %{_sysconfdir}/%{name}/* %{_mandir}/man*/* %if 0%{?have_systemd} %attr(0644,root,root) %{_unitdir}/powerman.service %attr(0644,root,root) %{_tmpfilesdir}/powerman.conf %else %{_sysconfdir}/init.d/%{name} %endif %{_libdir}/libpowerman.so.0 %{_libdir}/libpowerman.so.0.0.0 %dir %{_libdir}/stonith/plugins %dir %{_libdir}/stonith/plugins/external %{_libdir}/stonith/plugins/external/powerman %{_localstatedir}/run/%{name} %files devel %{_includedir}/libpowerman.h %exclude %{_libdir}/libpowerman.a %exclude %{_libdir}/libpowerman.la %{_libdir}/pkgconfig/libpowerman.pc %{_libdir}/libpowerman.so %changelog * Wed Apr 21 2021 Dave Love - 2.3.26-1 - New version * Tue Sep 3 2019 Dave love - 2.3.25-3 - Don't BR tcp_wrappers on Fedora - BR gcc * Mon Aug 19 2019 Dave love - 2.3.25-2 - Install /var/run/powerman - Make tcp_wrappers BR conditional * Wed Jan 30 2019 Dave Love - 2.3.25-1 - New version - Remove systemd patch and autoreconf * Sat Nov 11 2017 Dave Love - 2.3.24-5 - Fix for el6 * Wed Nov 8 2017 Dave Love - 2.3.24-4 - Update systemd support (fixes #1489093) - Clean up spec post-el5 - Fix %%preun - Own stonith directories * Mon Feb 29 2016 Dave Love - 2.3.24-3 - Rebuild for systemd change * Sun Feb 28 2016 Dave Love - 2.3.24-2 - Support systemd (fixes #1179482) - Run tests - Add snmppower - Don't BR flex bison readline-devel - More cleanup - Make pm man page a link * Fri Feb 26 2016 Dave Love - 2.3.24-1 - New version (fixes #967084) - Clean up spec; use %%license; fix URL - Move stonith file to main package and own directory - BR libgenders-devel * Sat Oct 10 2009 Steven M. Parrish - 2.3.5-2 - Fix multilib issue #509691 * Wed Aug 26 2009 Steven Parrish - 2.3.5-1 - Deprecated undocumented powerman.conf port directive. - Added powerman.conf listen directive to configure which interfaces - and ports the server listens on. Make the default localhost:10101. - Add support for HP integrated power control devices [Bjorn Helgaas] - Add support for Sun LOM. - Misc. documentation improvements - Add heartbeat STONITH plugin. * Sun Jul 26 2009 Fedora Release Engineering - 2.3.4-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Thu Feb 26 2009 Fedora Release Engineering - 2.3.4-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Wed Feb 11 2009 Steven M. Parrish 2.3.4-4 - Updated post and postun with ldconfig - added init script patch to default to autostart no * Tue Feb 10 2009 Steven M. Parrish 2.3.4-3 - Fix errors in files lists * Tue Feb 10 2009 Steven M. Parrish 2.3.4-2 - Fix errors in files lists * Tue Feb 10 2009 Steven M. Parrish 2.3.4-1 - New upstream release. New -devel subpackage created * Mon Feb 09 2009 Steven M. Parrish 2.3-1 - New upstream release * Mon Sep 15 2008 Steven M. Parrish 2.2-1 - New upstream release * Thu Aug 28 2008 Tom "spot" Callaway 2.1-2 - fix license tag * Wed Jun 18 2008 Steven Parrish 2.1-1 - New upstream release * Wed Jun 04 2008 Jarod Wilson 2.0-2 - Clean up some legacy distro cruft * Wed Jun 04 2008 Jarod Wilson 2.0-1 - New upstream release * Wed Feb 13 2008 Jarod Wilson 1.0.32-5 - Fix up header includes to build w/gcc 4.3 * Thu Jan 31 2008 Jarod Wilson 1.0.32-4 - And now make it build with ncurses instead of termcap in f9+ * Mon Jan 28 2008 Jarod Wilson 1.0.32-3 - Ugh, add libtermcap-devel BR * Mon Jan 28 2008 Jarod Wilson 1.0.32-2 - Add {lib,}curl-devel and readline-devel BR * Mon Jan 28 2008 Jarod Wilson 1.0.32-1 - New upstream release * Wed Feb 07 2007 Jarod Wilson 1.0.25-2 - Release bump to fix devel upgrade path * Mon Feb 05 2007 Jarod Wilson 1.0.25-1 - New upstream release - Fixed up compile flags * Tue Sep 05 2006 Jarod Wilson 1.0.24-3 - Rebuild for new glibc * Mon Jul 24 2006 Jarod Wilson 1.0.24-2 - Update BuildRequires for updated (minimal-er) mock buildroots * Tue Jun 13 2006 Jarod Wilson 1.0.24-1 - Assorted mods to conform more with Fedora Extras guidelines * Fri Apr 21 2006 Ben Woodard 1.0.23-4 - Added tcp_wrappers as a requirement so that it can build in mock * Mon Feb 27 2006 Ben Woodard 1.0.23-3 - change perms on files in etc/powerman so that they don't look like scripts to rpmlint. - mark powerman hardware files config files. - add patch to init file which turns off powerman by default and works around a minor problem in rpmlint's handling of chkconfig lines. * Thu Feb 23 2006 Ben Woodard - Change source to dl.sf.net - Add args to make - added flags to allow for parallel building - changed defattr which was interfering with perms of included files. - removed explicit attrs for files - removed man directories from package. - changed etc to sysconfdir macro. - powerman initscript not a config file. - change pm from an absolute symlink to a relative symlink * Thu Feb 16 2006 Ben Woodard 1.0.23-2 - fix permissions on spec file and source file - Put complete URL in Source0 - Condensed some of the files listed. * Wed Feb 15 2006 Jim Garlick 1.0.23-1 - new release 1.0.23 * Tue Feb 14 2006 Ben Woodard 1.0.22-3 - Changed /usr/bin to bindir - Changed /usr/sbin to sbindir - Added COPYING to list of docs. - Changed /etc/rc.d/init.d/ to initrddir - Changed /usr/man to mandir - Added a fully qualified path to the source file. - Fixed buildroot - Added a patch which should fix a fc4 build problem. * Thu Feb 09 2006 Ben Woodard 1.0.22-2 - changed the buildroot to match fedora guidlines - changed permissions of spec and src files. - added changelog to spec file