From 34e264a8ac278c1fb4929065b85871130644b4a4 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Sun, 27 Apr 2025 10:38:08 +0000 Subject: [PATCH 1/7] configure.ac: NUT_REPORT_FEATURE("requested to build and install documentation") to also report the decided nut_doc_build_list of specific required formats Signed-off-by: Jim Klimov --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 87433c4065..5d7bc2cce5 100644 --- a/configure.ac +++ b/configure.ac @@ -3463,9 +3463,6 @@ dnl is set to 'no', we may still want to build some doc targets manually dnl (so enable the Makefile recipes for those targets if tools are available) NUT_CHECK_ASCIIDOC -NUT_REPORT_FEATURE([requested to build and install documentation], [${nut_with_doc}], [], - [WITH_ASCIIDOC], [Define to enable Asciidoc support]) - DOC_INSTALL_DISTED_MANS=no KNOWN_UNABLE_MANS=no @@ -3496,6 +3493,9 @@ dnl If user passed --with-doc='' they they want nothing, right? ;; esac +NUT_REPORT_FEATURE([requested to build and install documentation], ['${nut_with_doc}' => '${nut_doc_build_list}'], [], + [WITH_ASCIIDOC], [Define to enable Asciidoc support]) + if test -z "${abs_srcdir}" ; then case "${srcdir}" in /*) abs_srcdir="${srcdir}";; From e94873360187882f7411e856d0b0134130201519 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Sun, 27 Apr 2025 11:03:49 +0000 Subject: [PATCH 2/7] m4/nut_report_feature.m4: NUT_REPORT_FEATURE: allow other prefixes than "whether to" Signed-off-by: Jim Klimov --- m4/nut_report_feature.m4 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/m4/nut_report_feature.m4 b/m4/nut_report_feature.m4 index 5b326c8deb..43ef880f4e 100644 --- a/m4/nut_report_feature.m4 +++ b/m4/nut_report_feature.m4 @@ -111,7 +111,18 @@ AC_DEFUN([NUT_REPORT_FEATURE], dnl arg#3 = value dnl arg#4 = autoconf varname dnl arg#5 = longer description (autoconf comment) - AC_MSG_CHECKING([whether to $1]) + dnl arg#6 = (OPTIONAL) word(s) after prefix "whether" before "$1", + dnl or nothing if "-"; NOTE: "whether" is not part of this + dnl consideration (see NUT REPORT used below with a partial + dnl message) + nrf_tmp="${6-}" + AS_CASE([x"${nrf_tmp}"], + [x], [nrf_tmp="to "], + [x-], [nrf_tmp=""] + ) + AC_MSG_CHECKING([whether ${nrf_tmp}$1]) + unset nrf_tmp + AC_MSG_RESULT([$2 $3]) NUT_REPORT([$1], [$2 $3]) From 997a3f44d8e72cf23e604fc289c3dcf3d54ca7bc Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Sun, 27 Apr 2025 11:05:11 +0000 Subject: [PATCH 3/7] configure.ac: make use of NUT_REPORT_FEATURE() arg #6 to produce saner message wording Signed-off-by: Jim Klimov --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 5d7bc2cce5..83842e5626 100644 --- a/configure.ac +++ b/configure.ac @@ -3494,7 +3494,7 @@ dnl If user passed --with-doc='' they they want nothing, right? esac NUT_REPORT_FEATURE([requested to build and install documentation], ['${nut_with_doc}' => '${nut_doc_build_list}'], [], - [WITH_ASCIIDOC], [Define to enable Asciidoc support]) + [WITH_ASCIIDOC], [Define to enable Asciidoc support], [-]) if test -z "${abs_srcdir}" ; then case "${srcdir}" in @@ -3727,7 +3727,7 @@ esac AM_CONDITIONAL(WITH_PDF_NONASCII_TITLES, [test x"$can_build_doc_pdf_nonascii_titles" = xyes]) NUT_REPORT_FEATURE([would build specific documentation format(s)], [${nut_with_doc}], [${DOC_BUILD_LIST}], - [WITH_DOCS], [Define to enable overall documentation generation]) + [WITH_DOCS], [Define to enable overall documentation generation], [-]) # To cater for less portable make's, precalculate the target list # for "make check" in "docs/" here... From 82069de3ab449879e4e313bb32a0c4ed8038b83e Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Sun, 27 Apr 2025 11:05:24 +0000 Subject: [PATCH 4/7] configure.ac: fix indentation Signed-off-by: Jim Klimov --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 83842e5626..4d809611eb 100644 --- a/configure.ac +++ b/configure.ac @@ -3684,9 +3684,9 @@ done rm -rf "${DOCTESTDIR}" AS_IF([test x"${nut_enable_configure_debug}" = xyes], [ - AC_MSG_NOTICE([(CONFIGURE-DEVEL-DEBUG) DOC_BUILD_LIST: '${DOC_BUILD_LIST}']) - AC_MSG_NOTICE([(CONFIGURE-DEVEL-DEBUG) DOC_CANNOTBUILD_LIST: '${DOC_CANNOTBUILD_LIST}']) - AC_MSG_NOTICE([(CONFIGURE-DEVEL-DEBUG) DOC_SKIPBUILD_LIST: '${DOC_SKIPBUILD_LIST}']) + AC_MSG_NOTICE([(CONFIGURE-DEVEL-DEBUG) DOC_BUILD_LIST: '${DOC_BUILD_LIST}']) + AC_MSG_NOTICE([(CONFIGURE-DEVEL-DEBUG) DOC_CANNOTBUILD_LIST: '${DOC_CANNOTBUILD_LIST}']) + AC_MSG_NOTICE([(CONFIGURE-DEVEL-DEBUG) DOC_SKIPBUILD_LIST: '${DOC_SKIPBUILD_LIST}']) ]) case "${nut_with_doc}" in From 2b7e1e56129e2b31b5a681b2ad6b9a070c689de2 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Sun, 27 Apr 2025 10:37:13 +0000 Subject: [PATCH 5/7] configure.ac, NEWS.adoc: fix regression of `configure --with-docs=all` released with NUT v2.8.3 Fallout of #2842, used wrong variable name for checking the requested list of doc types Signed-off-by: Jim Klimov --- NEWS.adoc | 7 +++++++ configure.ac | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/NEWS.adoc b/NEWS.adoc index 388f7fe82c..4ea73c91e7 100644 --- a/NEWS.adoc +++ b/NEWS.adoc @@ -41,6 +41,13 @@ https://github.com/networkupstools/nut/milestone/9 - (expected) Bug fixes for fallout possible due to "fightwarn" effort in 2.8.0+ + - Fix fallout of development in NUT v2.8.0 and/or v2.8.1 and/or v2.8.2 and/or + v2.8.3: + * Fixed a regression in recipes of NUT v2.8.3 release (as compared to + v2.8.2), where `configure --with-docs=all` no longer failed a run + of the `configure` script when some of the required rendering tools + were not in fact available. [#2842] + - common code: * Revised common `writepid()` to use `altpidpath()` as location for the PID file creation, if the default `rootpidpath()` is not accessible diff --git a/configure.ac b/configure.ac index 4d809611eb..2880820912 100644 --- a/configure.ac +++ b/configure.ac @@ -3692,17 +3692,19 @@ AS_IF([test x"${nut_enable_configure_debug}" = xyes], [ case "${nut_with_doc}" in auto) if test -n "${DOC_BUILD_LIST}"; then + dnl # We can build at least one format... nut_with_doc="yes" else + dnl # We can not build any formats... nut_with_doc="no" fi ;; no) ;; -*) +*) dnl # yes, all, skip... if test -n "${DOC_CANNOTBUILD_LIST}"; then DOC_CANNOTBUILD_LIST_LINES="`echo "${DOC_CANNOTBUILD_LIST}" | tr ' ' '\n' | grep -vE '^$'`" - for DOCTYPE in ${DOC_BUILD_LIST} ; do + for DOCTYPE in ${nut_doc_build_list} ; do if echo "${DOC_CANNOTBUILD_LIST_LINES}" | grep -E "^${DOCTYPE}(|=yes)\$" ; then AC_MSG_ERROR([Unable to build${DOC_CANNOTBUILD_LIST} documentation (check for 'no' results above)]) else if echo "${DOC_CANNOTBUILD_LIST_LINES}" | grep -E "^${DOCTYPE}=(skip|auto|dist-auto)\$" ; then From 05e563ac02831bbb5a399f5e4883bf58469812fc Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Sun, 27 Apr 2025 11:15:29 +0000 Subject: [PATCH 6/7] configure.ac: clarify why unbuildable doc formats are just warnings initially Signed-off-by: Jim Klimov --- configure.ac | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 2880820912..11051e043b 100644 --- a/configure.ac +++ b/configure.ac @@ -3574,7 +3574,7 @@ dnl not fail if we have no tools to generate it (so add to SKIP list). AC_MSG_RESULT(no) DOC_CANNOTBUILD_LIST="${DOC_CANNOTBUILD_LIST} ${nut_doc_build_target_base}" if test "${nut_doc_build_target_flag}" = "yes" ; then - AC_MSG_WARN([Unable to build ${nut_doc_build_target_base} documentation which you requested]) + AC_MSG_WARN([Unable to build ${nut_doc_build_target_base} documentation which you requested; will reflect on this below]) else DOC_SKIPBUILD_LIST="${DOC_SKIPBUILD_LIST} ${nut_doc_build_target_base}" fi @@ -3597,7 +3597,7 @@ dnl not fail if we have no tools to generate it (so add to SKIP list). AC_MSG_RESULT(no) DOC_CANNOTBUILD_LIST="${DOC_CANNOTBUILD_LIST} ${nut_doc_build_target_base}" if test "${nut_doc_build_target_flag}" = "yes" ; then - AC_MSG_WARN([Unable to build ${nut_doc_build_target_base} documentation which you requested]) + AC_MSG_WARN([Unable to build ${nut_doc_build_target_base} documentation which you requested; will reflect on this below]) else DOC_SKIPBUILD_LIST="${DOC_SKIPBUILD_LIST} ${nut_doc_build_target_base}" fi @@ -3623,7 +3623,7 @@ dnl not fail if we have no tools to generate it (so add to SKIP list). AC_MSG_RESULT(no) DOC_CANNOTBUILD_LIST="${DOC_CANNOTBUILD_LIST} ${nut_doc_build_target_base}" if test "${nut_doc_build_target_flag}" = "yes" ; then - AC_MSG_WARN([Unable to build ${nut_doc_build_target_base} documentation which you requested]) + AC_MSG_WARN([Unable to build ${nut_doc_build_target_base} documentation which you requested; will reflect on this below]) else DOC_SKIPBUILD_LIST="${DOC_SKIPBUILD_LIST} ${nut_doc_build_target_base}" fi @@ -3660,7 +3660,7 @@ dnl not fail if we have no tools to generate it (so add to SKIP list). DOC_CANNOTBUILD_LIST="${DOC_CANNOTBUILD_LIST} ${nut_doc_build_target_base}" KNOWN_UNABLE_MANS=yes if test "${nut_doc_build_target_flag}" = "yes" ; then - AC_MSG_WARN([Unable to build ${nut_doc_build_target_base} documentation which you requested]) + AC_MSG_WARN([Unable to build ${nut_doc_build_target_base} documentation which you requested; will reflect on this below]) else DOC_SKIPBUILD_LIST="${DOC_SKIPBUILD_LIST} ${nut_doc_build_target_base}" if test "${nut_doc_build_target_flag}" = "auto" || test "${nut_doc_build_target_flag}" = "dist-auto" ; then From 0db755e23cfce73cfe5f8e26f719167e402bd025 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Sun, 27 Apr 2025 11:15:46 +0000 Subject: [PATCH 7/7] configure.ac: quieter grep for unbuildable doc formats Signed-off-by: Jim Klimov --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 11051e043b..3bcc090707 100644 --- a/configure.ac +++ b/configure.ac @@ -3705,9 +3705,9 @@ no) if test -n "${DOC_CANNOTBUILD_LIST}"; then DOC_CANNOTBUILD_LIST_LINES="`echo "${DOC_CANNOTBUILD_LIST}" | tr ' ' '\n' | grep -vE '^$'`" for DOCTYPE in ${nut_doc_build_list} ; do - if echo "${DOC_CANNOTBUILD_LIST_LINES}" | grep -E "^${DOCTYPE}(|=yes)\$" ; then + if echo "${DOC_CANNOTBUILD_LIST_LINES}" | grep -E "^${DOCTYPE}(|=yes)\$" >/dev/null 2>/dev/null ; then AC_MSG_ERROR([Unable to build${DOC_CANNOTBUILD_LIST} documentation (check for 'no' results above)]) - else if echo "${DOC_CANNOTBUILD_LIST_LINES}" | grep -E "^${DOCTYPE}=(skip|auto|dist-auto)\$" ; then + else if echo "${DOC_CANNOTBUILD_LIST_LINES}" | grep -E "^${DOCTYPE}=(skip|auto|dist-auto)\$" >/dev/null 2>/dev/null ; then AC_MSG_NOTICE([Unable to build${DOC_CANNOTBUILD_LIST} documentation (check for 'no' results above), skipping]) fi fi