Skip to content

Report libmodbus linking type in drivers with it; revise NEWS and UPGRADING docs for 2.8.3 #2904

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Apr 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
87dab45
common/common.c, NEWS.adoc: upsnotify(): default to not spam if our f…
jimklimov Apr 16, 2025
99a804d
configure.ac: detect LDD early, so everyone can use it if available
jimklimov Apr 16, 2025
d2d1735
m4/nut_check_libmodbus.m4: only define NUT_MODBUS_HAS_USB if nut_have…
jimklimov Apr 16, 2025
29ff1f6
m4/nut_check_libmodbus.m4: detect NUT_MODBUS_LINKTYPE_STR
jimklimov Apr 16, 2025
7fd0e56
drivers/apc_modbus.c: report NUT_MODBUS_LINKTYPE_STR
jimklimov Apr 16, 2025
719cbdf
drivers/phoenixcontact_modbus.c, drivers/generic_modbus.c, drivers/hu…
jimklimov Apr 16, 2025
1ca6827
NEWS.adoc: modbus drivers now report NUT_MODBUS_LINKTYPE_STR [#2897]
jimklimov Apr 16, 2025
6863cea
NEWS.adoc: revise notes for NUT v2.8.3 release to group some themes a…
jimklimov Apr 16, 2025
907cd5d
UPGRADING.adoc: revise notes for NUT v2.8.3 release to upper-case sta…
jimklimov Apr 16, 2025
c15e5c7
*/Makefile.am: where we echo " TOKEN description", separate them by…
jimklimov Apr 17, 2025
911e488
*/Makefile.am: report work skipped by design as " SKIP description"…
jimklimov Apr 17, 2025
9fc5fb5
Makefile.am, tools/Makefile.am: fix parallel rebuilds of nut-scanner …
jimklimov Apr 18, 2025
2f98488
tools/nut-usbinfo.pl: comment a TODO
jimklimov Apr 18, 2025
87cb86a
docs/maintainer-guide.txt: more notes to check code/recipe quality be…
jimklimov Apr 15, 2025
775d202
configure.ac: report something reasonable if we skipped checking for …
jimklimov Apr 20, 2025
2e185f9
configure.ac: always detect if we have_disted_doc_man
jimklimov Apr 20, 2025
e084607
Jenkinsfile-dynamatrix: skip macos for Default Autotools builds (figh…
jimklimov Apr 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Jenkinsfile-dynamatrix
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ set | sort -n """
//dynamatrixAxesLabels: ['OS_FAMILY', 'OS_DISTRO', '${COMPILER}VER', 'ARCH${ARCH_BITS}'],
//dynamatrixAxesLabels: [~/^OS/, '${COMPILER}VER', 'ARCH${ARCH_BITS}'],
excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_STRICT_C
+ [[~/OS_DISTRO=netbsd/]] // commented in detail below
+ [[~/OS_DISTRO=(macos|netbsd)/]] // commented in detail below
+ [dynacfgPipeline.axisCombos_WINDOWS_CROSS]
], body)
}, // getParStages
Expand Down Expand Up @@ -432,7 +432,7 @@ set | sort -n """
//dynamatrixAxesLabels: ['OS_FAMILY', 'OS_DISTRO', '${COMPILER}VER', 'ARCH${ARCH_BITS}'],
//dynamatrixAxesLabels: [~/^OS/, '${COMPILER}VER', 'ARCH${ARCH_BITS}'],
excludeCombos: dynacfgPipeline.excludeCombos_DEFAULT_STRICT_C
+ [[~/OS_DISTRO=netbsd/]] // commented in detail below
+ [[~/OS_DISTRO=(macos|netbsd)/]] // commented in detail below
+ [dynacfgPipeline.axisCombos_WINDOWS_CROSS]
], body)
}, // getParStages
Expand Down
73 changes: 41 additions & 32 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ SUBDIRS_ALL_LIBS_LOCAL = \
all-libs-local/clients \
all-libs-local/drivers \
all-libs-local/tests \
all-libs-local/tools \
all-libs-local/tools/nut-scanner

# First target often defines default behavior, and in automake is always at least:
Expand All @@ -93,19 +94,19 @@ SUBDIR_MAKE_VERBOSE = default
all-fanout-maybe:
+@if [ x"$(NUT_MAKE_SKIP_FANOUT)" = xtrue ] ; then \
if [ x"$(SUBDIR_MAKE_VERBOSE)" != x0 ] ; then \
echo " SUBDIR-MAKE $@: skip optimization for parallel make - NUT_MAKE_SKIP_FANOUT is set" ; \
echo " SUBDIR-MAKE $@: skip optimization for parallel make - NUT_MAKE_SKIP_FANOUT is set" ; \
fi ; \
exit 0 ; \
fi ; \
case "-$(MAKEFLAGS) $(AM_MAKEFLAGS)" in \
*-j|*-j" "*|*-{j,l}{0,1,2,3,4,5,6,7,8,9}*|*-[jl][0123456789]*|*{-l,--jobs,--load-average,--max-load}" "{-,0,1,2,3,4,5,6,7,8,9}*|*--jobserver*|*--jobs" "[0123456789]*|*--load-average" "[0123456789]*|*--max-load" "[0123456789]*) \
if [ x"$(SUBDIR_MAKE_VERBOSE)" != x0 ] ; then \
echo " SUBDIR-MAKE $@: implement optimization for parallel make as 'make all-fanout-subdirs'" ; \
echo " SUBDIR-MAKE $@: implement optimization for parallel make as 'make all-fanout-subdirs'" ; \
fi ; \
$(MAKE) $(AM_MAKEFLAGS) all-fanout-subdirs ;; \
*) \
if [ x"$(SUBDIR_MAKE_VERBOSE)" != x0 ] ; then \
echo " SUBDIR-MAKE $@: skip optimization for parallel make - we seem to run sequentially now, seen MAKEFLAGS='$(MAKEFLAGS)' AM_MAKEFLAGS='$(AM_MAKEFLAGS)'" ; \
echo " SUBDIR-MAKE $@: skip optimization for parallel make - we seem to run sequentially now, seen MAKEFLAGS='$(MAKEFLAGS)' AM_MAKEFLAGS='$(AM_MAKEFLAGS)'" ; \
fi ;; \
esac

Expand Down Expand Up @@ -175,12 +176,12 @@ SUBDIR_TGT_RULE = ( \
[ x"$${TGT-}" != x ] || TGT="`echo '$@' | awk -F/ '{print $$1}'`" ; \
[ x"$${DIR-}" != x ] || DIR="`echo '$@' | sed 's,^[^/]*/,,'`" ; \
if [ x"$(SUBDIR_MAKE_VERBOSE)" != x0 ] ; then \
echo " SUBDIR-MAKE STARTING: 'make $$TGT' in $$DIR ..." ; \
echo " SUBDIR-MAKE STARTING: 'make $$TGT' in $$DIR ..." ; \
fi ; \
cd "$(abs_builddir)/$${DIR}" && \
$(MAKE) $(AM_MAKEFLAGS) $${SUBDIR_TGT_MAKEFLAGS-} "$${TGT}" || { RES=$$?; echo " SUBDIR-MAKE FAILURE: 'make $$TGT' in $$DIR" >&2 ; exit $$RES ; } ; \
$(MAKE) $(AM_MAKEFLAGS) $${SUBDIR_TGT_MAKEFLAGS-} "$${TGT}" || { RES=$$?; echo " SUBDIR-MAKE FAILURE: 'make $$TGT' in $$DIR" >&2 ; exit $$RES ; } ; \
if [ x"$(SUBDIR_MAKE_VERBOSE)" != x0 ] ; then \
echo " SUBDIR-MAKE SUCCESS: 'make $$TGT' in $$DIR" ; \
echo " SUBDIR-MAKE SUCCESS: 'make $$TGT' in $$DIR" ; \
fi ; \
)

Expand Down Expand Up @@ -229,15 +230,23 @@ all-libs-local/drivers: all-libs-local/common
all-libs-local/tests: all-libs-local/common
+@$(SUBDIR_TGT_RULE)

### Delivers: generated sources and/or headers for nut-scanner
### No dependencies: actually runs as part of autogen.sh but may be
### re-run during development when USB or SNMP driver sources change.
all-libs-local/tools:
+@$(SUBDIR_TGT_RULE)

### Delivers: libnutscan.la
### LIB-Requires-ext: drivers/libserial-nutscan.la
### LIB-Requires-ext: common/libnutwincompat.la common/libcommonstr.la
### HDR-Requires-ext: clients/libupsclient-version.h
### HDR-Requires-ext: nut-scanner/nutscan-snmp.h nut-scanner/nutscan-usb.h
### (generated by nut-scanner-deps/tools aliased as all-libs-local/tools)
### Requires-int: libnutscan.la
### Note: indirectly (ltdl) may use installed libupsclient.so
### however does directly use libupsclient-version.h
### for hints to find it at run-time
all-libs-local/tools/nut-scanner: all-libs-local/drivers all-libs-local/common all-libs-local/clients
all-libs-local/tools/nut-scanner: all-libs-local/drivers all-libs-local/common all-libs-local/clients all-libs-local/tools
+@$(SUBDIR_TGT_RULE)

# Handle all SUBDIRS_ALL_RECURSIVE in a way that dependencies can be specified,
Expand Down Expand Up @@ -543,7 +552,7 @@ else !HAVE_VALGRIND
memcheck distcheck-valgrind:
@echo "Starting $@" >&2
@echo "See also scripts/valgrind in NUT sources for a helper tool"
@echo "SKIPPED $@ : valgrind was not detected on this system by configure script" >&2
@echo " SKIP $@ : valgrind was not detected on this system by configure script" >&2
endif !HAVE_VALGRIND

# workaround the dist generated files that are also part of the distribution
Expand Down Expand Up @@ -594,7 +603,7 @@ maintainer-clean-local:
distclean-local:
+@for DIR in $(SUBDIRS) ; do \
if test -f "$${DIR}/Makefile" ; then \
echo " DISTCLEAN in $${DIR}" >&2 ; \
echo " DISTCLEAN in $${DIR}" >&2 ; \
( cd "$${DIR}" && $(MAKE) $(AM_MAKEFLAGS) -s distclean ) || exit ; \
fi ; \
done
Expand Down Expand Up @@ -648,7 +657,7 @@ spellcheck spellcheck-interactive:
if [ x"$(NUT_MAKE_SKIP_FANOUT)" = xtrue ] ; then \
RES=0 ; \
if [ x"$(SUBDIR_MAKE_VERBOSE)" != x0 ] ; then \
echo " SUBDIR-MAKE $@: skip optimization for parallel make - NUT_MAKE_SKIP_FANOUT is set" ; \
echo " SUBDIR-MAKE $@: skip optimization for parallel make - NUT_MAKE_SKIP_FANOUT is set" ; \
fi ; \
(cd $(builddir)/docs && $(MAKE) $(AM_MAKEFLAGS) -k -s $(abs_top_builddir)/docs/.prep-src-docs) || RES=$$? ; \
(cd $(builddir)/docs/man && $(MAKE) $(AM_MAKEFLAGS) -k -s $(abs_top_builddir)/docs/man/.prep-src-docs) || RES=$$? ; \
Expand Down Expand Up @@ -914,26 +923,26 @@ $(abs_top_builddir)/ChangeLog: tools/gitlog2changelog.py dummy-stamp
if test -e .git ; then \
NUT_GITDIR=".git" ; if test -r "$${NUT_GITDIR}" -a ! -d "$${NUT_GITDIR}" ; then GD="`grep -E '^gitdir:' "$${NUT_GITDIR}" | sed 's/^gitdir: *//'`" && test -n "$$GD" -a -d "$$GD" && NUT_GITDIR="$$GD" ; fi ; \
if test -s "$@" -a -d "$${NUT_GITDIR}" && test -z "`find "$${NUT_GITDIR}" -newer "$@" 2>/dev/null`" ; then \
echo " DOC-CHANGELOG-GENERATE $@ : SKIP (keep existing)" ; \
echo " DOC-CHANGELOG-GENERATE $@ : SKIP (keep existing)" ; \
echo "Using still-valid ChangeLog file generated earlier from same revision of Git source metadata in '$${NUT_GITDIR}'" >&2 ; \
else \
if test -s "$@" ; then \
echo " DOC-CHANGELOG-GENERATE $@ : RE-GENERATE (older than Git workspace metadata) ..." ; \
echo " DOC-CHANGELOG-GENERATE $@ : RE-GENERATE (older than Git workspace metadata) ..." ; \
else \
echo " DOC-CHANGELOG-GENERATE $@ : GENERATE (currently absent) ..." ; \
echo " DOC-CHANGELOG-GENERATE $@ : GENERATE (currently absent) ..." ; \
fi ; \
CHANGELOG_FILE="$@" $(WITH_PDF_NONASCII_TITLES_ENVVAR) \
CHANGELOG_REQUIRE_GROUP_BY_DATE_AUTHOR="$(CHANGELOG_REQUIRE_GROUP_BY_DATE_AUTHOR_ENVVAR)" \
$(abs_top_builddir)/tools/gitlog2changelog.py $(GITLOG_START_POINT) \
&& { echo " DOC-CHANGELOG-GENERATE $@ : SUCCESS"; } \
&& { echo " DOC-CHANGELOG-GENERATE $@ : SUCCESS"; } \
|| { \
echo " DOC-CHANGELOG-GENERATE $@ : FAILED (non-fatal)" >&2 ; \
echo " DOC-CHANGELOG-GENERATE $@ : FAILED (non-fatal)" >&2 ; \
printf "gitlog2changelog.py failed to generate the ChangeLog.\n\nNOTE: See https://github.com/networkupstools/nut/commits/master for change history.\n\n" > "$@" ; \
} ; \
fi ; \
else \
if test x"$(abs_top_srcdir)" != x"$(abs_top_builddir)" -a -s ./ChangeLog ; then \
echo " DOC-CHANGELOG-GENERATE $@ : SKIP (keep existing)" ; \
echo " DOC-CHANGELOG-GENERATE $@ : SKIP (keep existing)" ; \
if ! diff ./ChangeLog "$@" >/dev/null 2>/dev/null ; then \
echo "Using distributed ChangeLog file from sources (and builddir is not srcdir)" >&2 ; \
rm -f "$@" || true ; \
Expand All @@ -943,10 +952,10 @@ $(abs_top_builddir)/ChangeLog: tools/gitlog2changelog.py dummy-stamp
fi ; \
else \
if test -s "$@" ; then \
echo " DOC-CHANGELOG-GENERATE $@ : SKIP (keep existing)" ; \
echo " DOC-CHANGELOG-GENERATE $@ : SKIP (keep existing)" ; \
echo "Using distributed ChangeLog file from sources (and builddir is srcdir)" >&2 ; \
else \
echo " DOC-CHANGELOG-GENERATE $@ : FAILED (non-fatal)" >&2 ; \
echo " DOC-CHANGELOG-GENERATE $@ : FAILED (non-fatal)" >&2 ; \
printf "Failed to generate the ChangeLog.\n\nNOTE: See https://github.com/networkupstools/nut/commits/master for change history.\n\n" > "$@" ; \
fi ; \
fi ; \
Expand Down Expand Up @@ -1134,41 +1143,41 @@ install-as-root:
exit ; \
fi ; \
fi ; \
echo " MKDIR $(DESTDIR)/@STATEPATH@ $(DESTDIR)/@STATEPATH@/upssched" >&2 ; \
echo " MKDIR $(DESTDIR)/@STATEPATH@ $(DESTDIR)/@STATEPATH@/upssched" >&2 ; \
$(MKDIR_P) "$(DESTDIR)/@STATEPATH@/upssched" && \
for D in "@PIDPATH@" "@ALTPIDPATH@" "@ALTSTATEPATH@" "@CONFPATH@" ; do \
case x"$$D" in \
x|x@*) ;; \
*) echo " MKDIR $(DESTDIR)/$$D" >&2 ; \
*) echo " MKDIR $(DESTDIR)/$$D" >&2 ; \
$(MKDIR_P) "$(DESTDIR)/$$D" \
|| exit ;; \
esac ; \
done ; \
if (command -v chmod) ; then \
echo " CHMOD(0770) $(DESTDIR)/@STATEPATH@/upssched" >&2 ; \
echo " CHMOD(0770) $(DESTDIR)/@STATEPATH@/upssched" >&2 ; \
chmod 0770 "$(DESTDIR)/@STATEPATH@/upssched" \
|| exit ; \
for D in "@STATEPATH@" "@PIDPATH@" "@ALTPIDPATH@" "@ALTSTATEPATH@" ; do \
case x"$$D" in \
x|x@*|x/run|x/var/run|x/tmp|x/var/tmp|x/dev/shm|x/etc|x/var|x/usr|x/usr/local|x/usr/local/etc|x/usr/etc) ;; \
*) echo " CHMOD(0770) $(DESTDIR)/$$D" >&2 ; \
*) echo " CHMOD(0770) $(DESTDIR)/$$D" >&2 ; \
chmod 0770 "$(DESTDIR)/$$D" \
|| exit ;; \
esac ; \
done ; \
case x"@CONFPATH@" in \
x|x@*|x/run|x/var/run|x/tmp|x/var/tmp|x/dev/shm|x/etc|x/var|x/usr|x/usr/local|x/usr/local/etc|x/usr/etc) ;; \
*) echo " CHMOD(0751) $(DESTDIR)/@CONFPATH@" >&2 ; \
*) echo " CHMOD(0751) $(DESTDIR)/@CONFPATH@" >&2 ; \
chmod 0751 "$(DESTDIR)/@CONFPATH@" \
|| exit ;; \
esac ; \
for F in hosts.conf.sample upsstats-single.html.sample upsstats.html.sample upsset.conf.sample ; do \
echo " CHMOD(0644) CGI: $(DESTDIR)/@CONFPATH@/$$F" >&2 ; \
echo " CHMOD(0644) CGI: $(DESTDIR)/@CONFPATH@/$$F" >&2 ; \
chmod 0644 "$(DESTDIR)/@CONFPATH@/$$F" \
|| { if $(WITH_CGI) ; then exit 1 ; else true ; fi ; } ; \
done ; \
for F in nut.conf.sample ups.conf.sample upsd.conf.sample upsd.users.sample upsmon.conf.sample upssched.conf.sample ; do \
echo " CHMOD(0640) $(DESTDIR)/@CONFPATH@/$$F" >&2 ; \
echo " CHMOD(0640) $(DESTDIR)/@CONFPATH@/$$F" >&2 ; \
chmod 0640 "$(DESTDIR)/@CONFPATH@/$$F" \
|| exit ; \
done ; \
Expand All @@ -1178,30 +1187,30 @@ install-as-root:
if (command -v chown) && test 0 -lt "`id -u '@RUN_AS_USER@'`" \
&& ( test 0 -lt "`getent group '@RUN_AS_GROUP@' | awk -F: '{print $$3}'`" || test 0 -lt "`id -g '@RUN_AS_GROUP@'`" ) \
; then \
echo " CHOWN(@RUN_AS_USER@:@RUN_AS_GROUP@) $(DESTDIR)/@STATEPATH@/upssched" >&2 ; \
echo " CHOWN(@RUN_AS_USER@:@RUN_AS_GROUP@) $(DESTDIR)/@STATEPATH@/upssched" >&2 ; \
chown "@RUN_AS_USER@:@RUN_AS_GROUP@" "$(DESTDIR)/@STATEPATH@/upssched" \
|| exit ; \
for D in "@STATEPATH@" "@PIDPATH@" "@ALTPIDPATH@" "@ALTSTATEPATH@" ; do \
case x"$$D" in \
x|x@*|x/run|x/var/run|x/tmp|x/var/tmp|x/dev/shm|x/etc|x/var|x/usr|x/usr/local|x/usr/local/etc|x/usr/etc) ;; \
*) echo " CHOWN(@RUN_AS_USER@:@RUN_AS_GROUP@) $(DESTDIR)/$$D" >&2 ; \
*) echo " CHOWN(@RUN_AS_USER@:@RUN_AS_GROUP@) $(DESTDIR)/$$D" >&2 ; \
chown "@RUN_AS_USER@:@RUN_AS_GROUP@" "$(DESTDIR)/$$D" \
|| exit ;; \
esac ; \
done ; \
case x"@CONFPATH@" in \
x|x@*|x/run|x/var/run|x/tmp|x/var/tmp|x/dev/shm|x/etc|x/var|x/usr|x/usr/local|x/usr/local/etc|x/usr/etc) ;; \
*) echo " CHOWN(root:@RUN_AS_GROUP@) $(DESTDIR)/@CONFPATH@" >&2 ; \
*) echo " CHOWN(root:@RUN_AS_GROUP@) $(DESTDIR)/@CONFPATH@" >&2 ; \
chown "root:@RUN_AS_GROUP@" "$(DESTDIR)/@CONFPATH@" \
|| exit ;; \
esac ; \
for F in hosts.conf.sample upsstats-single.html.sample upsstats.html.sample upsset.conf.sample ; do \
echo " CHOWN(root:@RUN_AS_GROUP@) CGI: $(DESTDIR)/@CONFPATH@/$$F" >&2 ; \
echo " CHOWN(root:@RUN_AS_GROUP@) CGI: $(DESTDIR)/@CONFPATH@/$$F" >&2 ; \
chown "root:@RUN_AS_GROUP@" "$(DESTDIR)/@CONFPATH@/$$F" \
|| { if $(WITH_CGI) ; then exit 1 ; else true ; fi ; } ; \
done ; \
for F in nut.conf.sample ups.conf.sample upsd.conf.sample upsd.users.sample upsmon.conf.sample upssched.conf.sample ; do \
echo " CHOWN(root:@RUN_AS_GROUP@) $(DESTDIR)/@CONFPATH@/$$F" >&2 ; \
echo " CHOWN(root:@RUN_AS_GROUP@) $(DESTDIR)/@CONFPATH@/$$F" >&2 ; \
chown "root:@RUN_AS_GROUP@" "$(DESTDIR)/@CONFPATH@/$$F" \
|| exit ; \
done ; \
Expand Down Expand Up @@ -1370,10 +1379,10 @@ install-win-bundle-thirdparty:

else !HAVE_WINDOWS
install-win-bundle:
@echo "SKIP: '$@' not enabled for current build configuration"
@echo " SKIP '$@' : not enabled for current build configuration"

install-win-bundle-thirdparty:
@echo "SKIP: '$@' not enabled for current build configuration"
@echo " SKIP '$@' : not enabled for current build configuration"
endif !HAVE_WINDOWS

print-MAINTAINERCLEANFILES print-REALCLEANFILES:
Expand Down
Loading