diff options
-rw-r--r-- | sysutils/ups-nut-cgi/Makefile | 4 | ||||
-rw-r--r-- | sysutils/ups-nut-snmp/Makefile | 3 | ||||
-rw-r--r-- | sysutils/ups-nut-usb/Makefile | 3 | ||||
-rw-r--r-- | sysutils/ups-nut/Makefile | 3 | ||||
-rw-r--r-- | sysutils/ups-nut/Makefile.common | 10 | ||||
-rw-r--r-- | sysutils/ups-nut/PLIST | 21 | ||||
-rw-r--r-- | sysutils/ups-nut/distinfo | 16 | ||||
-rw-r--r-- | sysutils/ups-nut/files/upsdriver.sh | 4 | ||||
-rw-r--r-- | sysutils/ups-nut/patches/patch-aa | 4 | ||||
-rw-r--r-- | sysutils/ups-nut/patches/patch-ab | 105 | ||||
-rw-r--r-- | sysutils/ups-nut/patches/patch-clients_upsclient.c | 4 | ||||
-rw-r--r-- | sysutils/ups-nut/patches/patch-snmp-error-msg.c | 15 |
12 files changed, 56 insertions, 136 deletions
diff --git a/sysutils/ups-nut-cgi/Makefile b/sysutils/ups-nut-cgi/Makefile index c90562964e8..e550e7b5a2c 100644 --- a/sysutils/ups-nut-cgi/Makefile +++ b/sysutils/ups-nut-cgi/Makefile @@ -1,9 +1,8 @@ -# $NetBSD: Makefile,v 1.65 2018/03/12 11:17:37 wiz Exp $ +# $NetBSD: Makefile,v 1.66 2018/09/21 00:59:53 jym Exp $ .include "../../sysutils/ups-nut/Makefile.common" PKGNAME= ${DISTNAME:S/nut/ups-nut-cgi/} -PKGREVISION= 11 COMMENT= Network UPS Tools CGI scripts DEPENDS+= ups-nut-2.*:../../sysutils/ups-nut @@ -49,4 +48,5 @@ do-install: .include "../../graphics/freetype2/buildlink3.mk" .include "../../graphics/gd/buildlink3.mk" +.include "../../graphics/tiff/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/sysutils/ups-nut-snmp/Makefile b/sysutils/ups-nut-snmp/Makefile index 80801c16085..94fcf945d65 100644 --- a/sysutils/ups-nut-snmp/Makefile +++ b/sysutils/ups-nut-snmp/Makefile @@ -1,6 +1,5 @@ -# $NetBSD: Makefile,v 1.5 2016/03/05 11:29:32 jperkin Exp $ +# $NetBSD: Makefile,v 1.6 2018/09/21 00:59:53 jym Exp $ -PKGREVISION= 1 .include "../../sysutils/ups-nut/Makefile.common" PKGNAME= ${DISTNAME:S/nut/ups-nut-snmp/} diff --git a/sysutils/ups-nut-usb/Makefile b/sysutils/ups-nut-usb/Makefile index bf4dd672f23..a66f21c0814 100644 --- a/sysutils/ups-nut-usb/Makefile +++ b/sysutils/ups-nut-usb/Makefile @@ -1,9 +1,8 @@ -# $NetBSD: Makefile,v 1.8 2018/03/28 06:23:34 mrg Exp $ +# $NetBSD: Makefile,v 1.9 2018/09/21 00:59:53 jym Exp $ .include "../../sysutils/ups-nut/Makefile.common" PKGNAME= ${DISTNAME:S/nut/ups-nut-usb/} -PKGREVISION= 3 COMMENT= Network UPS Tools USB drivers DEPENDS+= ups-nut-2.*:../../sysutils/ups-nut diff --git a/sysutils/ups-nut/Makefile b/sysutils/ups-nut/Makefile index e5e3741478b..ce30508802f 100644 --- a/sysutils/ups-nut/Makefile +++ b/sysutils/ups-nut/Makefile @@ -1,9 +1,8 @@ -# $NetBSD: Makefile,v 1.54 2013/07/12 10:45:03 jperkin Exp $ +# $NetBSD: Makefile,v 1.55 2018/09/21 00:59:53 jym Exp $ .include "Makefile.common" PKGNAME= ups-${DISTNAME} -PKGREVISION= 1 COMMENT= Network UPS Tools CONFIGURE_ARGS+= --with-drvpath=${NUT_DRVDIR:Q} diff --git a/sysutils/ups-nut/Makefile.common b/sysutils/ups-nut/Makefile.common index 2e2e95c6a40..86349dc8cd9 100644 --- a/sysutils/ups-nut/Makefile.common +++ b/sysutils/ups-nut/Makefile.common @@ -1,18 +1,19 @@ -# $NetBSD: Makefile.common,v 1.5 2013/02/16 17:34:58 jdf Exp $ +# $NetBSD: Makefile.common,v 1.6 2018/09/21 00:59:53 jym 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.6.5 +BRANCH= 2.7 +DISTNAME= nut-${BRANCH}.4 CATEGORIES= sysutils -MASTER_SITES= http://www.networkupstools.org/source/2.6/ +MASTER_SITES= http://www.networkupstools.org/source/${BRANCH}/ MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://www.networkupstools.org/ -LICENSE= gnu-gpl-v2 +LICENSE= gnu-gpl-v2 OR gnu-gpl-v3 NUT_USER?= nut NUT_GROUP?= nut @@ -21,6 +22,7 @@ DISTINFO_FILE= ${.CURDIR}/../../sysutils/ups-nut/distinfo PATCHDIR= ${.CURDIR}/../../sysutils/ups-nut/patches USE_LIBTOOL= yes +USE_LANGUAGES= c c++ GNU_CONFIGURE= yes CONFIGURE_ARGS+= --sysconfdir=${NUT_CONFDIR:Q} CONFIGURE_ARGS+= --datadir=${NUT_DATADIR:Q} diff --git a/sysutils/ups-nut/PLIST b/sysutils/ups-nut/PLIST index 6ba2ddd967e..4155fa4a024 100644 --- a/sysutils/ups-nut/PLIST +++ b/sysutils/ups-nut/PLIST @@ -1,12 +1,15 @@ -@comment $NetBSD: PLIST,v 1.26 2014/03/11 14:05:16 jperkin Exp $ +@comment $NetBSD: PLIST,v 1.27 2018/09/21 00:59:53 jym Exp $ bin/upsc bin/upscmd bin/upslog bin/upsrw bin/upssched-cmd +lib/libnutclient.la lib/libupsclient.la +libexec/nut/al175 libexec/nut/apcsmart libexec/nut/apcsmart-old +libexec/nut/apcupsd-ups libexec/nut/bcmxcp libexec/nut/belkin libexec/nut/belkinunv @@ -31,19 +34,20 @@ libexec/nut/metasys libexec/nut/mge-shut libexec/nut/mge-utalk libexec/nut/microdowell +libexec/nut/nutdrv_qx libexec/nut/oldmge-shut libexec/nut/oneac libexec/nut/optiups libexec/nut/powercom libexec/nut/powerpanel libexec/nut/rhino +libexec/nut/riello_ser libexec/nut/safenet 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 @@ -51,8 +55,10 @@ 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-old.8 man/man8/apcsmart.8 +man/man8/apcupsd-ups.8 man/man8/bcmxcp.8 man/man8/belkin.8 man/man8/belkinunv.8 @@ -60,7 +66,7 @@ man/man8/bestfcom.8 man/man8/bestfortress.8 man/man8/bestuferrups.8 man/man8/bestups.8 -man/man8/blazer.8 +man/man8/blazer_ser.8 man/man8/clone.8 man/man8/dummy-ups.8 man/man8/etapro.8 @@ -78,12 +84,14 @@ man/man8/mge-utalk.8 man/man8/microdowell.8 man/man8/nut-recorder.8 man/man8/nut-scanner.8 +man/man8/nutdrv_qx.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/riello_ser.8 man/man8/safenet.8 man/man8/solis.8 man/man8/tripplite.8 @@ -99,6 +107,7 @@ man/man8/upsrw.8 man/man8/upssched.8 man/man8/victronups.8 sbin/upsd +sbin/upsdrvctl sbin/upsmon sbin/upssched share/doc/nut/COPYING @@ -133,16 +142,16 @@ 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/nut-hal.txt share/doc/nut/nut-names.txt share/doc/nut/nut-qa.txt +share/doc/nut/nutdrv_qx-subdrivers.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-subdrivers.txt share/doc/nut/snmp.txt share/doc/nut/sock-protocol.txt -share/doc/nut/stable-hcl.txt share/doc/nut/support.txt share/doc/nut/user-manual.txt share/examples/nut/nut.conf.sample @@ -153,7 +162,5 @@ share/examples/nut/upsmon.conf.sample share/examples/nut/upssched.conf.sample share/nut/cmdvartab share/nut/driver.list -@pkgdir share/nut/html @pkgdir share/doc/nut/drivers @pkgdir etc/nut -@pkgdir cgi-bin diff --git a/sysutils/ups-nut/distinfo b/sysutils/ups-nut/distinfo index 7c5abfe192c..3dada4bdd69 100644 --- a/sysutils/ups-nut/distinfo +++ b/sysutils/ups-nut/distinfo @@ -1,11 +1,11 @@ -$NetBSD: distinfo,v 1.32 2018/04/01 20:29:28 joerg Exp $ +$NetBSD: distinfo,v 1.33 2018/09/21 00:59:53 jym Exp $ -SHA1 (nut-2.6.5.tar.gz) = 320debe11df91f04e32824694d0c89a020677f71 -RMD160 (nut-2.6.5.tar.gz) = d6e6acd4696e3c3f8c0ecd998f8676a8625decb9 -SHA512 (nut-2.6.5.tar.gz) = f1c76e6280057dc558d53451e7de2bdc7f37a0f175b1c52c27e7dcb83deeb78f6885007ad188a7a3a19e411eba87e03eb2246310bd7a5a5bb6fa3ad2bebd49d8 -Size (nut-2.6.5.tar.gz) = 2038832 bytes -SHA1 (patch-aa) = 48110f378518edb43a653753eb4ef6ea28344c62 -SHA1 (patch-ab) = 44988118570714ab2c3fffdd75909c2255b94fa6 -SHA1 (patch-clients_upsclient.c) = dbd2cacf598ff3dc2d3d673dae8563348fc84c8b +SHA1 (nut-2.7.4.tar.gz) = a450382dbfaff2e1bdeefeda8d3c682a36a7fc72 +RMD160 (nut-2.7.4.tar.gz) = f39a49128a3ba20b1bf122ce569c5a867815c3a1 +SHA512 (nut-2.7.4.tar.gz) = 320c4aff85d8a370c5eff77d33924fdfc3caf6a250620693cdd5bf3336b3a80d8a207488eee841bcf8b72fbad68fda4c074e63b99c56e7886716fc934122d11a +Size (nut-2.7.4.tar.gz) = 2509831 bytes +SHA1 (patch-aa) = 5f39487b0ebb39e27dcc76b762ce06090085c24b +SHA1 (patch-clients_upsclient.c) = 9c521684a5ccf108bd464767f9b31aa2694afae1 SHA1 (patch-drivers_hidparser.c) = c71d84bbf3140db1f82ef155fdf5afec79cbd38d SHA1 (patch-drivers_libusb.c) = 4e75bc13123a37aa2a2b5497d51605f88b0c5464 +SHA1 (patch-snmp-error-msg.c) = f01db1f935cc168c9e831f5b672cd9e16ddf6f2c diff --git a/sysutils/ups-nut/files/upsdriver.sh b/sysutils/ups-nut/files/upsdriver.sh index 888139d2877..769737b117a 100644 --- a/sysutils/ups-nut/files/upsdriver.sh +++ b/sysutils/ups-nut/files/upsdriver.sh @@ -1,6 +1,6 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: upsdriver.sh,v 1.8 2004/02/15 13:14:25 lukem Exp $ +# $NetBSD: upsdriver.sh,v 1.9 2018/09/21 00:59:53 jym Exp $ # # PROVIDE: upsdriver # REQUIRE: NETWORK syslogd mountcritremote @@ -31,7 +31,7 @@ fi if [ "${upsdriver_type:-upsdrvctl}" = "upsdrvctl" ] then - ctl_command="@PREFIX@/libexec/nut/upsdrvctl" + ctl_command="@PREFIX@/sbin/upsdrvctl" required_files="@NUT_CONFDIR@/ups.conf" start_cmd="${ctl_command} start" stop_cmd="${ctl_command} stop" diff --git a/sysutils/ups-nut/patches/patch-aa b/sysutils/ups-nut/patches/patch-aa index 94a065658e1..1b2b8e17e16 100644 --- a/sysutils/ups-nut/patches/patch-aa +++ b/sysutils/ups-nut/patches/patch-aa @@ -1,4 +1,6 @@ -$NetBSD: patch-aa,v 1.11 2013/02/16 17:34:58 jdf Exp $ +$NetBSD: patch-aa,v 1.12 2018/09/21 00:59:53 jym Exp $ + +Default conf files go to example dir. --- conf/Makefile.in.orig 2013-02-08 15:36:48.000000000 +0100 +++ conf/Makefile.in 2013-02-08 15:37:02.000000000 +0100 diff --git a/sysutils/ups-nut/patches/patch-ab b/sysutils/ups-nut/patches/patch-ab deleted file mode 100644 index 467e3cf4ee6..00000000000 --- a/sysutils/ups-nut/patches/patch-ab +++ /dev/null @@ -1,105 +0,0 @@ -$NetBSD: patch-ab,v 1.12 2013/02/16 17:34:58 jdf Exp $ - -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 2013-02-08 15:39:09.000000000 +0100 -+++ drivers/snmp-ups.c 2013-02-08 15:39:13.000000000 +0100 -@@ -90,6 +90,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" -@@ -266,15 +269,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); -@@ -477,6 +480,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. */ -@@ -495,8 +501,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; -+ } - - if (!((status == STAT_SUCCESS) && (response->errstat == SNMP_ERR_NOERROR))) - { -@@ -876,6 +884,7 @@ - bool_t load_mib2nut(const char *mib) - { - int i; -+ int snmp_timeout = 0; - char buf[LARGEBUF]; - mib2nut_info_t *m2n = NULL; - -@@ -893,6 +902,7 @@ - /* Otherwise, revert to the classic method */ - if (m2n == NULL) - { -+again: - for (i = 0; mib2nut[i] != NULL; i++) { - /* Is there already a MIB name provided? */ - if (strcmp(mib, "auto") && strcmp(mib, mib2nut[i]->mib_name)) { -@@ -902,6 +912,9 @@ - - /* Classic method: test an OID specific to this MIB */ - 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; - } - /* MIB found */ -@@ -920,6 +933,19 @@ - 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) { diff --git a/sysutils/ups-nut/patches/patch-clients_upsclient.c b/sysutils/ups-nut/patches/patch-clients_upsclient.c index 1c589035abb..1ad281eedad 100644 --- a/sysutils/ups-nut/patches/patch-clients_upsclient.c +++ b/sysutils/ups-nut/patches/patch-clients_upsclient.c @@ -1,4 +1,6 @@ -$NetBSD: patch-clients_upsclient.c,v 1.1 2018/04/01 20:29:28 joerg Exp $ +$NetBSD: patch-clients_upsclient.c,v 1.2 2018/09/21 00:59:53 jym Exp $ + +Add missing header for timeval(3) functions. --- clients/upsclient.c.orig 2018-04-01 17:13:02.200981408 +0000 +++ clients/upsclient.c diff --git a/sysutils/ups-nut/patches/patch-snmp-error-msg.c b/sysutils/ups-nut/patches/patch-snmp-error-msg.c new file mode 100644 index 00000000000..a98c80021f7 --- /dev/null +++ b/sysutils/ups-nut/patches/patch-snmp-error-msg.c @@ -0,0 +1,15 @@ +$NetBSD: patch-snmp-error-msg.c,v 1.1 2018/09/21 00:59:53 jym Exp $ + +Get an explicit error message if we fail obtaining a response. + +--- drivers/snmp-ups.c.orig 2016-03-09 11:39:45.000000000 +0000 ++++ drivers/snmp-ups.c +@@ -577,6 +577,8 @@ struct snmp_pdu **nut_snmp_walk(const ch + status = snmp_synch_response(g_snmp_sess_p, pdu, &response); + + if (!response) { ++ nut_snmp_perror(g_snmp_sess_p, status, response, ++ "%s: %s", __func__, OID); + break; + } + |