Download raw body.
[UPDATE] sysutils/nut 2.8.4 -> 2.8.5
On 2026/04/09 12:37, Stuart Henderson wrote:
> there are some issues with this diff, i will send something out when
> i've tested a bit more
here's a diff (note I just committed some clean-up for 2.8.4 so you
will need a very fresh cvs up)
quite a lot changed in 2.8.5, i intend to hold back on committing
the update until after unlock unless there's an important reason to
do otherwise
Index: Makefile
===================================================================
RCS file: /cvs/ports/sysutils/nut/Makefile,v
diff -u -p -r1.131 Makefile
--- Makefile 9 Apr 2026 12:26:55 -0000 1.131
+++ Makefile 9 Apr 2026 12:36:12 -0000
@@ -1,18 +1,18 @@
COMMENT-main= UPS monitoring program supporting many brands
COMMENT-cgi= CGIs for monitoring Nut-based UPSs
+COMMENT-upower= driver for monitoring UPS via UPower
COMMENT-snmp= driver for monitoring UPS via SNMP
COMMENT-xml= driver for monitoring UPS via XML/HTTP
-V= 2.8.4
-REVISION= 0
+V= 2.8.5
DISTNAME= nut-${V:C/-rc.*//}
PKGNAME= nut-${V:S/-rc/rc/}
SITES= https://github.com/networkupstools/nut/releases/download/v$V/
-SHARED_LIBS += upsclient 5.0 # .7.0
-SHARED_LIBS += nutclient 2.0 # .2.2
-SHARED_LIBS += nutclientstub 1.0 # .1.1
-SHARED_LIBS += nutscan 4.0 # .4.0
+SHARED_LIBS += upsclient 6.0 # .8.0
+SHARED_LIBS += nutclient 3.0 # .3.0
+SHARED_LIBS += nutclientstub 1.1 # .1.1
+SHARED_LIBS += nutscan 5.0 # .5.0
CATEGORIES= sysutils
HOMEPAGE= https://networkupstools.org/
@@ -24,6 +24,7 @@ COMPILER= base-clang ports-gcc
COMMON += c crypto kvm pthread
WANTLIB-main += ${COMMON} ltdl m ssl ${COMPILER_LIBCXX} usb-1.0
+WANTLIB-upower += c gio-2.0 glib-2.0 gobject-2.0 iconv intl kvm pthread
WANTLIB-xml += ${COMMON} expat iconv intl neon proxy ssl z \
nghttp2 nghttp3 ngtcp2 ngtcp2_crypto_libressl
WANTLIB-snmp += ${COMMON} m netsnmp ssl
@@ -67,18 +68,24 @@ CONFIGURE_ARGS+= --datadir=${PREFIX}/sha
LDFLAGS="${LDFLAGS}"
# for CGI
-PREFIX-cgi= ${WEB_ROOT}
-BUILD_DEPENDS+= graphics/gd>=1.8.3
+PREFIX-cgi= ${WEB_ROOT}
+BUILD_DEPENDS+= graphics/gd>=1.8.3
CONFIGURE_ARGS+= --with-cgi \
--with-cgipath="${WEB_ROOT}/cgi-bin/nut" \
--with-gd-libs="-L${X11BASE}/lib -L${PREFIX}/lib \
-lgd -lpng -lz -ljpeg -lm -lfreetype -lX11" \
--with-gd-includes="-I${PREFIX}/include"
-PSEUDO_FLAVORS= no_snmp no_xml
+PSEUDO_FLAVORS= no_snmp no_upower no_xml
FLAVOR?=
MULTI_PACKAGES= -main -cgi
+.if ${FLAVOR:Mno_upower}
+CONFIGURE_ARGS+= --without-upower
+.else
+MULTI_PACKAGES+= -upower
+.endif
+
.if ${FLAVOR:Mno_snmp}
CONFIGURE_ARGS+= --without-snmp
.else
@@ -96,6 +103,10 @@ LIB_DEPENDS-main= ${LIB_DEPENDS} \
devel/libusb1
RUN_DEPENDS-main= # empty
+LIB_DEPENDS-upower= devel/glib2
+RUN_DEPENDS-upower= ${RUN_DEPENDS} \
+ sysutils/nut
+
LIB_DEPENDS-xml= net/neon
RUN_DEPENDS-xml= ${RUN_DEPENDS} \
sysutils/nut
@@ -110,13 +121,16 @@ LIB_DEPENDS-cgi= devel/gettext,-runtime
USE_GMAKE= Yes
USE_LIBTOOL= gnu# -all-static
-FAKE_FLAGS= sysconfdir=${PREFIX}/share/examples/nut
-
+FAKE_FLAGS= sysconfdir=${PREFIX}/share/examples/nut \
+ conf_examplesdir=${PREFIX}/share/examples/nut
NO_TEST= Yes
pre-configure:
${SUBST_CMD} ${WRKSRC}/conf/upssched.conf.sample.in
-ln -s ${MODPY_BIN} ${WRKDIR}/bin/python
+
+pre-install:
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/nut
post-install:
${INSTALL_DATA_DIR} ${WRKINST}${WEB_ROOT}/conf/nut/
Index: distinfo
===================================================================
RCS file: /cvs/ports/sysutils/nut/distinfo,v
diff -u -p -r1.32 distinfo
--- distinfo 5 Sep 2025 11:04:35 -0000 1.32
+++ distinfo 9 Apr 2026 12:36:12 -0000
@@ -1,2 +1,2 @@
-SHA256 (nut-2.8.4.tar.gz) = ATC6gup58Euk80xSSahZQ5d+/ZhO199q7BpRjVo1lPg=
-SIZE (nut-2.8.4.tar.gz) = 6522704
+SHA256 (nut-2.8.5.tar.gz) = GL8y5Z63ZLE9o8T6cDhJJtf6WEyzHS/n8TelcGM+7sE=
+SIZE (nut-2.8.5.tar.gz) = 7362259
Index: patches/patch-clients_Makefile_am
===================================================================
RCS file: /cvs/ports/sysutils/nut/patches/patch-clients_Makefile_am,v
diff -u -p -r1.5 patch-clients_Makefile_am
--- patches/patch-clients_Makefile_am 5 Sep 2025 11:04:35 -0000 1.5
+++ patches/patch-clients_Makefile_am 9 Apr 2026 12:36:12 -0000
@@ -1,7 +1,7 @@
Index: clients/Makefile.am
--- clients/Makefile.am.orig
+++ clients/Makefile.am
-@@ -110,10 +110,13 @@ upssched_LDADD = \
+@@ -157,12 +157,15 @@ upssched_LDADD += \
upsimage_cgi_SOURCES = upsimage.c upsclient.h upsimagearg.h cgilib.c cgilib.h
upsimage_cgi_LDADD = $(LDADD) $(LIBGD_LDFLAGS)
@@ -9,9 +9,11 @@ Index: clients/Makefile.am
upsset_cgi_SOURCES = upsset.c upsclient.h cgilib.c cgilib.h
+upsset_cgi_LDFLAGS = $(LDFLAGS) -all-static
+
upsstats_cgi_SOURCES = upsstats.c upsclient.h status.h upsstats.h \
upsimagearg.h cgilib.c cgilib.h
+ upsstats_cgi_LDADD = $(LDADD_CLIENT) $(top_builddir)/common/libcommonstrjson.la
+upsstats_cgi_LDFLAGS = $(LDFLAGS) -all-static
- # not LDADD... why?
- libupsclient_la_SOURCES = upsclient.c upsclient.h
+ ################################## Plain C client library (libupsclient) :
+
Index: patches/patch-clients_cgilib_c
===================================================================
RCS file: /cvs/ports/sysutils/nut/patches/patch-clients_cgilib_c,v
diff -u -p -r1.8 patch-clients_cgilib_c
--- patches/patch-clients_cgilib_c 2 Apr 2024 13:40:13 -0000 1.8
+++ patches/patch-clients_cgilib_c 9 Apr 2026 12:36:12 -0000
@@ -1,7 +1,7 @@
Index: clients/cgilib.c
--- clients/cgilib.c.orig
+++ clients/cgilib.c
-@@ -168,7 +168,7 @@ int checkhost(const char *host, char **desc)
+@@ -260,7 +260,7 @@ int checkhost(const char *host, char **desc)
if (!host)
return 0; /* deny null hostnames */
Index: patches/patch-clients_upsset_c
===================================================================
RCS file: /cvs/ports/sysutils/nut/patches/patch-clients_upsset_c,v
diff -u -p -r1.14 patch-clients_upsset_c
--- patches/patch-clients_upsset_c 5 Sep 2025 11:04:35 -0000 1.14
+++ patches/patch-clients_upsset_c 9 Apr 2026 12:36:12 -0000
@@ -1,21 +1,21 @@
Index: clients/upsset.c
--- clients/upsset.c.orig
+++ clients/upsset.c
-@@ -200,7 +200,7 @@ static void do_pickups(const char *currfunc)
+@@ -218,7 +218,7 @@ static void do_pickups(const char *currfunc)
char hostfn[NUT_PATH_MAX + 1];
PCONF_CTX_t ctx;
- snprintf(hostfn, sizeof(hostfn), "%s/hosts.conf", confpath());
+ snprintf(hostfn, sizeof(hostfn), "%s/hosts.conf", cgiconfpath());
- printf("<FORM METHOD=\"POST\" ACTION=\"upsset.cgi\">\n");
+ printf("<FORM METHOD=\"POST\" ACTION=\"upsset.cgi" EXEEXT "\">\n");
-@@ -1029,7 +1029,7 @@ static void check_conf(void)
+@@ -1066,7 +1066,7 @@ static void check_conf(void)
char fn[NUT_PATH_MAX + 1];
PCONF_CTX_t ctx;
- snprintf(fn, sizeof(fn), "%s/upsset.conf", confpath());
+ snprintf(fn, sizeof(fn), "%s/upsset.conf", cgiconfpath());
+ upsdebugx(1, "%s: considering configuration file %s", __func__, fn);
pconf_init(&ctx, upsset_conf_err);
-
Index: patches/patch-clients_upsstats_c
===================================================================
RCS file: /cvs/ports/sysutils/nut/patches/patch-clients_upsstats_c,v
diff -u -p -r1.11 patch-clients_upsstats_c
--- patches/patch-clients_upsstats_c 22 Apr 2025 15:01:30 -0000 1.11
+++ patches/patch-clients_upsstats_c 9 Apr 2026 12:36:12 -0000
@@ -1,21 +1,21 @@
Index: clients/upsstats.c
--- clients/upsstats.c.orig
+++ clients/upsstats.c
-@@ -851,7 +851,7 @@ static void display_template(const char *tfn)
- {
- char fn[NUT_PATH_MAX + 1], buf[LARGEBUF];
+@@ -1225,7 +1225,7 @@ static void display_template(const char *tfn, int type
+ exit(EXIT_FAILURE);
+ }
- snprintf(fn, sizeof(fn), "%s/%s", confpath(), tfn);
+ snprintf(fn, sizeof(fn), "%s/%s", cgiconfpath(), tfn);
- tf = fopen(fn, "r");
+ tf = fopen(fn, "rb");
-@@ -971,7 +971,7 @@ static void load_hosts_conf(void)
+@@ -1430,7 +1430,7 @@ static void load_hosts_conf(int handle_MONITOR)
char fn[NUT_PATH_MAX + 1];
PCONF_CTX_t ctx;
-- snprintf(fn, sizeof(fn), "%s/hosts.conf", CONFPATH);
+- snprintf(fn, sizeof(fn), "%s/hosts.conf", confpath());
+ snprintf(fn, sizeof(fn), "%s/hosts.conf", cgiconfpath());
+ upsdebugx(1, "%s: considering configuration file %s", __func__, fn);
pconf_init(&ctx, upsstats_hosts_err);
-
Index: patches/patch-common_common_c
===================================================================
RCS file: /cvs/ports/sysutils/nut/patches/patch-common_common_c,v
diff -u -p -r1.14 patch-common_common_c
--- patches/patch-common_common_c 5 Sep 2025 11:04:35 -0000 1.14
+++ patches/patch-common_common_c 9 Apr 2026 12:36:12 -0000
@@ -1,7 +1,7 @@
Index: common/common.c
--- common/common.c.orig
+++ common/common.c
-@@ -3478,6 +3478,17 @@ const char * confpath(void)
+@@ -4403,6 +4403,17 @@ const char * confpath(void)
return path;
}
Index: patches/patch-conf_ups_conf_sample
===================================================================
RCS file: /cvs/ports/sysutils/nut/patches/patch-conf_ups_conf_sample,v
diff -u -p -r1.9 patch-conf_ups_conf_sample
--- patches/patch-conf_ups_conf_sample 22 Apr 2025 15:01:30 -0000 1.9
+++ patches/patch-conf_ups_conf_sample 9 Apr 2026 12:36:12 -0000
@@ -1,7 +1,7 @@
Index: conf/ups.conf.sample
--- conf/ups.conf.sample.orig
+++ conf/ups.conf.sample
-@@ -158,6 +158,7 @@ maxretry = 3
+@@ -161,6 +161,7 @@ maxretry = 3
# port: REQUIRED. The serial port where your UPS is connected.
# For example:
# /dev/ttyS0 is usually the first port on Linux boxes.
@@ -9,7 +9,7 @@ Index: conf/ups.conf.sample
# "\\\\.\\COM1" is the first port on Windows boxes (note that
# the backslash characters themselves must be escaped,
# for the NUT configuration parser to yield "\\.\COM1").
-@@ -229,11 +230,11 @@ maxretry = 3
+@@ -232,11 +233,11 @@ maxretry = 3
# --------
#
# A simple example for a UPS called "powerpal" that uses the blazer_ser
@@ -23,7 +23,7 @@ Index: conf/ups.conf.sample
# desc = "Web server"
#
# If your UPS driver requires additional settings, you can specify them
-@@ -248,3 +249,17 @@ maxretry = 3
+@@ -251,3 +252,17 @@ maxretry = 3
#
# To find out if your driver supports any extra settings, start it with
# the -h option and/or read the driver's documentation.
Index: patches/patch-include_common_h
===================================================================
RCS file: /cvs/ports/sysutils/nut/patches/patch-include_common_h,v
diff -u -p -r1.13 patch-include_common_h
--- patches/patch-include_common_h 5 Sep 2025 11:04:35 -0000 1.13
+++ patches/patch-include_common_h 9 Apr 2026 12:36:12 -0000
@@ -1,7 +1,7 @@
Index: include/common.h
--- include/common.h.orig
+++ include/common.h
-@@ -414,6 +414,9 @@ void syslogbit_set(void);
+@@ -493,6 +493,9 @@ void syslogbit_set(void);
/* Return the default path for the directory containing configuration files */
const char * confpath(void);
Index: pkg/DESCR-upower
===================================================================
RCS file: pkg/DESCR-upower
diff -N pkg/DESCR-upower
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/DESCR-upower 9 Apr 2026 12:36:12 -0000
@@ -0,0 +1,2 @@
+This NUT driver provides support for monitoring UPS and battery devices
+managed by the UPower daemon via D-Bus.
Index: pkg/PLIST-cgi
===================================================================
RCS file: /cvs/ports/sysutils/nut/pkg/PLIST-cgi,v
diff -u -p -r1.9 PLIST-cgi
--- pkg/PLIST-cgi 9 Apr 2026 12:26:55 -0000 1.9
+++ pkg/PLIST-cgi 9 Apr 2026 12:36:12 -0000
@@ -7,6 +7,10 @@ conf/nut/hosts.conf.sample
@sample conf/nut/hosts.conf
conf/nut/upsset.conf.sample
@sample conf/nut/upsset.conf
+conf/nut/upsstats-modern-list.html.sample
+@sample conf/nut/upsstats-modern-list.html
+conf/nut/upsstats-modern-single.html.sample
+@sample conf/nut/upsstats-modern-single.html
conf/nut/upsstats-single.html.sample
@sample conf/nut/upsstats-single.html
conf/nut/upsstats.html.sample
@@ -16,3 +20,4 @@ nut/bottom.html
nut/header.html
nut/index.html
nut/nut-banner.png
+nut/nut-logo-60x60.png
Index: pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/sysutils/nut/pkg/PLIST-main,v
diff -u -p -r1.37 PLIST-main
--- pkg/PLIST-main 9 Apr 2026 12:26:55 -0000 1.37
+++ pkg/PLIST-main 9 Apr 2026 12:36:12 -0000
@@ -40,6 +40,7 @@
@bin bin/liebert-esp2
@bin bin/liebert-gxe
@bin bin/masterguard
+@bin bin/meanwell_ntu
@bin bin/metasys
@bin bin/mge-shut
@bin bin/mge-utalk
@@ -77,11 +78,6 @@ bin/upssched-cmd
@bin bin/usbhid-ups
@bin bin/ve-direct
@bin bin/victronups
-@comment html/
-@comment html/bottom.html
-@comment html/header.html
-@comment html/index.html
-@comment html/nut-banner.png
include/nut/
include/nut/nut-scan.h
include/nut/nutclient.h
@@ -142,10 +138,40 @@ lib/python${MODPY_VERSION}/site-packages
@man man/man3/nutclient_set_device_variable_value.3
@man man/man3/nutclient_set_device_variable_values.3
@man man/man3/nutclient_tcp_create_client.3
+@man man/man3/nutclient_tcp_create_client_ssl_NSSL.3
+@man man/man3/nutclient_tcp_create_client_ssl_OpenSSL.3
@man man/man3/nutclient_tcp_disconnect.3
+@man man/man3/nutclient_tcp_get_ssl_cafile.3
+@man man/man3/nutclient_tcp_get_ssl_capath.3
+@man man/man3/nutclient_tcp_get_ssl_caps.3
+@man man/man3/nutclient_tcp_get_ssl_certfile.3
+@man man/man3/nutclient_tcp_get_ssl_certhost_name.3
+@man man/man3/nutclient_tcp_get_ssl_certident_name.3
+@man man/man3/nutclient_tcp_get_ssl_certstore_path.3
+@man man/man3/nutclient_tcp_get_ssl_certstore_prefix.3
+@man man/man3/nutclient_tcp_get_ssl_certverify.3
+@man man/man3/nutclient_tcp_get_ssl_force.3
+@man man/man3/nutclient_tcp_get_ssl_keyfile.3
+@man man/man3/nutclient_tcp_get_ssl_keypass.3
+@man man/man3/nutclient_tcp_get_ssl_try.3
@man man/man3/nutclient_tcp_get_timeout.3
@man man/man3/nutclient_tcp_is_connected.3
+@man man/man3/nutclient_tcp_is_ssl.3
@man man/man3/nutclient_tcp_reconnect.3
+@man man/man3/nutclient_tcp_set_ssl_cafile.3
+@man man/man3/nutclient_tcp_set_ssl_capath.3
+@man man/man3/nutclient_tcp_set_ssl_certfile.3
+@man man/man3/nutclient_tcp_set_ssl_certhost_name.3
+@man man/man3/nutclient_tcp_set_ssl_certident_name.3
+@man man/man3/nutclient_tcp_set_ssl_certstore_path.3
+@man man/man3/nutclient_tcp_set_ssl_certstore_prefix.3
+@man man/man3/nutclient_tcp_set_ssl_certverify.3
+@man man/man3/nutclient_tcp_set_ssl_config_NSS.3
+@man man/man3/nutclient_tcp_set_ssl_config_OpenSSL.3
+@man man/man3/nutclient_tcp_set_ssl_force.3
+@man man/man3/nutclient_tcp_set_ssl_keyfile.3
+@man man/man3/nutclient_tcp_set_ssl_keypass.3
+@man man/man3/nutclient_tcp_set_ssl_try.3
@man man/man3/nutclient_tcp_set_timeout.3
@man man/man3/nutscan.3
@man man/man3/nutscan_add_commented_option_to_device.3
@@ -175,6 +201,13 @@ lib/python${MODPY_VERSION}/site-packages
@man man/man3/nutscan_scan_usb.3
@man man/man3/nutscan_scan_xml_http_range.3
@man man/man3/nutscan_stringify_ip_ranges.3
+@man man/man3/nutscan_upslog_cookie.3
+@man man/man3/nutscan_upslog_get_debug_level.3
+@man man/man3/nutscan_upslog_getproctag.3
+@man man/man3/nutscan_upslog_set_debug_level.3
+@man man/man3/nutscan_upslog_setprocname.3
+@man man/man3/nutscan_upslog_setproctag.3
+@man man/man3/nutscan_upslog_start_sync.3
@man man/man3/upscli_add_host_cert.3
@man man/man3/upscli_cleanup.3
@man man/man3/upscli_connect.3
@@ -188,17 +221,29 @@ lib/python${MODPY_VERSION}/site-packages
@man man/man3/upscli_list_start.3
@man man/man3/upscli_readline.3
@man man/man3/upscli_readline_timeout.3
+@man man/man3/upscli_readline_timeout_may_disconnect.3
+@man man/man3/upscli_report_build_details.3
@man man/man3/upscli_sendline.3
@man man/man3/upscli_sendline_timeout.3
+@man man/man3/upscli_sendline_timeout_may_disconnect.3
@man man/man3/upscli_set_default_connect_timeout.3
@man man/man3/upscli_splitaddr.3
@man man/man3/upscli_splitname.3
@man man/man3/upscli_ssl.3
+@man man/man3/upscli_ssl_caps.3
+@man man/man3/upscli_ssl_caps_descr.3
@man man/man3/upscli_str_add_unique_token.3
@man man/man3/upscli_str_contains_token.3
@man man/man3/upscli_strerror.3
@man man/man3/upscli_tryconnect.3
@man man/man3/upscli_upserror.3
+@man man/man3/upscli_upslog_cookie.3
+@man man/man3/upscli_upslog_get_debug_level.3
+@man man/man3/upscli_upslog_getproctag.3
+@man man/man3/upscli_upslog_set_debug_level.3
+@man man/man3/upscli_upslog_setprocname.3
+@man man/man3/upscli_upslog_setproctag.3
+@man man/man3/upscli_upslog_start_sync.3
@man man/man3/upsclient.3
@man man/man5/hosts.conf.5
@man man/man5/nut.conf.5
@@ -239,6 +284,7 @@ lib/python${MODPY_VERSION}/site-packages
@man man/man8/liebert-gxe.8
@man man/man8/liebert.8
@man man/man8/masterguard.8
+@man man/man8/meanwell_ntu.8
@man man/man8/metasys.8
@man man/man8/mge-shut.8
@man man/man8/mge-utalk.8
@@ -250,7 +296,7 @@ lib/python${MODPY_VERSION}/site-packages
@man man/man8/nutdrv_atcl_usb.8
@man man/man8/nutdrv_hashx.8
@man man/man8/nutdrv_qx.8
-@man man/man8/nutdrv_siemens_sitop.8
+@man man/man8/nutdrv_siemens-sitop.8
@man man/man8/nutupsdrv.8
@man man/man8/oneac.8
@man man/man8/optiups.8
@@ -409,9 +455,14 @@ share/doc/nut/images/ci/jenkins-nut.css
share/doc/nut/images/ci/jenkins-nut.png
share/doc/nut/images/ci/jenkins-nut.txt
share/doc/nut/images/ci/jenkins-nut.txt-prepped
+share/doc/nut/images/ci/obs-logo.png
+share/doc/nut/images/ci/obs-logo.svg
+share/doc/nut/images/ci/openSUSEBuildService.png
share/doc/nut/images/hostedby.png
share/doc/nut/images/note.png
-share/doc/nut/images/nut-logo.png
+share/doc/nut/images/nut-logo-256x256.png
+share/doc/nut/images/nut-logo-60x60.png
+share/doc/nut/images/nut-logo.svg
share/doc/nut/images/nut_layering.png
share/doc/nut/images/old-cgi.png
share/doc/nut/images/simple.png
@@ -465,8 +516,6 @@ share/examples/nut/upssched.conf.sample
@sample ${SYSCONFDIR}/upssched.conf
@mode 700
@sample /var/db/nut/
-@comment share/examples/nut/upsstats-single.html.sample
-@comment share/examples/nut/upsstats.html.sample
@mode
@owner
share/nut/
Index: pkg/PLIST-upower
===================================================================
RCS file: pkg/PLIST-upower
diff -N pkg/PLIST-upower
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/PLIST-upower 9 Apr 2026 12:36:12 -0000
@@ -0,0 +1,2 @@
+@bin bin/nut-upower
+@man man/man8/nut-upower.8
[UPDATE] sysutils/nut 2.8.4 -> 2.8.5