Update apcupsd to 3.14.11. This brings us support for new APC MODBUS
protocol used in the newest APC UPSes. - use stricter modes for scripts and data - drop apcupsd.conf.5 patch (patch from schwarze@ was commited upstream) - use ${VARBASE} instead of hardcoded /var Reads good to jasper@
This commit is contained in:
parent
ba5ef0d02c
commit
ac5a99a5ea
@ -1,16 +1,13 @@
|
||||
# $OpenBSD: Makefile,v 1.21 2014/01/24 10:48:23 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.22 2014/02/04 18:34:14 kirby Exp $
|
||||
|
||||
COMMENT-main = daemon for controlling APC UPSes
|
||||
COMMENT-cgi = CGI scripts for web monitoring
|
||||
COMMENT-x11 = gapcmon - GUI for apcupsd
|
||||
|
||||
DISTNAME = apcupsd-3.14.10
|
||||
DISTNAME = apcupsd-3.14.11
|
||||
PKGNAME-main = ${DISTNAME}
|
||||
PKGNAME-cgi = ${DISTNAME:S/-/-cgi-/}
|
||||
PKGNAME-x11 = ${DISTNAME:S/-/-x11-/}
|
||||
REVISION-main = 3
|
||||
REVISION-cgi = 1
|
||||
REVISION-x11 = 2
|
||||
|
||||
CATEGORIES = sysutils
|
||||
|
||||
@ -32,7 +29,7 @@ USE_GMAKE = Yes
|
||||
NO_TEST = Yes
|
||||
MAKE_FLAGS = VERBOSE=2
|
||||
|
||||
WEB_ROOT = /var/www
|
||||
WEB_ROOT = ${VARBASE}/www
|
||||
SUBST_VARS += WEB_ROOT ^BASESYSCONFDIR
|
||||
SYSCONFDIR = ${BASESYSCONFDIR}/apcupsd
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (apcupsd-3.14.10.tar.gz) = Bwe17JkW+96eROuNGAN8jY9139au71GrpUh+GJ7vIDI=
|
||||
SIZE (apcupsd-3.14.10.tar.gz) = 1336852
|
||||
SHA256 (apcupsd-3.14.11.tar.gz) = rcct6JpwSIHXx0VPf5jefQMYECsrCP5AD04cxNpGK3M=
|
||||
SIZE (apcupsd-3.14.11.tar.gz) = 2070896
|
||||
|
@ -1,17 +0,0 @@
|
||||
$OpenBSD: patch-doc_apcupsd_conf_5,v 1.1 2011/08/30 09:59:30 sthen Exp $
|
||||
--- doc/apcupsd.conf.5.orig Wed May 6 01:51:26 2009
|
||||
+++ doc/apcupsd.conf.5 Mon Jul 25 10:10:31 2011
|
||||
@@ -1,5 +1,4 @@
|
||||
.\" manual page [] for apcupsd.conf version 3.14.6
|
||||
-.Pp
|
||||
.Dd January 10, 2009
|
||||
.Dt APCUPSD.CONF 5
|
||||
.Os apcupsd.conf v3.14.6
|
||||
@@ -82,7 +81,6 @@ for most situations.
|
||||
apcupsd creates a lockfile for the serial or USB port in the specified
|
||||
directory. It must be changed when running more than one copy of apcupsd
|
||||
on the same computer to control multiple UPSes.
|
||||
-
|
||||
.It SCRIPTDIR <path>
|
||||
.Pp
|
||||
Directory in which apccontrol and event scripts are located.
|
25
sysutils/apcupsd/patches/patch-platforms_etc_Makefile
Normal file
25
sysutils/apcupsd/patches/patch-platforms_etc_Makefile
Normal file
@ -0,0 +1,25 @@
|
||||
$OpenBSD: patch-platforms_etc_Makefile,v 1.1 2014/02/04 18:34:14 kirby Exp $
|
||||
|
||||
These scripts should be executed only by root.
|
||||
|
||||
--- platforms/etc/Makefile.orig Sat Jan 25 01:59:23 2014
|
||||
+++ platforms/etc/Makefile Sat Jan 25 02:00:05 2014
|
||||
@@ -8,12 +8,12 @@ all-uninstall: uninstall-etc
|
||||
|
||||
install-etc:
|
||||
$(call MKDIR,$(sysconfdir))
|
||||
- $(call INSTNEW,644,apcupsd.conf,$(sysconfdir))
|
||||
- $(call INSTORIG,744,changeme,$(sysconfdir))
|
||||
- $(call INSTORIG,744,commfailure,$(sysconfdir))
|
||||
- $(call INSTORIG,744,commok,$(sysconfdir))
|
||||
- $(call INSTORIG,744,offbattery,$(sysconfdir))
|
||||
- $(call INSTORIG,744,onbattery,$(sysconfdir))
|
||||
+ $(call INSTNEW,444,apcupsd.conf,$(sysconfdir))
|
||||
+ $(call INSTORIG,500,changeme,$(sysconfdir))
|
||||
+ $(call INSTORIG,500,commfailure,$(sysconfdir))
|
||||
+ $(call INSTORIG,500,commok,$(sysconfdir))
|
||||
+ $(call INSTORIG,500,offbattery,$(sysconfdir))
|
||||
+ $(call INSTORIG,500,onbattery,$(sysconfdir))
|
||||
|
||||
uninstall-etc:
|
||||
|
@ -1,11 +1,11 @@
|
||||
$OpenBSD: patch-src_drivers_usb_bsd_bsd-usb_c,v 1.1 2011/02/02 21:56:04 jakemsr Exp $
|
||||
$OpenBSD: patch-src_drivers_usb_bsd_bsd-usb_c,v 1.2 2014/02/04 18:34:14 kirby Exp $
|
||||
|
||||
the USB_DEVICEINFO ioctl only needs read access. open the bus O_RDONLY
|
||||
to not require write permission.
|
||||
|
||||
--- src/drivers/usb/bsd/bsd-usb.c.orig Tue Feb 1 16:26:15 2011
|
||||
+++ src/drivers/usb/bsd/bsd-usb.c Tue Feb 1 16:26:15 2011
|
||||
@@ -246,7 +246,7 @@ static int open_usb_device(UPSINFO *ups)
|
||||
--- src/drivers/usb/bsd/bsd-usb.c.orig Mon Feb 11 19:21:50 2013
|
||||
+++ src/drivers/usb/bsd/bsd-usb.c Fri Jan 31 21:46:58 2014
|
||||
@@ -217,7 +217,7 @@ int BsdUsbUpsDriver::open_usb_device()
|
||||
/* Max of 10 USB busses */
|
||||
for (i = 0; i < 10; i++) {
|
||||
busname[8] = '0' + i;
|
||||
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST-cgi,v 1.2 2014/01/08 20:46:18 kirby Exp $
|
||||
@comment $OpenBSD: PLIST-cgi,v 1.3 2014/02/04 18:34:14 kirby Exp $
|
||||
@conflict apcupsd-<=3.14.10p1
|
||||
cgi-bin/apcupsd/
|
||||
@group bin
|
||||
@ -16,8 +16,12 @@ share/examples/apcupsd/etc/
|
||||
@sample ${SYSCONFDIR}/
|
||||
share/examples/apcupsd/etc/apcupsd.css
|
||||
@sample ${SYSCONFDIR}/apcupsd.css
|
||||
@mode 444
|
||||
share/examples/apcupsd/etc/hosts.conf
|
||||
@mode
|
||||
@sample ${SYSCONFDIR}/hosts.conf
|
||||
@mode 444
|
||||
share/examples/apcupsd/etc/multimon.conf
|
||||
@mode
|
||||
@sample ${SYSCONFDIR}/multimon.conf
|
||||
share/doc/pkg-readmes/${FULLPKGNAME}
|
||||
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST-main,v 1.5 2014/01/24 10:48:24 espie Exp $
|
||||
@comment $OpenBSD: PLIST-main,v 1.6 2014/02/04 18:34:14 kirby Exp $
|
||||
@pkgpath sysutils/apcupsd,snmp
|
||||
@group bin
|
||||
@man man/man5/apcupsd.conf.5
|
||||
@ -27,25 +27,25 @@ share/examples/apcupsd/
|
||||
share/examples/apcupsd/etc/
|
||||
@sample ${SYSCONFDIR}/
|
||||
share/examples/apcupsd/etc/apccontrol
|
||||
@mode 744
|
||||
@mode 750
|
||||
@sample ${SYSCONFDIR}/apccontrol
|
||||
@mode
|
||||
share/examples/apcupsd/etc/apcupsd.conf
|
||||
@sample ${SYSCONFDIR}/apcupsd.conf
|
||||
share/examples/apcupsd/etc/changeme
|
||||
@mode 744
|
||||
@mode 700
|
||||
@sample ${SYSCONFDIR}/changeme
|
||||
@mode
|
||||
share/examples/apcupsd/etc/commfailure
|
||||
@mode 744
|
||||
@mode 700
|
||||
@sample ${SYSCONFDIR}/commfailure
|
||||
@mode
|
||||
share/examples/apcupsd/etc/commok
|
||||
@mode 744
|
||||
@mode 700
|
||||
@sample ${SYSCONFDIR}/commok
|
||||
@mode
|
||||
share/examples/apcupsd/etc/offbattery
|
||||
@mode 744
|
||||
@mode 700
|
||||
@sample ${SYSCONFDIR}/offbattery
|
||||
@mode
|
||||
share/examples/apcupsd/etc/onbattery
|
||||
|
@ -1,15 +1,17 @@
|
||||
@comment $OpenBSD: PLIST-x11,v 1.1.1.1 2010/05/25 21:56:33 sthen Exp $
|
||||
@comment $OpenBSD: PLIST-x11,v 1.2 2014/02/04 18:34:14 kirby Exp $
|
||||
@group bin
|
||||
@bin bin/gapcmon
|
||||
share/applications/gapcmon.desktop
|
||||
@group
|
||||
share/pixmaps/
|
||||
@group bin
|
||||
@mode 444
|
||||
share/pixmaps/apcupsd.png
|
||||
share/pixmaps/charging.png
|
||||
share/pixmaps/gapc_prefs.png
|
||||
share/pixmaps/onbatt.png
|
||||
share/pixmaps/online.png
|
||||
share/pixmaps/unplugged.png
|
||||
@mode
|
||||
@exec %D/bin/update-desktop-database
|
||||
@unexec-delete %D/bin/update-desktop-database
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: README-cgi,v 1.1 2014/01/08 20:46:18 kirby Exp $
|
||||
$OpenBSD: README-cgi,v 1.2 2014/02/04 18:34:14 kirby Exp $
|
||||
|
||||
+-----------------------------------------------------------------------
|
||||
| Running ${FULLPKGNAME} on OpenBSD
|
||||
@ -11,8 +11,8 @@ This switch is on by default.
|
||||
|
||||
To run scripts in chrooted apache (default behaviour), configuration
|
||||
files must be available to the webserver:
|
||||
# mv ${SYSCONFDIR} /var/www/${SYSCONFDIR}
|
||||
# ln -s /var/www/${SYSCONFDIR} ${BASESYSCONFDIR}/
|
||||
# mv ${SYSCONFDIR} ${WEB_ROOT}/${SYSCONFDIR}
|
||||
# ln -s ${WEB_ROOT}/${SYSCONFDIR} ${BASESYSCONFDIR}/
|
||||
|
||||
And some libraries must be copied in:
|
||||
# ${WEB_ROOT}/cgi-bin/apcupsd/copy-libs.sh
|
||||
|
Loading…
x
Reference in New Issue
Block a user