Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
b47cf64
NEWS.adoc: Adjusted C++ header search path on Termux [#3353]
jimklimov Mar 21, 2026
b3c171d
NEWS.adoc: fix typo
jimklimov Mar 21, 2026
704bf17
conf/ups.conf.sample: clarify run-time group nuances [#3356]
jimklimov Mar 22, 2026
0faed3a
configure.ac, clients/Makefile.am, tests/Makefile.am: refactor with L…
jimklimov Mar 22, 2026
65b977f
configure.ac: generalize fix for LIBSSL_CXXFLAGS when -isystem is inv…
jimklimov Mar 22, 2026
722fb00
configure.ac, clients/nutclient.{cpp,h}, tests/cpputest-client.cpp, c…
jimklimov Mar 22, 2026
9e341df
configure.ac: extend detection of LIBSSL_CXXFLAGS on MSYS2 [#1599]
jimklimov Mar 22, 2026
0a6d278
clients/nutclient.cpp: fix includes for non-NSS builds [#1599]
jimklimov Mar 22, 2026
4254b3a
clients/nutclient.h: drop commented-away undefine of NSS/OPENSSL when…
jimklimov Mar 22, 2026
c825380
NEWS.adoc: highlight that PR #3233 also fixes fallout of #3008
jimklimov Mar 23, 2026
73fc502
Makefile.am: reformat spellcheck rule shell scriptlet
jimklimov Mar 23, 2026
7eb3358
docs/Makefile.am: move NEWS.adoc and UPGRADING.adoc to top of SPELLCH…
jimklimov Mar 23, 2026
8187a55
docs/Makefile.am: spellcheck: debug SPELLCHECK_SRCDIR and SPELLCHECK_…
jimklimov Mar 23, 2026
2c87f42
docs/Makefile.am: spellcheck: prioritize certain SPELLCHECK_NOEXT_DOC…
jimklimov Mar 23, 2026
ccdea76
Makefile.am: revise tracing of SUBDIR-MAKE reports to make them consi…
jimklimov Mar 23, 2026
2bd16d3
Makefile.am: fix "make check" done from scratch [#2871, #3039]
jimklimov Mar 23, 2026
e17d8a7
docs/FAQ.txt: expand the section on driver inability to connect to a …
jimklimov Mar 23, 2026
a22f8a9
GitIgnore .all.*-generated.timestamp files [#2871]
jimklimov Mar 23, 2026
15c2094
Makefile.am, docs/man/Makefile.am: apply ticks similar to those for g…
jimklimov Mar 23, 2026
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
Makefile
Makefile.in
tags
.all.*-generated.timestamp

## Parent directory only
/aclocal.m4
Expand Down
107 changes: 82 additions & 25 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -94,22 +94,46 @@ SUBDIRS_ALL_LIBS_LOCAL = \

#all all-recursive all-am-local all-local: all-fanout-maybe
all-recursive: all-fanout-maybe
check-recursive install-recursive: generated-headers-with-a-touch

all check install: all-fanout-cleanup
# Make sure automake-defined check/install goals begin with our hack for
# touch-files for generated headers (so each depending sub-directory does
# not re-evaluate those rules in whole); note that these goals may end up
# also calling all-fanout-maybe (as they depend on "all"):
check-recursive install-recursive: generated-headers-with-a-touch

# NOTE: Beside dependency above, also called from some code paths in
# the all-fanout-maybe implementation:
generated-headers-with-a-touch: @dotMAKE@
$(MAKE) $(AM_MAKEFLAGS) NUT_VERSION_H_GENERATED=false nut_version.h
$(MAKE) $(AM_MAKEFLAGS) touch-include-all-nut_version-generated.timestamp
$(MAKE) $(AM_MAKEFLAGS) libupsclient-version.h
$(MAKE) $(AM_MAKEFLAGS) touch-clients-all-libupsclient_version-generated.timestamp
+$(MAKE) $(AM_MAKEFLAGS) NUT_VERSION_H_GENERATED=false nut_version.h
+$(MAKE) $(AM_MAKEFLAGS) touch-include-all-nut_version-generated.timestamp
+$(MAKE) $(AM_MAKEFLAGS) libupsclient-version.h
+$(MAKE) $(AM_MAKEFLAGS) touch-clients-all-libupsclient_version-generated.timestamp
+$(MAKE) $(AM_MAKEFLAGS) NUT_LINKMAN_GENERATED=false prep-linkman-generated
+$(MAKE) $(AM_MAKEFLAGS) touch-docs-man-all-linkman-generated-generated.timestamp

# After completing the automake-defined goals, clean up:
all: all-fanout-cleanup
check: check-fanout-cleanup
install: install-fanout-cleanup

# Run as part of "all", but after the autotools-standard "all-recursive"
# where we quiesce nut_version.h regeneration attempts for each subdir
all-fanout-cleanup: all-recursive
# which automake recipes iterate; similarly for "check" and "install":
cleanup-touchfiles-for-generated-headers:
@rm -f include/.all.nut_version-generated.timestamp \
docs/man/.all.nut_linkman-generated.timestamp \
clients/.all.libupsclient_version-generated.timestamp

all-fanout-cleanup: all-recursive @dotMAKE@
+@$(MAKE) $(AM_MAKEFLAGS) cleanup-touchfiles-for-generated-headers

check-fanout-cleanup: check-recursive @dotMAKE@
+@$(MAKE) $(AM_MAKEFLAGS) cleanup-touchfiles-for-generated-headers

install-fanout-cleanup: install-recursive @dotMAKE@
+@$(MAKE) $(AM_MAKEFLAGS) cleanup-touchfiles-for-generated-headers

# Called from generated-headers-with-a-touch:
touch-include-all-nut_version-generated.timestamp:
@[ -s include/nut_version.h ]
@touch -r include/nut_version.h -d '-10 seconds' include/.all.nut_version-generated.timestamp && exit ; \
Expand All @@ -122,6 +146,16 @@ touch-clients-all-libupsclient_version-generated.timestamp:
touch -d '1970-01-01' clients/.all.libupsclient_version-generated.timestamp && exit ; \
touch clients/.all.libupsclient_version-generated.timestamp

touch-docs-man-all-linkman-generated-generated.timestamp:
@[ -s docs/man/linkman-driver-names.txt ] && [ -s docs/man/linkman-drivertool-names.txt ]
@if test -n "`find docs/man/linkman-driver-names.txt -newer docs/man/linkman-drivertool-names.txt`" ; then \
touch -r docs/man/linkman-drivertool-names.txt -d '-10 seconds' docs/man/.all.nut_linkman-generated.timestamp && exit ; \
else \
touch -r docs/man/linkman-driver-names.txt -d '-10 seconds' docs/man/.all.nut_linkman-generated.timestamp && exit ; \
fi ; \
touch -d '1970-01-01' docs/man/.all.nut_linkman-generated.timestamp && exit ; \
touch docs/man/.all.nut_linkman-generated.timestamp

# Verbosity for fanout rule tracing; 0/1 (or "default" that may auto-set
# to 0 or 1 in some rules below)
SUBDIR_MAKE_VERBOSE = default
Expand All @@ -134,23 +168,23 @@ all-fanout-maybe: @dotMAKE@
clients/.all.libupsclient_version-generated.timestamp
+@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 $@: skip optimization for parallel make - NUT_MAKE_SKIP_FANOUT is set" ; \
fi ; \
$(MAKE) $(AM_MAKEFLAGS) generated-headers-with-a-touch || exit ; \
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 LAUNCH $@: implement optimization for parallel make as 'make all-fanout-subdirs'" ; \
fi ; \
$(MAKE) $(AM_MAKEFLAGS) all-fanout-subdirs || exit ; \
if [ x"$(SUBDIR_MAKE_VERBOSE)" != x0 ] ; then \
echo " SUBDIR-MAKE $@: optimization for parallel make as 'make all-fanout-subdirs' finished; now automake rules can follow up with default implementation of 'all-recursive' and/or 'all' (may try to regenerate some files again; should keep existing results though)" ; \
echo " SUBDIR-MAKE FINISH $@: optimization for parallel make as 'make all-fanout-subdirs' finished; now automake rules can follow up with default implementation of 'all-recursive' and/or 'all' (may try to regenerate some files again; should keep existing results though)" ; \
fi ;; \
*) \
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 $@: skip optimization for parallel make - we seem to run sequentially now, seen MAKEFLAGS='$(MAKEFLAGS)' AM_MAKEFLAGS='$(AM_MAKEFLAGS)'" ; \
fi ; \
$(MAKE) $(AM_MAKEFLAGS) generated-headers-with-a-touch || exit ; \
;; \
Expand Down Expand Up @@ -234,12 +268,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 $${SUBDIR_TGT_MAKEFLAGS-} $$TGT' in $$DIR ..." ; \
echo " SUBDIR-MAKE STARTING $@: 'make $${SUBDIR_TGT_MAKEFLAGS-} $$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 ; } ; \
if [ x"$(SUBDIR_MAKE_VERBOSE)" != x0 ] ; then \
echo " SUBDIR-MAKE SUCCESS $@: 'make $${SUBDIR_TGT_MAKEFLAGS-} $$TGT' in $$DIR" ; \
echo " SUBDIR-MAKE SUCCESS $@: 'make $${SUBDIR_TGT_MAKEFLAGS-} $$TGT' in $$DIR" ; \
fi ; \
)

Expand Down Expand Up @@ -343,16 +377,30 @@ all/include: all-libs-local/include @dotMAKE@
+@NUT_VERSION_H_GENERATED=true; export NUT_VERSION_H_GENERATED; \
$(SUBDIR_TGT_RULE)

prep-src-docs/docs/man: @dotMAKE@
+@SUBDIR_TGT_MAKEFLAGS='MAINTAINER_DOCS_PREP_MAN_DELAY=3'; export SUBDIR_TGT_MAKEFLAGS; \
# Quickly bail out if somehow recursed into this goal from a dependency
# (looking at all/docs with its several sub-make calls):
prep-linkman-generated/docs/man: @dotMAKE@
+@if [ x"$(NUT_LINKMAN_GENERATED)" = xtrue ] || [ x"$${NUT_LINKMAN_GENERATED}" = xtrue ] ; then exit 0 ; fi ; \
SUBDIR_TGT_MAKEFLAGS='NUT_LINKMAN_GENERATED=false'; export SUBDIR_TGT_MAKEFLAGS; \
NUT_LINKMAN_GENERATED=false; export NUT_LINKMAN_GENERATED; \
$(SUBDIR_TGT_RULE) || exit ; \
$(MAKE) $(AM_MAKEFLAGS) touch-docs-man-all-linkman-generated-generated.timestamp

prep-src-docs/docs/man: prep-linkman-generated/docs/man @dotMAKE@
+@SUBDIR_TGT_MAKEFLAGS='MAINTAINER_DOCS_PREP_MAN_DELAY=3 NUT_LINKMAN_GENERATED=true'; export SUBDIR_TGT_MAKEFLAGS; \
NUT_LINKMAN_GENERATED=true; export NUT_LINKMAN_GENERATED; \
$(SUBDIR_TGT_RULE)

prep-src-docs/docs: @dotMAKE@
+@DOCS_NO_MAN=true; export DOCS_NO_MAN; \
prep-src-docs/docs: prep-linkman-generated/docs/man @dotMAKE@
+@SUBDIR_TGT_MAKEFLAGS='NUT_LINKMAN_GENERATED=true'; export SUBDIR_TGT_MAKEFLAGS; \
DOCS_NO_MAN=true; export DOCS_NO_MAN; \
NUT_LINKMAN_GENERATED=true; export NUT_LINKMAN_GENERATED; \
$(SUBDIR_TGT_RULE)

all/docs/man: prep-src-docs/docs/man @dotMAKE@
+@$(SUBDIR_TGT_RULE)
+@SUBDIR_TGT_MAKEFLAGS='NUT_LINKMAN_GENERATED=true'; export SUBDIR_TGT_MAKEFLAGS; \
NUT_LINKMAN_GENERATED=true; export NUT_LINKMAN_GENERATED; \
$(SUBDIR_TGT_RULE)

# Note: we optionally sort of depend on ChangeLog.adoc so it is pre-made and
# pre-processed for html/pdf renders (if any are requested), so they surely
Expand All @@ -361,7 +409,8 @@ all/docs/man: prep-src-docs/docs/man @dotMAKE@
# types are enabled.
MAINTAINER_ASCIIDOCS_CHANGELOG_DELAY = 0
all/docs: prep-src-docs/docs/man @dotMAKE@
+@case "@DOC_BUILD_LIST@" in \
+@NUT_LINKMAN_GENERATED=true; export NUT_LINKMAN_GENERATED; \
case "@DOC_BUILD_LIST@" in \
*pdf*|*html-single*|*html-chunked*) \
echo " DOC-CHANGELOG-ASCIIDOC Pre-generate ChangeLog artifacts before the bulk of $@ ..." ; \
MAINTAINER_ASCIIDOCS_CHANGELOG_DELAY="$(MAINTAINER_ASCIIDOCS_CHANGELOG_DELAY)" \
Expand All @@ -371,11 +420,14 @@ all/docs: prep-src-docs/docs/man @dotMAKE@
echo " DOC-CHANGELOG-ASCIIDOC Pre-generate ChangeLog artifacts before the bulk of $@ : SUCCESS" ;; \
*) ;; \
esac
+@$(MAKE) $(AM_MAKEFLAGS) prep-src-docs/docs
+@DOCS_NO_MAN=true; export DOCS_NO_MAN; $(SUBDIR_TGT_RULE)
+@NUT_LINKMAN_GENERATED=true; export NUT_LINKMAN_GENERATED; \
$(MAKE) $(AM_MAKEFLAGS) prep-src-docs/docs
+@NUT_LINKMAN_GENERATED=true; export NUT_LINKMAN_GENERATED; \
DOCS_NO_MAN=true; export DOCS_NO_MAN; $(SUBDIR_TGT_RULE)

all-recursive/docs: all/docs all/docs/man @dotMAKE@
+@$(SUBDIR_TGT_RULE)
+@NUT_LINKMAN_GENERATED=true; export NUT_LINKMAN_GENERATED; \
$(SUBDIR_TGT_RULE)

# Dependencies below are dictated by who needs whose library from another dir
# (generated by a sub-make there, so we pre-emptively ensure it exists to avoid
Expand Down Expand Up @@ -761,7 +813,7 @@ spellcheck spellcheck-interactive: @dotMAKE@
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 $@: 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 All @@ -781,8 +833,9 @@ spellcheck spellcheck-interactive: @dotMAKE@
fi ; \
export SUBDIR_MAKE_VERBOSE ; \
( $(MAKE) $(AM_MAKEFLAGS) SPELLCHECK_TGT='$@' SUBDIR_MAKE_VERBOSE="$${SUBDIR_MAKE_VERBOSE}" -k -s $(SPELLCHECK_DIRS) && exit ; \
echo "WARNING: FAILED fanned-out attempt in $@, retrying with NUT_MAKE_SKIP_FANOUT" >&2 ; \
$(MAKE) $(AM_MAKEFLAGS) NUT_MAKE_SKIP_FANOUT=true SPELLCHECK_TGT='$@' -k -s $(SPELLCHECK_DIRS) ) || exit ; \
echo "WARNING: FAILED fanned-out attempt in $@, retrying with NUT_MAKE_SKIP_FANOUT" >&2 ; \
$(MAKE) $(AM_MAKEFLAGS) NUT_MAKE_SKIP_FANOUT=true SPELLCHECK_TGT='$@' -k -s $(SPELLCHECK_DIRS) \
) || exit ; \
if [ x'$@' = xspellcheck-interactive ] ; then \
echo "SUCCESS: $@: follow up with spellcheck-quick to revise and update timestamps"; \
$(MAKE) $(AM_MAKEFLAGS) spellcheck-quick ; \
Expand Down Expand Up @@ -1087,6 +1140,10 @@ $(abs_top_builddir)/ChangeLog: tools/gitlog2changelog.py dummy-stamp
ChangeLog.adoc: ChangeLog @dotMAKE@
+cd $(abs_top_builddir)/docs && $(MAKE) $(AM_MAKEFLAGS) ../ChangeLog.adoc

prep-linkman-generated: @dotMAKE@
@rm -f docs/man/.all.nut_linkman-generated.timestamp
+cd $(abs_top_builddir)/docs/man && $(MAKE) $(AM_MAKEFLAGS) prep-linkman-generated

nut_version.h include/nut_version.h: @dotMAKE@
@rm -f include/.all.nut_version-generated.timestamp
+cd $(abs_top_builddir)/include && $(MAKE) $(AM_MAKEFLAGS) nut_version.h
Expand Down
8 changes: 7 additions & 1 deletion NEWS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ https://github.com/networkupstools/nut/milestone/12
not-requested (e.g. do not start `upsd` in `MODE=netclient`), even though
the unit is nominally enabled; this should make packaging and providing
service pre-sets more simple. [issue #837, PR #3233]
+
In a way, this should also fix fallout of a change delivered in NUT v2.8.4
release, where `upsmon` could have started with `MODE=none` in `nut.conf`,
but the `nutshutdown` script would bail out quickly and quietly. [PR #3008]
* Fixed thread-safety of IP address printout in `libupsclient` method
`upscli_tryconnect()` (practical bug seen in `nut-scanner` parallel scans).
[issue #3234]
Expand Down Expand Up @@ -327,7 +331,7 @@ https://github.com/networkupstools/nut/milestone/12

- `upsd` data server updates:
* Sometimes "Data for UPS [X] is stale" and "UPS [X] data is no longer
stale" messages were logged in the same second, especially no busy
stale" messages were logged in the same second, especially on busy
systems. Now we allow one more second on top of `MAXAGE` setting to
declare the device dead, just in case fractional/whole second rounding
comes into play and breaks things. [issue #661]
Expand Down Expand Up @@ -502,6 +506,8 @@ several `FSD` notifications into one executed action. [PR #3097]
* Added an option to (primarily) `--disable-threading` for systems with
detected but broken `libpthread` support, or to test alternate code
paths during development or in CI. [#3300]
* Adjusted C++ header search path on Termux when `-isystem` is involved,
as noted with NSS builds. [issues #1599, #1711, PR #3353]

- Recipes, CI and helper script updates not classified above:
* Fixed CI recipes for PyPI publication of PyNUT(Client) module to also
Expand Down
10 changes: 5 additions & 5 deletions clients/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ CLEANFILES =
# 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:
AM_CXXFLAGS = -DHAVE_NUTCOMMON=1 -I$(top_builddir)/include -I$(top_srcdir)/include
if WITH_SSL
AM_CXXFLAGS += $(LIBSSL_CFLAGS)
endif WITH_SSL
if WITH_SSL_CXX
AM_CXXFLAGS += $(LIBSSL_CXXFLAGS)
endif WITH_SSL_CXX

# Make sure out-of-dir dependencies exist (especially when dev-building parts):
$(top_builddir)/include/nut_version.h \
Expand Down Expand Up @@ -309,9 +309,9 @@ if HAVE_WINDOWS
# Many versions of MingW seem to fail to build non-static DLL without this
libnutclient_la_LDFLAGS += -no-undefined
endif HAVE_WINDOWS
if WITH_SSL
if WITH_SSL_CXX
libnutclient_la_LIBADD += $(LIBSSL_LDFLAGS_RPATH) $(LIBSSL_LIBS)
endif WITH_SSL
endif WITH_SSL_CXX
else !HAVE_CXX11
EXTRA_DIST += nutclient.h nutclient.cpp
endif !HAVE_CXX11
Expand Down
Loading
Loading