diff options
author | bouyer <bouyer@pkgsrc.org> | 2011-07-29 15:11:40 +0000 |
---|---|---|
committer | bouyer <bouyer@pkgsrc.org> | 2011-07-29 15:11:40 +0000 |
commit | e0c74b57be2d552372267adf7f1e8f968e4687b8 (patch) | |
tree | e0671a738498c503481fa6169f68798977774ba3 /sysutils | |
parent | 5b22e1bdf7f08065f826dd475839f663a335ef5e (diff) | |
download | pkgsrc-e0c74b57be2d552372267adf7f1e8f968e4687b8.tar.gz |
Update ups-nut* from 2.0.5 to 2.6.1. Changes are too large to list here,
see: http://www.networkupstools.org/source/2.6/new-2.6.1.txt
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/ups-nut-cgi/Makefile | 29 | ||||
-rw-r--r-- | sysutils/ups-nut-snmp/Makefile | 16 | ||||
-rw-r--r-- | sysutils/ups-nut-usb/Makefile | 19 | ||||
-rw-r--r-- | sysutils/ups-nut-usb/PLIST | 9 | ||||
-rw-r--r-- | sysutils/ups-nut/Makefile | 28 | ||||
-rw-r--r-- | sysutils/ups-nut/Makefile.common | 19 | ||||
-rw-r--r-- | sysutils/ups-nut/PLIST | 86 | ||||
-rw-r--r-- | sysutils/ups-nut/distinfo | 13 | ||||
-rw-r--r-- | sysutils/ups-nut/patches/patch-aa | 24 | ||||
-rw-r--r-- | sysutils/ups-nut/patches/patch-ab | 127 | ||||
-rw-r--r-- | sysutils/ups-nut/patches/patch-ac | 102 |
11 files changed, 361 insertions, 111 deletions
diff --git a/sysutils/ups-nut-cgi/Makefile b/sysutils/ups-nut-cgi/Makefile index 514fb792572..2752f40a3a5 100644 --- a/sysutils/ups-nut-cgi/Makefile +++ b/sysutils/ups-nut-cgi/Makefile @@ -1,18 +1,19 @@ -# $NetBSD: Makefile,v 1.52 2011/01/13 13:39:26 wiz Exp $ +# $NetBSD: Makefile,v 1.53 2011/07/29 15:11:40 bouyer Exp $ PKG_DESTDIR_SUPPORT= user-destdir .include "../../sysutils/ups-nut/Makefile.common" PKGNAME= ${DISTNAME:S/nut/ups-nut-cgi/} -PKGREVISION= 4 COMMENT= Network UPS Tools CGI scripts DEPENDS+= ups-nut-2.*:../../sysutils/ups-nut -BUILD_TARGET= cgi -INSTALL_TARGET= install-cgi INSTALLATION_DIRS+= ${NUT_EGDIR} +INSTALLATION_DIRS+= ${PREFIX}/libexec/cgi-bin +INSTALLATION_DIRS+= ${PREFIX}/share/nut/html +INSTALLATION_DIRS+= ${PREFIX}/${PKGMANDIR}/man5 +INSTALLATION_DIRS+= ${PREFIX}/${PKGMANDIR}/man8 CONFIGURE_ARGS+= --with-cgi CONFIGURE_ARGS+= --with-cgipath=${NUT_CGIDIR:Q} @@ -27,6 +28,26 @@ CONF_FILES+= ${NUT_EGDIR}/upsstats-single.html.sample \ CONF_FILES+= ${NUT_EGDIR}/upsstats.html.sample \ ${NUT_CONFDIR}/upsstats.html +do-install: + (cd ${WRKSRC}/clients && env ${MAKE_ENV} \ + ${MAKE_PROGRAM} ${INSTALL_MAKE_FLAGS} install-cgiexecPROGRAMS) + for f in hosts.conf.sample upsset.conf.sample \ + upsstats.html.sample upsstats-single.html.sample; do \ + ${INSTALL_DATA} ${WRKSRC}/conf/$$f ${DESTDIR}${NUT_EGDIR}; \ + done + for f in bottom.html header.html index.html nut-banner.png; do \ + ${INSTALL_DATA} ${WRKSRC}/data/html/$$f \ + ${DESTDIR}${PREFIX}/share/nut/html; \ + done + for f in hosts.conf.5 upsset.conf.5 upsstats.html.5; do \ + ${INSTALL_MAN} ${WRKSRC}/docs/man/$$f \ + ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5/; \ + done + for f in upsimage.cgi.8 upsset.cgi.8 upsstats.cgi.8; do \ + ${INSTALL_MAN} ${WRKSRC}/docs/man/$$f \ + ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8/; \ + done + .include "../../graphics/freetype2/buildlink3.mk" .include "../../graphics/gd/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/sysutils/ups-nut-snmp/Makefile b/sysutils/ups-nut-snmp/Makefile index 4d5003b825a..38a2eab67f6 100644 --- a/sysutils/ups-nut-snmp/Makefile +++ b/sysutils/ups-nut-snmp/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2008/06/20 01:09:36 joerg Exp $ +# $NetBSD: Makefile,v 1.3 2011/07/29 15:11:40 bouyer Exp $ PKG_DESTDIR_SUPPORT= user-destdir @@ -9,12 +9,18 @@ COMMENT= Network UPS Tools SNMP driver DEPENDS+= ups-nut-2.*:../../sysutils/ups-nut -BUILD_TARGET= all snmp -INSTALL_TARGET= install-snmp - BUILD_DEFS+= NUT_STATEDIR -CONFIGURE_ARGS+= --with-drvpath=${NUT_DRVDIR:Q} +INSTALLATION_DIRS+= ${PREFIX}/libexec/nut +INSTALLATION_DIRS+= ${PREFIX}/${PKGMANDIR}/man8 + +CONFIGURE_ARGS+= --with-snmp --with-drvpath=${NUT_DRVDIR:Q} + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/drivers/snmp-ups \ + ${DESTDIR}${PREFIX}/libexec/nut/ + ${INSTALL_MAN} ${WRKSRC}/docs/man/snmp-ups.8 \ + ${DESTDIR}${PREFIX}//${PKGMANDIR}/man8/ .include "../../net/net-snmp/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/sysutils/ups-nut-usb/Makefile b/sysutils/ups-nut-usb/Makefile index 0deff2a02cd..7d9f60b1b91 100644 --- a/sysutils/ups-nut-usb/Makefile +++ b/sysutils/ups-nut-usb/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2008/06/20 01:09:36 joerg Exp $ +# $NetBSD: Makefile,v 1.3 2011/07/29 15:11:40 bouyer Exp $ PKG_DESTDIR_SUPPORT= user-destdir @@ -9,12 +9,23 @@ COMMENT= Network UPS Tools USB drivers DEPENDS+= ups-nut-2.*:../../sysutils/ups-nut -BUILD_TARGET= all usb -INSTALL_TARGET= install-usb +INSTALLATION_DIRS+= ${PREFIX}/libexec/nut +INSTALLATION_DIRS+= ${PREFIX}/${PKGMANDIR}/man8 BUILD_DEFS+= NUT_STATEDIR -CONFIGURE_ARGS+= --with-drvpath=${NUT_DRVDIR:Q} +CONFIGURE_ARGS+= --with-usb --with-drvpath=${NUT_DRVDIR:Q} + +do-install: + for f in usbhid-ups bcmxcp_usb tripplite_usb blazer_usb richcomm_usb;\ + do \ + ${INSTALL_PROGRAM} ${WRKSRC}/drivers/$$f \ + ${DESTDIR}${PREFIX}/libexec/nut/; \ + done + for f in usbhid-ups.8 bcmxcp_usb.8 tripplite_usb.8 richcomm_usb.8; do \ + ${INSTALL_MAN} ${WRKSRC}/docs/man/$$f \ + ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8/; \ + done .include "../../devel/libusb/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/sysutils/ups-nut-usb/PLIST b/sysutils/ups-nut-usb/PLIST index 93ed4c3d1c6..ced5a3f0e8d 100644 --- a/sysutils/ups-nut-usb/PLIST +++ b/sysutils/ups-nut-usb/PLIST @@ -1,7 +1,10 @@ -@comment $NetBSD: PLIST,v 1.1.1.1 2006/08/16 13:23:16 ghen Exp $ +@comment $NetBSD: PLIST,v 1.2 2011/07/29 15:11:40 bouyer Exp $ libexec/nut/bcmxcp_usb -libexec/nut/newhidups +libexec/nut/blazer_usb libexec/nut/tripplite_usb +libexec/nut/richcomm_usb +libexec/nut/usbhid-ups man/man8/bcmxcp_usb.8 -man/man8/newhidups.8 man/man8/tripplite_usb.8 +man/man8/richcomm_usb.8 +man/man8/usbhid-ups.8 diff --git a/sysutils/ups-nut/Makefile b/sysutils/ups-nut/Makefile index e85c68699d2..b1fc8239b18 100644 --- a/sysutils/ups-nut/Makefile +++ b/sysutils/ups-nut/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.51 2010/02/19 21:23:34 joerg Exp $ +# $NetBSD: Makefile,v 1.52 2011/07/29 15:11:40 bouyer Exp $ PKG_DESTDIR_SUPPORT= user-destdir @@ -7,18 +7,13 @@ PKG_DESTDIR_SUPPORT= user-destdir PKGNAME= ups-${DISTNAME} COMMENT= Network UPS Tools -CONFIGURE_ARGS+= --with-user=${NUT_USER:Q} -CONFIGURE_ARGS+= --with-group=${NUT_GROUP:Q} CONFIGURE_ARGS+= --with-drvpath=${NUT_DRVDIR:Q} CONFIGURE_ARGS+= --with-altpidpath=${NUT_STATEDIR:Q} CONFIGURE_ARGS+= --with-pidpath=${NUT_STATEDIR:Q} -NUT_USER?= nut -NUT_GROUP?= nut - PKG_GROUPS_VARS+= NUT_GROUP PKG_USERS_VARS+= NUT_USER -BUILD_DEFS+= NUT_STATEDIR +BUILD_DEFS+= NUT_STATEDIR VARBASE FILES_SUBST+= NUT_CONFDIR=${NUT_CONFDIR:Q} FILES_SUBST+= NUT_STATEDIR=${NUT_STATEDIR:Q} @@ -33,7 +28,8 @@ PKG_GECOS.${NUT_USER}= Network UPS Tools PKG_HOME.${NUT_USER}= ${NUT_STATEDIR} PKG_SHELL.${NUT_USER}= ${SH} -CONF_FILES= ${NUT_EGDIR}/ups.conf.sample ${NUT_CONFDIR}/ups.conf +CONF_FILES= ${NUT_EGDIR}/nut.conf.sample ${NUT_CONFDIR}/nut.conf +CONF_FILES+= ${NUT_EGDIR}/ups.conf.sample ${NUT_CONFDIR}/ups.conf CONF_FILES+= ${NUT_EGDIR}/upssched.conf.sample \ ${NUT_CONFDIR}/upssched.conf @@ -42,7 +38,7 @@ CONF_FILES_PERMS= ${NUT_EGDIR}/upsd.conf.sample \ ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0600 CONF_FILES_PERMS+= ${NUT_EGDIR}/upsd.users.sample \ ${NUT_CONFDIR}/upsd.users \ - ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0600 + ${NUT_USER} ${NUT_GROUP} 0600 CONF_FILES_PERMS+= ${NUT_EGDIR}/upsmon.conf.sample \ ${NUT_CONFDIR}/upsmon.conf \ ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0600 @@ -54,13 +50,17 @@ OWN_DIRS_PERMS= ${NUT_STATEDIR} ${NUT_USER} ${NUT_GROUP} 0770 INSTALLATION_DIRS+= ${NUT_EGDIR} ${NUT_DOCDIR}/cables ${NUT_DOCDIR}/drivers post-install: - ${INSTALL_DATA_DIR} + ${INSTALL_DATA_DIR} ${DESTDIR}${NUT_EGDIR} + ${MV} ${DESTDIR}${NUT_CONFDIR}/*.sample ${DESTDIR}${NUT_EGDIR} + ${INSTALL_DATA_DIR} ${DESTDIR}${NUT_DOCDIR} for f in COPYING CREDITS ChangeLog NEWS README INSTALL UPGRADING; do \ ${INSTALL_DATA} ${WRKSRC}/$$f ${DESTDIR}${NUT_DOCDIR}; \ done - ${INSTALL_DATA} ${WRKSRC}/docs/FAQ ${DESTDIR}${NUT_DOCDIR} - ${INSTALL_DATA} ${WRKSRC}/data/driver.list ${DESTDIR}${NUT_DOCDIR} - ${INSTALL_DATA} ${WRKSRC}/docs/*.txt ${DESTDIR}${NUT_DOCDIR} - ${INSTALL_DATA} ${WRKSRC}/docs/cables/*.txt ${DESTDIR}${NUT_DOCDIR}/cables + for f in ${WRKSRC}/docs/*.txt; do \ + ${INSTALL_DATA} $$f ${DESTDIR}${NUT_DOCDIR}; \ + done + for f in ${WRKSRC}/docs/cables/*.txt; do \ + ${INSTALL_DATA} $$f ${DESTDIR}${NUT_DOCDIR}/cables/; \ + done .include "../../mk/bsd.pkg.mk" diff --git a/sysutils/ups-nut/Makefile.common b/sysutils/ups-nut/Makefile.common index 978e53c713d..d2980b09582 100644 --- a/sysutils/ups-nut/Makefile.common +++ b/sysutils/ups-nut/Makefile.common @@ -1,21 +1,34 @@ -# $NetBSD: Makefile.common,v 1.2 2008/01/30 22:10:12 ghen Exp $ +# $NetBSD: Makefile.common,v 1.3 2011/07/29 15:11:40 bouyer Exp $ +# used by sysutils/ups-nut/Makefile +# used by sysutils/ups-nut-cgi/Makefile +# used by sysutils/ups-nut-snmp/Makefile +# used by sysutils/ups-nut-usb/Makefile +# used by sysutils/p5-ups-nut/Makefile -DISTNAME= nut-2.0.5 +DISTNAME= nut-2.6.1 CATEGORIES= sysutils -MASTER_SITES= http://random.networkupstools.org/source/2.0/ +MASTER_SITES= http://www.networkupstools.org/source/2.6/ MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://www.networkupstools.org/ +LICENSE= gnu-gpl-v2 + +NUT_USER?= nut +NUT_GROUP?= nut + DISTINFO_FILE= ${.CURDIR}/../../sysutils/ups-nut/distinfo PATCHDIR= ${.CURDIR}/../../sysutils/ups-nut/patches +USE_LIBTOOL= yes GNU_CONFIGURE= yes CONFIGURE_ARGS+= --sysconfdir=${NUT_CONFDIR:Q} CONFIGURE_ARGS+= --datadir=${NUT_DATADIR:Q} CONFIGURE_ARGS+= --localstatedir=${NUT_STATEDIR:Q} CONFIGURE_ARGS+= --with-statepath=${NUT_STATEDIR:Q} CONFIGURE_ARGS+= --with-htmlpath=${PREFIX:Q}/share/nut/html +CONFIGURE_ARGS+= --with-user=${NUT_USER} +CONFIGURE_ARGS+= --with-group=${NUT_GROUP} CHECK_PORTABILITY_SKIP= packaging/* diff --git a/sysutils/ups-nut/PLIST b/sysutils/ups-nut/PLIST index 8f93b0ceb04..625cb4f3f6b 100644 --- a/sysutils/ups-nut/PLIST +++ b/sysutils/ups-nut/PLIST @@ -1,85 +1,86 @@ -@comment $NetBSD: PLIST,v 1.23 2009/06/14 21:28:48 joerg Exp $ +@comment $NetBSD: PLIST,v 1.24 2011/07/29 15:11:40 bouyer Exp $ bin/upsc bin/upscmd bin/upslog bin/upsrw -libexec/nut/al175 +bin/upssched-cmd +lib/libupsclient.la libexec/nut/apcsmart libexec/nut/bcmxcp libexec/nut/belkin libexec/nut/belkinunv libexec/nut/bestfcom +libexec/nut/bestfortress libexec/nut/bestuferrups libexec/nut/bestups -libexec/nut/blazer -libexec/nut/cpsups -libexec/nut/cyberpower -libexec/nut/esupssmart +libexec/nut/blazer_ser +libexec/nut/clone +libexec/nut/clone-outlet +libexec/nut/dummy-ups libexec/nut/etapro libexec/nut/everups -libexec/nut/fentonups libexec/nut/gamatronic libexec/nut/genericups -libexec/nut/ippon libexec/nut/isbmex +libexec/nut/ivtscd libexec/nut/liebert +libexec/nut/liebert-esp2 libexec/nut/masterguard -libexec/nut/megatec libexec/nut/metasys libexec/nut/mge-shut libexec/nut/mge-utalk -libexec/nut/mustek -libexec/nut/nitram +libexec/nut/microdowell +libexec/nut/newmge-shut libexec/nut/oneac libexec/nut/optiups libexec/nut/powercom libexec/nut/powerpanel libexec/nut/rhino libexec/nut/safenet -libexec/nut/sms +libexec/nut/skel libexec/nut/solis libexec/nut/tripplite libexec/nut/tripplitesu libexec/nut/upscode2 libexec/nut/upsdrvctl libexec/nut/victronups +man/man5/nut.conf.5 man/man5/ups.conf.5 man/man5/upsd.conf.5 man/man5/upsd.users.5 man/man5/upsmon.conf.5 man/man5/upssched.conf.5 -man/man8/al175.8 man/man8/apcsmart.8 man/man8/bcmxcp.8 man/man8/belkin.8 man/man8/belkinunv.8 man/man8/bestfcom.8 +man/man8/bestfortress.8 man/man8/bestuferrups.8 man/man8/bestups.8 -man/man8/cpsups.8 -man/man8/cyberpower.8 +man/man8/blazer.8 +man/man8/clone.8 man/man8/dummy-ups.8 man/man8/etapro.8 man/man8/everups.8 -man/man8/fentonups.8 +man/man8/gamatronic.8 man/man8/genericups.8 -man/man8/ippon.8 man/man8/isbmex.8 +man/man8/ivtscd.8 man/man8/liebert.8 +man/man8/liebert-esp2.8 man/man8/masterguard.8 -man/man8/megatec.8 man/man8/metasys.8 man/man8/mge-shut.8 man/man8/mge-utalk.8 -man/man8/mustek.8 -man/man8/nitram.8 +man/man8/microdowell.8 man/man8/nutupsdrv.8 man/man8/oneac.8 man/man8/optiups.8 man/man8/powercom.8 man/man8/powerpanel.8 +man/man8/rhino.8 man/man8/safenet.8 -man/man8/sms.8 man/man8/solis.8 man/man8/tripplite.8 man/man8/tripplitesu.8 @@ -97,16 +98,13 @@ sbin/upsd sbin/upsmon sbin/upssched share/doc/nut/COPYING -share/doc/nut/CREDITS share/doc/nut/ChangeLog -share/doc/nut/FAQ +share/doc/nut/FAQ.txt share/doc/nut/INSTALL share/doc/nut/NEWS share/doc/nut/README share/doc/nut/UPGRADING -share/doc/nut/acpi.txt -share/doc/nut/al175-vars.txt -share/doc/nut/big-servers.txt +share/doc/nut/acknowledgements.txt share/doc/nut/cables/apc-rs500-serial.txt share/doc/nut/cables/apc.txt share/doc/nut/cables/ge-imv-victron.txt @@ -115,29 +113,35 @@ share/doc/nut/cables/mgeups.txt share/doc/nut/cables/powerware.txt share/doc/nut/cables/repotec.txt share/doc/nut/cables/sms.txt -share/doc/nut/chroot.txt -share/doc/nut/commands.txt -share/doc/nut/config-files.txt +share/doc/nut/cables.txt +share/doc/nut/config-notes.txt share/doc/nut/configure.txt share/doc/nut/contact-closure.txt -share/doc/nut/data-room.txt share/doc/nut/design.txt share/doc/nut/developers.txt -share/doc/nut/driver.list +share/doc/nut/developer-guide.txt +share/doc/nut/documentation.txt +share/doc/nut/download.txt +share/doc/nut/features.txt share/doc/nut/hid-subdrivers.txt -share/doc/nut/ideas.txt -share/doc/nut/megatec.txt +share/doc/nut/history.txt +share/doc/nut/macros.txt +share/doc/nut/net-protocol.txt +share/doc/nut/new-clients.txt share/doc/nut/new-drivers.txt -share/doc/nut/new-names.txt -share/doc/nut/osd-notify.txt -share/doc/nut/pager.txt -share/doc/nut/powersaving.txt -share/doc/nut/protocol.txt -share/doc/nut/shutdown.txt +share/doc/nut/nut-hal.txt +share/doc/nut/nut-names.txt +share/doc/nut/nut-qa.txt +share/doc/nut/outlets.txt +share/doc/nut/packager-guide.txt +share/doc/nut/scheduling.txt +share/doc/nut/security.txt share/doc/nut/snmp.txt share/doc/nut/sock-protocol.txt -share/doc/nut/ssl.txt -share/doc/nut/upssched.txt +share/doc/nut/stable-hcl.txt +share/doc/nut/support.txt +share/doc/nut/user-manual.txt +share/examples/nut/nut.conf.sample share/examples/nut/ups.conf.sample share/examples/nut/upsd.conf.sample share/examples/nut/upsd.users.sample diff --git a/sysutils/ups-nut/distinfo b/sysutils/ups-nut/distinfo index 8082d1179f3..d39710fd60f 100644 --- a/sysutils/ups-nut/distinfo +++ b/sysutils/ups-nut/distinfo @@ -1,7 +1,8 @@ -$NetBSD: distinfo,v 1.26 2008/01/30 22:10:13 ghen Exp $ +$NetBSD: distinfo,v 1.27 2011/07/29 15:11:40 bouyer Exp $ -SHA1 (nut-2.0.5.tar.gz) = d2c07adeac524b8463677c756a90f2f22084f35e -RMD160 (nut-2.0.5.tar.gz) = e5f90a73932e038d3dfee8cb32faf097d99a7e0b -Size (nut-2.0.5.tar.gz) = 809006 bytes -SHA1 (patch-aa) = e4649220e30ab6b582cf9115de9f7faad0f7cf8b -SHA1 (patch-ab) = a5a1a74071d23043317114a3897ea35af3d7d11f +SHA1 (nut-2.6.1.tar.gz) = 8198378259631b50d23c6ce5a52ef0e40132b33f +RMD160 (nut-2.6.1.tar.gz) = fc5c6c3028f9a2b41615d213bea11b5de7735840 +Size (nut-2.6.1.tar.gz) = 1776645 bytes +SHA1 (patch-aa) = 53825abe2f7c6f5285a73edd5e990518bb8d0c84 +SHA1 (patch-ab) = 2321e8c5a53c0a6fb2e227b4a5ffc2793641f7bf +SHA1 (patch-ac) = d0f31a48d35c66f5c0405b4a40799769ed0930f6 diff --git a/sysutils/ups-nut/patches/patch-aa b/sysutils/ups-nut/patches/patch-aa index af24a1f1874..a9a7a2bc74d 100644 --- a/sysutils/ups-nut/patches/patch-aa +++ b/sysutils/ups-nut/patches/patch-aa @@ -1,13 +1,13 @@ -$NetBSD: patch-aa,v 1.9 2004/02/15 13:14:25 lukem Exp $ +$NetBSD: patch-aa,v 1.10 2011/07/29 15:11:40 bouyer Exp $ ---- conf/Makefile.in.orig Tue Sep 3 09:23:02 2002 -+++ conf/Makefile.in Sat Feb 14 22:02:46 2004 -@@ -4,7 +4,7 @@ - prefix = @prefix@ - exec_prefix = @exec_prefix@ - --CONFPATH = $(DESTDIR)@sysconfdir@ -+CONFPATH = $(DESTDIR)@prefix@/share/examples/nut - - INSTALLCMD = @INSTALL@ - +--- conf/Makefile.in.orig 2011-06-27 14:45:05.000000000 +0200 ++++ conf/Makefile.in 2011-06-27 14:49:32.000000000 +0200 +@@ -109,7 +109,7 @@ + CC = @CC@ + CCDEPMODE = @CCDEPMODE@ + CFLAGS = @CFLAGS@ +-CONFPATH = @CONFPATH@ ++CONFPATH = $(DESTDIR)@prefix@/share/examples/nut + CPP = @CPP@ + CPPFLAGS = @CPPFLAGS@ + CYGPATH_W = @CYGPATH_W@ diff --git a/sysutils/ups-nut/patches/patch-ab b/sysutils/ups-nut/patches/patch-ab index 2c31e89ce05..c19a943ffc0 100644 --- a/sysutils/ups-nut/patches/patch-ab +++ b/sysutils/ups-nut/patches/patch-ab @@ -1,25 +1,114 @@ -$NetBSD: patch-ab,v 1.10 2008/01/30 22:10:13 ghen Exp $ +$NetBSD: patch-ab,v 1.11 2011/07/29 15:11:40 bouyer Exp $ ---- Makefile.in.orig 2006-11-08 03:08:45.000000000 +0100 -+++ Makefile.in -@@ -41,7 +41,7 @@ distclean: clean - rm $$i/Makefile; \ - done +Keep trying initialisation if we get a timeout or network error while +probing the device. +Submitted upstream as tracker #313195 + +--- drivers/snmp-ups.c.orig 2011-05-31 12:36:49.000000000 +0200 ++++ drivers/snmp-ups.c 2011-06-29 13:16:16.000000000 +0200 +@@ -76,6 +76,9 @@ + const char *mibname; + const char *mibvers; + ++int nut_snmp_err; /* saved snmp error from nut_snmp_get */ ++int nut_sys_err; /* saved system errno from nut_snmp_get */ ++ + static void disable_transfer_oids(void); + + #define DRIVER_NAME "Generic SNMP UPS driver" +@@ -225,15 +228,15 @@ + + /* FIXME: first test if the device is reachable to avoid timeouts! */ + +- /* Load the SNMP to NUT translation data */ +- load_mib2nut(mibs); +- + /* init polling frequency */ + if (getval(SU_VAR_POLLFREQ)) + pollfreq = atoi(getval(SU_VAR_POLLFREQ)); + else + pollfreq = DEFAULT_POLLFREQ; + ++ /* Load the SNMP to NUT translation data */ ++ load_mib2nut(mibs); ++ + /* Get UPS Model node to see if there's a MIB */ + su_info_p = su_find_info("ups.model"); + status = nut_snmp_get_str(su_info_p->OID, model, sizeof(model), NULL); +@@ -393,6 +396,9 @@ + size_t name_len = MAX_OID_LEN; + static unsigned int numerr = 0; + ++ nut_sys_err = 0; ++ nut_snmp_err = 0; ++ + upsdebugx(3, "nut_snmp_get(%s)", OID); + + /* create and send request. */ +@@ -411,8 +417,10 @@ + + status = snmp_synch_response(g_snmp_sess_p, pdu, &response); + +- if (!response) ++ if (!response) { ++ snmp_error(g_snmp_sess_p, &nut_sys_err, &nut_snmp_err, NULL); + return NULL; ++ } --install: install-dirs install-bin install-man install-data -+install: install-dirs install-bin install-man install-conf install-data + if (!((status == STAT_SUCCESS) && (response->errstat == SNMP_ERR_NOERROR))) + { +@@ -431,7 +439,7 @@ - install-bin: - @for i in $(SUBDIRS); do \ -@@ -72,9 +72,10 @@ build-cgi-fake: - @echo "Run 'configure --with-cgi' before doing 'make cgi'." + if ((numerr < SU_ERR_LIMIT) || ((numerr % SU_ERR_RATE) == 0)) + nut_snmp_perror(g_snmp_sess_p, status, response, +- "nut_snmp_get: %s", OID); ++ "nut_snmp_get: %s", OID); - build-cgi: -+ @cd common; $(MAKE); cd ..; - @cd clients; $(MAKE) cgi; cd ..; + snmp_free_pdu(response); + response = NULL; +@@ -718,6 +726,7 @@ + { + int i; + char buf[LARGEBUF]; ++ int snmp_timeout = 0; --install-cgi: cgi install-cgi-dir install-dirs install-cgi-bin install-cgi-man install-cgi-html -+install-cgi: cgi install-cgi-dir install-dirs install-cgi-conf install-cgi-bin install-cgi-man install-cgi-html + upsdebugx(2, "SNMP UPS driver : entering load_mib2nut(%s)", mib); - install-cgi-dir: - if (test ! -d $(CGIPATH)) then \ +@@ -728,12 +737,16 @@ + * APHEL-GENESIS-II-MIB => .iso.org.dod.internet.private.enterprises.17373 + * APHEL Revelation MIB => .iso.org.dod.internet.private.enterprises.534.6.6.6 + */ ++again: + for (i = 0; mib2nut[i] != NULL; i++) { + if (strcmp(mib, "auto") && strcmp(mib, mib2nut[i]->mib_name)) { + continue; + } + upsdebugx(1, "load_mib2nut: trying %s mib", mib2nut[i]->mib_name); + if (!nut_snmp_get_str(mib2nut[i]->oid_auto_check, buf, sizeof(buf), NULL)) { ++ if (nut_snmp_err == SNMPERR_BAD_SENDTO || ++ nut_snmp_err == SNMPERR_TIMEOUT) ++ snmp_timeout++; + continue; + } + snmp_info = mib2nut[i]->snmp_info; +@@ -743,6 +756,20 @@ + upsdebugx(1, "load_mib2nut: using %s mib", mibname); + return TRUE; + } ++ if (snmp_timeout > 0) { ++ upslogx(LOG_WARNING, "timeout while probing %s", ++ upsname?upsname:device_name); ++ snmp_timeout = 0; ++ if (sleep(pollfreq) == 0) { ++ /* ++ * we're likely to end up in background if started ++ * from upsdrvctl so enable syslog now ++ */ ++ syslogbit_set(); ++ goto again; ++ } ++ } ++ + /* Did we find something or is it really an unknown mib */ + if (strcmp(mib, "auto") != 0) { + fatalx(EXIT_FAILURE, "Unknown mibs value: %s", mib); diff --git a/sysutils/ups-nut/patches/patch-ac b/sysutils/ups-nut/patches/patch-ac new file mode 100644 index 00000000000..810051d175f --- /dev/null +++ b/sysutils/ups-nut/patches/patch-ac @@ -0,0 +1,102 @@ +$NetBSD: patch-ac,v 1.7 2011/07/29 15:11:40 bouyer Exp $ + +Improve netvision handling (especially, add 3-phase support) +Submitted upstream as tracker #313197 + +--- drivers/netvision-mib.c.orig 2011-05-31 12:36:49.000000000 +0200 ++++ drivers/netvision-mib.c 2011-06-30 00:12:14.000000000 +0200 +@@ -49,8 +49,12 @@ + #define NETVISION_OID_BATT_VOLTS ".1.3.6.1.4.1.4555.1.1.1.1.2.5.0" + + #define NETVISION_OID_INPUT_NUM_LINES ".1.3.6.1.4.1.4555.1.1.1.1.3.1.0" /* 1phase or 3phase UPS input */ ++#define NETVISION_OID_INPUT_FREQ ".1.3.6.1.4.1.4555.1.1.1.1.3.2.0" + #define NETVISION_OID_OUTPUT_NUM_LINES ".1.3.6.1.4.1.4555.1.1.1.1.4.3.0" /* 1phase or 3phase UPS output */ ++#define NETVISION_OID_OUTPUT_FREQ ".1.3.6.1.4.1.4555.1.1.1.1.4.2.0" + ++#define NETVISION_OID_BYPASS_FREQ ".1.3.6.1.4.1.4555.1.1.1.1.5.1.0" ++#define NETVISION_OID_BYPASS_NUM_LINES ".1.3.6.1.4.1.4555.1.1.1.1.5.2.0" /* 1phase or 3phase UPS input */ + /* + three phase ups provide input/output/load for each phase + in case of one-phase output, only _P1 should be used +@@ -60,19 +64,31 @@ + #define NETVISION_OID_OUT_CURRENT_P1 ".1.3.6.1.4.1.4555.1.1.1.1.4.4.1.3.1" + #define NETVISION_OID_OUT_LOAD_PCT_P1 ".1.3.6.1.4.1.4555.1.1.1.1.4.4.1.4.1" + #define NETVISION_OID_IN_VOLTAGE_P1 ".1.3.6.1.4.1.4555.1.1.1.1.3.3.1.5.1" ++#define NETVISION_OID_IN_CURRENT_P1 ".1.3.6.1.4.1.4555.1.1.1.1.3.3.1.3.1" ++#define NETVISION_OID_BY_VOLTAGE_P1 ".1.3.6.1.4.1.4555.1.1.1.1.5.3.1.2.1" ++#define NETVISION_OID_BY_CURRENT_P1 ".1.3.6.1.4.1.4555.1.1.1.1.5.3.1.3.1" + + #define NETVISION_OID_OUT_VOLTAGE_P2 ".1.3.6.1.4.1.4555.1.1.1.1.4.4.1.2.2" + #define NETVISION_OID_OUT_CURRENT_P2 ".1.3.6.1.4.1.4555.1.1.1.1.4.4.1.3.2" + #define NETVISION_OID_OUT_LOAD_PCT_P2 ".1.3.6.1.4.1.4555.1.1.1.1.4.4.1.4.2" + #define NETVISION_OID_IN_VOLTAGE_P2 ".1.3.6.1.4.1.4555.1.1.1.1.3.3.1.5.2" ++#define NETVISION_OID_IN_CURRENT_P2 ".1.3.6.1.4.1.4555.1.1.1.1.3.3.1.3.2" ++#define NETVISION_OID_BY_VOLTAGE_P2 ".1.3.6.1.4.1.4555.1.1.1.1.5.3.1.2.2" ++#define NETVISION_OID_BY_CURRENT_P2 ".1.3.6.1.4.1.4555.1.1.1.1.5.3.1.3.2" + + #define NETVISION_OID_OUT_VOLTAGE_P3 ".1.3.6.1.4.1.4555.1.1.1.1.4.4.1.2.3" + #define NETVISION_OID_OUT_CURRENT_P3 ".1.3.6.1.4.1.4555.1.1.1.1.4.4.1.3.3" + #define NETVISION_OID_OUT_LOAD_PCT_P3 ".1.3.6.1.4.1.4555.1.1.1.1.4.4.1.4.3" + #define NETVISION_OID_IN_VOLTAGE_P3 ".1.3.6.1.4.1.4555.1.1.1.1.3.3.1.5.3" ++#define NETVISION_OID_IN_CURRENT_P3 ".1.3.6.1.4.1.4555.1.1.1.1.3.3.1.3.3" ++#define NETVISION_OID_BY_VOLTAGE_P3 ".1.3.6.1.4.1.4555.1.1.1.1.5.3.1.2.3" ++#define NETVISION_OID_BY_CURRENT_P3 ".1.3.6.1.4.1.4555.1.1.1.1.5.3.1.3.3" + + #define NETVISION_OID_OUTPUT_SOURCE ".1.3.6.1.4.1.4555.1.1.1.1.4.1.0" + ++#define NETVISION_OID_CONTROL_STATUS ".1.3.6.1.4.1.4555.1.1.1.1.8.1" ++#define NETVISION_OID_CONTROL_SHUTDOWN_DELAY ".1.3.6.1.4.1.4555.1.1.1.1.8.2" ++ + static info_lkp_t netvision_output_info[] = { + { 1, "" }, /* output source other */ + { 2, "" }, /* output source none */ +@@ -102,12 +118,45 @@ + SU_FLAG_OK | SU_STATUS_PWR, &netvision_output_info[0] }, + + /* ups load */ +- { "ups.load", 0, 1, NETVISION_OID_OUT_LOAD_PCT_P1, 0, SU_FLAG_OK, NULL }, ++ { "ups.load", 0, 1, NETVISION_OID_OUT_LOAD_PCT_P1, 0, SU_INPUT_1, NULL }, + + /*ups input,output voltage, output frquency phase 1 */ +- { "input.voltage", 0, 0.1, NETVISION_OID_IN_VOLTAGE_P1, 0, SU_FLAG_OK, NULL }, +- { "output.voltage", 0, 0.1, NETVISION_OID_OUT_VOLTAGE_P1, 0, SU_FLAG_OK, NULL }, +- { "output.current", 0, 0.1, NETVISION_OID_OUT_CURRENT_P1, 0, SU_FLAG_OK, NULL }, ++ { "input.phases", 0, 1.0, NETVISION_OID_INPUT_NUM_LINES, 0, SU_FLAG_SETINT, NULL, &input_phases }, ++ { "input.frequency", 0, 0.1, NETVISION_OID_INPUT_FREQ, 0, SU_FLAG_OK, NULL }, ++ { "input.voltage", 0, 0.1, NETVISION_OID_IN_VOLTAGE_P1, 0, SU_INPUT_1, NULL }, ++ { "input.current", 0, 0.1, NETVISION_OID_IN_CURRENT_P1, 0, SU_INPUT_1, NULL }, ++ { "input.L1-N.voltage", 0, 0.1, NETVISION_OID_IN_VOLTAGE_P1, 0, SU_INPUT_3, NULL }, ++ { "input.L1.current", 0, 0.1, NETVISION_OID_IN_CURRENT_P1, 0, SU_INPUT_3, NULL }, ++ { "input.L2-N.voltage", 0, 0.1, NETVISION_OID_IN_VOLTAGE_P2, 0, SU_INPUT_3, NULL }, ++ { "input.L2.current", 0, 0.1, NETVISION_OID_IN_CURRENT_P2, 0, SU_INPUT_3, NULL }, ++ { "input.L3-N.voltage", 0, 0.1, NETVISION_OID_IN_VOLTAGE_P3, 0, SU_INPUT_3, NULL }, ++ { "input.L3.current", 0, 0.1, NETVISION_OID_IN_CURRENT_P3, 0, SU_INPUT_3, NULL }, ++ ++ { "output.phases", 0, 1.0, NETVISION_OID_OUTPUT_NUM_LINES, 0, SU_FLAG_SETINT, NULL, &output_phases }, ++ { "output.frequency", 0, 0.1, NETVISION_OID_OUTPUT_FREQ, 0, SU_FLAG_OK, NULL }, ++ { "output.voltage", 0, 0.1, NETVISION_OID_OUT_VOLTAGE_P1, 0, SU_OUTPUT_1, NULL }, ++ { "output.current", 0, 0.1, NETVISION_OID_OUT_CURRENT_P1, 0, SU_OUTPUT_1, NULL }, ++ { "output.load", 0, 1.0, NETVISION_OID_OUT_LOAD_PCT_P1, 0, SU_OUTPUT_1, NULL }, ++ { "output.L1-N.voltage", 0, 0.1, NETVISION_OID_OUT_VOLTAGE_P1, 0, SU_OUTPUT_3, NULL }, ++ { "output.L1.current", 0, 0.1, NETVISION_OID_OUT_CURRENT_P1, 0, SU_OUTPUT_3, NULL }, ++ { "output.L1.power.percent", 0, 1.0, NETVISION_OID_OUT_LOAD_PCT_P1, 0, SU_OUTPUT_3, NULL }, ++ { "output.L2-N.voltage", 0, 0.1, NETVISION_OID_OUT_VOLTAGE_P2, 0, SU_OUTPUT_3, NULL }, ++ { "output.L2.current", 0, 0.1, NETVISION_OID_OUT_CURRENT_P2, 0, SU_OUTPUT_3, NULL }, ++ { "output.L2.power.percent", 0, 1.0, NETVISION_OID_OUT_LOAD_PCT_P2, 0, SU_OUTPUT_3, NULL }, ++ { "output.L3-N.voltage", 0, 0.1, NETVISION_OID_OUT_VOLTAGE_P3, 0, SU_OUTPUT_3, NULL }, ++ { "output.L3.current", 0, 0.1, NETVISION_OID_OUT_CURRENT_P3, 0, SU_OUTPUT_3, NULL }, ++ { "output.L3.power.percent", 0, 1.0, NETVISION_OID_OUT_LOAD_PCT_P3, 0, SU_OUTPUT_3, NULL }, ++ ++ { "input.bypass.phases", 0, 1.0, NETVISION_OID_BYPASS_NUM_LINES, 0, SU_FLAG_SETINT, NULL, &bypass_phases }, ++ { "input.bypass.frequency", 0, 0.1, NETVISION_OID_BYPASS_FREQ, 0, SU_FLAG_OK, NULL }, ++ { "input.bypass.voltage", 0, 0.1, NETVISION_OID_BY_VOLTAGE_P1, 0, SU_BYPASS_1, NULL }, ++ { "input.bypass.current", 0, 0.1, NETVISION_OID_BY_CURRENT_P1, 0, SU_BYPASS_1, NULL }, ++ { "input.bypass.L1-N.voltage", 0, 0.1, NETVISION_OID_BY_VOLTAGE_P1, 0, SU_BYPASS_3, NULL }, ++ { "input.bypass.L1.current", 0, 0.1, NETVISION_OID_BY_CURRENT_P1, 0, SU_BYPASS_3, NULL }, ++ { "input.bypass.L2-N.voltage", 0, 0.1, NETVISION_OID_BY_VOLTAGE_P2, 0, SU_BYPASS_3, NULL }, ++ { "input.bypass.L2.current", 0, 0.1, NETVISION_OID_BY_CURRENT_P2, 0, SU_BYPASS_3, NULL }, ++ { "input.bypass.L3-N.voltage", 0, 0.1, NETVISION_OID_BY_VOLTAGE_P3, 0, SU_BYPASS_3, NULL }, ++ { "input.bypass.L3.current", 0, 0.1, NETVISION_OID_BY_CURRENT_P3, 0, SU_BYPASS_3, NULL }, + + /* battery info */ + { "battery.charge", 0, 1, NETVISION_OID_BATT_CHARGE, "", SU_FLAG_OK, NULL }, |