diff --git a/Makefile.am b/Makefile.am index 3aef1e9166..e7f9210e98 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,8 +1,5 @@ # top-level Makefile for NUT -# include directory for aclocal -ACLOCAL_AMFLAGS = -I m4 - # Export certain values for ccache which NUT ci_build.sh can customize, # to facilitate developer iteration re-runs of "make" later. # At least GNU and BSD make implementations are okay with this syntax. @@ -12,6 +9,9 @@ ACLOCAL_AMFLAGS = -I m4 @NUT_AM_MAKE_CAN_EXPORT@export CCACHE_PATH=@CCACHE_PATH@ @NUT_AM_MAKE_CAN_EXPORT@export PATH=@PATH_DURING_CONFIGURE@ +# include directory for aclocal +ACLOCAL_AMFLAGS = -I m4 + # subdirectories to build and distribute. The order matters, as # several subdirectories depend on stuff in "common" or tools being built first SUBDIRS = include common clients conf data docs drivers tools \ diff --git a/NEWS.adoc b/NEWS.adoc index a266f4b539..db5dd4f390 100644 --- a/NEWS.adoc +++ b/NEWS.adoc @@ -55,6 +55,9 @@ https://github.com/networkupstools/nut/milestone/10 activity was completed by the hardware, which led to mis-processing of shutdown triggers. Also, notification was added to report "finished calibration". [issue #2168, PR #2169] + * `upsmon` recognition of `OFF` state as a trigger for FSD (forced shut + down) criticality considered also the input line state, which may be + an independently evolving circumstance. [issue #2278, PR #2279] * `upsmon` support for `POLLFAIL_LOG_THROTTLE_MAX` did not neuter the applied setting when live-reloading configuration, so commenting it away in `upsmon.conf` did not have the effect of resetting the logging diff --git a/clients/Makefile.am b/clients/Makefile.am index 9e294d40e1..c00bea373f 100644 --- a/clients/Makefile.am +++ b/clients/Makefile.am @@ -1,5 +1,4 @@ # Network UPS Tools: clients -EXTRA_DIST = # Export certain values for ccache which NUT ci_build.sh can customize, # to facilitate developer iteration re-runs of "make" later. @@ -10,6 +9,8 @@ EXTRA_DIST = @NUT_AM_MAKE_CAN_EXPORT@export CCACHE_PATH=@CCACHE_PATH@ @NUT_AM_MAKE_CAN_EXPORT@export PATH=@PATH_DURING_CONFIGURE@ +EXTRA_DIST = + # nutclient.cpp for some legacy reason (maybe initial detached development?) # optionally includes "common.h" with the NUT build setup - and this option # was never triggered in fact, not until pushed through command line like this: diff --git a/clients/upsmon.c b/clients/upsmon.c index f7a0b42ed8..a56fb10276 100644 --- a/clients/upsmon.c +++ b/clients/upsmon.c @@ -1100,10 +1100,11 @@ static int is_ups_critical(utype_t *ups) /* administratively OFF (long enough, see OFFDURATION) */ if (flag_isset(ups->status, ST_OFF) && offdurationtime >= 0 - && (ups->linestate == 0 || ups->offstate == 1)) { + && ups->offstate == 1) { upslogx(LOG_WARNING, "UPS [%s] is reported as (administratively) OFF", ups->sys); + upsdebugx(1, "UPS [%s] is now critical being OFF for too long. In case of persisting unwanted shutdowns, consider disabling the upsmon 'OFFDURATION' option.", ups->sys); return 1; } diff --git a/data/html/Makefile.am b/data/html/Makefile.am index 90fa56fa28..0ef0652637 100644 --- a/data/html/Makefile.am +++ b/data/html/Makefile.am @@ -1,4 +1,5 @@ # Network UPS Tools: data/html + # install these only if configured --with-cgi if WITH_CGI dist_html_DATA = index.html bottom.html nut-banner.png diff --git a/docs/nut.dict b/docs/nut.dict index 22dddc9287..1099b5d333 100644 --- a/docs/nut.dict +++ b/docs/nut.dict @@ -1,4 +1,4 @@ -personal_ws-1.1 en 3449 utf-8 +personal_ws-1.1 en 3450 utf-8 AAC AAS ABI @@ -1860,6 +1860,7 @@ cpqpower cpsups cr crestfactor +criticality crlf cron crontab diff --git a/drivers/apc-ats-mib.c b/drivers/apc-ats-mib.c index 5cb8cc50be..227c5ff6cd 100644 --- a/drivers/apc-ats-mib.c +++ b/drivers/apc-ats-mib.c @@ -24,7 +24,7 @@ #include "apc-ats-mib.h" -#define APC_ATS_MIB_VERSION "0.6" +#define APC_ATS_MIB_VERSION "0.60" #define APC_ATS_SYSOID ".1.3.6.1.4.1.318.1.3.11" #define APC_ATS_OID_MODEL_NAME ".1.3.6.1.4.1.318.1.1.8.1.5.0" diff --git a/drivers/apc-epdu-mib.c b/drivers/apc-epdu-mib.c index bc8b288b11..7386f3a07d 100644 --- a/drivers/apc-epdu-mib.c +++ b/drivers/apc-epdu-mib.c @@ -23,7 +23,7 @@ #include "apc-epdu-mib.h" -#define APC_EPDU_MIB_VERSION "0.1" +#define APC_EPDU_MIB_VERSION "0.10" #define APC_EPDU_MIB_SYSOID ".1.3.6.1.4.1.318.1.3.4.9" diff --git a/drivers/apc-pdu-mib.c b/drivers/apc-pdu-mib.c index 2ca28df12c..a4b882153f 100644 --- a/drivers/apc-pdu-mib.c +++ b/drivers/apc-pdu-mib.c @@ -23,7 +23,7 @@ #include "apc-pdu-mib.h" -#define APC_PDU_MIB_VERSION "0.4" +#define APC_PDU_MIB_VERSION "0.40" #define APC_PDU_MIB_SYSOID_RPDU ".1.3.6.1.4.1.318.1.3.4.4" #define APC_PDU_MIB_SYSOID_RPDU2 ".1.3.6.1.4.1.318.1.3.4.5" diff --git a/drivers/bestpower-mib.c b/drivers/bestpower-mib.c index 51ba1a62c3..13b86d52b8 100644 --- a/drivers/bestpower-mib.c +++ b/drivers/bestpower-mib.c @@ -22,7 +22,7 @@ #include "bestpower-mib.h" -#define BESTPOWER_MIB_VERSION "0.4" +#define BESTPOWER_MIB_VERSION "0.40" #define BESTPOWER_OID_MODEL_NAME ".1.3.6.1.4.1.2947.1.1.2.0" /* diff --git a/drivers/delta_ups-mib.c b/drivers/delta_ups-mib.c index 888542aef8..d5052083e6 100644 --- a/drivers/delta_ups-mib.c +++ b/drivers/delta_ups-mib.c @@ -25,7 +25,7 @@ #include "delta_ups-mib.h" -#define DELTA_UPS_MIB_VERSION "0.5" +#define DELTA_UPS_MIB_VERSION "0.50" #define DELTA_UPS_SYSOID ".1.3.6.1.4.1.2254.2.4" diff --git a/drivers/eaton-pdu-nlogic-mib.c b/drivers/eaton-pdu-nlogic-mib.c index 5a97fadd26..fe1cad6846 100644 --- a/drivers/eaton-pdu-nlogic-mib.c +++ b/drivers/eaton-pdu-nlogic-mib.c @@ -24,7 +24,7 @@ #include "eaton-pdu-nlogic-mib.h" -#define EATON_PDU_NLOGIC_MIB_VERSION "0.1" +#define EATON_PDU_NLOGIC_MIB_VERSION "0.10" #define EATON_PDU_NLOGIC_SYSOID ".1.3.6.1.4.1.534.7.1" diff --git a/drivers/eaton-pdu-pulizzi-mib.c b/drivers/eaton-pdu-pulizzi-mib.c index 54b81433b3..7ed0f3f1a5 100644 --- a/drivers/eaton-pdu-pulizzi-mib.c +++ b/drivers/eaton-pdu-pulizzi-mib.c @@ -42,7 +42,7 @@ /* Pulizzi Switched ePDU */ -#define EATON_PULIZZI_SW_MIB_VERSION "0.5" +#define EATON_PULIZZI_SW_MIB_VERSION "0.50" #define PULIZZI_SW_OID_MIB ".1.3.6.1.4.1.20677.3.1.1" #define PULIZZI_SW_OID_MODEL_NAME ".1.3.6.1.4.1.20677.2.1.1.0" diff --git a/drivers/emerson-avocent-pdu-mib.c b/drivers/emerson-avocent-pdu-mib.c index 8ca90d8a3c..0154e44cd1 100644 --- a/drivers/emerson-avocent-pdu-mib.c +++ b/drivers/emerson-avocent-pdu-mib.c @@ -25,7 +25,7 @@ #include "emerson-avocent-pdu-mib.h" -#define EMERSON_AVOCENT_MIB_VERSION "1.3" +#define EMERSON_AVOCENT_MIB_VERSION "1.30" #define EMERSON_AVOCENT_SYSOID ".1.3.6.1.4.1.10418.17.1.7" #define EMERSON_AVOCENT_OID_MODEL_NAME ".1.3.6.1.4.1.10418.17.2.1.2.0" diff --git a/drivers/hpe-pdu3-cis-mib.c b/drivers/hpe-pdu3-cis-mib.c index 5b6bf9ef86..392f745ac6 100644 --- a/drivers/hpe-pdu3-cis-mib.c +++ b/drivers/hpe-pdu3-cis-mib.c @@ -21,7 +21,7 @@ #include "hpe-pdu3-cis-mib.h" -#define HPE_PDU3_CIS_MIB_VERSION "0.1" +#define HPE_PDU3_CIS_MIB_VERSION "0.10" #define HPE_PDU3_CIS_SYSOID ".1.3.6.1.4.1.232.165.11" #define HPE_PDU3_OID_MODEL_NAME ".1.3.6.1.4.1.232.165.11.1.2.1.3.1" diff --git a/drivers/huawei-mib.c b/drivers/huawei-mib.c index 42b90e5845..949c0215df 100644 --- a/drivers/huawei-mib.c +++ b/drivers/huawei-mib.c @@ -21,7 +21,7 @@ #include "huawei-mib.h" -#define HUAWEI_MIB_VERSION "0.4" +#define HUAWEI_MIB_VERSION "0.40" #define HUAWEI_SYSOID ".1.3.6.1.4.1.8072.3.2.10" #define HUAWEI_UPSMIB ".1.3.6.1.4.1.2011" diff --git a/drivers/raritan-pdu-mib.c b/drivers/raritan-pdu-mib.c index f4e52ac440..2dd5dfd9f2 100644 --- a/drivers/raritan-pdu-mib.c +++ b/drivers/raritan-pdu-mib.c @@ -25,7 +25,7 @@ #include "raritan-pdu-mib.h" -#define RARITAN_MIB_VERSION "0.8" +#define RARITAN_MIB_VERSION "0.80" /* Raritan MIB * this one uses the same MIB as Eaton Revelation, diff --git a/drivers/raritan-px2-mib.c b/drivers/raritan-px2-mib.c index 627105162e..022a9c9f24 100644 --- a/drivers/raritan-px2-mib.c +++ b/drivers/raritan-px2-mib.c @@ -23,7 +23,7 @@ #include "raritan-px2-mib.h" -#define RARITAN_PX2_MIB_VERSION "0.4" +#define RARITAN_PX2_MIB_VERSION "0.40" #define RARITAN_PX2_MIB_SYSOID ".1.3.6.1.4.1.13742.6" #define RARITAN_PX2_OID_MODEL_NAME ".1.3.6.1.4.1.13742.6.3.2.1.1.3.1" diff --git a/drivers/xppc-mib.c b/drivers/xppc-mib.c index cfbc450b89..596f110f19 100644 --- a/drivers/xppc-mib.c +++ b/drivers/xppc-mib.c @@ -24,7 +24,7 @@ #include "xppc-mib.h" -#define XPPC_MIB_VERSION "0.4" +#define XPPC_MIB_VERSION "0.40" #define XPPC_SYSOID ".1.3.6.1.4.1.935" diff --git a/m4/nut_check_libgd.m4 b/m4/nut_check_libgd.m4 index b6f58efcb1..a8c7de5d17 100644 --- a/m4/nut_check_libgd.m4 +++ b/m4/nut_check_libgd.m4 @@ -127,9 +127,17 @@ if test -z "${nut_have_libgd_seen}"; then AC_MSG_CHECKING([with gdlib.pc Libs.private]) LDFLAGS="$LDFLAGS $_LIBS_PRIVATE" unset ac_cv_search_gdImagePng - AC_SEARCH_LIBS(gdImagePng, gd, [], [nut_have_libgd=no]) + AC_SEARCH_LIBS(gdImagePng, gd, [nut_have_libgd=yes], [nut_have_libgd=no]) ]) unset _LIBS_PRIVATE + dnl At least mingw 32-bit builds of the DLL seem to not + dnl tell the linker how to get from GD to PNG lib + AS_IF([test x"$nut_have_libgd" = xno], [ + AC_MSG_CHECKING([with explicit -lpng in the loop]) + LDFLAGS="$LDFLAGS -lgd" + unset ac_cv_search_gdImagePng + AC_SEARCH_LIBS(gdImagePng, png png16, [nut_have_libgd=yes], [nut_have_libgd=no]) + ]) ]) ]) diff --git a/scripts/python/module/Makefile.am b/scripts/python/module/Makefile.am index 0f64340c22..17659223eb 100644 --- a/scripts/python/module/Makefile.am +++ b/scripts/python/module/Makefile.am @@ -25,7 +25,7 @@ GENERATED_DIST = dist build *.egg-info GENERATED_SRC = PyNUTClient README.txt LICENSE-GPL3 # These are normally generated by a NUT build, but if we want to iterate -# specifically PyNUTClient packaging - `make clean dist` should do it here: +# specifically PyNUTClient packaging - `make veryclean dist` should do it here: GENERATED_PY = test_nutclient.py PyNUT.py setup.py # (Re-)generate files normally made by `configure` from .in templates @@ -40,6 +40,8 @@ $(GENERATED_DIST): .pypi-dist clean-local: rm -rf $(GENERATED_SRC) $(GENERATED_DIST) rm -f .pypi-src .pypi-dist* + +veryclean: clean rm -f $(GENERATED_PY) # Python test envs take a while to populate, so maybe better not clean @@ -47,6 +49,7 @@ clean-local: # if this choice proves a problem. distclean-local: rm -rf .tox + rm -f $(GENERATED_PY) MAINTAINERCLEANFILES = Makefile.in .dirstamp .pypi-tools* diff --git a/scripts/subdriver/gen-snmp-subdriver.sh b/scripts/subdriver/gen-snmp-subdriver.sh index 4683aff9a5..aa9a53fd5c 100755 --- a/scripts/subdriver/gen-snmp-subdriver.sh +++ b/scripts/subdriver/gen-snmp-subdriver.sh @@ -10,7 +10,7 @@ # Copyright (C) # 2011 - 2012 Arnaud Quette # 2015 - 2022 Eaton (author: Arnaud Quette ) -# 2011 - 2022 Jim Klimov +# 2011 - 2024 Jim Klimov # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -206,7 +206,7 @@ generate_C() { #include "${HFILE}" - #define ${UDRIVER}_MIB_VERSION "0.1" + #define ${UDRIVER}_MIB_VERSION "0.01" #define ${UDRIVER}_SYSOID "${DEVICE_SYSOID}" diff --git a/tools/nut-usbinfo.pl b/tools/nut-usbinfo.pl index 945cbad00f..080a5e91aa 100755 --- a/tools/nut-usbinfo.pl +++ b/tools/nut-usbinfo.pl @@ -361,7 +361,8 @@ sub find_usbdevs $driver=$1; } else { - die "Unknown driver type: $nameFile"; + warn "Unknown driver type: $nameFile"; + next; } if ($vendor{$VendorID}{$ProductID}{"driver"}) { if ($driver ne $vendor{$VendorID}{$ProductID}{"driver"}) {