pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/sysutils/ups-nut



Module Name:    pkgsrc
Committed By:   gdt
Date:           Thu Nov  9 18:58:44 UTC 2023

Modified Files:
        pkgsrc/sysutils/ups-nut: DESCR Makefile Makefile.common PLIST
        pkgsrc/sysutils/ups-nut/files: upskillpower.sh

Log Message:
sysutils/ups-nut: Merge improvements from wip

  - install python interface to nut.  While in theory it probably
    ought to be in a split package, it seems overall useful relative
    to the burden of python, given that python is very likely
    installed anyway.
  - don't run asciidoc (the package didn't depend on it)
  - clean up MESSAGE_SUBST as MESSAGE is long gone
  - enable power down; it has been commented out


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/sysutils/ups-nut/DESCR
cvs rdiff -u -r1.72 -r1.73 pkgsrc/sysutils/ups-nut/Makefile
cvs rdiff -u -r1.13 -r1.14 pkgsrc/sysutils/ups-nut/Makefile.common
cvs rdiff -u -r1.31 -r1.32 pkgsrc/sysutils/ups-nut/PLIST
cvs rdiff -u -r1.2 -r1.3 pkgsrc/sysutils/ups-nut/files/upskillpower.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/sysutils/ups-nut/DESCR
diff -u pkgsrc/sysutils/ups-nut/DESCR:1.1 pkgsrc/sysutils/ups-nut/DESCR:1.2
--- pkgsrc/sysutils/ups-nut/DESCR:1.1   Wed Oct 31 22:54:04 2001
+++ pkgsrc/sysutils/ups-nut/DESCR       Thu Nov  9 18:58:44 2023
@@ -1,5 +1,7 @@
-This is a developing project to monitor a large assortment of UPS hardware.
+Network UPS Tools can monitor a large assortment of UPS hardware.
 Network communications are used so that multiple systems can monitor a
 single physical UPS and shut down together if necessary without any
-special "sharing hardware" on the UPS itself. CGI scripts are in the
-ups-nut-cgi package.
+special "sharing hardware" on the UPS itself.
+
+There are additional ups-nut-* packages for cgi, SNMP, and USB
+support.

Index: pkgsrc/sysutils/ups-nut/Makefile
diff -u pkgsrc/sysutils/ups-nut/Makefile:1.72 pkgsrc/sysutils/ups-nut/Makefile:1.73
--- pkgsrc/sysutils/ups-nut/Makefile:1.72       Thu Nov  9 16:41:15 2023
+++ pkgsrc/sysutils/ups-nut/Makefile    Thu Nov  9 18:58:44 2023
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.72 2023/11/09 16:41:15 gdt Exp $
+# $NetBSD: Makefile,v 1.73 2023/11/09 18:58:44 gdt Exp $
 
 .include "Makefile.common"
 
 PKGNAME=               ups-${DISTNAME}
+PKGREVISION=           1
 COMMENT=               Network UPS Tools
 
 SUBST_CLASSES+=                man-so
@@ -16,13 +17,23 @@ SUBST_NOOP_OK.man-so=       yes
 TOOLS_SCRIPT.perl=     exit 1
 
 CONFIGURE_ARGS+=       --with-drvpath=${NUT_DRVDIR:Q}
-CONFIGURE_ARGS+=       --with-altpidpath=${NUT_STATEDIR:Q}
 CONFIGURE_ARGS+=       --with-pidpath=${NUT_STATEDIR:Q}
+CONFIGURE_ARGS+=       --with-altpidpath=${NUT_STATEDIR:Q}
+
 # nut, bizarrely, does not install headers by default
 CONFIGURE_ARGS+=       --with-dev
-CONFIGURE_ARGS+=       --without-snmp  # provided by sysutils/ups-nut-snmp
-# nut is overly aggressive about installing python files; tell it not to.
-CONFIGURE_ARGS+=       --without-python2 --without-python3
+CONFIGURE_ARGS+=       --without-asciidoc
+
+CONFIGURE_ARGS+=       --without-snmp          # provided by sysutils/ups-nut-snmp
+CONFIGURE_ARGS+=       --without-usb           # provided by sysutils/ups-nut-usb
+CONFIGURE_ARGS+=       --without-nut_monitor   # not yet packaged
+
+# Disable python2 to workaround
+# https://github.com/networkupstools/nut/issues/1792 which upstream
+# declines to fix.
+CONFIGURE_ARGS+=       --without-python2
+CONFIGURE_ARGS+=       --with-python=${PYTHONBIN}
+# \todo Move to split package.
 
 PKG_GROUPS_VARS+=      NUT_GROUP
 PKG_USERS_VARS+=       NUT_USER
@@ -31,10 +42,6 @@ BUILD_DEFS+=         NUT_STATEDIR VARBASE
 FILES_SUBST+=          NUT_CONFDIR=${NUT_CONFDIR:Q}
 FILES_SUBST+=          NUT_STATEDIR=${NUT_STATEDIR:Q}
 
-MESSAGE_SUBST+=                NUT_CONFDIR=${NUT_CONFDIR}
-MESSAGE_SUBST+=                NUT_EGDIR=${NUT_EGDIR}
-MESSAGE_SUBST+=                NUT_DOCDIR=${NUT_DOCDIR}
-
 PKG_GROUPS=            ${NUT_GROUP}
 PKG_USERS=             ${NUT_USER}:${NUT_GROUP}
 PKG_GECOS.${NUT_USER}= Network UPS Tools
@@ -57,6 +64,8 @@ CONF_FILES_PERMS+=    ${NUT_EGDIR}/upsmon.c
                        ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0600
 RCD_SCRIPTS=           ups upskillpower upsdriver upsd upsmon upslog
 
+PY_PATCHPLIST=         yes
+
 OWN_DIRS=              ${NUT_CONFDIR}
 OWN_DIRS_PERMS=                ${NUT_STATEDIR} ${NUT_USER} ${NUT_GROUP} 0770
 
@@ -81,4 +90,5 @@ post-install:
 
 # nut-scanner needs libltdl, but this is not documented
 .include "../../devel/libltdl/buildlink3.mk"
+.include "../../lang/python/extension.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/sysutils/ups-nut/Makefile.common
diff -u pkgsrc/sysutils/ups-nut/Makefile.common:1.13 pkgsrc/sysutils/ups-nut/Makefile.common:1.14
--- pkgsrc/sysutils/ups-nut/Makefile.common:1.13        Thu Nov  9 16:41:15 2023
+++ pkgsrc/sysutils/ups-nut/Makefile.common     Thu Nov  9 18:58:44 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.13 2023/11/09 16:41:15 gdt Exp $
+# $NetBSD: Makefile.common,v 1.14 2023/11/09 18:58:44 gdt Exp $
 # used by sysutils/ups-nut/Makefile
 # used by sysutils/ups-nut-cgi/Makefile
 # used by sysutils/ups-nut-snmp/Makefile
@@ -45,5 +45,6 @@ NUT_DATADIR=          ${PREFIX}/share/nut
 NUT_DOCDIR=            ${PREFIX}/share/doc/nut
 NUT_DRVDIR=            ${PREFIX}/libexec/nut
 NUT_EGDIR=             ${PREFIX}/share/examples/nut
+# \todo Change to /var/run rather than /var/db
 NUT_STATEDIR?=         ${VARBASE}/db/nut
 NUT_CGIDIR=            ${PREFIX}/libexec/cgi-bin

Index: pkgsrc/sysutils/ups-nut/PLIST
diff -u pkgsrc/sysutils/ups-nut/PLIST:1.31 pkgsrc/sysutils/ups-nut/PLIST:1.32
--- pkgsrc/sysutils/ups-nut/PLIST:1.31  Thu Nov  9 16:41:15 2023
+++ pkgsrc/sysutils/ups-nut/PLIST       Thu Nov  9 18:58:44 2023
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.31 2023/11/09 16:41:15 gdt Exp $
+@comment $NetBSD: PLIST,v 1.32 2023/11/09 18:58:44 gdt Exp $
 bin/nut-scanner
 bin/upsc
 bin/upscmd
@@ -22,6 +22,8 @@ lib/pkgconfig/libnutclient.pc
 lib/pkgconfig/libnutclientstub.pc
 lib/pkgconfig/libnutscan.pc
 lib/pkgconfig/libupsclient.pc
+${PYSITELIB}/PyNUT.py
+${PYSITELIB}/test_nutclient.py
 libexec/nut/al175
 libexec/nut/apcsmart
 libexec/nut/apcsmart-old

Index: pkgsrc/sysutils/ups-nut/files/upskillpower.sh
diff -u pkgsrc/sysutils/ups-nut/files/upskillpower.sh:1.2 pkgsrc/sysutils/ups-nut/files/upskillpower.sh:1.3
--- pkgsrc/sysutils/ups-nut/files/upskillpower.sh:1.2   Thu Jun 22 05:31:07 2023
+++ pkgsrc/sysutils/ups-nut/files/upskillpower.sh       Thu Nov  9 18:58:44 2023
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: upskillpower.sh,v 1.2 2023/06/22 05:31:07 wiz Exp $
+# $NetBSD: upskillpower.sh,v 1.3 2023/11/09 18:58:44 gdt Exp $
 #
 # PROVIDE: upskillpower
 # REQUIRE: mountcritremote
@@ -26,7 +26,7 @@ killpower()
 {
     if @PREFIX@/sbin/upsmon -K; then
        echo "upskillpower: POWER OFF commanded"
-       echo TEST ONLY @PREFIX@/sbin/upsdrvctl shutdown
+       @PREFIX@/sbin/upsdrvctl shutdown
     fi
 }
 



Home | Main Index | Thread Index | Old Index