Accepting request 290399 from home:posophe:branches:hardware
update + systemd OBS-URL: https://build.opensuse.org/request/show/290399 OBS-URL: https://build.opensuse.org/package/show/hardware/powerman?expand=0&rev=25
This commit is contained in:
parent
00d888b67e
commit
814586525e
@ -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
3
powerman-2.3.20.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:a4b0858d1214aab18e2673596b00ac9bad976cb7b777209e10732467c3551b88
|
||||||
|
size 620248
|
@ -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
|
|
||||||
##
|
|
@ -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
|
|
@ -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
|
Mon Aug 4 16:54:41 UTC 2014 - sfalken@opensuse.org
|
||||||
|
|
||||||
|
11
powerman.service
Normal file
11
powerman.service
Normal 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
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package powerman
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -15,33 +15,22 @@
|
|||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# 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
|
Name: powerman
|
||||||
Version: 2.3.16
|
Version: 2.3.20
|
||||||
Release: 0
|
Release: 0
|
||||||
Url: http://code.google.com/p/powerman/
|
Url: https://github.com/chaos/powerman
|
||||||
Source: %{name}-%{version}.tar.gz
|
Source0: https://github.com/chaos/powerman/releases/download/%{version}/%{name}-%{version}.tar.gz
|
||||||
Patch0: powerman-piddir.patch
|
Source1: %{name}.service
|
||||||
Patch1: powerman-runlevel.patch
|
|
||||||
Summary: Centralized Power Control for Clusters
|
Summary: Centralized Power Control for Clusters
|
||||||
License: GPL-2.0+
|
License: GPL-2.0+
|
||||||
Group: Productivity/Clustering/HA
|
Group: Productivity/Clustering/HA
|
||||||
BuildRequires: curl-devel
|
BuildRequires: curl-devel
|
||||||
BuildRequires: ncurses-devel
|
BuildRequires: ncurses-devel
|
||||||
BuildRequires: pkg-config
|
BuildRequires: pkg-config
|
||||||
|
BuildRequires: systemd-rpm-macros
|
||||||
BuildRequires: tcpd-devel
|
BuildRequires: tcpd-devel
|
||||||
%if 0%{?enable_heartbeat}
|
|
||||||
BuildRequires: heartbeat
|
|
||||||
%endif
|
|
||||||
#BuildRequires: genders
|
#BuildRequires: genders
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
%{?systemd_requires}
|
||||||
PreReq: %insserv_prereq
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
PowerMan is a tool for manipulating remote power control (RPC) devices from a
|
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
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
|
||||||
%patch1 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# --with-genders
|
# --with-genders
|
||||||
@ -78,25 +65,24 @@ make %{?jobs:-j%jobs}
|
|||||||
%install
|
%install
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/*.la
|
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
|
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
|
rm -r $RPM_BUILD_ROOT%{_libdir}/stonith
|
||||||
%endif
|
|
||||||
|
|
||||||
%clean
|
%pre
|
||||||
rm -rf $RPM_BUILD_ROOT
|
%service_add_pre %{name}.service
|
||||||
|
|
||||||
%preun
|
|
||||||
%{stop_on_removal}
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%{fillup_and_insserv -f}
|
%service_add_post %{name}.service
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%service_del_preun %{name}.service
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%{restart_on_update}
|
%service_del_postun %{name}.service
|
||||||
%{insserv_cleanup}
|
|
||||||
|
|
||||||
%post -n libpowerman0 -p /sbin/ldconfig
|
%post -n libpowerman0 -p /sbin/ldconfig
|
||||||
|
|
||||||
@ -106,15 +92,12 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc AUTHORS DISCLAIMER COPYING NEWS README TODO
|
%doc AUTHORS DISCLAIMER COPYING NEWS README TODO
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
%if 0%{?enable_heartbeat}
|
|
||||||
%{_libdir}/stonith/plugins/external/powerman
|
|
||||||
%endif
|
|
||||||
%dir %attr(0755,daemon,root) %ghost /run/powerman
|
%dir %attr(0755,daemon,root) %ghost /run/powerman
|
||||||
%doc %{_mandir}/man?/*.*
|
%{_mandir}/man?/*.*
|
||||||
%exclude %doc %{_mandir}/man3/*.*
|
%exclude %{_mandir}/man3/*.*
|
||||||
%{_sbindir}/*
|
%{_sbindir}/*
|
||||||
%dir %config %{_sysconfdir}/powerman
|
%dir %{_sysconfdir}/powerman
|
||||||
%{_sysconfdir}/init.d/powerman
|
%{_unitdir}/%{name}.service
|
||||||
%config %{_sysconfdir}/powerman/powerman.conf
|
%config %{_sysconfdir}/powerman/powerman.conf
|
||||||
%{_sysconfdir}/powerman/*.dev
|
%{_sysconfdir}/powerman/*.dev
|
||||||
|
|
||||||
@ -123,7 +106,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_includedir}/*
|
%{_includedir}/*
|
||||||
%{_libdir}/*.so
|
%{_libdir}/*.so
|
||||||
%{_libdir}/pkgconfig/*.pc
|
%{_libdir}/pkgconfig/*.pc
|
||||||
%doc %{_mandir}/man3/*.*
|
%{_mandir}/man3/*.*
|
||||||
|
|
||||||
%files -n libpowerman0
|
%files -n libpowerman0
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
Loading…
Reference in New Issue
Block a user