pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
ups-nut: Align to pkgsrc and update to 2.8.4 beta
Module Name: pkgsrc-wip
Committed By: Greg Troxel <gdt%lexort.com@localhost>
Pushed By: gdt
Date: Fri Aug 1 10:32:52 2025 -0400
Changeset: aa4118d7379ef9aef25bc292b4af63e2e3fa0bd2
Modified Files:
ups-nut/DESCR
ups-nut/Makefile
ups-nut/Makefile.common
ups-nut/PLIST
ups-nut/PLIST.SunOS
ups-nut/distinfo
ups-nut/files/ups.sh
ups-nut/files/upskillpower.sh
ups-nut/options.mk
ups-nut/patches/patch-conf_Makefile.in
ups-nut/patches/patch-drivers_libusb0.c
Added Files:
ups-nut/patches/patch-server_sockdebug.c
Log Message:
ups-nut: Align to pkgsrc and update to 2.8.4 beta
- Sync from pkgsrc (overdue)
- change version to today's git master, heading to 2.8.4
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=aa4118d7379ef9aef25bc292b4af63e2e3fa0bd2
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
ups-nut/DESCR | 3 +--
ups-nut/Makefile | 39 +++++++++++++++++++-------------
ups-nut/Makefile.common | 8 +++++--
ups-nut/PLIST | 15 ++++++++----
ups-nut/PLIST.SunOS | 4 +++-
ups-nut/distinfo | 7 +++---
ups-nut/files/ups.sh | 4 ++--
ups-nut/files/upskillpower.sh | 2 +-
ups-nut/options.mk | 15 ++++++++++--
ups-nut/patches/patch-conf_Makefile.in | 2 +-
ups-nut/patches/patch-drivers_libusb0.c | 2 +-
ups-nut/patches/patch-server_sockdebug.c | 21 +++++++++++++++++
12 files changed, 87 insertions(+), 35 deletions(-)
diffs:
diff --git a/ups-nut/DESCR b/ups-nut/DESCR
index facab20bb4..4f84b73fca 100644
--- a/ups-nut/DESCR
+++ b/ups-nut/DESCR
@@ -7,5 +7,4 @@ There are additional ups-nut-* packages for cgi, SNMP, and USB
support.
This package tracks the NUT git repository, and sometimes includes
-proposed changes or experimental changes. It is not suitable for
-production systems.
+proposed changes or experimental changes.
diff --git a/ups-nut/Makefile b/ups-nut/Makefile
index 4fb8471071..3e14531278 100644
--- a/ups-nut/Makefile
+++ b/ups-nut/Makefile
@@ -1,10 +1,12 @@
-# $NetBSD: Makefile,v 1.76 2024/04/03 17:42:53 gdt Exp $
+# $NetBSD: Makefile,v 1.81 2025/05/31 13:58:38 gdt Exp $
.include "Makefile.common"
PKGNAME= ups-${DISTNAME}
COMMENT= Network UPS Tools
+PLIST_VARS+= python
+
SUBST_CLASSES+= man-so
SUBST_MESSAGE.man-so= Fixing manpage .so references.
SUBST_STAGE.man-so= pre-build
@@ -16,13 +18,17 @@ SUBST_NOOP_OK.man-so= yes
TOOLS_SCRIPT.perl= exit 1
CONFIGURE_ARGS+= --with-drvpath=${NUT_DRVDIR:Q}
-CONFIGURE_ARGS+= --with-pidpath=${NUT_STATEDIR:Q}
-CONFIGURE_ARGS+= --with-altpidpath=${NUT_STATEDIR:Q}
+CONFIGURE_ARGS+= --with-pidpath=${NUT_RUNDIR:Q}
+CONFIGURE_ARGS+= --with-altpidpath=${NUT_RUNDIR:Q}
# nut, bizarrely, does not install headers by default
CONFIGURE_ARGS+= --with-dev
CONFIGURE_ARGS+= --without-asciidoc
+# Auto-enables if prereqs (not documented) are present. Unclear
+# usefulness, so until rationale to enable (and patch), disable.
+CONFIGURE_ARGS+= --disable-extapi-enphase
+
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
@@ -31,22 +37,20 @@ CONFIGURE_ARGS+= --without-nut_monitor # not yet packaged
# https://github.com/networkupstools/nut/issues/1792 which upstream
# declines to fix.
CONFIGURE_ARGS+= --without-python2
-# Force only our chosen python3 (same reason as above).
-CONFIGURE_ARGS+= --with-python3=${PYTHONBIN}
-CONFIGURE_ARGS+= --with-python=${PYTHONBIN}
-# \todo Move to split package.
PKG_GROUPS_VARS+= NUT_GROUP
PKG_USERS_VARS+= NUT_USER
-BUILD_DEFS+= NUT_STATEDIR VARBASE
+BUILD_DEFS+= NUT_RUNDIR NUT_STATEDIR VARBASE
FILES_SUBST+= NUT_CONFDIR=${NUT_CONFDIR:Q}
FILES_SUBST+= NUT_STATEDIR=${NUT_STATEDIR:Q}
-PKG_GROUPS= ${NUT_GROUP}
PKG_USERS= ${NUT_USER}:${NUT_GROUP}
+PKG_GROUPS= ${NUT_GROUP}
PKG_GECOS.${NUT_USER}= Network UPS Tools
+# \todo Remove or justify.
PKG_HOME.${NUT_USER}= ${NUT_STATEDIR}
+# \todo Remove or justify.
PKG_SHELL.${NUT_USER}= ${SH}
CONF_FILES= ${NUT_EGDIR}/nut.conf.sample ${NUT_CONFDIR}/nut.conf
@@ -68,30 +72,33 @@ RCD_SCRIPTS= ups upskillpower upsdriver upsd upsmon upslog
PY_PATCHPLIST= yes
OWN_DIRS= ${NUT_CONFDIR}
+# \todo Explain why this is 770 instead of 755.
OWN_DIRS_PERMS= ${NUT_STATEDIR} ${NUT_USER} ${NUT_GROUP} 0770
-INSTALLATION_DIRS+= ${NUT_EGDIR} ${NUT_DOCDIR}/cables ${NUT_DOCDIR}/drivers
+INSTALLATION_DIRS+= ${NUT_EGDIR}
+INSTALLATION_DIRS+= ${NUT_DOCDIR} ${NUT_DOCDIR}/cables ${NUT_DOCDIR}/detailed
+# \todo Drop, after understanding why it is here.
+INSTALLATION_DIRS+= ${NUT_DOCDIR}/drivers
CHECK_INTERPRETER_SKIP+= share/nut/solaris-init/nut
post-install:
- ${INSTALL_DATA_DIR} ${DESTDIR}${NUT_EGDIR}
${MV} ${DESTDIR}${NUT_CONFDIR}/*.sample ${DESTDIR}${NUT_EGDIR}
- ${INSTALL_DATA_DIR} ${DESTDIR}${NUT_DOCDIR}
- ${INSTALL_DATA_DIR} ${DESTDIR}${NUT_DOCDIR}/detailed
for f in AUTHORS COPYING ChangeLog NEWS.adoc README.adoc UPGRADING.adoc; do \
${INSTALL_DATA} ${WRKSRC}/$$f ${DESTDIR}${NUT_DOCDIR}; \
done
+ for f in ${WRKSRC}/docs/cables/*.txt; do \
+ ${INSTALL_DATA} $$f ${DESTDIR}${NUT_DOCDIR}/cables; \
+ done
for f in ${WRKSRC}/docs/*.txt; do \
${INSTALL_DATA} $$f ${DESTDIR}${NUT_DOCDIR}/detailed; \
done
- for f in ${WRKSRC}/docs/cables/*.txt; do \
- ${INSTALL_DATA} $$f ${DESTDIR}${NUT_DOCDIR}/cables/; \
- done
TEST_TARGET= check
# nut-scanner needs libltdl, but this is not documented
.include "../../devel/libltdl/buildlink3.mk"
+.if !empty(PKG_OPTIONS:Mpython)
.include "../../lang/python/extension.mk"
+.endif
.include "../../mk/bsd.pkg.mk"
diff --git a/ups-nut/Makefile.common b/ups-nut/Makefile.common
index 1db5c176d5..0cab528652 100644
--- a/ups-nut/Makefile.common
+++ b/ups-nut/Makefile.common
@@ -6,7 +6,7 @@
# used by wip/p5-UPS-Nut/Makefile
# 2.8.3-rc5
-DISTNAME= nut-2.8.2.2878
+DISTNAME= nut-2.8.3.724
CATEGORIES= sysutils
#MASTER_SITES= http://www.networkupstools.org/source/${PKGVERSION_NOREV:R}/
MASTER_SITES= https://www.NetBSD.org/~gdt/
@@ -23,6 +23,8 @@ DISTINFO_FILE= ${.CURDIR}/../../wip/ups-nut/distinfo
PATCHDIR= ${.CURDIR}/../../wip/ups-nut/patches
USE_TOOLS= pkg-config
+# \todo File upstream bug. (email 20250801)
+USE_TOOLS+= gsed
USE_LIBTOOL= yes
USE_LANGUAGES= c c++
GNU_CONFIGURE= yes
@@ -47,6 +49,8 @@ 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
+# \todo RUNDIR is used for pidfiles and socckets, and thus should be /var/run/nut.
+# Move creation from OWN_DIRS_PERMS into rc.d/upsd.
+NUT_RUNDIR?= ${VARBASE}/db/nut
NUT_CGIDIR= ${PREFIX}/libexec/cgi-bin
diff --git a/ups-nut/PLIST b/ups-nut/PLIST
index 07655945fb..4561433994 100644
--- a/ups-nut/PLIST
+++ b/ups-nut/PLIST
@@ -23,8 +23,8 @@ lib/pkgconfig/libnutclient.pc
lib/pkgconfig/libnutclientstub.pc
lib/pkgconfig/libnutscan.pc
lib/pkgconfig/libupsclient.pc
-${PYSITELIB}/PyNUT.py
-${PYSITELIB}/test_nutclient.py
+${PLIST.python}${PYSITELIB}/PyNUT.py
+${PLIST.python}${PYSITELIB}/test_nutclient.py
libexec/nut/al175
libexec/nut/apcsmart
libexec/nut/apcsmart-old
@@ -43,6 +43,7 @@ libexec/nut/clone-outlet
libexec/nut/dummy-ups
libexec/nut/etapro
libexec/nut/everups
+libexec/nut/failover
libexec/nut/gamatronic
libexec/nut/genericups
libexec/nut/isbmex
@@ -56,12 +57,14 @@ libexec/nut/mge-shut
libexec/nut/mge-utalk
libexec/nut/microdowell
libexec/nut/microsol-apc
+libexec/nut/nutdrv_hashx
libexec/nut/nutdrv_qx
libexec/nut/nutdrv_siemens-sitop
libexec/nut/oneac
libexec/nut/optiups
libexec/nut/powercom
libexec/nut/powerpanel
+libexec/nut/powervar_cx_ser
libexec/nut/rhino
libexec/nut/riello_ser
libexec/nut/safenet
@@ -71,6 +74,7 @@ libexec/nut/solis
libexec/nut/tripplite
libexec/nut/tripplitesu
libexec/nut/upscode2
+libexec/nut/ve-direct
libexec/nut/victronups
libexec/sockdebug
man/man3/libnutclient.3
@@ -166,6 +170,7 @@ man/man5/upsd.conf.5
man/man5/upsd.users.5
man/man5/upsmon.conf.5
man/man5/upssched.conf.5
+man/man7/nut.7
man/man8/al175.8
man/man8/apcsmart-old.8
man/man8/apcsmart.8
@@ -184,6 +189,7 @@ man/man8/clone.8
man/man8/dummy-ups.8
man/man8/etapro.8
man/man8/everups.8
+man/man8/failover.8
man/man8/gamatronic.8
man/man8/genericups.8
man/man8/isbmex.8
@@ -197,10 +203,10 @@ man/man8/mge-shut.8
man/man8/mge-utalk.8
man/man8/microdowell.8
man/man8/microsol-apc.8
-man/man8/nut-driver-enumerator.8
man/man8/nut-recorder.8
man/man8/nut-scanner.8
man/man8/nutconf.8
+man/man8/nutdrv_hashx.8
man/man8/nutdrv_qx.8
man/man8/nutdrv_siemens_sitop.8
man/man8/nutupsdrv.8
@@ -208,6 +214,7 @@ man/man8/oneac.8
man/man8/optiups.8
man/man8/powercom.8
man/man8/powerpanel.8
+man/man8/powervar_cx_ser.8
man/man8/rhino.8
man/man8/riello_ser.8
man/man8/safenet.8
@@ -221,11 +228,11 @@ man/man8/upscmd.8
man/man8/upscode2.8
man/man8/upsd.8
man/man8/upsdrvctl.8
-man/man8/upsdrvsvcctl.8
man/man8/upslog.8
man/man8/upsmon.8
man/man8/upsrw.8
man/man8/upssched.8
+man/man8/ve-direct.8
man/man8/victronups.8
sbin/upsd
sbin/upsdrvctl
diff --git a/ups-nut/PLIST.SunOS b/ups-nut/PLIST.SunOS
index fd9fc8b2c5..07f30f606f 100644
--- a/ups-nut/PLIST.SunOS
+++ b/ups-nut/PLIST.SunOS
@@ -1,12 +1,14 @@
-@comment $NetBSD: PLIST.SunOS,v 1.2 2023/12/01 19:18:28 jperkin Exp $
+@comment $NetBSD: PLIST.SunOS,v 1.3 2025/05/22 12:46:35 jperkin Exp $
libexec/nut-driver-enumerator.sh
sbin/upsdrvsvcctl
share/nut/solaris-init/nut
share/nut/solaris-init/reset-ups-usb-solaris.sh.sample
share/nut/solaris-smf/manifest/nut-driver-enumerator.xml
share/nut/solaris-smf/manifest/nut-driver.xml
+share/nut/solaris-smf/manifest/nut-logger.xml
share/nut/solaris-smf/manifest/nut-monitor.xml
share/nut/solaris-smf/manifest/nut-server.xml
share/nut/solaris-smf/manifest/nut.xml
+share/nut/solaris-smf/method/svc-nut-logger
share/nut/solaris-smf/method/svc-nut-monitor
share/nut/solaris-smf/method/svc-nut-server
diff --git a/ups-nut/distinfo b/ups-nut/distinfo
index 6397fa3a1b..7831bf0990 100644
--- a/ups-nut/distinfo
+++ b/ups-nut/distinfo
@@ -1,10 +1,11 @@
$NetBSD: distinfo,v 1.41 2023/11/09 16:41:15 gdt Exp $
-BLAKE2s (nut-2.8.2.2878.tar.gz) = 6cfe8e7da4df9927ba204c0fb3d7dbd31d6cb0011e73da0179276c46abfa21d9
-SHA512 (nut-2.8.2.2878.tar.gz) = 70e928db59a19732b4b53c6cc5ee82b368395eebb16cca66001cea72560f9586e41dd49b1b9bf1a7bc1bc841222479b3b065b2f60a081e09a55504ca15851ac8
-Size (nut-2.8.2.2878.tar.gz) = 6223192 bytes
+BLAKE2s (nut-2.8.3.724.tar.gz) = b6a6f88fc7f1f807c9346b6074f3d8baa383ab0bb2a445601a2145049f6b2d53
+SHA512 (nut-2.8.3.724.tar.gz) = 62a336af305367002cc975d7d5221ae64477aa0ce724070d0b993f36181061350fff233dceec8d8051b9696fb9dac170e7108fa52455609b4b6de7745c02ff61
+Size (nut-2.8.3.724.tar.gz) = 5993270 bytes
SHA1 (patch-clients_upsclient.c) = 45eee24ed3cc06bbf5ec81344d0db62a3da3a827
SHA1 (patch-conf_Makefile.in) = 8d02a0b05659cb210a77e863a28a3b9caa596dfc
SHA1 (patch-drivers_libhid.c) = 8b4f773d9b32e4c43f7045a4a83854382b08cb5b
SHA1 (patch-drivers_libusb0.c) = bdd6fcb145386598b4ac5474d4c866ded5f6d5fa
SHA1 (patch-drivers_libusb1.c) = 58d8ffe9507399802ad885c2e2627641978e5438
+SHA1 (patch-server_sockdebug.c) = 788efc0a519a6a0256b80156fff415d91a359098
diff --git a/ups-nut/files/ups.sh b/ups-nut/files/ups.sh
index 16c4cbd725..60fb69a874 100644
--- a/ups-nut/files/ups.sh
+++ b/ups-nut/files/ups.sh
@@ -1,10 +1,10 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: ups.sh,v 1.11 2023/01/07 16:16:10 gdt Exp $
+# $NetBSD: ups.sh,v 1.12 2025/02/13 19:18:37 gdt Exp $
#
# KEYWORD: nostart
-# NB: This file is not intended to be run automaticlally at boot. It
+# NB: This file is not intended to be run automatically at boot. It
# is a convenience script for humans to start or stop all 4 nut-ups
# daemons as a group.
diff --git a/ups-nut/files/upskillpower.sh b/ups-nut/files/upskillpower.sh
index b5d972b19a..522b01eed0 100644
--- a/ups-nut/files/upskillpower.sh
+++ b/ups-nut/files/upskillpower.sh
@@ -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
diff --git a/ups-nut/options.mk b/ups-nut/options.mk
index ef878b1501..abdbfd57fa 100644
--- a/ups-nut/options.mk
+++ b/ups-nut/options.mk
@@ -1,9 +1,10 @@
-# $NetBSD: options.mk,v 1.3 2023/11/09 21:02:48 gdt Exp $
+# $NetBSD: options.mk,v 1.4 2025/05/16 16:55:21 martin Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.ups-nut
+PKG_SUPPORTED_OPTIONS= python
PKG_OPTIONS_OPTIONAL_GROUPS= ssl
PKG_OPTIONS_GROUP.ssl= nss openssl
-PKG_SUGGESTED_OPTIONS= openssl
+PKG_SUGGESTED_OPTIONS= python openssl
.include "../../mk/bsd.options.mk"
@@ -16,3 +17,13 @@ CONFIGURE_ARGS+= --with-ssl=openssl --without-nss --with-openssl
.else
CONFIGURE_ARGS+= --without-ssl
.endif
+
+.if !empty(PKG_OPTIONS:Mpython)
+# Force only our chosen python3 (see Makefile comment for --without-python2)
+CONFIGURE_ARGS+= --with-python3=${PYTHONBIN}
+CONFIGURE_ARGS+= --with-python=${PYTHONBIN}
+PLIST.python= yes
+# \todo Move to split package.
+.else
+CONFIGURE_ARGS+= --without-python3
+.endif
diff --git a/ups-nut/patches/patch-conf_Makefile.in b/ups-nut/patches/patch-conf_Makefile.in
index d1615ca813..eee68f0cbf 100644
--- a/ups-nut/patches/patch-conf_Makefile.in
+++ b/ups-nut/patches/patch-conf_Makefile.in
@@ -1,4 +1,4 @@
-$NetBSD: patch-conf_Makefile.in,v 1.1 2023/11/09 16:41:15 gdt Exp $
+$NetBSD: patch-conf_Makefile.in,v 1.2 2025/05/17 23:56:37 gdt Exp $
Place example configs in example directory, not etcdir.
This is a pkgsrc norms adjustment and thus not reportable upstream.
diff --git a/ups-nut/patches/patch-drivers_libusb0.c b/ups-nut/patches/patch-drivers_libusb0.c
index c1876ed032..243780be36 100644
--- a/ups-nut/patches/patch-drivers_libusb0.c
+++ b/ups-nut/patches/patch-drivers_libusb0.c
@@ -1,4 +1,4 @@
-$NetBSD: patch-drivers_libusb0.c,v 1.1 2022/04/26 23:28:25 gdt Exp $
+$NetBSD: patch-drivers_libusb0.c,v 1.2 2025/05/17 23:56:37 gdt Exp $
--- drivers/libusb0.c.orig 2024-12-02 14:39:55.000000000 +0000
+++ drivers/libusb0.c
diff --git a/ups-nut/patches/patch-server_sockdebug.c b/ups-nut/patches/patch-server_sockdebug.c
new file mode 100644
index 0000000000..d97873157c
--- /dev/null
+++ b/ups-nut/patches/patch-server_sockdebug.c
@@ -0,0 +1,21 @@
+$NetBSD: patch-server_sockdebug.c,v 1.1 2023/11/09 18:01:06 gdt Exp $
+
+Work around upstream bug of including libwrap on a test program not written for tcp wrappers.
+
+Reported upstream by email 20231109.
+
+--- server/sockdebug.c.orig 2023-09-17 14:34:05.000000000 +0000
++++ server/sockdebug.c
+@@ -32,6 +32,12 @@
+ #include "parseconf.h"
+ #include "nut_stdint.h"
+
++#ifdef HAVE_WRAP
++#include <tcpd.h>
++int allow_severity = LOG_INFO;
++int deny_severity = LOG_WARNING;
++#endif /* HAVE_WRAP */
++
+ static PCONF_CTX_t sock_ctx;
+
+ static void sock_arg(size_t numarg, char **arg)
Home |
Main Index |
Thread Index |
Old Index