Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into libconf-nutconf
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
  • Loading branch information
jimklimov committed Jan 29, 2024
2 parents 79327f9 + be1b79a commit a83873b
Show file tree
Hide file tree
Showing 23 changed files with 43 additions and 24 deletions.
6 changes: 3 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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 \
Expand Down
3 changes: 3 additions & 0 deletions NEWS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion clients/Makefile.am
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion clients/upsmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
1 change: 1 addition & 0 deletions data/html/Makefile.am
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion docs/nut.dict
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
personal_ws-1.1 en 3449 utf-8
personal_ws-1.1 en 3450 utf-8
AAC
AAS
ABI
Expand Down Expand Up @@ -1860,6 +1860,7 @@ cpqpower
cpsups
cr
crestfactor
criticality
crlf
cron
crontab
Expand Down
2 changes: 1 addition & 1 deletion drivers/apc-ats-mib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion drivers/apc-epdu-mib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion drivers/apc-pdu-mib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion drivers/bestpower-mib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

/*
Expand Down
2 changes: 1 addition & 1 deletion drivers/delta_ups-mib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion drivers/eaton-pdu-nlogic-mib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion drivers/eaton-pdu-pulizzi-mib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion drivers/emerson-avocent-pdu-mib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion drivers/hpe-pdu3-cis-mib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion drivers/huawei-mib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion drivers/raritan-pdu-mib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion drivers/raritan-px2-mib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion drivers/xppc-mib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
10 changes: 9 additions & 1 deletion m4/nut_check_libgd.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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])
])
])
])
Expand Down
5 changes: 4 additions & 1 deletion scripts/python/module/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -40,13 +40,16 @@ $(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
# them too enthusiastically. Can revise (move to "clean-local") later,
# if this choice proves a problem.
distclean-local:
rm -rf .tox
rm -f $(GENERATED_PY)

MAINTAINERCLEANFILES = Makefile.in .dirstamp .pypi-tools*

Expand Down
4 changes: 2 additions & 2 deletions scripts/subdriver/gen-snmp-subdriver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Copyright (C)
# 2011 - 2012 Arnaud Quette <arnaud.quette@free.fr>
# 2015 - 2022 Eaton (author: Arnaud Quette <ArnaudQuette@Eaton.com>)
# 2011 - 2022 Jim Klimov <jimklimov+nut@gmail.com>
# 2011 - 2024 Jim Klimov <jimklimov+nut@gmail.com>
#
# 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
Expand Down Expand Up @@ -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}"
Expand Down
3 changes: 2 additions & 1 deletion tools/nut-usbinfo.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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"}) {
Expand Down

0 comments on commit a83873b

Please sign in to comment.