update to 2.0.5 + a fix to make bcmxcp work correctly again
partially from and ok mbalmer
This commit is contained in:
parent
2780c70985
commit
bf3bca3741
@ -1,16 +1,15 @@
|
||||
# $OpenBSD: Makefile,v 1.21 2006/11/25 19:36:43 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.22 2007/05/18 12:22:45 henning Exp $
|
||||
|
||||
COMMENT-main= "UPS monitoring program supporting many brands"
|
||||
COMMENT-cgi= "CGIs for monitoring Nut-based UPSs"
|
||||
COMMENT-snmp= "driver for monitoring UPSs via SNMP"
|
||||
|
||||
VERSION= 2.0.3
|
||||
DISTNAME= nut-${VERSION}
|
||||
PKGNAME-main= ${DISTNAME}p0
|
||||
PKGNAME-cgi= nut-cgi-${VERSION}
|
||||
PKGNAME-snmp= nut-snmp-${VERSION}
|
||||
DISTNAME= nut-2.0.5
|
||||
PKGNAME-cgi= ${DISTNAME:S/-/-cgi-/}
|
||||
PKGNAME-snmp= ${DISTNAME:S/-/-snmp-}
|
||||
CATEGORIES= sysutils
|
||||
HOMEPAGE= http://www.networkupstools.org/
|
||||
|
||||
MAINTAINER= Marc Balmer <mbalmer@openbsd.org>
|
||||
|
||||
MASTER_SITES= http://random.networkupstools.org/source/2.0/
|
||||
@ -28,12 +27,13 @@ NUT_ID= 529
|
||||
SUBST_VARS= WEB_ROOT NUT_USER NUT_ID
|
||||
|
||||
CONFIGURE_STYLE= gnu old
|
||||
CONFIGURE_ARGS+= --sysconfdir=${SYSCONFDIR}/nut
|
||||
CONFIGURE_ARGS+= --datadir=${LOCALBASE}/share/ups
|
||||
CONFIGURE_ARGS+= --with-statepath=/var/db/nut
|
||||
CONFIGURE_ARGS+= --with-user=${NUT_USER}
|
||||
CONFIGURE_ARGS+= --with-ssl
|
||||
CONFIGURE_ARGS+= --enable-strip
|
||||
CONFIGURE_ARGS+= --sysconfdir=${SYSCONFDIR}/nut \
|
||||
--datadir=${PREFIX}/share/ups \
|
||||
--mandir=${PREFIX}/man \
|
||||
--with-statepath=/var/db/nut \
|
||||
--with-user=${NUT_USER} \
|
||||
--with-ssl \
|
||||
--enable-strip
|
||||
|
||||
ALL_TARGET= all
|
||||
INSTALL_TARGET= install
|
||||
@ -48,7 +48,7 @@ MULTI_PACKAGES+= -cgi
|
||||
MULTI_PACKAGES+= -snmp
|
||||
.endif
|
||||
|
||||
PREFIX-cgi= ${WEB_ROOT}
|
||||
PREFIX-cgi= ${WEB_ROOT}
|
||||
WANTLIB-cgi=
|
||||
|
||||
LIB_DEPENDS-snmp= netsnmp::net/net-snmp
|
||||
@ -56,10 +56,10 @@ LIB_DEPENDS-snmp= netsnmp::net/net-snmp
|
||||
.if ${MULTI_PACKAGES:M-cgi}
|
||||
BUILD_DEPENDS+= :gd->=1.8.3:graphics/gd
|
||||
|
||||
CONFIGURE_ARGS+= --with-cgi
|
||||
CONFIGURE_ARGS+= --with-cgipath="${WEB_ROOT}/cgi-bin/nut"
|
||||
CONFIGURE_ARGS+= --with-gd-libs="-L${LOCALBASE}/lib -lgd -lpng -lz -ljpeg -lm"
|
||||
CONFIGURE_ARGS+= --with-gd-includes="-I${LOCALBASE}/include"
|
||||
CONFIGURE_ARGS+= --with-cgi \
|
||||
--with-cgipath="${WEB_ROOT}/cgi-bin/nut" \
|
||||
--with-gd-libs="-L${PREFIX}/lib -lgd -lpng -lz -ljpeg -lm" \
|
||||
--with-gd-includes="-I${PREFIX}/include"
|
||||
|
||||
ALL_TARGET+= cgi
|
||||
INSTALL_TARGET+= install-cgi
|
||||
|
@ -1,5 +1,5 @@
|
||||
MD5 (nut-2.0.3.tar.gz) = 7S0xBNAhpt24ZPI9jL0c9g==
|
||||
RMD160 (nut-2.0.3.tar.gz) = iQxSsatTgQHDDlvjPnhYF6dzzbk=
|
||||
SHA1 (nut-2.0.3.tar.gz) = PqBkZohGUp2VZj6tvwe0HKjCWx0=
|
||||
SHA256 (nut-2.0.3.tar.gz) = 5N7R/R8RmnHuUA0EO/oI2RLYR5NzjYGyvQiHHjTtj5U=
|
||||
SIZE (nut-2.0.3.tar.gz) = 656376
|
||||
MD5 (nut-2.0.5.tar.gz) = sI/ehhkRVLvP2oYPlaXcog==
|
||||
RMD160 (nut-2.0.5.tar.gz) = 5fkKc5MuA409/ujLMvrwl9mafgs=
|
||||
SHA1 (nut-2.0.5.tar.gz) = 0sB63qxSS4RjZ3x1apDy8iCE814=
|
||||
SHA256 (nut-2.0.5.tar.gz) = Xhv+z8pSgQTbcCUFDIEljuIGIN90l6tZiK1GHZUcggM=
|
||||
SIZE (nut-2.0.5.tar.gz) = 809006
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-clients_cgilib_c,v 1.3 2004/02/09 06:48:48 marcm Exp $
|
||||
--- clients/cgilib.c.orig 2004-01-03 14:55:07.000000000 -0800
|
||||
+++ clients/cgilib.c 2004-01-03 14:55:22.000000000 -0800
|
||||
@@ -162,7 +162,7 @@ int checkhost(const char *host, char **d
|
||||
$OpenBSD: patch-clients_cgilib_c,v 1.4 2007/05/18 12:22:46 henning Exp $
|
||||
--- clients/cgilib.c.orig Thu Jan 27 15:33:14 2005
|
||||
+++ clients/cgilib.c Fri May 18 13:54:23 2007
|
||||
@@ -162,7 +162,7 @@ int checkhost(const char *host, char **desc)
|
||||
if (!host)
|
||||
return 0; /* deny null hostnames */
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-clients_upsset_c,v 1.4 2004/09/27 03:10:24 marcm Exp $
|
||||
--- clients/upsset.c.orig Mon Mar 8 04:09:03 2004
|
||||
+++ clients/upsset.c Thu Sep 16 08:48:42 2004
|
||||
@@ -202,7 +202,7 @@ static void do_pickups(const char *currf
|
||||
$OpenBSD: patch-clients_upsset_c,v 1.5 2007/05/18 12:22:46 henning Exp $
|
||||
--- clients/upsset.c.orig Mon Jul 10 14:33:14 2006
|
||||
+++ clients/upsset.c Fri May 18 13:54:23 2007
|
||||
@@ -202,7 +202,7 @@ static void do_pickups(const char *currfunc)
|
||||
char hostfn[SMALLBUF];
|
||||
PCONF_CTX ctx;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-clients_upsstats_c,v 1.3 2004/09/27 03:10:24 marcm Exp $
|
||||
--- clients/upsstats.c.orig Mon Sep 29 21:50:10 2003
|
||||
+++ clients/upsstats.c Thu Sep 16 08:48:42 2004
|
||||
@@ -658,7 +658,7 @@ static void display_template(const char
|
||||
$OpenBSD: patch-clients_upsstats_c,v 1.4 2007/05/18 12:22:46 henning Exp $
|
||||
--- clients/upsstats.c.orig Wed Nov 8 03:08:45 2006
|
||||
+++ clients/upsstats.c Fri May 18 13:54:23 2007
|
||||
@@ -830,7 +830,7 @@ static void display_template(const char *tfn)
|
||||
{
|
||||
char fn[SMALLBUF], buf[LARGEBUF];
|
||||
|
||||
@ -10,7 +10,7 @@ $OpenBSD: patch-clients_upsstats_c,v 1.3 2004/09/27 03:10:24 marcm Exp $
|
||||
|
||||
tf = fopen(fn, "r");
|
||||
|
||||
@@ -715,7 +715,7 @@ static void load_hosts_conf(void)
|
||||
@@ -970,7 +970,7 @@ static void load_hosts_conf(void)
|
||||
char fn[SMALLBUF];
|
||||
PCONF_CTX ctx;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-common_common_c,v 1.2 2004/09/27 03:10:24 marcm Exp $
|
||||
--- common/common.c.orig Mon Mar 8 04:09:54 2004
|
||||
+++ common/common.c Thu Sep 16 08:48:42 2004
|
||||
@@ -271,6 +271,17 @@ const char * confpath(void)
|
||||
$OpenBSD: patch-common_common_c,v 1.3 2007/05/18 12:22:46 henning Exp $
|
||||
--- common/common.c.orig Thu Jan 4 21:19:27 2007
|
||||
+++ common/common.c Thu Jan 18 00:41:08 2007
|
||||
@@ -287,6 +287,17 @@ const char * confpath(void)
|
||||
return path;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-configure,v 1.7 2006/05/03 17:32:09 henning Exp $
|
||||
--- configure.orig Tue Feb 7 12:50:20 2006
|
||||
+++ configure Mon May 1 17:40:26 2006
|
||||
@@ -5368,7 +5368,7 @@ cat >>conftest.$ac_ext <<_ACEOF
|
||||
$OpenBSD: patch-configure,v 1.8 2007/05/18 12:22:46 henning Exp $
|
||||
--- configure.orig Wed Jan 3 15:17:48 2007
|
||||
+++ configure Thu Jan 18 00:41:08 2007
|
||||
@@ -8120,7 +8120,7 @@ cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <openssl/ssl.h>
|
||||
int
|
||||
|
39
sysutils/nut/patches/patch-drivers_bcmxcp_c
Normal file
39
sysutils/nut/patches/patch-drivers_bcmxcp_c
Normal file
@ -0,0 +1,39 @@
|
||||
--- drivers/bcmxcp.c.orig Fri May 18 13:57:40 2007
|
||||
+++ drivers/bcmxcp.c Fri May 18 13:57:26 2007
|
||||
@@ -732,18 +732,6 @@ void upsdrv_initinfo(void)
|
||||
/* Set driver version info */
|
||||
dstate_setinfo("driver.version.internal", "%s", DRV_VERSION);
|
||||
|
||||
- /* Get information on Phases from UPS */
|
||||
- res = command_read_sequence(PW_UPS_TOP_DATA_REQ, answer);
|
||||
- if (res <= 0)
|
||||
- fatal_with_errno("Could not communicate with the ups");
|
||||
-
|
||||
- nphases = (answer[0] & 0x0F) +1;
|
||||
- dstate_setinfo("input.phases", "%d", nphases);
|
||||
-
|
||||
-
|
||||
- /* Init BCM/XCP <-> NUT meter map */
|
||||
- init_meter_map();
|
||||
-
|
||||
/* Init BCM/XCP alarm descriptions */
|
||||
init_alarm_map();
|
||||
|
||||
@@ -786,8 +774,15 @@ void upsdrv_initinfo(void)
|
||||
}
|
||||
dstate_setinfo("ups.power.nominal", "%d", iRating);
|
||||
|
||||
- /* Skip UPS' number of phases and phase angle, as NUT do not care */
|
||||
- iIndex += 2;
|
||||
+ /* Get information on Phases from UPS */
|
||||
+ nphases = (answer[iIndex++]);
|
||||
+ dstate_setinfo("output.phases", "%d", nphases);
|
||||
+
|
||||
+ /* Init BCM/XCP <-> NUT meter map */
|
||||
+ init_meter_map();
|
||||
+
|
||||
+ /* Skip UPS' phase angle, as NUT do not care */
|
||||
+ iIndex += 1;
|
||||
|
||||
/* Get length of UPS description */
|
||||
len = answer[iIndex++];
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-drivers_fentonups_c,v 1.2 2006/05/03 17:32:09 henning Exp $
|
||||
--- drivers/fentonups.c.orig Thu May 26 14:22:27 2005
|
||||
+++ drivers/fentonups.c Mon May 1 18:16:55 2006
|
||||
@@ -34,14 +34,17 @@ static float lowvolt = 0, voltrange, chr
|
||||
$OpenBSD: patch-drivers_fentonups_c,v 1.3 2007/05/18 12:22:46 henning Exp $
|
||||
--- drivers/fentonups.c.orig Tue Dec 19 04:18:58 2006
|
||||
+++ drivers/fentonups.c Fri May 18 13:54:23 2007
|
||||
@@ -34,14 +34,17 @@ static float lowvolt = 0, voltrange, chrglow = 0, chrg
|
||||
static int lownorm, highnorm;
|
||||
|
||||
/* handle devices which don't give a properly formatted I string */
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-drivers_fentonups_h,v 1.2 2006/05/03 17:32:09 henning Exp $
|
||||
--- drivers/fentonups.h.orig Wed Jul 20 12:45:41 2005
|
||||
+++ drivers/fentonups.h Mon May 1 17:44:54 2006
|
||||
@@ -106,5 +106,8 @@ struct {
|
||||
$OpenBSD: patch-drivers_fentonups_h,v 1.3 2007/05/18 12:22:46 henning Exp $
|
||||
--- drivers/fentonups.h.orig Wed Nov 8 03:08:45 2006
|
||||
+++ drivers/fentonups.h Thu Jan 18 00:41:08 2007
|
||||
@@ -109,5 +109,8 @@ struct {
|
||||
{ "UNITEK Alph1000iS A0", "Unitek", "Alpha 1000is",
|
||||
9.6, 2.4, 9.6, 2.4, 158, 172, 288, 290, 0 },
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-include_common_h,v 1.3 2006/05/03 17:32:09 henning Exp $
|
||||
--- include/common.h.orig Thu Jan 27 15:33:18 2005
|
||||
+++ include/common.h Mon May 1 17:40:26 2006
|
||||
@@ -74,6 +74,9 @@ void syslogbit_set(void);
|
||||
$OpenBSD: patch-include_common_h,v 1.4 2007/05/18 12:22:46 henning Exp $
|
||||
--- include/common.h.orig Thu Jan 4 21:19:27 2007
|
||||
+++ include/common.h Thu Jan 18 00:41:09 2007
|
||||
@@ -81,6 +81,9 @@ void syslogbit_set(void);
|
||||
/* Return the default path for the directory containing configuration files */
|
||||
const char * confpath(void);
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
@comment $OpenBSD: PLIST-main,v 1.1 2006/11/25 19:36:43 espie Exp $
|
||||
@comment $OpenBSD: PLIST-main,v 1.2 2007/05/18 12:22:46 henning Exp $
|
||||
@conflict upsd-*
|
||||
@pkgpath sysutils/nut
|
||||
@pkgpath sysutils/nut,no_cgi
|
||||
@pkgpath sysutils/nut,snmp
|
||||
@pkgpath sysutils/nut,no_cgi,snmp
|
||||
@newuser ${NUT_USER}:${NUT_ID}:::UPS User:/var/empty:/sbin/nologin
|
||||
bin/al175
|
||||
bin/apcsmart
|
||||
bin/bcmxcp
|
||||
bin/belkin
|
||||
@ -25,13 +26,17 @@ bin/ippon
|
||||
bin/isbmex
|
||||
bin/liebert
|
||||
bin/masterguard
|
||||
bin/megatec
|
||||
bin/metasys
|
||||
bin/mge-shut
|
||||
bin/mge-utalk
|
||||
bin/mustek
|
||||
bin/nitram
|
||||
bin/oneac
|
||||
bin/optiups
|
||||
bin/powercom
|
||||
bin/powermust
|
||||
bin/powerpanel
|
||||
bin/rhino
|
||||
bin/safenet
|
||||
bin/sms
|
||||
bin/solis
|
||||
@ -44,6 +49,11 @@ bin/upsdrvctl
|
||||
bin/upslog
|
||||
bin/upsrw
|
||||
bin/victronups
|
||||
@comment html/
|
||||
@comment html/bottom.html
|
||||
@comment html/header.html
|
||||
@comment html/index.html
|
||||
html/nut-banner.png
|
||||
@man man/man5/hosts.conf.5
|
||||
@man man/man5/ups.conf.5
|
||||
@man man/man5/upsd.conf.5
|
||||
@ -52,6 +62,7 @@ bin/victronups
|
||||
@man man/man5/upssched.conf.5
|
||||
@man man/man5/upsset.conf.5
|
||||
@man man/man5/upsstats.html.5
|
||||
@man man/man8/al175.8
|
||||
@man man/man8/apcsmart.8
|
||||
@man man/man8/bcmxcp.8
|
||||
@man man/man8/belkin.8
|
||||
@ -61,23 +72,26 @@ bin/victronups
|
||||
@man man/man8/bestups.8
|
||||
@man man/man8/cpsups.8
|
||||
@man man/man8/cyberpower.8
|
||||
@man man/man8/dummy-ups.8
|
||||
@man man/man8/etapro.8
|
||||
@man man/man8/everups.8
|
||||
@man man/man8/fentonups.8
|
||||
@man man/man8/gamatronic.8
|
||||
@man man/man8/genericups.8
|
||||
@man man/man8/ippon.8
|
||||
@man man/man8/isbmex.8
|
||||
@man man/man8/liebert.8
|
||||
@man man/man8/masterguard.8
|
||||
@man man/man8/megatec.8
|
||||
@man man/man8/metasys.8
|
||||
@man man/man8/mge-shut.8
|
||||
@man man/man8/mge-utalk.8
|
||||
@man man/man8/mustek.8
|
||||
@man man/man8/nitram.8
|
||||
@man man/man8/nutupsdrv.8
|
||||
@man man/man8/oneac.8
|
||||
@man man/man8/optiups.8
|
||||
@man man/man8/powercom.8
|
||||
@man man/man8/powermust.8
|
||||
@man man/man8/powerpanel.8
|
||||
@man man/man8/safenet.8
|
||||
@man man/man8/sms.8
|
||||
@man man/man8/solis.8
|
||||
@ -102,6 +116,8 @@ sbin/upssched
|
||||
share/doc/nut/
|
||||
share/doc/nut/FAQ
|
||||
share/doc/nut/README
|
||||
share/doc/nut/acpi.txt
|
||||
share/doc/nut/al175-vars.txt
|
||||
share/doc/nut/big-servers.txt
|
||||
share/doc/nut/cables/
|
||||
share/doc/nut/cables/apc-rs500-serial.txt
|
||||
@ -122,6 +138,7 @@ share/doc/nut/design.txt
|
||||
share/doc/nut/developers.txt
|
||||
share/doc/nut/hid-subdrivers.txt
|
||||
share/doc/nut/ideas.txt
|
||||
share/doc/nut/megatec.txt
|
||||
share/doc/nut/new-drivers.txt
|
||||
share/doc/nut/new-names.txt
|
||||
share/doc/nut/osd-notify.txt
|
||||
|
Loading…
x
Reference in New Issue
Block a user