diff options
author | Philippe Audeoud <jadawin@FreeBSD.org> | 2009-02-16 13:25:42 +0000 |
---|---|---|
committer | Philippe Audeoud <jadawin@FreeBSD.org> | 2009-02-16 13:25:42 +0000 |
commit | 283e1bfa755e5fa4c34d71b10ff6a51efb6c50e5 (patch) | |
tree | e8c4aee6b1bb01e27d1cfed3fe17544d7be77d02 /sysutils/powerman | |
parent | ae23fe260e5879c309b547c5c899e6b1125478aa (diff) | |
download | freebsd-ports-283e1bfa755e5fa4c34d71b10ff6a51efb6c50e5.zip |
- Update to 2.3.4
- Update MASTER_SITES
- Update dependencies
- Update manpages
- Remove useless old stuff
- Update WWW in pkg-descr
PR: ports/131654
Submitted by: Joerg Pulz <Joerg.Pulz at frm2.tum.de>
Diffstat (limited to 'sysutils/powerman')
25 files changed, 125 insertions, 633 deletions
diff --git a/sysutils/powerman/Makefile b/sysutils/powerman/Makefile index 63a63033abcc..acfc3e27c231 100644 --- a/sysutils/powerman/Makefile +++ b/sysutils/powerman/Makefile @@ -5,36 +5,32 @@ # $FreeBSD$ PORTNAME= powerman -PORTVERSION= 1.0.20 -PORTREVISION= 1 +PORTVERSION= 2.3.4 +#PORTREVISION= 1 CATEGORIES= sysutils parallel -MASTER_SITES= ftp://ftp.llnl.gov/pub/linux/powerman/ -EXTRACT_SUFX= .tgz +MASTER_SITES= SF/powerman MAINTAINER= ports@FreeBSD.org COMMENT= PowerMan is a tool for doing remote power control -USE_BISON= build -USE_GMAKE= yes -USE_RC_SUBR= yes +LIB_DEPENDS= curl.5:${PORTSDIR}/ftp/curl -MAKE_ENV+= LDFLAGS="${LDFLAGS}" CPPFLAGS="${CPPFLAGS}" \ - PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \ - PTHREAD_LIBS="${PTHREAD_LIBS}" +USE_PERL5_BUILD= yes +USE_BZIP2= yes +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --with-httppower --localstatedir=${DESTDIR}/var \ + --with-pkgconfig-dir=${PREFIX}/libdata/pkgconfig +CONFIGURE_ENV= CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" +USE_LDCONFIG= yes +USE_RC_SUBR= powerman.sh -MAN1= powerman.1 -MAN5= powerman.conf.5 -MAN7= powerman-devices.7 -MAN8= powermand.8 +CFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib -post-patch: -.for file in ${MAN1} ${MAN5} powermand.1 - @${REINPLACE_CMD} -e "s:%%PREFIX%%:${PREFIX}:" "${WRKSRC}/man/${file}" -.endfor - @${REINPLACE_CMD} -e "s:%%PREFIX%%:${PREFIX}:" \ - "${WRKSRC}/src/powerman.h" - @${REINPLACE_CMD} -e "s:%%PREFIX%%:${PREFIX}:" \ - -e "s:%%RC_SUBR%%:${RC_SUBR}:" \ - "${WRKSRC}/scripts/powerman.init" +MAN1= pm.1 powerman.1 +MAN3= libpowerman.3 +MAN5= powerman.conf.5 powerman.dev.5 +MAN7= powerman-devices.7 +MAN8= httppower.8 plmpower.8 powermand.8 vpcd.8 .include <bsd.port.mk> diff --git a/sysutils/powerman/distinfo b/sysutils/powerman/distinfo index 466dc40af9bc..7cb1243e4d99 100644 --- a/sysutils/powerman/distinfo +++ b/sysutils/powerman/distinfo @@ -1,3 +1,3 @@ -MD5 (powerman-1.0.20.tgz) = 6b33b4d0376e2578e93fc32071c719b2 -SHA256 (powerman-1.0.20.tgz) = c69db4fcb8f93a13913f6f6990d5152e482cbca4b844cfb199679586e7107915 -SIZE (powerman-1.0.20.tgz) = 148573 +MD5 (powerman-2.3.4.tar.bz2) = f47c7725b426b0a776a4980d8628471e +SHA256 (powerman-2.3.4.tar.bz2) = 449fd9c2fa1ba4d3bd366fc5421fbf4fb185e28aa16188fb68dd55fe1fc71d88 +SIZE (powerman-2.3.4.tar.bz2) = 405351 diff --git a/sysutils/powerman/files/patch-Makefile b/sysutils/powerman/files/patch-Makefile deleted file mode 100644 index 4ca481a7ee72..000000000000 --- a/sysutils/powerman/files/patch-Makefile +++ /dev/null @@ -1,104 +0,0 @@ -$FreeBSD$ - ---- Makefile.orig Fri Dec 19 09:39:10 2003 -+++ Makefile Thu Aug 5 14:57:44 2004 -@@ -1,20 +1,19 @@ - PROJECT = powerman - VERSION = $(shell perl -ne 'print,exit if s/^\s*VERSION:\s*(\S*).*/\1/i' META) - RELEASE = $(shell perl -ne 'print,exit if s/^\s*RELEASE:\s*(\S*).*/\1/i' META) --SHELL= /bin/sh --MAKE= /usr/bin/make --CC= gcc --INSTALL= /usr/bin/install -c -+SHELL?= /bin/sh -+CC?= gcc -+INSTALL?=/usr/bin/install -c - mkinstalldirs= $(SHELL) $(top_srcdir)/aux/mkinstalldirs --CFLAGS= -g -O2 -Wall -+CFLAGS?= -g -O2 -Wall - - top_srcdir = . --prefix = /usr -+prefix = ${PREFIX} - exec_prefix = ${prefix} - bindir = ${exec_prefix}/bin --sbindir = ${exec_prefix}/sbin --mandir = $(prefix)/man --etcdir = /etc -+sbindir = ${exec_prefix}/sbin -+mandir = ${prefix}/man -+etcdir = ${prefix}/etc - packagedir = ${etcdir}/${PROJECT} - - all: progs tests -@@ -26,38 +25,38 @@ - $(MAKE) -C test - - install: all -- $(mkinstalldirs) $(DESTDIR)$(bindir) -- $(INSTALL) src/powerman $(DESTDIR)$(bindir)/ -- ln -s $(bindir)/powerman $(DESTDIR)$(bindir)/pm -- $(mkinstalldirs) $(DESTDIR)$(sbindir) -- $(INSTALL) src/powermand $(DESTDIR)$(sbindir)/ -- $(mkinstalldirs) $(DESTDIR)$(packagedir) -- $(INSTALL) etc/baytech.dev $(DESTDIR)$(packagedir) -- $(INSTALL) etc/baytech-rpc28-nc.dev $(DESTDIR)$(packagedir) -- $(INSTALL) etc/baytech-rpc3-nc.dev $(DESTDIR)$(packagedir) -- $(INSTALL) etc/icebox.dev $(DESTDIR)$(packagedir) -- $(INSTALL) etc/icebox3.dev $(DESTDIR)$(packagedir) -- $(INSTALL) etc/wti.dev $(DESTDIR)$(packagedir) -- $(INSTALL) etc/wti-rps10.dev $(DESTDIR)$(packagedir) -- $(INSTALL) etc/apc.dev $(DESTDIR)$(packagedir) -- $(INSTALL) etc/apcnew.dev $(DESTDIR)$(packagedir) --# $(INSTALL) etc/vicebox.dev $(DESTDIR)$(packagedir) -- $(INSTALL) etc/vpc.dev $(DESTDIR)$(packagedir) -- $(INSTALL) etc/ibmh8.dev $(DESTDIR)$(packagedir) -- $(INSTALL) etc/phantom.dev $(DESTDIR)$(packagedir) -- $(INSTALL) etc/phantom4.dev $(DESTDIR)$(packagedir) -- $(INSTALL) etc/ipmi.dev $(DESTDIR)$(packagedir) -- $(INSTALL) etc/cyclades-pm8.dev $(DESTDIR)$(packagedir) -- $(INSTALL) etc/ipmipower.dev $(DESTDIR)$(packagedir) -- $(mkinstalldirs) $(DESTDIR)$(mandir)/man1 -- $(INSTALL) -m 644 man/powerman.1 $(DESTDIR)$(mandir)/man1 -- $(INSTALL) -m 644 man/powermand.1 $(DESTDIR)$(mandir)/man1 -- $(mkinstalldirs) $(DESTDIR)$(mandir)/man5 -- $(INSTALL) -m 644 man/powerman.conf.5 $(DESTDIR)$(mandir)/man5 -- $(mkinstalldirs) $(DESTDIR)$(mandir)/man7 -- $(INSTALL) -m 644 man/powerman-devices.7 $(DESTDIR)$(mandir)/man7 -- $(mkinstalldirs) $(DESTDIR)/etc/rc.d/init.d -- $(INSTALL) -m 755 scripts/powerman.init $(DESTDIR)/etc/rc.d/init.d/powerman -+ $(mkinstalldirs) $(bindir) -+ ${BSD_INSTALL_PROGRAM} src/powerman $(bindir)/ -+ ln -s $(bindir)/powerman $(bindir)/pm -+ $(mkinstalldirs) $(sbindir) -+ ${BSD_INSTALL_PROGRAM} src/powermand $(sbindir)/ -+ $(mkinstalldirs) $(packagedir) -+ ${BSD_INSTALL_DATA} etc/baytech.dev $(packagedir) -+ ${BSD_INSTALL_DATA} etc/baytech-rpc28-nc.dev $(packagedir) -+ ${BSD_INSTALL_DATA} etc/baytech-rpc3-nc.dev $(packagedir) -+ ${BSD_INSTALL_DATA} etc/icebox.dev $(packagedir) -+ ${BSD_INSTALL_DATA} etc/icebox3.dev $(packagedir) -+ ${BSD_INSTALL_DATA} etc/wti.dev $(packagedir) -+ ${BSD_INSTALL_DATA} etc/wti-rps10.dev $(packagedir) -+ ${BSD_INSTALL_DATA} etc/apc.dev $(packagedir) -+ ${BSD_INSTALL_DATA} etc/apcnew.dev $(packagedir) -+# ${BSD_INSTALL_DATA} etc/vicebox.dev $(packagedir) -+ ${BSD_INSTALL_DATA} etc/vpc.dev $(packagedir) -+ ${BSD_INSTALL_DATA} etc/ibmh8.dev $(packagedir) -+ ${BSD_INSTALL_DATA} etc/phantom.dev $(packagedir) -+ ${BSD_INSTALL_DATA} etc/phantom4.dev $(packagedir) -+ ${BSD_INSTALL_DATA} etc/ipmi.dev $(packagedir) -+ ${BSD_INSTALL_DATA} etc/cyclades-pm8.dev $(packagedir) -+ ${BSD_INSTALL_DATA} etc/ipmipower.dev $(packagedir) -+ $(mkinstalldirs) $(mandir)/man1 -+ ${BSD_INSTALL_DATA} man/powerman.1 $(mandir)/man1 -+ $(mkinstalldirs) $(mandir)/man8 -+ ${BSD_INSTALL_DATA} man/powermand.1 $(mandir)/man8/powermand.8 -+ $(mkinstalldirs) $(mandir)/man5 -+ ${BSD_INSTALL_DATA} man/powerman.conf.5 $(mandir)/man5 -+ $(mkinstalldirs) $(mandir)/man7 -+ ${BSD_INSTALL_DATA} man/powerman-devices.7 $(mandir)/man7 -+ ${BSD_INSTALL_SCRIPT} scripts/powerman.init $(etcdir)/rc.d/powermand.sh - - clean: - make -C src clean diff --git a/sysutils/powerman/files/patch-man-powerman.1 b/sysutils/powerman/files/patch-man-powerman.1 deleted file mode 100644 index 2400270a5022..000000000000 --- a/sysutils/powerman/files/patch-man-powerman.1 +++ /dev/null @@ -1,29 +0,0 @@ -$FreeBSD$ - ---- man/powerman.1.orig Fri Dec 19 09:39:10 2003 -+++ man/powerman.1 Mon Aug 23 16:19:38 2004 -@@ -146,18 +146,18 @@ - powerman --on "foo[0,4-5]" - .fi - .SH "FILES" --/usr/sbin/powermand -+%%PREFIX%%/sbin/powermand - .br --/usr/bin/powerman -+%%PREFIX%%/bin/powerman - .br --/usr/bin/pm -+%%PREFIX%%/bin/pm - .br --/etc/powerman/powerman.conf -+%%PREFIX%%/etc/powerman/powerman.conf - .br --/etc/powerman/*.dev -+%%PREFIX%%/etc/powerman/*.dev - .SH "ORIGIN" - Developed by Andrew Uselton <useton2@llnl.gov> on LLNL's Linux - clusters. This software is open source and distributed under - the terms of the Gnu GPL. - .SH "SEE ALSO" --powermand(1) powerman.conf(5) -+powermand(8) powerman.conf(5) diff --git a/sysutils/powerman/files/patch-man-powerman.conf.5 b/sysutils/powerman/files/patch-man-powerman.conf.5 index 5c2cdc7e88a2..2c757041ae10 100644 --- a/sysutils/powerman/files/patch-man-powerman.conf.5 +++ b/sysutils/powerman/files/patch-man-powerman.conf.5 @@ -1,21 +1,20 @@ -$FreeBSD$ - ---- man/powerman.conf.5.orig Wed Aug 6 16:56:56 2003 -+++ man/powerman.conf.5 Thu Jun 10 08:38:10 2004 -@@ -90,13 +90,13 @@ - node "pengra15" "pow1" "8" \fR - .fi - .SH "FILES" --/etc/powerman/powerman.conf -+%%PREFIX%%/etc/powerman/powerman.conf - .br --/etc/powerman/*.dev -+%%PREFIX%%/etc/powerman/*.dev - .SH "ORIGIN" - Developed by Andrew Uselton <useton2@llnl.gov> on LLNL's Linux - clusters. This software is open source and distributed under - the terms of the Gnu GPL. - .SH "SEE ALSO" --powermand(1) powerman(1) -+powermand(8) powerman(1) +--- man/powerman.conf.5.in.orig 2009-02-13 18:31:28.000000000 +0100 ++++ man/powerman.conf.5.in 2009-02-13 18:34:28.000000000 +0100 +@@ -5,7 +5,7 @@ + + .SH DESCRIPTION + The powerman.conf file typically includes one or more of the remote power +-controller (RPC) device files provided in the /etc/powerman directory; ++controller (RPC) device files provided in the @X_SYSCONFDIR@/powerman directory; + sets a few global options; + instantiates RPC devices with unique names, hostnames, and ports; + and maps node names to RPC's and plug numbers. +@@ -32,7 +32,7 @@ + Baytech RPC-3 remote power controllers. + .LP + .nf +-include "/etc/powerman/baytech.dev" # include def for "baytech" RPC ++include "@X_SYSCONFDIR@/powerman/baytech.dev" # include def for "baytech" RPC + + tcpwrappers yes # enable TCP wrappers diff --git a/sysutils/powerman/files/patch-man-powermand.1 b/sysutils/powerman/files/patch-man-powermand.1 deleted file mode 100644 index 9e814e8d0d33..000000000000 --- a/sysutils/powerman/files/patch-man-powermand.1 +++ /dev/null @@ -1,28 +0,0 @@ -$FreeBSD$ - ---- man/powermand.1.orig Mon Dec 23 11:26:15 2002 -+++ man/powermand.1 Thu Jun 10 08:38:20 2004 -@@ -25,7 +25,7 @@ - \." 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - \."################################################################# - .\" --.TH PowerMan 1 "Release 1.0" "LLNL" "PowerMan" -+.TH PowerMan 8 "Release 1.0" "LLNL" "PowerMan" - .SH NAME - powermand \- power control and monitoring daemon - .SH SYNOPSIS -@@ -56,11 +56,11 @@ - .B PowerMan - and exit. - .SH "FILES" --/usr/sbin/powermand -+%%PREFIX%%/sbin/powermand - .br --/usr/bin/powerman -+%%PREFIX%%/bin/powerman - .br --/etc/powerman/powerman.conf -+%%PREFIX%%/etc/powerman/powerman.conf - .SH "ORIGIN" - Developed by Andrew Uselton <useton2@llnl.gov> on LLNL's Linux - clusters. This software is open source and distributed under diff --git a/sysutils/powerman/files/patch-man-powermand.8 b/sysutils/powerman/files/patch-man-powermand.8 new file mode 100644 index 000000000000..80325388d2b8 --- /dev/null +++ b/sysutils/powerman/files/patch-man-powermand.8 @@ -0,0 +1,11 @@ +--- man/powermand.8.in.orig 2009-02-13 18:33:44.000000000 +0100 ++++ man/powermand.8.in 2009-02-13 18:34:09.000000000 +0100 +@@ -12,7 +12,7 @@ + .TP + .I "-c, --conf filename" + Override the default location of the powerman configuration file +-.I /etc/powerman/powerman.conf. ++.I @X_SYSCONFDIR@/powerman/powerman.conf. + .TP + .I "-f, --foreground" + Do not daemonize, and send debugging/error messages to stderr instead of syslog. diff --git a/sysutils/powerman/files/patch-scripts-Makefile.in b/sysutils/powerman/files/patch-scripts-Makefile.in new file mode 100644 index 000000000000..21337a7bf89e --- /dev/null +++ b/sysutils/powerman/files/patch-scripts-Makefile.in @@ -0,0 +1,13 @@ +--- scripts/Makefile.in.orig 2009-02-13 18:58:48.000000000 +0100 ++++ scripts/Makefile.in 2009-02-13 18:59:00.000000000 +0100 +@@ -371,10 +371,6 @@ + + install-data-local: + -$(top_srcdir)/config/install-sh -m 755 -d \ +- $(DESTDIR)$(sysconfdir)/init.d +- $(top_srcdir)/config/install-sh -m 755 $(srcdir)/powerman.init \ +- $(DESTDIR)$(sysconfdir)/init.d/powerman +- -$(top_srcdir)/config/install-sh -m 755 -d \ + $(DESTDIR)$(localstatedir)/run + -$(top_srcdir)/config/install-sh -o $(RUN_AS_USER) -m 755 -d \ + $(DESTDIR)$(localstatedir)/run/powerman diff --git a/sysutils/powerman/files/patch-scripts-powerman.init b/sysutils/powerman/files/patch-scripts-powerman.init deleted file mode 100644 index 05b97fe4a5a4..000000000000 --- a/sysutils/powerman/files/patch-scripts-powerman.init +++ /dev/null @@ -1,90 +0,0 @@ -$FreeBSD$ - ---- scripts/powerman.init.orig Thu Jun 10 08:16:04 2004 -+++ scripts/powerman.init Thu Jun 10 08:28:08 2004 -@@ -1,61 +1,27 @@ - #!/bin/sh --## --# powerman.init,v 1.3 2001/12/12 20:08:46 dun Exp --## --# chkconfig: 345 95 5 --# description: PowerMan manages Remote Power Controller (RPC) devices --# processname: /usr/sbin/powermand --# config: /etc/powerman/powerman.conf --## -+# $FreeBSD$ - --# Source function library. --. /etc/rc.d/init.d/functions -+# PROVIDE: powermand -+# REQUIRE: DAEMON -+# BEFORE: LOGIN -+# KEYWORD: shutdown -+ -+# Define these powermand_* variables in one of these files: -+# /etc/rc.conf -+# /etc/rc.conf.local -+# /etc/rc.conf.d/powermand -+# -+# DO NOT CHANGE THESE DEFAULT VALUES HERE -+# -+powermand_enable=${powermand_enable:-"NO"} -+powermand_flags=${powermand_flags:-""} -+ -+. %%RC_SUBR%% -+ -+name="powermand" -+rcvar=`set_rcvar` -+command="%%PREFIX%%/sbin/powermand" -+required_files="%%PREFIX%%/etc/powerman.conf" - --# Source networking configuration. --. /etc/sysconfig/network -- --# Check that networking is up. --[ ${NETWORKING} = "no" ] && exit 0 -- --DAEMON=powermand --RETVAL=0 -- --[ -x "/usr/sbin/$DAEMON" ] || exit 0 -- --# See how we were called. --case "$1" in -- start) -- echo -n "Starting PowerMan: " -- daemon $DAEMON -- RETVAL=$? -- echo -- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$DAEMON -- ;; -- stop) -- echo -n "Shutting down PowerMan: " -- killproc $DAEMON -- RETVAL=$? -- echo -- [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$DAEMON -- ;; -- status) -- status $DAEMON -- RETVAL=$? -- ;; -- restart) -- $0 stop -- $0 start -- RETVAL=$? -- ;; -- reload) -- echo -n "Reloading PowerMan: " -- killproc $DAEMON -HUP -- RETVAL=$? -- echo -- ;; -- *) -- echo "Usage: $DAEMON {start|stop|status|restart|reload}" -- exit 1 --esac -- --exit $RETVAL -+load_rc_config $name -+run_rc_command "$1" diff --git a/sysutils/powerman/files/patch-src-Makefile b/sysutils/powerman/files/patch-src-Makefile deleted file mode 100644 index 645f4060f342..000000000000 --- a/sysutils/powerman/files/patch-src-Makefile +++ /dev/null @@ -1,47 +0,0 @@ -$FreeBSD$ - ---- src/Makefile.orig Mon Dec 8 20:30:51 2003 -+++ src/Makefile Mon Mar 29 22:04:15 2004 -@@ -3,11 +3,11 @@ - #################################################################### - - PROJECT= powerman --SHELL= /bin/sh --CC= gcc --MAKE= /usr/bin/make --LEX= /usr/bin/flex --YACC= /usr/bin/bison -+SHELL?= /bin/sh -+CC?= gcc -+MAKE?= /usr/bin/make -+LEX?= /usr/bin/flex -+YACC?= /usr/bin/bison - - VERSTR= $(shell if test -n "$(VERSION)"; then \ - if test -n "$(RELEASE)"; then \ -@@ -18,10 +18,10 @@ - - DEFS= -DHAVE_CONFIG_H -DPOWERMAN_VERSION=\"$(VERSTR)\" - #DEFS+= -DNDEBUG --CFLAGS= -g -Wall $(DEFS) -+CFLAGS+= $(DEFS) - #CFLAGS+= -pg - --LIBS= -lfl -lwrap -lnsl -lutil -+LIBS= -lfl -lwrap -lutil - - COMMON_OBJS = wrappers.o error.o hostlist.o debug.o - -@@ -37,10 +37,10 @@ - all: powerman powermand - - powermand: $(SERVER_OBJS) -- $(CC) $(CFLAGS) -o $@ $(SERVER_OBJS) $(LIBS) -+ $(CC) $(CFLAGS) -o $@ $(SERVER_OBJS) $(LDFLAGS) $(LIBS) - - powerman: $(CLIENT_OBJS) -- $(CC) -o $@ $(CLIENT_OBJS) $(LIBS) -+ $(CC) -o $@ $(CLIENT_OBJS) $(LDFLAGS) $(LIBS) - - parse_lex.c: parse.lex - $(LEX) -oparse_lex.c parse.lex diff --git a/sysutils/powerman/files/patch-src-client.c b/sysutils/powerman/files/patch-src-client.c deleted file mode 100644 index 3a0eb9e99dad..000000000000 --- a/sysutils/powerman/files/patch-src-client.c +++ /dev/null @@ -1,19 +0,0 @@ -$FreeBSD$ - ---- src/client.c.orig Mon Mar 29 14:25:54 2004 -+++ src/client.c Mon Mar 29 14:27:27 2004 -@@ -31,10 +31,14 @@ - #include <syslog.h> - #include <stdarg.h> - -+#include <sys/types.h> -+#include <netinet/in.h> - #include <arpa/inet.h> - #include <tcpd.h> - #include <stdio.h> - #include <fcntl.h> -+#include <sys/socket.h> -+#include <limits.h> - - #include "powerman.h" - #include "wrappers.h" diff --git a/sysutils/powerman/files/patch-src-device_pipe.c b/sysutils/powerman/files/patch-src-device_pipe.c deleted file mode 100644 index 0628e58e6d4c..000000000000 --- a/sysutils/powerman/files/patch-src-device_pipe.c +++ /dev/null @@ -1,15 +0,0 @@ -$FreeBSD$ - ---- src/device_pipe.c.orig Mon Mar 29 22:02:27 2004 -+++ src/device_pipe.c Mon Mar 29 22:02:48 2004 -@@ -38,7 +38,10 @@ - #include <ctype.h> - #include <sys/types.h> - #include <sys/wait.h> -+#include <signal.h> -+#ifdef __linux__ - #include <pty.h> -+#endif - - - #include "powerman.h" diff --git a/sysutils/powerman/files/patch-src-hostlist.c b/sysutils/powerman/files/patch-src-hostlist.c deleted file mode 100644 index 74d928504e98..000000000000 --- a/sysutils/powerman/files/patch-src-hostlist.c +++ /dev/null @@ -1,13 +0,0 @@ -$FreeBSD$ - ---- src/hostlist.c.orig Mon Mar 29 13:50:02 2004 -+++ src/hostlist.c Mon Mar 29 13:50:18 2004 -@@ -43,7 +43,7 @@ - #include <assert.h> - #include <errno.h> - #include <ctype.h> --#include <sys/param.h> -+#include <limits.h> - #include <unistd.h> - - #include "hostlist.h" diff --git a/sysutils/powerman/files/patch-src-parse.lex b/sysutils/powerman/files/patch-src-parse.lex deleted file mode 100644 index ae7e6964272e..000000000000 --- a/sysutils/powerman/files/patch-src-parse.lex +++ /dev/null @@ -1,12 +0,0 @@ -$FreeBSD$ - ---- src/parse.lex.orig Mon Mar 29 21:57:12 2004 -+++ src/parse.lex Mon Mar 29 21:57:46 2004 -@@ -41,6 +41,7 @@ - #include "error.h" - #include "parse_util.h" - extern void yyerror(); -+extern YYSTYPE yylval; - - #define MAX_INCLUDE_DEPTH 10 - static YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH]; diff --git a/sysutils/powerman/files/patch-src-parse.y b/sysutils/powerman/files/patch-src-parse.y deleted file mode 100644 index a692873ddd1f..000000000000 --- a/sysutils/powerman/files/patch-src-parse.y +++ /dev/null @@ -1,32 +0,0 @@ - -$FreeBSD$ - ---- src/parse.y.orig Fri Feb 20 00:01:26 2004 -+++ src/parse.y Sun Sep 5 22:24:43 2004 -@@ -37,6 +37,7 @@ - #include <stdio.h> - #include <ctype.h> - #include <unistd.h> -+#include <limits.h> - - #include "powerman.h" - #include "list.h" -@@ -50,6 +51,10 @@ - #include "error.h" - #include "string.h" - -+#ifdef __FreeBSD__ -+typedef int reg_syntax_t; -+#endif -+ - /* - * A PreScript is a list of PreStmts. - */ -@@ -754,6 +759,7 @@ - case EPL_NONODES: - _errormsg("more plugs than nodes"); - default: -+ break; - } - - if (!conf_addnodes(nodestr)) diff --git a/sysutils/powerman/files/patch-src-powerman.c b/sysutils/powerman/files/patch-src-powerman.c deleted file mode 100644 index d878789ed216..000000000000 --- a/sysutils/powerman/files/patch-src-powerman.c +++ /dev/null @@ -1,38 +0,0 @@ -$FreeBSD$ - ---- src/powerman.c.orig Sun Nov 30 16:13:28 2003 -+++ src/powerman.c Thu Jun 17 09:11:40 2004 -@@ -34,6 +34,8 @@ - #include <stdlib.h> - #include <assert.h> - #include <libgen.h> -+#include <limits.h> -+#include <sys/socket.h> - - #include "powerman.h" - #include "wrappers.h" -@@ -78,6 +80,24 @@ - }; - - static const struct option *longopts = long_options; -+ -+#ifdef __FreeBSD__ -+#include <stdarg.h> -+ -+#define BUF_MAX 1024 -+ -+static int dprintf(int fd, char *const fmt, ...) -+{ -+ int ret; -+ va_list ap; -+ char buf[BUF_MAX]; -+ -+ va_start(ap, fmt); -+ ret = vsnprintf(buf, BUF_MAX, fmt, ap); -+ va_end(ap); -+ return (int) write(fd, buf, (ret > BUF_MAX) ? BUF_MAX : ret); -+} -+#endif - - int main(int argc, char **argv) - { diff --git a/sysutils/powerman/files/patch-src-powerman.h b/sysutils/powerman/files/patch-src-powerman.h deleted file mode 100644 index 953679fd596d..000000000000 --- a/sysutils/powerman/files/patch-src-powerman.h +++ /dev/null @@ -1,19 +0,0 @@ -$FreeBSD$ - ---- src/powerman.h.orig Thu Jun 10 08:57:15 2004 -+++ src/powerman.h Thu Jun 10 08:57:55 2004 -@@ -39,10 +39,10 @@ - #endif /* MIN */ - - #define DAEMON_NAME "powermand" --#define PID_FILE_NAME "/var/run/powerman/powerman.pid" --#define PID_DIR "/var/run/powerman" --#define ROOT_DIR "/etc/powerman" --#define DFLT_CONFIG_FILE "/etc/powerman/powerman.conf" -+#define PID_FILE_NAME "/var/run/powerman.pid" -+#define PID_DIR "/var/run" -+#define ROOT_DIR "%%PREFIX%%/etc/powerman" -+#define DFLT_CONFIG_FILE "%%PREFIX%%/etc/powerman.conf" - - #define DFLT_PORT "10101" - #define DFLT_HOSTNAME "localhost" diff --git a/sysutils/powerman/files/patch-src-powermand.c b/sysutils/powerman/files/patch-src-powermand.c deleted file mode 100644 index c893d8b10c90..000000000000 --- a/sysutils/powerman/files/patch-src-powermand.c +++ /dev/null @@ -1,15 +0,0 @@ -$FreeBSD$ - ---- src/powermand.c.orig Mon Mar 29 14:23:55 2004 -+++ src/powermand.c Mon Mar 29 14:24:44 2004 -@@ -35,6 +35,10 @@ - #include <stdlib.h> - #include <stdio.h> - #include <assert.h> -+#ifdef __linux__ -+#include <list.h> -+#endif -+#include <limits.h> - - #include "powerman.h" - #include "list.h" diff --git a/sysutils/powerman/files/patch-src-wrappers.c b/sysutils/powerman/files/patch-src-wrappers.c deleted file mode 100644 index e5e9cc6a404f..000000000000 --- a/sysutils/powerman/files/patch-src-wrappers.c +++ /dev/null @@ -1,35 +0,0 @@ -$FreeBSD$ - ---- src/wrappers.c.orig Mon Mar 29 12:59:20 2004 -+++ src/wrappers.c Mon Mar 29 13:47:54 2004 -@@ -42,6 +42,7 @@ - #if HAVE_POLL - #include <sys/poll.h> - #endif -+#include <limits.h> - - #include "wrappers.h" - #include "cbuf.h" -@@ -486,7 +487,10 @@ - */ - if (!((errno == EWOULDBLOCK) || - (errno == ECONNABORTED) || -- (errno == EPROTO) || (errno == EINTR))) -+#ifdef __linux__ -+ (errno == EPROTO) || -+#endif -+ (errno == EINTR))) - lsd_fatal_error(__FILE__, __LINE__, "accept"); - } - return new; -@@ -639,8 +643,10 @@ - int n; - char buf[MAX_REG_BUF]; - -+#ifdef __linux__ - /* Review: undocumented, is it needed? */ - re_syntax_options = RE_SYNTAX_POSIX_EXTENDED; -+#endif - Strncpy(buf, string, MAX_REG_BUF); - n = regexec(preg, buf, nmatch, pmatch, eflags); - return n; diff --git a/sysutils/powerman/files/patch-src-wrappers.h b/sysutils/powerman/files/patch-src-wrappers.h deleted file mode 100644 index 04edc0cdda8e..000000000000 --- a/sysutils/powerman/files/patch-src-wrappers.h +++ /dev/null @@ -1,19 +0,0 @@ -$FreeBSD$ - ---- src/wrappers.h.orig Mon Mar 29 12:57:11 2004 -+++ src/wrappers.h Mon Mar 29 13:46:45 2004 -@@ -35,9 +35,14 @@ - #include <sys/time.h> - #include <time.h> - #include <regex.h> -+#include <netinet/in.h> - #include <netdb.h> - #if HAVE_POLL - #include <sys/poll.h> -+#endif -+ -+#ifdef __FreeBSD__ -+#define REG_NOERROR 0 - #endif - - /* diff --git a/sysutils/powerman/files/patch-test-Makefile b/sysutils/powerman/files/patch-test-Makefile deleted file mode 100644 index 96d09cfb4fe2..000000000000 --- a/sysutils/powerman/files/patch-test-Makefile +++ /dev/null @@ -1,20 +0,0 @@ -$FreeBSD$ - ---- test/Makefile.orig Mon Dec 8 20:30:52 2003 -+++ test/Makefile Tue Mar 30 10:19:02 2004 -@@ -1,10 +1,13 @@ --CFLAGS= -g -Wall -I../src -+#CFLAGS= -g -Wall -I../src -+CFLAGS+= -Wall -I../src - VICEOBJS = vicebox.o wrappers.o error.o debug.o - - all: vpcd - - vpcd: vpcd.o -- $(CC) -o $@ $< -lpthread -+ $(CC) -o $@ $< ${LDFLAGS} ${PTHREAD_LIBS} -+vpcd.o: vpcd.c -+ $(CC) $(CPPFLAGS) $(CFLAGS) ${PTHREAD_CFLAGS} -c -o $@ $< - - vicebox : $(VICEOBJS) - $(CC) $(CFLAGS) -o $@ $(VICEOBJS) diff --git a/sysutils/powerman/files/patch-test-vpcd.c b/sysutils/powerman/files/patch-test-vpcd.c deleted file mode 100644 index 53ffe18f4800..000000000000 --- a/sysutils/powerman/files/patch-test-vpcd.c +++ /dev/null @@ -1,47 +0,0 @@ -$FreeBSD$ - ---- test/vpcd.c.orig Mon Dec 1 01:16:33 2003 -+++ test/vpcd.c Thu Jun 17 09:38:30 2004 -@@ -16,6 +16,8 @@ - #include <getopt.h> - #include <unistd.h> - #include <stdlib.h> -+#include <sys/types.h> -+#include <netinet/in.h> - #include <arpa/inet.h> - #include <sys/types.h> - #include <sys/socket.h> -@@ -49,6 +51,24 @@ - - static int errcount = 0; - -+#ifdef __FreeBSD__ -+#include <stdarg.h> -+ -+#define BUF_MAX 1024 -+ -+static int dprintf(int fd, char *const fmt, ...) -+{ -+ int ret; -+ va_list ap; -+ char buf[BUF_MAX]; -+ -+ va_start(ap, fmt); -+ ret = vsnprintf(buf, BUF_MAX, fmt, ap); -+ va_end(ap); -+ return (int) write(fd, buf, (ret > BUF_MAX) ? BUF_MAX : ret); -+} -+#endif -+ - static void _noop_handler(int signum) - { - fprintf(stderr, "vpcd: received signal %d\n", signum); -@@ -392,7 +412,7 @@ - case 'n': /* --num_threads n */ - num_threads = strtol(optarg, NULL, 0); - if (num_threads < MIN_THREADS || num_threads > MAX_THREADS) { -- fprintf(stderr, "num_threads value out of range (%d-%d)\n", -+ fprintf(stderr, "num_threads value out of range (%d-%ld)\n", - MIN_THREADS, MAX_THREADS); - exit(1); - } diff --git a/sysutils/powerman/files/powerman.sh.in b/sysutils/powerman/files/powerman.sh.in new file mode 100644 index 000000000000..0cfb27c7b7d3 --- /dev/null +++ b/sysutils/powerman/files/powerman.sh.in @@ -0,0 +1,27 @@ +#!/bin/sh +# $FreeBSD$ + +# PROVIDE: powermand +# REQUIRE: NETWORKING +# BEFORE: LOGIN +# KEYWORD: shutdown + +# Define these powermand_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/powermand +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# +powermand_enable=${powermand_enable:-"NO"} +powermand_flags=${powermand_flags:-""} + +. %%RC_SUBR%% + +name="powermand" +rcvar=`set_rcvar` +command="%%PREFIX%%/sbin/powermand" +required_files="%%PREFIX%%/etc/powerman.conf" + +load_rc_config $name +run_rc_command "$1" diff --git a/sysutils/powerman/pkg-descr b/sysutils/powerman/pkg-descr index fbe1ad93bb78..d09631b23226 100644 --- a/sysutils/powerman/pkg-descr +++ b/sysutils/powerman/pkg-descr @@ -3,4 +3,4 @@ devices from a central location. Several RPC varieties are supported natively by PowerMan and Expect-like configurability simplifies the addition of new devices. -WWW: http://www.llnl.gov/linux/powerman/ +WWW: http://powerman.sf.net/ diff --git a/sysutils/powerman/pkg-plist b/sysutils/powerman/pkg-plist index c734290730a5..4f302e2f1032 100644 --- a/sysutils/powerman/pkg-plist +++ b/sysutils/powerman/pkg-plist @@ -1,21 +1,49 @@ +@stopdaemon powerman bin/pm bin/powerman etc/powerman/apc.dev +etc/powerman/apc7900.dev etc/powerman/apcnew.dev +etc/powerman/apcold.dev +etc/powerman/apcpdu.dev +etc/powerman/apcpdu3.dev +etc/powerman/bashfun.dev etc/powerman/baytech-rpc28-nc.dev etc/powerman/baytech-rpc3-nc.dev etc/powerman/baytech.dev +etc/powerman/cb-7050.dev +etc/powerman/cyclades-pm10.dev +etc/powerman/cyclades-pm20.dev +etc/powerman/cyclades-pm42.dev etc/powerman/cyclades-pm8.dev -etc/powerman/ibmh8.dev +etc/powerman/dli.dev +etc/powerman/hp3488.dev +etc/powerman/ibmbladecenter.dev etc/powerman/icebox.dev etc/powerman/icebox3.dev +etc/powerman/ics8064.dev +etc/powerman/ilom.dev etc/powerman/ipmi.dev etc/powerman/ipmipower.dev etc/powerman/phantom.dev -etc/powerman/phantom4.dev +etc/powerman/plmpower.dev +etc/powerman/powerman.conf.example +etc/powerman/powerman.dev +etc/powerman/swpdu.dev etc/powerman/vpc.dev etc/powerman/wti-rps10.dev etc/powerman/wti.dev -etc/rc.d/powermand.sh +include/libpowerman.h +lib/libpowerman.a +lib/libpowerman.la +lib/libpowerman.so +lib/libpowerman.so.0 +libdata/pkgconfig/libpowerman.pc +sbin/httppower +sbin/plmpower sbin/powermand -@dirrm etc/powerman +sbin/vpcd +@dirrmtry etc/powerman +@cwd / +@dirrmtry /var/run/powerman +@cwd %%PREFIX%% |