sysutils/apcupsd: sync with upstream

Taken from: FreeBSD
This commit is contained in:
Franco Fichtner 2025-02-06 12:46:47 +01:00
parent 2a8c4f6c94
commit 42b20e71d0
2 changed files with 24 additions and 5 deletions

View file

@ -1,6 +1,6 @@
PORTNAME= apcupsd
PORTVERSION= 3.14.14
PORTREVISION= 5
PORTREVISION= 6
CATEGORIES= sysutils
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}%20-%20Stable/${PORTVERSION}
@ -29,10 +29,10 @@ SUB_FILES= pkg-message
CONFLICTS_INSTALL= apcctrl
OPTIONS_DEFINE= APCDUMB_DRV APCSMART_DRV CGI CLIENT_ONLY GAPCMON MODBUS \
MODBUS_USB PCNET_DRV SHUTDOWN_POWEROFF SNMP_DRV SNMP_DRV_OLD \
TCP_WRAPPERS TEST_DRV USB_DRV USB_REPORTING
OPTIONS_DEFAULT= APCDUMB_DRV APCSMART_DRV MODBUS MODBUS_USB PCNET_DRV \
SNMP_DRV TCP_WRAPPERS USB_DRV
MODBUS_USB PCNET_COMMLOST PCNET_DRV SHUTDOWN_POWEROFF SNMP_DRV \
SNMP_DRV_OLD TCP_WRAPPERS TEST_DRV USB_DRV USB_REPORTING
OPTIONS_DEFAULT= APCDUMB_DRV APCSMART_DRV MODBUS MODBUS_USB PCNET_COMMLOST \
PCNET_DRV SNMP_DRV TCP_WRAPPERS USB_DRV
OPTIONS_SUB= yes
APCDUMB_DRV_DESC= Dumb UPS driver support
@ -42,6 +42,7 @@ CLIENT_ONLY_DESC= Only NIS client (no network server or drivers)
GAPCMON_DESC= Build GTK GUI front-end
MODBUS_DESC= MODBUS driver support
MODBUS_USB_DESC= MODBUS USB driver support
PCNET_COMMLOST_DESC= Experimental patch for faulty PCNET timeouts
PCNET_DRV_DESC= PowerChute Network Shutdown driver support
SHUTDOWN_POWEROFF_DESC= Shutdown behavior with Halt and Power off
SNMP_DRV_DESC= SNMP driver support
@ -75,6 +76,7 @@ TCP_WRAPPERS_CONFIGURE_WITH= libwrap=yes
TEST_DRV_CONFIGURE_ENABLE= test
USB_DRV_CONFIGURE_ENABLE= usb
PCNET_COMMLOST_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-pcnet-commlost
USB_REPORTING_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-usb-reporting
.include <bsd.port.options.mk>

View file

@ -0,0 +1,17 @@
# https://sourceforge.net/p/apcupsd/mailman/apcupsd-users/thread/CAGGHmKEjHQfRkB1EvHdv5b54buNKwQpMVmQzznpB%2BWNx_nEvWw%40mail.gmail.com/#msg59114143
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=283900
--- src/drivers/pcnet/pcnet.c (revision 2381)
+++ src/drivers/pcnet/pcnet.c (working copy)
@@ -32,10 +32,10 @@
/*
* Number of seconds with no data before we declare COMMLOST.
- * UPS should report in every 25 seconds. We allow 2 missing
+ * UPS should report in every 25 seconds. We allow 3 missing
* reports plus a fudge factor.
*/
-#define COMMLOST_TIMEOUT 55
+#define COMMLOST_TIMEOUT 80
/* Win32 needs a special close for sockets */
#ifdef HAVE_MINGW