From: Atanas Vladimirov Subject: [UPDATE] sysutils/nut 2.8.4 -> 2.8.5 To: Ports Date: Wed, 08 Apr 2026 23:55:55 +0300 Hello Folks, Here is a patch to update the NUT (Network UPS Tools) to the recently released 2.8.5 Comments are welcome! Please add me in CC because I'm not subscribed to the list. Best wishes, Atanas ################# Index: Makefile =================================================================== RCS file: /cvs/ports/sysutils/nut/Makefile,v diff -u -p -r1.130 Makefile --- Makefile 5 Sep 2025 11:04:35 -0000 1.130 +++ Makefile 8 Apr 2026 20:28:16 -0000 @@ -3,7 +3,7 @@ COMMENT-cgi= CGIs for monitoring Nut-bas COMMENT-snmp= driver for monitoring UPS via SNMP COMMENT-xml= driver for monitoring UPS via XML/HTTP -V= 2.8.4 +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/ @@ -13,10 +13,10 @@ PKGNAME-cgi= ${PKGNAME:S/-/-cgi-/} PKGNAME-snmp= ${PKGNAME:S/-/-snmp-/} PKGNAME-xml= ${PKGNAME:S/-/-xml-/} -SHARED_LIBS += upsclient 5.0 # .7.0 -SHARED_LIBS += nutclient 2.0 # .2.2 +SHARED_LIBS += upsclient 6.0 # .8.0 +SHARED_LIBS += nutclient 3.0 # .3.0 SHARED_LIBS += nutclientstub 1.0 # .1.1 -SHARED_LIBS += nutscan 4.0 # .4.0 +SHARED_LIBS += nutscan 5.0 # .5.0 CATEGORIES= sysutils HOMEPAGE= https://networkupstools.org/ @@ -64,6 +64,7 @@ CONFIGURE_ARGS+= --datadir=${PREFIX}/sha --with-user=_ups \ --with-group=_ups \ --without-ipmi \ + --without-hotplug-dir \ CPPFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="${LDFLAGS}" @@ -124,7 +125,8 @@ pre-configure: post-install: ${INSTALL_DATA_DIR} ${WRKINST}${WEB_ROOT}/conf/nut/ -.for file in hosts.conf upsset.conf upsstats.html upsstats-single.html +.for file in hosts.conf upsset.conf upsstats.html upsstats-single.html \ + upsstats-modern-list.html upsstats-modern-single.html ${INSTALL_DATA} ${WRKBUILD}/conf/${file}.sample \ ${WRKINST}${WEB_ROOT}/conf/nut/ .endfor 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 8 Apr 2026 20:28:16 -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 8 Apr 2026 20:28:16 -0000 @@ -1,17 +1,18 @@ Index: clients/Makefile.am --- clients/Makefile.am.orig +++ clients/Makefile.am -@@ -110,10 +110,13 @@ upssched_LDADD = \ +@@ -157,11 +157,13 @@ upssched_LDADD += \ upsimage_cgi_SOURCES = upsimage.c upsclient.h upsimagearg.h cgilib.c cgilib.h upsimage_cgi_LDADD = $(LDADD) $(LIBGD_LDFLAGS) +upsimage_cgi_LDFLAGS = $(LDFLAGS) -all-static 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_LDFLAGS = $(LDFLAGS) -all-static + upsstats_cgi_LDADD = $(LDADD_CLIENT) $(top_builddir)/common/libcommonstrjson.la - # 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 8 Apr 2026 20:28:16 -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 8 Apr 2026 20:28:16 -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("
\n"); + printf("\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 8 Apr 2026 20:28:16 -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 8 Apr 2026 20:28:16 -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 8 Apr 2026 20:28:16 -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 8 Apr 2026 20:28:16 -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/PLIST-cgi =================================================================== RCS file: /cvs/ports/sysutils/nut/pkg/PLIST-cgi,v diff -u -p -r1.8 PLIST-cgi --- pkg/PLIST-cgi 11 Mar 2022 19:57:44 -0000 1.8 +++ pkg/PLIST-cgi 8 Apr 2026 20:28:16 -0000 @@ -7,6 +7,8 @@ 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 +conf/nut/upsstats-modern-single.html.sample conf/nut/upsstats-single.html.sample @sample conf/nut/upsstats-single.html conf/nut/upsstats.html.sample Index: pkg/PLIST-main =================================================================== RCS file: /cvs/ports/sysutils/nut/pkg/PLIST-main,v diff -u -p -r1.36 PLIST-main --- pkg/PLIST-main 5 Sep 2025 11:04:35 -0000 1.36 +++ pkg/PLIST-main 8 Apr 2026 20:28:16 -0000 @@ -8,6 +8,17 @@ @pkgpath sysutils/nut,no_cgi,snmp @newgroup _ups:529 @newuser _ups:529:529::UPS User:/var/empty:/sbin/nologin +@sample ${SYSCONFDIR}/ +@comment share/examples/nut/hosts.conf.sample +@sample ${BASESYSCONFDIR}/avahi/ +@sample ${BASESYSCONFDIR}/avahi/services/ +@mode 700 +@owner _ups +@sample /var/db/nut/ +@comment share/examples/nut/upsstats-single.html.sample +@comment share/examples/nut/upsstats.html.sample +@mode +@owner @rcscript ${RCDIR}/nut @rcscript ${RCDIR}/upsd @rcscript ${RCDIR}/upsmon @@ -40,12 +51,14 @@ @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 @bin bin/microdowell @bin bin/microsol-apc @bin bin/nut-scanner +@bin bin/nut-upower @bin bin/nutconf @bin bin/nutdrv_atcl_usb @bin bin/nutdrv_hashx @@ -82,6 +95,7 @@ bin/upssched-cmd @comment html/header.html @comment html/index.html @comment html/nut-banner.png +html/nut-logo-60x60.png include/nut/ include/nut/nut-scan.h include/nut/nutclient.h @@ -147,10 +161,40 @@ lib/python${MODPY_VERSION}/site-packages @comment @man man/man3/nutclient_set_device_variable_value.3 @comment @man man/man3/nutclient_set_device_variable_values.3 @comment @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 @comment @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 @comment @man man/man3/nutclient_tcp_get_timeout.3 @comment @man man/man3/nutclient_tcp_is_connected.3 +@man man/man3/nutclient_tcp_is_ssl.3 @comment @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 @comment @man man/man3/nutclient_tcp_set_timeout.3 @man man/man3/nutscan.3 @man man/man3/nutscan_add_commented_option_to_device.3 @@ -180,6 +224,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 @@ -193,17 +244,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 @@ -244,6 +307,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 @@ -251,11 +315,12 @@ lib/python${MODPY_VERSION}/site-packages @man man/man8/microsol-apc.8 @man man/man8/nut-recorder.8 @man man/man8/nut-scanner.8 +@man man/man8/nut-upower.8 @man man/man8/nutconf.8 @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 @@ -414,9 +479,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 @@ -441,41 +511,7 @@ share/doc/nut/solaris-usb.txt share/doc/nut/support.txt share/doc/nut/user-manual.txt share/doc/pkg-readmes/${PKGSTEM} -share/examples/nut/ -@sample ${SYSCONFDIR}/ -@comment share/examples/nut/hosts.conf.sample -share/examples/nut/nut.conf.sample -share/examples/nut/nut.service -@sample ${BASESYSCONFDIR}/avahi/ -@sample ${BASESYSCONFDIR}/avahi/services/ -@sample ${BASESYSCONFDIR}/avahi/services/nut.service -@owner _ups -share/examples/nut/ups.conf.sample -@mode 600 -@sample ${SYSCONFDIR}/ups.conf -@mode -share/examples/nut/upsd.conf.sample -@mode 600 -@sample ${SYSCONFDIR}/upsd.conf -@mode -share/examples/nut/upsd.users.sample -@mode 600 -@sample ${SYSCONFDIR}/upsd.users -@mode -share/examples/nut/upsmon.conf.sample -@mode 600 -@sample ${SYSCONFDIR}/upsmon.conf -@mode -share/examples/nut/upssched.conf.sample -@sample ${SYSCONFDIR}/upssched.conf -share/examples/nut/upsset.conf.sample -@sample ${SYSCONFDIR}/upsset.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/examples/nut share/nut/ share/nut/cmdvartab share/nut/driver.list