Skip to content

Commit

Permalink
Merge branch 'master' into issue-1803
Browse files Browse the repository at this point in the history
  • Loading branch information
jimklimov authored Jan 3, 2025
2 parents 91993a9 + 5d832b9 commit ea480a5
Show file tree
Hide file tree
Showing 51 changed files with 722 additions and 456 deletions.
2 changes: 1 addition & 1 deletion INSTALL.nut.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ ifndef::top_builddir[]
endif::top_builddir[]
//
//
// Address links on GitHub vs docs
// Address links on GitHub vs. docs
// (note: 'env-github' attribute is set on GitHub)
//
// - when generating docs:
Expand Down
42 changes: 21 additions & 21 deletions Jenkinsfile-dynamatrix

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -529,13 +529,13 @@ setver:
# Clean the dist tarball and packages
MAINTAINERCLEANFILES_DISTBALL = nut-*.tar.gz
# HP-UX:
MAINTAINERCLEANFILES_PACKAGES = NUT_HPUX_package@[email protected]
MAINTAINERCLEANFILES_PACKAGES = NUT_HPUX_package@[email protected] NUT_HPUX_package-@[email protected]
# AIX as below, and RedHat-compatible (cover binary and source packages):
MAINTAINERCLEANFILES_PACKAGES += nut*rpm
# Debian-compatible (cover binary and source packages):
MAINTAINERCLEANFILES_PACKAGES += nut*deb
# Solaris SVR4 package archives:
MAINTAINERCLEANFILES_PACKAGES += NUT_solaris_*_package@[email protected]
MAINTAINERCLEANFILES_PACKAGES += NUT_solaris_*_package@[email protected] NUT_solaris_*_package-@[email protected]
# Newer Solaris IPS (aka "pkg(5)" format archives)
MAINTAINERCLEANFILES_PACKAGES += *.p5p

Expand All @@ -549,7 +549,7 @@ package: dist
"HP-UX") \
( cd scripts/HP-UX && \
$(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$DESTDIR" package && \
mv NUT_HPUX_package.depot $(abs_top_builddir)/NUT_HPUX_package@[email protected] ) ;; \
mv NUT_HPUX_package.depot $(abs_top_builddir)/NUT_HPUX_package-@[email protected] ) ;; \
"SunOS") \
$(MAKE) $(AM_MAKEFLAGS) && \
$(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$DESTDIR" install && \
Expand Down
10 changes: 8 additions & 2 deletions NEWS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,12 @@ relocated into new `shutdown.default` INSTCMD definitions. [#2670]
and it defaults to `true` allowing for better ordered documents at the cost
of some memory during document generation. [#2510]
- updated man page generation with `configure` script options to specify that
manual sections on the target platform differ from (Linux-based) defaults
hard-coded into page sources; this should allow to simplify NUT packaging
recipe maintenance in distributions (no more updating patches for changed
or added documentation sources).
- lines in first section of NUT configuration report (can optionally remain as
`config.nut_report_feature.log` and be installed into shared documentation
of a NUT package) are now better grouped as miscellaneous features and
Expand Down Expand Up @@ -1634,7 +1640,7 @@ refer to this change set (too long in the making) as NUT 2.7.5.
autoconf-2.70 releases in 2020 (also works with 2.69 which was the
earlier release since 2012)
* Dynamic library loading used in certain programs and use-cases improved,
especially for 64-bit vs 32-bit builds on multiple-bitness OSes
especially for 64-bit vs. 32-bit builds on multiple-bitness OSes
* Logging routines like `upsdebugx()` were refactored as macros so there
is slightly less overhead when logging is disabled [PRs #685 and #1100]
* Numerous classes of compilation warnings eradicated, many of those being
Expand Down Expand Up @@ -1869,7 +1875,7 @@ Release notes for NUT 2.7.2 - what's new since 2.7.1
* Emerson Network Power Liebert PSI 1440
* MicroDowell B.Box LP 500
* Numeric Digital 800 plus
* OptiUPS VS 575C
* OptiUPS vs. 575C
* Tripp Lite SU10KRT3/1X
- FreeDesktop Hardware Abstraction Layer (HAL) support was removed.
Expand Down
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ ifndef::top_builddir[]
endif::top_builddir[]
//
//
// Address links on GitHub vs docs
// Address links on GitHub vs. docs
// (note: 'env-github' attribute is set on GitHub)
//
// - when generating docs:
Expand Down
16 changes: 15 additions & 1 deletion UPGRADING.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,20 @@ Changes from 2.8.2 to 2.8.3
disable certain NUT units by default; its comments document each choice.
[issue #2721]
- Reference packages prepared by `make package` should now separate the
`PACKAGE_VERSION` from the platform-dependent prefix by a dash character
in the ultimate package file name. Previously they were glued together
for some platform targets (HPUX, Solaris). Solaris SVR4 package file names
should new differentiate `i386` vs. `amd64` and `sparc` vs. `sparcv9`,
depending on `target_cpu` of the build. If you had any scripts relying
on the older pattern, they may have to be updated.
- Updated man page generation with `configure` script options to specify that
manual sections on the target platform differ from (Linux-based) defaults
hard-coded into page sources; this should allow to simplify NUT packaging
recipe maintenance in distributions (no more updating patches for changed
or added documentation sources)
- `upsmon` should now integrate natively with systemd-driven OS sleep events
(built with systemd version 221 or newer "inhibitor interface"), so various
hacks previously packaged into `/usr/lib/systemd/system-sleep/` scripts or
Expand Down Expand Up @@ -262,7 +276,7 @@ Changes from 2.8.0 to 2.8.1
- The `upsd.conf` listing of `LISTEN` addresses was previously inverted
(the last listed address was applied first), which was counter-intuitive
and fixed for this release. If user configurations somehow relied on this
order (e.g. to prioritize IPv6 vs IPv4 listeners), configuration changes
order (e.g. to prioritize IPv6 vs. IPv4 listeners), configuration changes
may be needed. [#2012]
- The `upsd` configured to listen on IPv6 addresses should handle only
Expand Down
2 changes: 1 addition & 1 deletion autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ echo "----------------------------------------------------------------------"
echo "Please note that on some systems the routine below can complain that "
echo " > configure.ac: warning: AC_INIT: not a literal: m4_esyscmd_s(...)"
echo "but still does the right thing about PACKAGE_VERSION and PACKAGE_URL settings."
echo "Check if your distro provides an 'autoconf-archive' package anf if it helps."
echo "Check if your distro provides an 'autoconf-archive' package and if it helps."
echo "Please post an issue in NUT bug tracker with platform details if it does not."
echo "----------------------------------------------------------------------"

Expand Down
2 changes: 1 addition & 1 deletion ci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1991,7 +1991,7 @@ default|default-alldrv|default-alldrv:no-distcheck|default-all-errors|default-sp
done

# TODO: Similar loops for other variations like TESTING,
# MGE SHUT vs other serial protocols...
# MGE SHUT vs. other serial protocols...

if can_clean_check ; then
echo "=== One final try for optional_maintainer_clean_check:"
Expand Down
2 changes: 1 addition & 1 deletion clients/nutclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ void Socket::connect(const std::string& host, uint16_t port)
snprintf(sport, sizeof(sport), "%" PRIuMAX, static_cast<uintmax_t>(port));

memset(&hints, 0, sizeof(hints));
/* TODO? Port IPv4 vs IPv6 detail from upsclient.c */
/* TODO? Port IPv4 vs. IPv6 detail from upsclient.c */
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
hints.ai_protocol = IPPROTO_TCP;
Expand Down
10 changes: 8 additions & 2 deletions common/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -678,9 +678,15 @@ const char *suggest_doc_links(const char *progname, const char *progconf) {
snprintf(buf, sizeof(buf),
"For more information please ");
#if defined(WITH_DOCS) && WITH_DOCS
/* FIXME: Currently all NUT tools and drivers are in same
* man page section for "System Management Programs".
* If this ever changes (e.g. clients like `upsc` can be
* a "User Program" just as well), we may need an extra
method argument here.
*/
snprintfcat(buf, sizeof(buf),
"Read The Fine Manual ('man %s') and/or ",
buf2);
"Read The Fine Manual ('man %s %s') and/or ",
MAN_SECTION_CMD_SYS, buf2);
#endif
snprintfcat(buf, sizeof(buf),
"see\n\t%s/docs/man/%s.html\n",
Expand Down
48 changes: 47 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ dnl off by `dirname` should do the trick.
dnl NOTE: the resulting NUT_WEBSITE_BASE string does not end with a slash!
NUT_WEBSITE_BASE="`dirname "${PACKAGE_URL}index.html"`"
dnl Fallback, no trailing slash!
[ -n "${NUT_WEBSITE_BASE-}" ] || NUT_WEBSITE_BASE='https://www.networkupstools.org'
test -n "${NUT_WEBSITE_BASE-}" || NUT_WEBSITE_BASE='https://www.networkupstools.org'

dnl Note: this refers to GITREV at the time of configure script running
dnl primarily for better messaging in the script itself (also to render
Expand Down Expand Up @@ -2130,6 +2130,12 @@ dnl the usual builds can pass by default on systems without asciidoc.
NUT_ARG_WITH([docs], [build and install documentation (alias to --with-doc)], [man=auto])
NUT_ARG_WITH([doc], [build and install documentation (see docs/configure.txt for many variants of the option)], [${nut_with_docs}])

dnl NOTE: Sections may be strings, not pure numbers, on some platforms:
NUT_ARG_WITH([docs-man-section-api], [man page section for library APIs], [3])
NUT_ARG_WITH([docs-man-section-cfg], [man page section for configuration files], [5])
NUT_ARG_WITH([docs-man-section-cmd-sys], [man page section for system management commands], [8])
NUT_ARG_WITH([docs-man-section-cmd-usr], [man page section for user commands], [1])

dnl NOTE: Until X-Mas 2021, the default was "legacy" (now "medium")
NUT_ARG_ENABLE([warnings],
[enable warning presets that were picked as useful in maintainership and CI practice (variants include gcc-minimal, gcc-medium, gcc-hard, clang-minimal, clang-medium, clang-hard, all; auto-choosers: hard, medium, minimal, yes=auto='gcc or clang or all at hardcoded default difficulty')],
Expand Down Expand Up @@ -3432,6 +3438,37 @@ fi
AM_CONDITIONAL(WITH_PDFS, test "${WITH_PDFS}" = "yes")
AM_CONDITIONAL(SKIP_PDFS, test "${SKIP_PDFS}" = "yes")

dnl NOTE: Sections may be strings, not pure numbers, on some platforms:
MAN_SECTION_API="${nut_with_docs_man_section_api}"
MAN_SECTION_CFG="${nut_with_docs_man_section_cfg}"
MAN_SECTION_CMD_SYS="${nut_with_docs_man_section_cmd_sys}"
MAN_SECTION_CMD_USR="${nut_with_docs_man_section_cmd_usr}"

MAN_SECTION_API_BASE="`echo "${MAN_SECTION_API}" | sed 's/^\(@<:@0-9@:>@*\)@<:@^0-9@:>@.*$/\1/'`"
MAN_SECTION_CFG_BASE="`echo "${MAN_SECTION_CFG}" | sed 's/^\(@<:@0-9@:>@*\)@<:@^0-9@:>@.*$/\1/'`"
MAN_SECTION_CMD_SYS_BASE="`echo "${MAN_SECTION_CMD_SYS}" | sed 's/^\(@<:@0-9@:>@*\)@<:@^0-9@:>@.*$/\1/'`"
MAN_SECTION_CMD_USR_BASE="`echo "${MAN_SECTION_CMD_USR}" | sed 's/^\(@<:@0-9@:>@*\)@<:@^0-9@:>@.*$/\1/'`"

AC_DEFINE_UNQUOTED([MAN_SECTION_API], ["${MAN_SECTION_API}"], [man page section for library APIs])
AC_DEFINE_UNQUOTED([MAN_SECTION_CFG], ["${MAN_SECTION_CFG}"], [man page section for configuration files])
AC_DEFINE_UNQUOTED([MAN_SECTION_CMD_SYS], ["${MAN_SECTION_CMD_SYS}"], [man page section for system management commands])
AC_DEFINE_UNQUOTED([MAN_SECTION_CMD_USR], ["${MAN_SECTION_CMD_USR}"], [man page section for user commands])

AC_DEFINE_UNQUOTED([MAN_SECTION_API_BASE], ["${MAN_SECTION_API_BASE}"], [base (number only) man page section for library APIs])
AC_DEFINE_UNQUOTED([MAN_SECTION_CFG_BASE], ["${MAN_SECTION_CFG_BASE}"], [base (number only) man page section for configuration files])
AC_DEFINE_UNQUOTED([MAN_SECTION_CMD_SYS_BASE], ["${MAN_SECTION_CMD_SYS_BASE}"], [base (number only) man page section for system management commands])
AC_DEFINE_UNQUOTED([MAN_SECTION_CMD_USR_BASE], ["${MAN_SECTION_CMD_USR_BASE}"], [base (number only) man page section for user commands])

AC_SUBST(MAN_SECTION_API)
AC_SUBST(MAN_SECTION_CFG)
AC_SUBST(MAN_SECTION_CMD_SYS)
AC_SUBST(MAN_SECTION_CMD_USR)

AC_SUBST(MAN_SECTION_API_BASE)
AC_SUBST(MAN_SECTION_CFG_BASE)
AC_SUBST(MAN_SECTION_CMD_SYS_BASE)
AC_SUBST(MAN_SECTION_CMD_USR_BASE)

dnl ----------------------------------------------------------------------
dnl checks related to --with-dev

Expand Down Expand Up @@ -4754,6 +4791,14 @@ NUT_DATADIR="${conftemp}"
NUT_REPORT_SETTING_PATH([Data file path],
NUT_DATADIR, "${conftemp}", [Default path for data files])

dnl same for mandir
conftemp="${mandir}"
eval conftemp=\"${conftemp}\"
eval conftemp=\"${conftemp}\"
NUT_MANDIR="${conftemp}"
NUT_REPORT_SETTING_PATH([Man page path],
NUT_MANDIR, "${conftemp}", [Default path for man page files])

dnl same for bindir
conftemp="${bindir}"
eval conftemp=\"${conftemp}\"
Expand Down Expand Up @@ -4982,6 +5027,7 @@ AC_SUBST(BINDIR)
AC_SUBST(LIBDIR)
AC_SUBST(PKGCONFIGDIR)
AC_SUBST(NUT_DATADIR, [`eval echo "${NUT_DATADIR}"`])
AC_SUBST(NUT_MANDIR, [`eval echo "${NUT_MANDIR}"`])
AC_SUBST(NUT_LIBEXECDIR, [`eval echo "${LIBEXECDIR}"`])
AC_SUBST(DRVPATH)
AC_SUBST(SBINDIR)
Expand Down
1 change: 1 addition & 0 deletions data/driver.list.in
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@

"Greencell" "ups" "2" "Micropower 600" "USB" "nutdrv_qx" # https://github.com/networkupstools/nut/issues/1080
"Greencell" "ups" "2" "Micropower 600" "USB" "blazer_usb" # https://github.com/networkupstools/nut/issues/1080
"Greencell" "ups" "2" "PowerProof 2000" "USB" "nutdrv_qx" # https://github.com/networkupstools/nut/issues/2727

"Gtec" "ups" "2" "ZP120N-1K / ZP120N-1KS / ZP120N-2K / ZP120N-2KS / ZP120N-3K / ZP120N-3KS" "USB" "blazer_usb"
"Gtec" "ups" "2" "ZP120N-6K / ZP120N-6KS / ZP120N-10K-11 / ZP120N-10KS-11" "USB" "blazer_usb"
Expand Down
Loading

0 comments on commit ea480a5

Please sign in to comment.