Skip to content

Commit 56f1ec3

Browse files
authored
Merge a4d7493 into 276c0b7
2 parents 276c0b7 + a4d7493 commit 56f1ec3

13 files changed

+188
-91
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ Makefile.in
5858
*-prepped
5959
*.usage-report
6060
*.adoc-parsed
61+
*.adoc-parsed.*
6162
*.adoc*.tmp
6263
*.adoc*.tmp.*
6364
*.txt*.tmp

INSTALL.nut.adoc

+14-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Installation instructions
77
//GH_MARKUP_1095//ifndef::top_srcdir[]
88
//GH_MARKUP_1095//include::docs/asciidoc-vars.conf[]
99
//GH_MARKUP_1095//endif::top_srcdir[]
10-
//GH_MARKUP_1095_INCLUDE_BEGIN//7e01bd198 (2024-10-20) docs/asciidoc-vars.conf: try defining linksrcdoc macro
10+
//GH_MARKUP_1095_INCLUDE_BEGIN//a6bd83d48 (2025-03-20) docs/asciidoc-vars.conf: document that linkdoc may have further args
1111
ifndef::asciidoc-vars-nut-included[]
1212
:asciidoc-vars-nut-included: true
1313
// NOTE: The big block of comments and definitions below comes from
@@ -54,6 +54,10 @@ ifndef::asciidoc-vars-nut-included[]
5454
// the command shown. This is also needed to properly display links
5555
// to manpages in both GitHub and generated docs without defining an
5656
// attribute for each manpage.
57+
// * `linkmanext` and `linkmanext2` macros repeat the behavior of the default ones.
58+
// These macros are intended for system man pages (e.g. HTML links might lead
59+
// to a generic internet site, or possibly to a distro-provided library
60+
// online or locally).
5761
//
5862
// Optional attributes set by callers:
5963
// * `website-url` (defaulted below) may be used for "historic website"
@@ -113,9 +117,9 @@ ifndef::env-github[]
113117
// syntax: {linksrcdoc}<document>
114118
// -> linksrcdoc:<document>[]
115119
:linksrcdoc: linksrcdoc:
116-
// * link to doc -> our macro
117-
// syntax: {linkdoc}<document>{ld-s}[<display title>]
118-
// -> linkdoc:<document>[<display title>]
120+
// * link to doc -> our macro (optional 2/3/4 args)
121+
// syntax: {linkdoc}<document>{ld-s}[<display title>{,<anchor>{,<srcdoc>{,<chunkname>}}}]
122+
// -> linkdoc:<document>[<display title>{,<anchor>{,<srcdoc>{,<chunkname>}}}]
119123
:linkdoc: linkdoc:
120124
:ld-s:
121125
// * link to single doc -> our macro
@@ -130,6 +134,8 @@ ifndef::env-github[]
130134
:lm-s: [
131135
:lm-c: ,
132136
:lm-e: ]
137+
:linkmanext: https://www.die.net/search/?q=
138+
:linkmanext2: https://www.die.net/search/?q=
133139
endif::env-github[]
134140
//
135141
// - on GitHub:
@@ -148,8 +154,8 @@ ifdef::env-github[]
148154
// syntax: {linksrcdoc}<document>
149155
// -> link:<document>[]
150156
:linksrcdoc: link:{top_srcdir}/
151-
// * link to doc -> link
152-
// syntax: {linkdoc}<document>{ld-s}[<display title>]
157+
// * link to doc -> link (FIXME: ignore or use 2/3/4 args; currently they are all pasted as <display title> contents!)
158+
// syntax: {linkdoc}<document>{ld-s}[<display title>{,<anchor>{,<srcdoc>{,<chunkname>}}}]
153159
// -> {website-url}docs/<document>.chunked/index.html[<display title>]
154160
:linkdoc: {website-url}docs/
155161
:ld-s: .chunked/index.html
@@ -166,6 +172,8 @@ ifdef::env-github[]
166172
:lm-s: .html[
167173
:lm-c: (
168174
:lm-e: )]
175+
:linkmanext: https://www.die.net/search/?q=
176+
:linkmanext2: https://www.die.net/search/?q=
169177
endif::env-github[]
170178
endif::asciidoc-vars-nut-included[]
171179
//

Makefile.am

+8-25
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,8 @@ distclean-local:
575575

576576
# Hook the documentation building and validating recipes
577577
# Note: these are optionally available (as determined during configure runs)
578+
# Only require SPELLCHECK_REPORT_MAYBE_UPDATED_DICT=yes for the last entry
579+
# (reduce noise for spellcheck-interactive)
578580
# Maint: grep -l 'SPELLCHECK_' `git grep -lw spellcheck '*.am'`
579581
spellcheck spellcheck-interactive:
580582
+@RES=0; \
@@ -596,7 +598,7 @@ spellcheck spellcheck-interactive:
596598
(cd $(builddir)/scripts/systemd && $(MAKE) $(AM_MAKEFLAGS) -s $@) || RES=$$? ; \
597599
(cd $(builddir)/scripts/udev && $(MAKE) $(AM_MAKEFLAGS) -s $@) || RES=$$? ; \
598600
(cd $(builddir)/scripts/upsdrvsvcctl && $(MAKE) $(AM_MAKEFLAGS) -s $@) || RES=$$? ; \
599-
(cd $(builddir)/tests/NIT && $(MAKE) $(AM_MAKEFLAGS) -s $@) || RES=$$? ; \
601+
(cd $(builddir)/tests/NIT && $(MAKE) $(AM_MAKEFLAGS) SPELLCHECK_REPORT_MAYBE_UPDATED_DICT=yes -s $@) || RES=$$? ; \
600602
exit $$RES
601603

602604
# Note: the "all-docs" and "check-docs" targets may require tools not
@@ -626,12 +628,9 @@ INSTALL.nut UPGRADING NEWS README:
626628
# definitions), to apply them into the committed document sources.
627629
# Not bothering about with "make dist" constraints etc. - changes
628630
# the contents of srcdir directly and intentionally.
629-
# NOTE: There is a problem with `printf '%s' "${LINE}"` (double-quoted)
630-
# that causes backslashes to be treated as escape characters, and
631-
# shell replacements with `${VAR/pat/sub}` are not really portable.
632-
# To address this, we use the pure POSIX shell `replace_all()`
633-
# method suggested at https://stackoverflow.com/a/75037170/4715872
634-
# WARNING: It may succumb to lines ending with asterisk however!
631+
# NOTE: Using `read -r` per POSIX standard to avoid backslashes
632+
# being treated as escape characters:
633+
# https://pubs.opengroup.org/onlinepubs/9699919799/utilities/read.html
635634
MAINTAINER_ASCIIDOCS_RECIPE_DEBUG_STREAM = /dev/null
636635
#MAINTAINER_ASCIIDOCS_RECIPE_DEBUG_STREAM = &2
637636

@@ -640,35 +639,19 @@ maintainer-asciidocs:
640639
USEDREV_NOSUBJ="`git log -1 --oneline --pretty=format:'%h (%cs)' docs/asciidoc-vars.conf`" || exit ; \
641640
echo "$@: Updating asciidoc text sources with docs/asciidoc-vars.conf as of commit: $${USEDREV}"; \
642641
echo "//GH_MARKUP_1095_INCLUDE_BEGIN//$${USEDREV}" > docs/asciidoc-vars.conf.lastrev.tmp || exit ; \
643-
replace_all() { \
644-
case "$$1" in *"$$2"*) ;; *) echo "$$1" ; return ;; esac ; \
645-
RIGHT="$$1" ; R=''; \
646-
while [ -n "$$RIGHT" ]; do \
647-
echo "LEFT='$$LEFT' RIGHT='$$RIGHT' => R='$$R'" >$(MAINTAINER_ASCIIDOCS_RECIPE_DEBUG_STREAM) ; \
648-
LEFT="$${RIGHT%%$$2*}" ; \
649-
echo "=> LEFT='$$LEFT'" >$(MAINTAINER_ASCIIDOCS_RECIPE_DEBUG_STREAM) ; \
650-
if [ x"$$LEFT" = x"$$RIGHT" ]; then \
651-
R="$$R$$RIGHT" ; \
652-
return ; \
653-
fi ; \
654-
R="$$R$$LEFT$$3" ; \
655-
RIGHT="$${RIGHT#*$$2}" ; \
656-
done ; \
657-
echo "$$R" ; \
658-
} ; \
659642
find . -name '*.adoc' -or -name '*.txt' | ( \
660643
FILES=""; \
661644
while read F ; do \
662645
grep -E '^//+GH_MARKUP_1095_INCLUDE_(BEGIN|END)' "$$F" >/dev/null \
663646
|| { echo "$@: SKIP: no GH_MARKUP_1095_INCLUDE_* tags: $$F"; continue ; } ; \
664647
rm -f "$${F}"*.tmp || exit ; \
665648
EXT="1.tmp"; \
666-
while IFS='' read LINE ; do \
649+
while IFS='' read -r LINE ; do \
667650
case "$${LINE}" in \
668651
"//GH_MARKUP_1095_INCLUDE_BEGIN"*) EXT="2.tmp" ; continue ;; \
669652
"//GH_MARKUP_1095_INCLUDE_END"*|"////GH_MARKUP_1095_INCLUDE_END"*) EXT="3.tmp" ; continue ;; \
670653
esac ; \
671-
printf '%s\n' "`replace_all "$${LINE}" '\\' '''\\'`" >> "$${F}.$${EXT}" || exit ; \
654+
printf '%s\n' "$${LINE}" >> "$${F}.$${EXT}" || exit ; \
672655
done < "$$F" || { echo "$@: FAILED injection for $${F}" >&2; exit 1; } ; \
673656
if test -s "$${F}.2.tmp" && test -z "`diff "$${F}.2.tmp" docs/asciidoc-vars.conf | tr -d '\n'`" ; then \
674657
rm -f "$${F}"*.tmp ; \

NEWS.adoc

+6-4
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ https://github.com/networkupstools/nut/milestone/9
4141

4242
- (expected) Bug fixes for fallout possible due to "fightwarn" effort in 2.8.0+
4343

44-
- added `scripts/external_apis` with an example script integrating a
45-
non-native protocol with NUT; that example can be installed using
46-
`configure --enable-extapi-enphase`. [issue #2807, PR #2813]
47-
4844
PLANNED: Release notes for NUT 2.8.3 - what's new since 2.8.2
4945
-------------------------------------------------------------
5046
@@ -464,6 +460,8 @@ This requirement compromises usability of `make distcheck` on platforms without
464460
* `upsd_cleanup()` is now traced, to more easily see that the daemon is
465461
exiting (and/or start-up has aborted due to configuration or run-time
466462
issues). Warning about "world readable" files clarified. [#2417]
463+
* Failure to `LISTEN` on an invalid host name (e.g. `localhost:3493` or
464+
`1.2.3.4/24`) is now logged in a more actionable manner. [#2665]
467465
468466
- nut-scanner:
469467
* the tool relies on dynamic loading of shared objects (library files)
@@ -584,6 +582,10 @@ relocated into new `shutdown.default` INSTCMD definitions. [#2670]
584582
where the shared objects are not packaged into the common RPATH.
585583
[issue #2674, PR #2675]
586584
585+
- added `scripts/external_apis` with an example script integrating a
586+
non-native protocol with NUT; that example can be installed using
587+
`configure --enable-extapi-enphase`. [issue #2807, PR #2813]
588+
587589
- added `scripts/valgrind` with a helper script and suppression file to
588590
ignore common third-party problems. [#2511]
589591

README.adoc

+14-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Network UPS Tools Overview
77
//GH_MARKUP_1095//ifndef::top_srcdir[]
88
//GH_MARKUP_1095//include::docs/asciidoc-vars.conf[]
99
//GH_MARKUP_1095//endif::top_srcdir[]
10-
//GH_MARKUP_1095_INCLUDE_BEGIN//7e01bd198 (2024-10-20) docs/asciidoc-vars.conf: try defining linksrcdoc macro
10+
//GH_MARKUP_1095_INCLUDE_BEGIN//a6bd83d48 (2025-03-20) docs/asciidoc-vars.conf: document that linkdoc may have further args
1111
ifndef::asciidoc-vars-nut-included[]
1212
:asciidoc-vars-nut-included: true
1313
// NOTE: The big block of comments and definitions below comes from
@@ -54,6 +54,10 @@ ifndef::asciidoc-vars-nut-included[]
5454
// the command shown. This is also needed to properly display links
5555
// to manpages in both GitHub and generated docs without defining an
5656
// attribute for each manpage.
57+
// * `linkmanext` and `linkmanext2` macros repeat the behavior of the default ones.
58+
// These macros are intended for system man pages (e.g. HTML links might lead
59+
// to a generic internet site, or possibly to a distro-provided library
60+
// online or locally).
5761
//
5862
// Optional attributes set by callers:
5963
// * `website-url` (defaulted below) may be used for "historic website"
@@ -113,9 +117,9 @@ ifndef::env-github[]
113117
// syntax: {linksrcdoc}<document>
114118
// -> linksrcdoc:<document>[]
115119
:linksrcdoc: linksrcdoc:
116-
// * link to doc -> our macro
117-
// syntax: {linkdoc}<document>{ld-s}[<display title>]
118-
// -> linkdoc:<document>[<display title>]
120+
// * link to doc -> our macro (optional 2/3/4 args)
121+
// syntax: {linkdoc}<document>{ld-s}[<display title>{,<anchor>{,<srcdoc>{,<chunkname>}}}]
122+
// -> linkdoc:<document>[<display title>{,<anchor>{,<srcdoc>{,<chunkname>}}}]
119123
:linkdoc: linkdoc:
120124
:ld-s:
121125
// * link to single doc -> our macro
@@ -130,6 +134,8 @@ ifndef::env-github[]
130134
:lm-s: [
131135
:lm-c: ,
132136
:lm-e: ]
137+
:linkmanext: https://www.die.net/search/?q=
138+
:linkmanext2: https://www.die.net/search/?q=
133139
endif::env-github[]
134140
//
135141
// - on GitHub:
@@ -148,8 +154,8 @@ ifdef::env-github[]
148154
// syntax: {linksrcdoc}<document>
149155
// -> link:<document>[]
150156
:linksrcdoc: link:{top_srcdir}/
151-
// * link to doc -> link
152-
// syntax: {linkdoc}<document>{ld-s}[<display title>]
157+
// * link to doc -> link (FIXME: ignore or use 2/3/4 args; currently they are all pasted as <display title> contents!)
158+
// syntax: {linkdoc}<document>{ld-s}[<display title>{,<anchor>{,<srcdoc>{,<chunkname>}}}]
153159
// -> {website-url}docs/<document>.chunked/index.html[<display title>]
154160
:linkdoc: {website-url}docs/
155161
:ld-s: .chunked/index.html
@@ -166,6 +172,8 @@ ifdef::env-github[]
166172
:lm-s: .html[
167173
:lm-c: (
168174
:lm-e: )]
175+
:linkmanext: https://www.die.net/search/?q=
176+
:linkmanext2: https://www.die.net/search/?q=
169177
endif::env-github[]
170178
endif::asciidoc-vars-nut-included[]
171179
//

docs/FAQ.txt

+46
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,52 @@ check if a custom build from Git (usually using the `master` branch
918918
of NUT https://github.com/networkupstools/nut/ repository) has your
919919
issue fixed by some kind soul already.
920920

921+
== I can't connect with SSL using old NUT on an appliance
922+
923+
Unfortunately, some vendors do not issue new firmwares often, and even more
924+
rarely do they significantly update any programs inside. It is not uncommon
925+
to see NUT versions over a decade old delivered with small NAS boxes, for
926+
example.
927+
928+
This may impact not only NUT protocol compatibility, but also transport
929+
protocols such as SSL -- as cipher algorithms get outdated over time, and
930+
ones deemed insecure are no longer handled at all (by default). This is
931+
not a problem limited to NUT: old SSH Key Exchange (kex) protocols or old
932+
HTTPS mechanisms also become hard or impossible to use eventually.
933+
934+
On one hand, you can look into NUT configuration of `DISABLE_WEAK_SSL`.
935+
936+
On another, you can modify configuration of the newer system to allow older
937+
algorithms as required by the older other system.
938+
939+
For NUT built against OpenSSL, the change would be in `/etc/ssl/openssl.cnf`
940+
and similar to the diff block below:
941+
942+
----
943+
--- a/etc/ssl/openssl.cnf
944+
+++ b/etc/ssl/openssl.cnf
945+
@@ -52,13 +52,6 @@ tsa_policy3 = 1.2.3.4.5.7
946+
947+
[openssl_init]
948+
providers = provider_sect
949+
+ssl_conf = ssl_sect
950+
+
951+
+[ssl_sect]
952+
+system_default = system_default_sect
953+
+
954+
+[system_default_sect]
955+
+CipherString = DEFAULT@SECLEVEL=0
956+
957+
# List of providers to load
958+
[provider_sect]
959+
----
960+
961+
Of course, keep in mind that by doing this you degrade your security level.
962+
If better solutions are possible in your situation, prefer to follow them!
963+
964+
Thanks to Kajetan Rzepecki for doing the research and posting the findings
965+
in https://github.com/networkupstools/nut/issues/1899
966+
921967
== I built NUT from Git, and it complains about lots of missing files. What happened?
922968

923969
If you are not actively developing a driver, can you use a snapshot instead?

0 commit comments

Comments
 (0)