From 2aa1dc2a73b1b9369927ad73955dc957774d0eb5 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 2 Nov 2023 13:06:48 +0100 Subject: [PATCH 1/5] docs/config-prereqs.txt: small fixes to Slackware 15 chapter [#2143 follow-up] Signed-off-by: Jim Klimov --- docs/config-prereqs.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/config-prereqs.txt b/docs/config-prereqs.txt index ce16b8d73c..4bac7fef3e 100644 --- a/docs/config-prereqs.txt +++ b/docs/config-prereqs.txt @@ -499,7 +499,7 @@ Slackware Linux 15 ~~~~~~~~~~~~~~~~~~ Another long-term presence in the Linux landscape, and sometimes the baseline -for appliances, the Slackware project recently hit release 15 in 2002, averaging +for appliances, the Slackware project recently hit release 15 in 2022, averaging two years per major release. It can be installed e.g. in a VM, using ISO images from the project site; see: @@ -611,8 +611,9 @@ are named `*.tgz`) from here, and passed to `installpkg`: * http://www.slackware.com/~alien/slackbuilds/openjdk11/ * http://www.slackware.com/~alien/slackbuilds/asciidoc/ * http://www.slackware.com/~alien/slackbuilds/cppunit/ -* http://www.slackware.com/~alien/slackbuilds/lua/ (5.1 currently) and - http://www.slackware.com/~alien/slackbuilds/lua53/ -- note that LUA is not +* http://www.slackware.com/~alien/slackbuilds/lua/ (5.1 in "stable") and + http://www.slackware.com/~alien/slackbuilds/lua53/ (5.4 in "current" + as of Slackware 15.1 candidate in the works) -- note that LUA is not needed for the current NUT code base, but may become needed after import of features from forks From 1d6e5ed0239bff65d46e9cbe42bda72f1a52e9de Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 2 Nov 2023 13:31:05 +0100 Subject: [PATCH 2/5] docs/config-prereqs.txt, docs/nut.dict: clarify about /dev/shm and noexec option [#2143 follow-up] Signed-off-by: Jim Klimov --- docs/config-prereqs.txt | 10 ++++++++++ docs/nut.dict | 8 +++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/config-prereqs.txt b/docs/config-prereqs.txt index 4bac7fef3e..afec65269b 100644 --- a/docs/config-prereqs.txt +++ b/docs/config-prereqs.txt @@ -644,6 +644,16 @@ a reputable repository: https://sotirov-bg.net/slackpack/ and should cover most if not all of the dependencies required for NUT building (including PowerMan, IPMI etc.) +NOTE: If setting up a CI farm agent with builds in RAM disk, keep in mind that +default mount options for `/dev/shm` preclude script execution. Either set up +the agent in a non-standard fashion (to use another work area), or if this is +a dedicated machine -- relax the mount options in `/etc/fstab`. Here is an +example with `noexec` which we *must avoid* for such use-case: +---- +:; mount | grep /dev/shm +tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,inode64) +---- + FreeBSD 12.2 ~~~~~~~~~~~~ diff --git a/docs/nut.dict b/docs/nut.dict index 93849fc162..7fd7d869d6 100644 --- a/docs/nut.dict +++ b/docs/nut.dict @@ -1,4 +1,4 @@ -personal_ws-1.1 en 3273 utf-8 +personal_ws-1.1 en 3279 utf-8 AAC AAS ABI @@ -2001,6 +2001,7 @@ frontends fs fsd fsr +fstab ftdi fuji fullload @@ -2143,6 +2144,7 @@ initscripts initups inline innotech +inode inplace installcheck installpkg @@ -2484,7 +2486,9 @@ nnn noAuthNoPriv nobody's nobt +nodev nodtk +noexec noflag nogroup nohang @@ -2501,6 +2505,7 @@ noout norating noro noscanlangid +nosuid notAfter notifyme notifytype @@ -2730,6 +2735,7 @@ refactoring referencenominal regex regtype +relatime releasekeyring relicensing remoting From b4c954075bf2d887f2c4cd3939bf17e6ff360feb Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 2 Nov 2023 14:19:23 +0100 Subject: [PATCH 3/5] Clarify what is libnutclientstub Signed-off-by: Jim Klimov --- NEWS.adoc | 2 ++ docs/nut.dict | 3 ++- lib/libnutclientstub.pc.in | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/NEWS.adoc b/NEWS.adoc index ed37387199..9193e83130 100644 --- a/NEWS.adoc +++ b/NEWS.adoc @@ -400,6 +400,8 @@ as part of https://github.com/networkupstools/nut/issues/1410 solution. - nutclient C++ library: * added `listDeviceClients()` and `deviceGetClients(dev)` to `Client` classes, and `Device::getClients()` to match PyNUT capabilities [#549] + * published artifacts may include a `libnutclientstub` which is an + implementation of a NUT TCP client in C++ with in-memory data store. - upsclient C library: * added support for `NUT_QUIET_INIT_SSL` environment variable to hide diff --git a/docs/nut.dict b/docs/nut.dict index 7fd7d869d6..6dfad0c297 100644 --- a/docs/nut.dict +++ b/docs/nut.dict @@ -1,4 +1,4 @@ -personal_ws-1.1 en 3279 utf-8 +personal_ws-1.1 en 3280 utf-8 AAC AAS ABI @@ -2257,6 +2257,7 @@ libneon libnss libnut libnutclient +libnutclientstub libnutclientsub libnutconfig libnutscan diff --git a/lib/libnutclientstub.pc.in b/lib/libnutclientstub.pc.in index b730a63054..0f8921b9f8 100644 --- a/lib/libnutclientstub.pc.in +++ b/lib/libnutclientstub.pc.in @@ -7,7 +7,7 @@ statepath=@STATEPATH@ nutuser=@RUN_AS_USER@ Name: libnutclientstub -Description: Stub for UPS monitoring with Network UPS Tools +Description: Stub for UPS monitoring with Network UPS Tools (primarily for C++ tests) Version: @PACKAGE_VERSION@ Libs: -L${libdir} -lnutclientstub Cflags: -I${includedir} From 3735f96acb95ce9a88c765f07952720a27f44535 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 2 Nov 2023 16:35:09 +0100 Subject: [PATCH 4/5] docs/man/upsmon.txt: avoid characters (some unicode space) that some versions of asciidoc dislike Signed-off-by: Jim Klimov --- docs/man/upsmon.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/man/upsmon.txt b/docs/man/upsmon.txt index 464ba705f6..227d9c34c7 100644 --- a/docs/man/upsmon.txt +++ b/docs/man/upsmon.txt @@ -414,7 +414,7 @@ load and don't want some systems to be powered off while others remain running if the "wall power" returns at the wrong moment as usual, the "FSD" flag can not be removed from the data server unless its daemon is restarted. If we do take the first step in critical mode, then we normally intend to go -all the way -- shut down all the servers gracefully, and power down the UPS. +all the way -- shut down all the servers gracefully, and power down the UPS. Keep in mind that some UPS devices and corresponding drivers would also latch or otherwise resurface the "FSD" state again even if "wall power" is available, From d16aebb93449f94fe65eff7766aefab7a7a3b3dd Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 2 Nov 2023 17:09:10 +0100 Subject: [PATCH 5/5] configure.ac: nut_enable_inplace_runtime: pass libexecdir if specified Signed-off-by: Jim Klimov --- configure.ac | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/configure.ac b/configure.ac index 1f21c9f2f6..0043fa0b9d 100644 --- a/configure.ac +++ b/configure.ac @@ -409,6 +409,21 @@ AS_IF([test x"$nut_enable_inplace_runtime" = xyes -a x"${NUT_VERSION_DEPLOYED-}" eval conftemp=\"${conftemp}\" LIBDIR="${conftemp}" + AS_CASE(["${CONFIG_FLAGS_DEPLOYED} ${CONFIG_FLAGS}"], + [*--libexecdir=*], [ + for F in ${CONFIG_FLAGS_DEPLOYED} ${CONFIG_FLAGS} ; do + case "$F" in + "--libexecdir="*) libexecdir="`echo "$F" | ( IFS='=' read K V ; echo "$V" )`" ;; + esac + done + ] + ) + + conftemp="${libexecdir}" + eval conftemp=\"${conftemp}\" + eval conftemp=\"${conftemp}\" + LIBEXECDIR="${conftemp}" + AS_CASE(["${CONFIG_FLAGS_DEPLOYED} ${CONFIG_FLAGS}"], [*--with-pkgconfig-dir=*], [ for F in ${CONFIG_FLAGS_DEPLOYED} ${CONFIG_FLAGS} ; do