sysutils/apcupsd: update to 3.14.14

Update apcupsd package to 3.14.14.


3.14.14 -- 31 May 2016

BUG FIXES

  * win32: Fix missing DLLs when installing only apctray

  * Fixes for socket error handling. Resolves apcaccess crash when connection
    fails as well as several other theoretical issues.

  * MODBUS/USB error handling (COMMLOST) improvements for faulty USB links

  * Fix hiddev binding when usbfs is mounted on /dev/bus/usb instead of
    /proc/bus/usb. This is necessary for switching between MODBUS/USB and
    USB/HID on Linux.

  * Update GPLv2 text and FSF address to match current versions from FSF.

  * Various fixes for potential issues suggested by Coverity Scan

  * MacOS X port support for El Capitan System Integrity Protection (SIP)
    aka "rootless"

  * Fix shutdown failure on Windows when UPSNAME includes spaces

  * Fix building bsd-usb driver
    (This was broken when modbus-usb support was added.)

FEATURES

  * Add status display for output current as well as apparent power
This commit is contained in:
taca 2020-09-19 13:50:48 +00:00
parent aa8b450cbb
commit 4b440744a5
14 changed files with 154 additions and 45 deletions

View file

@ -1,10 +1,8 @@
# $NetBSD: Makefile,v 1.91 2020/08/17 20:20:02 leot Exp $
# $NetBSD: Makefile,v 1.92 2020/09/19 13:50:48 taca Exp $
DISTNAME= apcupsd-3.14.13r2365
PKGREVISION= 6
DISTNAME= apcupsd-3.14.14
CATEGORIES= sysutils
#MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=apcupsd/}
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=apcupsd/}
MAINTAINER= bouyer@NetBSD.org
HOMEPAGE= http://www.apcupsd.org/
@ -17,10 +15,11 @@ USE_LANGUAGES= c c++
GNU_CONFIGURE= yes
PKG_SYSCONFSUBDIR= apcupsd
WRKSRC= ${WRKDIR}/apcupsd
CTF_SUPPORTED= no # https://smartos.org/bugview/OS-6533
BUILD_DEFS+= VARBASE
.include "options.mk"
# Thread support is needed to compile powerflute, which has a curses
@ -94,8 +93,8 @@ SUBST_MESSAGE.strip= Fixing conflicting STRIP variable name
#
HTMLDOCS= manual.html apcupsd.png charging.png commlost.png \
main_configs.png multimon.png onbatt.png online.png status.png \
thanks.png wininstall6.png
main_configs.png multimon.png onbatt.png online.png \
status.png thanks.png wininstall6.png
post-install:
${INSTALL_DATA} ${WRKSRC}/platforms/etc/apcupsd.conf \

View file

@ -1,18 +1,18 @@
$NetBSD: distinfo,v 1.21 2016/01/28 15:51:34 prlw1 Exp $
$NetBSD: distinfo,v 1.22 2020/09/19 13:50:48 taca Exp $
SHA1 (apcupsd-3.14.13r2365.tar.gz) = aa4093de66a4228e4b40820dc39afd597a8f3464
RMD160 (apcupsd-3.14.13r2365.tar.gz) = da006ac337dbf46d2f3ecba6408e459842b96994
SHA512 (apcupsd-3.14.13r2365.tar.gz) = 35a4bb5e30b4e7315322f541d399b81f35abd1c6887614ebd94fa7371f2b42b07167ed618ad763b7053b74fb1c24fd78ce6c4811ebddada41874ca1004e0730f
Size (apcupsd-3.14.13r2365.tar.gz) = 1816935 bytes
SHA1 (patch-ab) = 3db85accf1b05c8723dd7625278dfac02909dc34
SHA1 (patch-ac) = 98e8853dd030e09d5a487e57a277ff1269baa517
SHA1 (patch-ad) = 2877fd13513c96f4489953b539012b03c16b0223
SHA1 (patch-ae) = 9deb5f88617ea4fa81308567f4e65851c05e3f86
SHA1 (patch-af) = 1d9e76ff90699aa15f2311e0eae922071e83fca8
SHA1 (patch-ag) = c160cf80182edd0e42323dd24eddff7ae91c0e13
SHA1 (patch-ah) = 738b93b481310aa92ee16d0fbf91b5723b8cabb8
SHA1 (patch-ai) = 0295d1bd90b5bb7890e93ef04f12c76cfdc6c94a
SHA1 (patch-aj) = b46da7d9a81dca87b3e1dc89f4cfe2c8bfa9623c
SHA1 (patch-an) = 64aef62894075ccd9cca1308bf57b8ef897b4763
SHA1 (patch-ao) = 1f755c11e30759f023c3a1a6f23949300d1ff7f7
SHA1 (patch-ap) = 32cf69dcc70ade970532e4e738fe8927ec1ec304
SHA1 (apcupsd-3.14.14.tar.gz) = f027fa141c929371fe860443b6d911ef3a3606fb
RMD160 (apcupsd-3.14.14.tar.gz) = ecab483f1a38d1cfb75c6d439f89a611efcc45f2
SHA512 (apcupsd-3.14.14.tar.gz) = c953bbf3e08f809748a7978a3952604176390d1cd276f187fe096d9bc3c8993b52127e8350c0363387da41318e24b4d1e00ea58df71f3bb8f50c9a5a64cd2d7f
Size (apcupsd-3.14.14.tar.gz) = 1843409 bytes
SHA1 (patch-ab) = d40bfe1ee1a69828edbf72d9854398b9b5cb717a
SHA1 (patch-ac) = 9d61f954b4e6a9606549e83738e3e02ea55cb32a
SHA1 (patch-ad) = 987b0c33ea5a606d8eec8dcdc4413be2305e7877
SHA1 (patch-ae) = f8cda0bcc63b3054393ac48c6b1fac489b070c3a
SHA1 (patch-af) = a38c206b7682ce2d0bc385de191123d151bcf353
SHA1 (patch-ag) = 03310cdeaba7dae5b4599eddc86ebccda7902332
SHA1 (patch-ah) = a183a60ae579f7afe747b20a008fedad7593bfe8
SHA1 (patch-ai) = 849a218110bc104fc1f36e88c0117378cd124a21
SHA1 (patch-aj) = 36e62a5a6ddf149381f53910a0e8d3f394d3f193
SHA1 (patch-an) = 07c1ec6e9b51a4208521e717e18d155c0511642f
SHA1 (patch-ao) = 79b77ff98e6d7913bc99aaffa6a8f39348362c95
SHA1 (patch-ap) = 99d86069fc9d6f4e8f6d6f47b9092677c9227022

View file

@ -1,4 +1,7 @@
$NetBSD: patch-ab,v 1.6 2007/06/15 21:15:39 bouyer Exp $
$NetBSD: patch-ab,v 1.7 2020/09/19 13:50:48 taca Exp $
* Accept connection from localhost default.
* Use proper directory.
--- platforms/etc/apcupsd.conf.in.orig 2007-06-15 22:21:18.000000000 +0200
+++ platforms/etc/apcupsd.conf.in 2007-06-15 22:28:16.000000000 +0200

View file

@ -1,4 +1,6 @@
$NetBSD: patch-ac,v 1.4 2006/11/15 21:46:25 bouyer Exp $
$NetBSD: patch-ac,v 1.5 2020/09/19 13:50:48 taca Exp $
* Use proper directory.
--- include/defines.h.orig 2006-11-15 17:33:07.000000000 +0100
+++ include/defines.h 2006-11-15 17:33:22.000000000 +0100

View file

@ -1,4 +1,6 @@
$NetBSD: patch-ad,v 1.5 2012/05/07 12:55:23 shattered Exp $
$NetBSD: patch-ad,v 1.6 2020/09/19 13:50:48 taca Exp $
* apccontrol script.
--- platforms/netbsd/apccontrol.in.orig 2012-04-21 20:53:17.000000000 +0000
+++ platforms/netbsd/apccontrol.in

View file

@ -1,4 +1,8 @@
$NetBSD: patch-ae,v 1.7 2011/08/01 14:54:51 bouyer Exp $
$NetBSD: patch-ae,v 1.8 2020/09/19 13:50:48 taca Exp $
* Fix for pkgsrc environment.
* Add Dragonfly support.
* Add apccontrol script on NetBSD.
--- autoconf/configure.in.orig 2010-09-02 16:23:39.000000000 +0200
+++ autoconf/configure.in 2011-08-01 15:40:05.000000000 +0200

View file

@ -1,4 +1,6 @@
$NetBSD: patch-af,v 1.8 2016/01/28 15:51:34 prlw1 Exp $
$NetBSD: patch-af,v 1.9 2020/09/19 13:50:48 taca Exp $
* Fix installation for pkgsrc.
--- src/Makefile.orig 2014-11-04 19:17:43.000000000 +0000
+++ src/Makefile

View file

@ -1,4 +1,6 @@
$NetBSD: patch-ag,v 1.5 2011/08/01 14:54:51 bouyer Exp $
$NetBSD: patch-ag,v 1.6 2020/09/19 13:50:48 taca Exp $
* Fix installation for pkgsrc.
--- platforms/etc/Makefile.orig 2011-08-01 16:13:04.000000000 +0200
+++ platforms/etc/Makefile 2011-08-01 16:13:13.000000000 +0200

View file

@ -1,14 +1,96 @@
$NetBSD: patch-ah,v 1.4 2007/06/15 21:15:39 bouyer Exp $
$NetBSD: patch-ah,v 1.5 2020/09/19 13:50:48 taca Exp $
--- platforms/netbsd/apcupsd.in.orig 2002-05-28 15:34:05.000000000 +0200
+++ platforms/netbsd/apcupsd.in 2007-01-05 20:52:42.000000000 +0100
@@ -6,6 +6,9 @@
# chkconfig: 2345 20 99
# description: apcupsd monitors power and takes action if necessary
Use standard NetBSD rc(8) scheme.
--- platforms/netbsd/apcupsd.in.orig 2002-05-28 13:34:53.000000000 +0000
+++ platforms/netbsd/apcupsd.in
@@ -1,49 +1,50 @@
-#! /bin/sh
+#!/bin/sh
#
# apcupsd This shell script takes care of starting and stopping
# the apcupsd UPS monitoring daemon.
#
-# chkconfig: 2345 20 99
-# description: apcupsd monitors power and takes action if necessary
+# PROVIDE: apcupsd
+# REQUIRE: DAEMON
+#
APCPID=@PIDDIR@/apcupsd.pid
APCLOCK=@PIDDIR@/apcupsd.lock
#
-APCPID=@PIDDIR@/apcupsd.pid
-APCLOCK=@PIDDIR@/apcupsd.lock
DISTVER="@DISTVER@"
-return=" Done."
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
+name="apcupsd"
+rcvar=$name
+command="@sbindir@/${name}"
+pidfile="@PIDDIR@/${name}.pid"
+apclock="@PIDDIR@/${name}.lock"
+command_args="--kill-on-powerfail"
+extra_commands="info"
-case "$1" in
- start)
- rm -f @PWRFAILDIR@/powerfail
- rm -f @nologdir@/nologin
- echo -n "Starting apcupsd power management"
- @sbindir@/apcupsd --kill-on-powerfail || return=" Failed."
- touch $APCLOCK
- echo -e "$return"
- ;;
- stop)
- echo -n "Stopping apcupsd power management"
- if [ -f ${APCPID} ]; then
- THEPID=`cat ${APCPID}`
- kill ${THEPID} || return=" Failed."
- rm -f ${APCPID}
- else
- return=" Failed."
- fi
- rm -f $APCLOCK
- echo -e "$return"
- ;;
- restart)
- $0 stop
- $0 start
- ;;
- status)
- @sbindir@/apcaccess status
- ;;
- *)
- echo "Usage: $0 {start|stop|restart|status}"
- exit 1
-esac
+apcupsd_start_precmd()
+{
+ rm -f @PWRFAILDIR@/powerfail
+}
-exit 0
+apcupsd_start_postcmd()
+{
+ touch $apclock
+}
+
+apcupsd_stop_postcmd()
+{
+ rm -f $apclock
+}
+
+apcupsd_info()
+{
+ @sbindir@/apcaccess status
+}
+
+
+start_precmd=apcupsd_start_precmd
+start_postcmd=apcupsd_start_postcmd
+stop_postcmd=apcupsd_stop_postcmd
+info_cmd=apcupsd_info
+
+load_rc_config $name
+run_rc_command "$1"

View file

@ -1,4 +1,6 @@
$NetBSD: patch-ai,v 1.5 2011/08/01 14:54:51 bouyer Exp $
$NetBSD: patch-ai,v 1.6 2020/09/19 13:50:48 taca Exp $
* Fix installation for pkgsrc.
--- platforms/netbsd/Makefile.orig 2011-08-01 15:45:29.000000000 +0200
+++ platforms/netbsd/Makefile 2011-08-01 15:45:49.000000000 +0200

View file

@ -1,4 +1,8 @@
$NetBSD: patch-aj,v 1.9 2016/01/28 15:51:34 prlw1 Exp $
$NetBSD: patch-aj,v 1.10 2020/09/19 13:50:48 taca Exp $
* Fix for pkgsrc environment.
* Add Dragonfly support.
* Add apccontrol script on NetBSD.
--- configure.orig 2015-01-04 20:35:43.000000000 +0000
+++ configure

View file

@ -1,4 +1,7 @@
$NetBSD: patch-an,v 1.8 2016/01/28 15:51:34 prlw1 Exp $
$NetBSD: patch-an,v 1.9 2020/09/19 13:50:48 taca Exp $
* Rename upsimage.cgi to apcupsimage.cgi.
* Fix installation for pkgsrc.
--- src/cgi/Makefile.orig 2014-11-04 19:17:43.000000000 +0000
+++ src/cgi/Makefile

View file

@ -1,4 +1,6 @@
$NetBSD: patch-ao,v 1.7 2011/08/01 14:54:51 bouyer Exp $
$NetBSD: patch-ao,v 1.8 2020/09/19 13:50:48 taca Exp $
* Fix installation for pkgsrc.
--- platforms/Makefile.orig 2011-08-01 15:55:53.000000000 +0200
+++ platforms/Makefile 2011-08-01 15:56:26.000000000 +0200

View file

@ -1,4 +1,6 @@
$NetBSD: patch-ap,v 1.4 2012/02/19 18:21:58 bouyer Exp $
$NetBSD: patch-ap,v 1.5 2020/09/19 13:50:48 taca Exp $
* Fix installation for pkgsrc.
--- platforms/sun/Makefile.orig 2008-06-01 23:57:56.000000000 +0200
+++ platforms/sun/Makefile 2012-02-19 19:20:10.000000000 +0100