update to 2.4.3, tested by Denny White and Aaron Stellman
note that with USB UPS, you may have to allow permissions on further ugen subdevices (e.g. ugen0.01 as well as ugen0.00).
This commit is contained in:
parent
6d73519307
commit
5c5a608f6c
@ -1,13 +1,13 @@
|
||||
# $OpenBSD: Makefile,v 1.35 2010/03/20 17:11:40 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.36 2010/03/31 22:11:11 sthen 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
|
||||
|
||||
DISTNAME= nut-2.4.1
|
||||
PKGNAME-main= ${DISTNAME}p3
|
||||
PKGNAME-cgi= ${DISTNAME:S/-/-cgi-/}p0
|
||||
PKGNAME-snmp= ${DISTNAME:S/-/-snmp-/}p0
|
||||
DISTNAME= nut-2.4.3
|
||||
PKGNAME-main= ${DISTNAME}
|
||||
PKGNAME-cgi= ${DISTNAME:S/-/-cgi-/}
|
||||
PKGNAME-snmp= ${DISTNAME:S/-/-snmp-/}
|
||||
CATEGORIES= sysutils
|
||||
HOMEPAGE= http://www.networkupstools.org/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
MD5 (nut-2.4.1.tar.gz) = YJ668hI/xxcdJabHQt19Zg==
|
||||
RMD160 (nut-2.4.1.tar.gz) = 0EanEfuPlLGjZS3qd00gFoQpInI=
|
||||
SHA1 (nut-2.4.1.tar.gz) = yOmZ2nGM/hQhGXfBndmwVc/G+to=
|
||||
SHA256 (nut-2.4.1.tar.gz) = niRB4acEZidxXP544i+C97sFvzgHNfgDcxtk4GvRnzw=
|
||||
SIZE (nut-2.4.1.tar.gz) = 1121152
|
||||
MD5 (nut-2.4.3.tar.gz) = b4k7YbB5FeehOTJPo/eRIQ==
|
||||
RMD160 (nut-2.4.3.tar.gz) = bsa7pnqyyqdh57MpngR7xJuFzr0=
|
||||
SHA1 (nut-2.4.3.tar.gz) = OgmwnAPffosS9wV2/XA+ZdHPewY=
|
||||
SHA256 (nut-2.4.3.tar.gz) = 07cB8h8eBJq7XflO6YBfzob+V6h2w7tBIXVYqEakkzU=
|
||||
SIZE (nut-2.4.3.tar.gz) = 1154503
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-clients_Makefile_in,v 1.10 2009/04/03 15:40:12 sthen Exp $
|
||||
--- clients/Makefile.in.orig Tue Feb 17 09:24:09 2009
|
||||
+++ clients/Makefile.in Wed Mar 18 21:27:43 2009
|
||||
@@ -342,10 +342,12 @@ upsmon_SOURCES = upsmon.c upsmon.h upsclient.h
|
||||
$OpenBSD: patch-clients_Makefile_in,v 1.11 2010/03/31 22:11:11 sthen Exp $
|
||||
--- clients/Makefile.in.orig Tue Feb 23 10:04:41 2010
|
||||
+++ clients/Makefile.in Sat Mar 20 23:18:11 2010
|
||||
@@ -359,10 +359,12 @@ upsmon_SOURCES = upsmon.c upsmon.h upsclient.h
|
||||
upssched_SOURCES = upssched.c upssched.h
|
||||
upssched_LDADD = ../common/libcommon.a ../common/libparseconf.la $(NETLIBS)
|
||||
upsimage_cgi_SOURCES = upsimage.c upsclient.h upsimagearg.h cgilib.c cgilib.h
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-clients_upsstats_c,v 1.7 2009/04/03 15:40:12 sthen Exp $
|
||||
--- clients/upsstats.c.orig Tue Feb 17 09:20:43 2009
|
||||
+++ clients/upsstats.c Wed Mar 18 21:27:43 2009
|
||||
@@ -835,7 +835,7 @@ static void display_template(const char *tfn)
|
||||
$OpenBSD: patch-clients_upsstats_c,v 1.8 2010/03/31 22:11:11 sthen Exp $
|
||||
--- clients/upsstats.c.orig Thu Feb 11 21:43:13 2010
|
||||
+++ clients/upsstats.c Sat Mar 20 23:18:11 2010
|
||||
@@ -844,7 +844,7 @@ static void display_template(const char *tfn)
|
||||
{
|
||||
char fn[SMALLBUF], buf[LARGEBUF];
|
||||
|
||||
@ -10,7 +10,7 @@ $OpenBSD: patch-clients_upsstats_c,v 1.7 2009/04/03 15:40:12 sthen Exp $
|
||||
|
||||
tf = fopen(fn, "r");
|
||||
|
||||
@@ -955,7 +955,7 @@ static void load_hosts_conf(void)
|
||||
@@ -964,7 +964,7 @@ static void load_hosts_conf(void)
|
||||
char fn[SMALLBUF];
|
||||
PCONF_CTX_t ctx;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-common_common_c,v 1.4 2008/01/30 20:55:59 mbalmer Exp $
|
||||
--- common/common.c.orig Sun May 27 16:07:56 2007
|
||||
+++ common/common.c Wed Aug 1 12:59:05 2007
|
||||
@@ -301,6 +301,17 @@ const char * confpath(void)
|
||||
$OpenBSD: patch-common_common_c,v 1.5 2010/03/31 22:11:11 sthen Exp $
|
||||
--- common/common.c.orig Thu Feb 11 21:43:12 2010
|
||||
+++ common/common.c Sat Mar 20 23:18:12 2010
|
||||
@@ -319,6 +319,17 @@ const char * confpath(void)
|
||||
return path;
|
||||
}
|
||||
|
||||
|
@ -1,23 +0,0 @@
|
||||
$OpenBSD: patch-conf_upsd_conf_sample,v 1.1 2010/01/15 11:25:15 sthen Exp $
|
||||
|
||||
from r1852 upstream;
|
||||
|
||||
* base the default maxconn on available filehandles.
|
||||
* change the error message to better indicate that it's an error
|
||||
not a warning.
|
||||
|
||||
--- conf/upsd.conf.sample.orig Tue Jan 12 12:24:50 2010
|
||||
+++ conf/upsd.conf.sample Tue Jan 12 12:28:42 2010
|
||||
@@ -34,8 +34,8 @@
|
||||
|
||||
# =======================================================================
|
||||
# MAXCONN <connections>
|
||||
-# MAXCONN 1024
|
||||
#
|
||||
-# This defaults to 1024 connections. Each UPS, each LISTEN address and each
|
||||
-# client count as one connection. If the server runs out of connections, it
|
||||
-# will no longer accept new incoming client connections.
|
||||
+# This defaults to maximum number allowed on your system. Each UPS, each
|
||||
+# LISTEN address and each client count as one connection. If the server
|
||||
+# runs out of connections, it will no longer accept new incoming client
|
||||
+# connections. Only set this if you know exactly what you're doing.
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-conf_upsmon_conf_sample,v 1.1 2010/03/20 17:11:40 ajacoutot Exp $
|
||||
--- conf/upsmon.conf.sample.orig Fri Mar 12 10:32:24 2010
|
||||
+++ conf/upsmon.conf.sample Fri Mar 12 10:33:02 2010
|
||||
@@ -109,7 +109,7 @@ MINSUPPLIES 1
|
||||
$OpenBSD: patch-conf_upsmon_conf_sample,v 1.2 2010/03/31 22:11:11 sthen Exp $
|
||||
--- conf/upsmon.conf.sample.orig Thu Feb 18 21:19:09 2010
|
||||
+++ conf/upsmon.conf.sample Sat Mar 20 23:18:18 2010
|
||||
@@ -108,7 +108,7 @@ MINSUPPLIES 1
|
||||
#
|
||||
# This should work just about everywhere ... if it doesn't, well, change it.
|
||||
|
||||
|
@ -1,12 +0,0 @@
|
||||
$OpenBSD: patch-conf_upssched_conf_sample_in,v 1.1 2010/03/03 20:39:16 sthen Exp $
|
||||
--- conf/upssched.conf.sample.in.orig Wed Mar 3 17:29:20 2010
|
||||
+++ conf/upssched.conf.sample.in Wed Mar 3 17:29:29 2010
|
||||
@@ -14,7 +14,7 @@
|
||||
# A shell script with a big case..esac construct should work nicely for this.
|
||||
# An example has been provided to help you get started.
|
||||
|
||||
-CMDSCRIPT /usr/local/ups/bin/upssched-cmd
|
||||
+CMDSCRIPT ${LOCALBASE}/bin/upssched-cmd
|
||||
|
||||
# ============================================================================
|
||||
#
|
@ -1,12 +1,12 @@
|
||||
$OpenBSD: patch-configure,v 1.12 2009/04/03 15:40:12 sthen Exp $
|
||||
--- configure.orig Tue Feb 17 09:23:51 2009
|
||||
+++ configure Wed Mar 18 21:27:43 2009
|
||||
@@ -10506,7 +10506,7 @@ cat >>conftest.$ac_ext <<_ACEOF
|
||||
$OpenBSD: patch-configure,v 1.13 2010/03/31 22:11:11 sthen Exp $
|
||||
--- configure.orig Tue Feb 23 10:04:39 2010
|
||||
+++ configure Sat Mar 20 23:18:19 2010
|
||||
@@ -10709,7 +10709,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
/* end confdefs.h. */
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
int
|
||||
-main ()
|
||||
+test_main ()
|
||||
{
|
||||
SSL_library_init()
|
||||
|
||||
;
|
||||
|
13
sysutils/nut/patches/patch-drivers_blazer_usb_c
Normal file
13
sysutils/nut/patches/patch-drivers_blazer_usb_c
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-drivers_blazer_usb_c,v 1.1 2010/03/31 22:11:11 sthen Exp $
|
||||
--- drivers/blazer_usb.c.orig Sat Mar 20 23:31:35 2010
|
||||
+++ drivers/blazer_usb.c Sat Mar 20 23:31:48 2010
|
||||
@@ -387,7 +387,9 @@ int blazer_command(const char *cmd, char *buf, size_t
|
||||
|
||||
case -ETIMEDOUT: /* Connection timed out */
|
||||
case -EOVERFLOW: /* Value too large for defined data type */
|
||||
+#ifdef EPROTO
|
||||
case -EPROTO: /* Protocol error */
|
||||
+#endif
|
||||
default:
|
||||
break;
|
||||
}
|
13
sysutils/nut/patches/patch-drivers_libusb_c
Normal file
13
sysutils/nut/patches/patch-drivers_libusb_c
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-drivers_libusb_c,v 1.1 2010/03/31 22:11:11 sthen Exp $
|
||||
--- drivers/libusb.c.orig Sat Mar 20 23:31:09 2010
|
||||
+++ drivers/libusb.c Sat Mar 20 23:31:21 2010
|
||||
@@ -376,7 +376,9 @@ static int libusb_strerror(const int ret, const char *
|
||||
return 0;
|
||||
|
||||
case -EOVERFLOW: /* Value too large for defined data type */
|
||||
+#ifdef EPROTO
|
||||
case -EPROTO: /* Protocol error */
|
||||
+#endif
|
||||
upsdebugx(2, "%s: %s", desc, usb_strerror());
|
||||
return 0;
|
||||
|
13
sysutils/nut/patches/patch-drivers_usbhid-ups_c
Normal file
13
sysutils/nut/patches/patch-drivers_usbhid-ups_c
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-drivers_usbhid-ups_c,v 1.1 2010/03/31 22:11:11 sthen Exp $
|
||||
--- drivers/usbhid-ups.c.orig Sat Mar 20 23:29:39 2010
|
||||
+++ drivers/usbhid-ups.c Sat Mar 20 23:29:39 2010
|
||||
@@ -1225,7 +1225,9 @@ static bool_t hid_ups_walk(walkmode_t mode)
|
||||
|
||||
case -ETIMEDOUT: /* Connection timed out */
|
||||
case -EOVERFLOW: /* Value too large for defined data type */
|
||||
+#ifdef EPROTO
|
||||
case -EPROTO: /* Protocol error */
|
||||
+#endif
|
||||
case -EPIPE: /* Broken pipe */
|
||||
default:
|
||||
/* Don't know what happened, try again later... */
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-include_config_h_in,v 1.3 2004/02/09 06:48:48 marcm Exp $
|
||||
--- include/config.h.in.orig 2003-08-22 19:56:06.000000000 -0700
|
||||
+++ include/config.h.in 2004-01-03 10:08:47.000000000 -0800
|
||||
@@ -12,6 +12,9 @@
|
||||
$OpenBSD: patch-include_config_h_in,v 1.4 2010/03/31 22:11:11 sthen Exp $
|
||||
--- include/config.h.in.orig Fri Feb 19 21:20:07 2010
|
||||
+++ include/config.h.in Sat Mar 20 23:18:19 2010
|
||||
@@ -18,6 +18,9 @@
|
||||
/* Default path for data files */
|
||||
#undef DATADIR
|
||||
|
||||
|
@ -1,43 +0,0 @@
|
||||
$OpenBSD: patch-server_upsd_c,v 1.1 2010/01/15 11:25:15 sthen Exp $
|
||||
|
||||
from r1852 upstream;
|
||||
|
||||
* base the default maxconn on available filehandles.
|
||||
* change the error message to better indicate that it's an error
|
||||
not a warning.
|
||||
|
||||
--- server/upsd.c.orig Tue Jan 12 12:23:27 2010
|
||||
+++ server/upsd.c Tue Jan 12 12:24:45 2010
|
||||
@@ -52,8 +52,8 @@ int deny_severity = LOG_WARNING;
|
||||
/* default 15 seconds before data is marked stale */
|
||||
int maxage = 15;
|
||||
|
||||
- /* default FD_SETSIZE connections allowed */
|
||||
- int maxconn = FD_SETSIZE;
|
||||
+ /* preloaded to {OPEN_MAX} in main, can be overridden via upsd.conf */
|
||||
+ int maxconn = 0;
|
||||
|
||||
/* preloaded to STATEPATH in main, can be overridden via upsd.conf */
|
||||
char *statepath = NULL;
|
||||
@@ -712,7 +712,10 @@ void poll_reload(void)
|
||||
ret = sysconf(_SC_OPEN_MAX);
|
||||
|
||||
if (ret < maxconn) {
|
||||
- fatalx(EXIT_FAILURE, "Maximum number of connections limited to %d [requested %d]", ret, maxconn);
|
||||
+ fatalx(EXIT_FAILURE,
|
||||
+ "Your system limits the maximum number of connections to %d\n"
|
||||
+ "but you requested %d. The server won't start until this\n"
|
||||
+ "problem is resolved.\n", ret, maxconn);
|
||||
}
|
||||
|
||||
fds = xrealloc(fds, maxconn * sizeof(*fds));
|
||||
@@ -1036,6 +1039,9 @@ int main(int argc, char **argv)
|
||||
if (chroot_path) {
|
||||
chroot_start(chroot_path);
|
||||
}
|
||||
+
|
||||
+ /* default to system limit (may be overridden in upsd.conf */
|
||||
+ maxconn = sysconf(_SC_OPEN_MAX);
|
||||
|
||||
/* handle upsd.conf */
|
||||
load_upsdconf(0); /* 0 = initial */
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST-main,v 1.6 2010/03/20 17:11:40 ajacoutot Exp $
|
||||
@comment $OpenBSD: PLIST-main,v 1.7 2010/03/31 22:11:11 sthen Exp $
|
||||
@conflict upsd-*
|
||||
@pkgpath sysutils/nut
|
||||
@pkgpath sysutils/nut,no_cgi
|
||||
@ -13,18 +13,22 @@
|
||||
@bin bin/belkin
|
||||
@bin bin/belkinunv
|
||||
@bin bin/bestfcom
|
||||
@bin bin/bestfortress
|
||||
@bin bin/bestuferrups
|
||||
@bin bin/bestups
|
||||
@bin bin/blazer_ser
|
||||
@bin bin/blazer_usb
|
||||
@bin bin/cyberpower
|
||||
@bin bin/clone
|
||||
@bin bin/clone-outlet
|
||||
@bin bin/dummy-ups
|
||||
@bin bin/etapro
|
||||
@bin bin/everups
|
||||
@bin bin/gamatronic
|
||||
@bin bin/genericups
|
||||
@bin bin/isbmex
|
||||
@bin bin/ivtscd
|
||||
@bin bin/liebert
|
||||
@bin bin/liebertgxt2
|
||||
@bin bin/masterguard
|
||||
@bin bin/megatec
|
||||
@bin bin/megatec_usb
|
||||
@ -64,6 +68,7 @@ lib/libupsclient.a
|
||||
lib/libupsclient.la
|
||||
lib/pkgconfig/
|
||||
@man man/man5/hosts.conf.5
|
||||
@man man/man5/nut.conf.5
|
||||
@man man/man5/ups.conf.5
|
||||
@man man/man5/upsd.conf.5
|
||||
@man man/man5/upsd.users.5
|
||||
@ -77,17 +82,20 @@ lib/pkgconfig/
|
||||
@man man/man8/belkin.8
|
||||
@man man/man8/belkinunv.8
|
||||
@man man/man8/bestfcom.8
|
||||
@man man/man8/bestfortress.8
|
||||
@man man/man8/bestuferrups.8
|
||||
@man man/man8/bestups.8
|
||||
@man man/man8/blazer.8
|
||||
@man man/man8/cyberpower.8
|
||||
@man man/man8/clone.8
|
||||
@man man/man8/dummy-ups.8
|
||||
@man man/man8/etapro.8
|
||||
@man man/man8/everups.8
|
||||
@man man/man8/gamatronic.8
|
||||
@man man/man8/genericups.8
|
||||
@man man/man8/isbmex.8
|
||||
@man man/man8/ivtscd.8
|
||||
@man man/man8/liebert.8
|
||||
@man man/man8/liebertgxt2.8
|
||||
@man man/man8/masterguard.8
|
||||
@man man/man8/megatec.8
|
||||
@man man/man8/megatec_usb.8
|
||||
|
Loading…
Reference in New Issue
Block a user