Dominique Leuenberger 2015-03-23 11:18:03 +00:00 committed by Git OBS Bridge
commit f36fcce438
7 changed files with 49 additions and 80 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5ab2846d15a93917fe79190f7a7609c3c2e128c03d040edf365fbd4f80a985b2
size 615696

3
powerman-2.3.20.tar.gz Normal file
View File

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

View File

@ -1,25 +0,0 @@
diff -rupN powerman-2.3.16.old/scripts/powerman.in powerman-2.3.16/scripts/powerman.in
--- powerman-2.3.16.old/scripts/powerman.in 2012-01-12 16:37:34.000000000 -0800
+++ powerman-2.3.16/scripts/powerman.in 2014-08-04 09:40:11.063544169 -0700
@@ -34,7 +34,8 @@ DESC="PowerMan"
DAEMON="$sbindir/powermand"
#DAEMON_ARGS=
CONFIG=$sysconfdir/powerman/powerman.conf
-PIDFILE="$localstatedir/run/powerman/powermand.pid"
+PIDDIR="/run/powerman"
+PIDFILE="$PIDDIR/powermand.pid"
#NICE=
USER=@RUN_AS_USER@
#SIGHUP_RELOAD=
@@ -54,6 +55,11 @@ service_init ()
SIGTERM_TIMEOUT="3"
STATUS=0
+if [ ! -d "$PIDDIR" ] ; then
+ mkdir "$PIDDIR"
+ chown $USER $PIDDIR
+fi
+
# Read configuration defaults to override variables:
# $DAEMON_ARGS, $CONFIG, $PIDFILE, $USER, $NICE, $SIGHUP_RELOAD
##

View File

@ -1,13 +0,0 @@
Index: powerman-2.3.9/scripts/powerman.in
===================================================================
--- powerman-2.3.9.orig/scripts/powerman.in
+++ powerman-2.3.9/scripts/powerman.in
@@ -16,7 +16,7 @@
# Required-Stop: $local_fs $named $network
# Should-Start: $remote_fs $syslog $time
# Should-Stop: $remote_fs $syslog $time
-# Default-Start: 2 3 4 5
+# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Short-Description: Start/Stop the PowerMan (remote power manager) daemon.
### END INIT INFO

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Thu Mar 12 09:45:27 UTC 2015 - p.drouand@gmail.com
- Update to version 2.3.20
* add dist tag to release (TOSS-2667)
* Minor automake updates
- Move to systemd
- Remove unneeded patchs
* powerman-piddir.patch
* powerman-runlevel.patch
- Update project and download Urls; project has moved to github
- Some cleanup
-------------------------------------------------------------------
Mon Aug 4 16:54:41 UTC 2014 - sfalken@opensuse.org

11
powerman.service Normal file
View File

@ -0,0 +1,11 @@
[Unit]
Description=Powerman Daemon
After=network.target
[Service]
Type=forking
PIDFile=/run/powerman.pid
ExecStart=/usr/sbin/powermand
[Install]
WantedBy=multi-user.target

View File

@ -1,7 +1,7 @@
#
# spec file for package powerman
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -15,33 +15,22 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%if 0%{?suse_version} <= 1140
%if 0%{?suse_version} > 1110
%define enable_heartbeat 1
%endif
%endif
Name: powerman
Version: 2.3.16
Version: 2.3.20
Release: 0
Url: http://code.google.com/p/powerman/
Source: %{name}-%{version}.tar.gz
Patch0: powerman-piddir.patch
Patch1: powerman-runlevel.patch
Url: https://github.com/chaos/powerman
Source0: https://github.com/chaos/powerman/releases/download/%{version}/%{name}-%{version}.tar.gz
Source1: %{name}.service
Summary: Centralized Power Control for Clusters
License: GPL-2.0+
Group: Productivity/Clustering/HA
BuildRequires: curl-devel
BuildRequires: ncurses-devel
BuildRequires: pkg-config
BuildRequires: systemd-rpm-macros
BuildRequires: tcpd-devel
%if 0%{?enable_heartbeat}
BuildRequires: heartbeat
%endif
#BuildRequires: genders
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: %insserv_prereq
%{?systemd_requires}
%description
PowerMan is a tool for manipulating remote power control (RPC) devices from a
@ -65,8 +54,6 @@ A header file and static library for developing applications using PowerMan.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%build
# --with-genders
@ -78,25 +65,24 @@ make %{?jobs:-j%jobs}
%install
make install DESTDIR=$RPM_BUILD_ROOT
rm $RPM_BUILD_ROOT%{_libdir}/*.la
ln -s ../..%{_sysconfdir}/init.d/powerman $RPM_BUILD_ROOT%{_sbindir}/rcpowerman
rm -rf %{buildroot}%{_sysconfdir}/init.d
install -Dm 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rc%{name}
mv $RPM_BUILD_ROOT%{_sysconfdir}/powerman/powerman.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/powerman/powerman.conf
#
%if ! 0%{?enable_heartbeat}
rm -r $RPM_BUILD_ROOT%{_libdir}/stonith
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%preun
%{stop_on_removal}
%pre
%service_add_pre %{name}.service
%post
%{fillup_and_insserv -f}
%service_add_post %{name}.service
%preun
%service_del_preun %{name}.service
%postun
%{restart_on_update}
%{insserv_cleanup}
%service_del_postun %{name}.service
%post -n libpowerman0 -p /sbin/ldconfig
@ -106,15 +92,12 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root)
%doc AUTHORS DISCLAIMER COPYING NEWS README TODO
%{_bindir}/*
%if 0%{?enable_heartbeat}
%{_libdir}/stonith/plugins/external/powerman
%endif
%dir %attr(0755,daemon,root) %ghost /run/powerman
%doc %{_mandir}/man?/*.*
%exclude %doc %{_mandir}/man3/*.*
%{_mandir}/man?/*.*
%exclude %{_mandir}/man3/*.*
%{_sbindir}/*
%dir %config %{_sysconfdir}/powerman
%{_sysconfdir}/init.d/powerman
%dir %{_sysconfdir}/powerman
%{_unitdir}/%{name}.service
%config %{_sysconfdir}/powerman/powerman.conf
%{_sysconfdir}/powerman/*.dev
@ -123,7 +106,7 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%doc %{_mandir}/man3/*.*
%{_mandir}/man3/*.*
%files -n libpowerman0
%defattr(-,root,root)