Skip to content

Commit b837dee

Browse files
authored
Merge branch 'master' into fix_libusb_threads_when_backgrounded
2 parents 7ad4486 + cf973cc commit b837dee

133 files changed

Lines changed: 10387 additions & 1171 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/01-make-dist-worker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343

4444
steps:
4545
- name: Checkout repository
46-
uses: actions/checkout@v6
46+
uses: actions/checkout@v7
4747
with:
4848
# NOTE: This is the unprivileged part of the GHA-01-tarballs ritual,
4949
# running potentially untrusted shell code from the PR source branch.
@@ -128,7 +128,7 @@ jobs:
128128
- name: Prepare ccache
129129
# Based on https://docs.github.com/en/actions/reference/workflows-and-actions/dependency-caching#example-using-the-cache-action example
130130
id: cache-ccache
131-
uses: actions/cache@v5
131+
uses: actions/cache@v6
132132
env:
133133
compiler: 'CC=gcc CXX=g++'
134134
cache-name: cache-ccache-${{ env.compiler }}

.github/workflows/05-codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565

6666
steps:
6767
- name: Checkout repository
68-
uses: actions/checkout@v6
68+
uses: actions/checkout@v7
6969

7070
# Using hints from https://askubuntu.com/questions/272248/processing-triggers-for-man-db
7171
- if: matrix.language == 'cpp' && matrix.os == 'ubuntu-latest'
@@ -81,7 +81,7 @@ jobs:
8181
- name: Prepare ccache
8282
# Based on https://docs.github.com/en/actions/reference/workflows-and-actions/dependency-caching#example-using-the-cache-action example
8383
id: cache-ccache
84-
uses: actions/cache@v5
84+
uses: actions/cache@v6
8585
env:
8686
cache-name: cache-ccache-${{ matrix.compiler }}-${{ matrix.NUT_SSL_VARIANTS }}-${{ matrix.NUT_USB_VARIANTS }}
8787
with:

INSTALL.nut.adoc

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -731,8 +731,24 @@ binary packages that exist on various major systems.
731731
Debian, Ubuntu and other derivatives
732732
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
733733

734-
NOTE: NUT is packaged and well maintained in these systems.
735-
The official Debian packager used to be part of the NUT Team.
734+
[NOTE]
735+
======
736+
NUT is packaged and well maintained in these systems.
737+
738+
Still, with especially Debian distribution being focused on stability and
739+
predictability, its major releases settle on some version of NUT as the base
740+
line and might only significantly update it with the next major release.
741+
Packages may be several years behind the tip of development, shielding the
742+
users from both recent bugs and recent improvements. Ubuntu is similar in
743+
this regard, but has more frequent interim (non-LTS) releases.
744+
745+
Either way, if your device is only supported with a newer version of NUT
746+
than what the OS packages deliver, or that support was improved in newer
747+
versions, you may have to build your own (whether from scratch or by adapting
748+
the distro-provided recipes to newer NUT sources), or try "experimental"
749+
official repositories that may ship more recent versions of software as
750+
they are staged for a future OS release.
751+
======
736752

737753
Using your preferred method (apt-get, aptitude, Synaptic, ...), install
738754
the 'nut' package, and optionally the following:
@@ -759,7 +775,8 @@ Mandriva
759775
~~~~~~~~
760776

761777
NOTE: NUT is packaged and well maintained in these systems.
762-
The official Mandriva packager is part of the NUT Team.
778+
That said, considerations noted above regarding packages being behind
779+
latest development still apply.
763780

764781
Using your preferred method (urpmi, RPMdrake, ...), install one of the
765782
two below packages:
@@ -778,7 +795,8 @@ SUSE / openSUSE
778795
~~~~~~~~~~~~~~~
779796

780797
NOTE: NUT is packaged and well maintained in these systems.
781-
The official SUSE packager is part of the NUT Team.
798+
That said, considerations noted above regarding packages being behind
799+
latest development still apply.
782800

783801
Install the 'nut-classic' package, and optionally the following:
784802

@@ -796,7 +814,8 @@ Red Hat, Fedora and CentOS
796814
~~~~~~~~~~~~~~~~~~~~~~~~~~
797815

798816
NOTE: NUT is packaged and well maintained in these systems.
799-
The official Red Hat packager is part of the NUT Team.
817+
That said, considerations noted above regarding packages being behind
818+
latest development still apply.
800819

801820
Using your preferred method (yum, Add/Remove Software, ...), install
802821
one of the two below packages:

Jenkinsfile-dynamatrix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,6 +1419,7 @@ def stageNameFunc_ShellcheckCustom(DynamatrixSingleBuildConfig dsbc) {
14191419
if ( env?.BRANCH_NAME ==~ /.*verbose.*/ )
14201420
{
14211421
dynamatrixGlobalState.enableDebugTrace = true
1422+
// WARNING: Too verbose for common debugging needs:
14221423
//dynamatrixGlobalState.enableDebugTraceResolver = true
14231424
dynamatrixGlobalState.enableDebugErrors = true
14241425
dynamatrixGlobalState.enableDebugMilestones = true
@@ -1431,6 +1432,7 @@ if ( env?.BRANCH_NAME ==~ /.*verbose.*/ )
14311432
if ( env?.BRANCH_NAME ==~ /.*fightwarn.*/ )
14321433
{
14331434
dynamatrixGlobalState.enableDebugTraceGithubStatusHighlights = true
1435+
dynamatrixGlobalState.enableDebugTraceBadge = true
14341436
}
14351437

14361438
dynamatrixPipeline(dynacfgBase, dynacfgPipeline)

Makefile.am

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,13 @@ install-fanout-cleanup: install-recursive @dotMAKE@
137137
touch-include-all-nut_version-generated.timestamp:
138138
@[ -s include/nut_version.h ]
139139
@touch -r include/nut_version.h -d '-10 seconds' include/.all.nut_version-generated.timestamp 2>/dev/null && exit ; \
140-
touch -d '1970-01-01T00:00:00' include/.all.nut_version-generated.timestamp && exit ; \
140+
touch -t '197001010000.00' include/.all.nut_version-generated.timestamp && exit ; \
141141
touch include/.all.nut_version-generated.timestamp
142142

143143
touch-clients-all-libupsclient_version-generated.timestamp:
144144
@[ -s clients/libupsclient-version.h ]
145145
@touch -r clients/libupsclient-version.h -d '-10 seconds' clients/.all.libupsclient_version-generated.timestamp 2>/dev/null && exit ; \
146-
touch -d '1970-01-01T00:00:00' clients/.all.libupsclient_version-generated.timestamp && exit ; \
146+
touch -t '197001010000.00' clients/.all.libupsclient_version-generated.timestamp && exit ; \
147147
touch clients/.all.libupsclient_version-generated.timestamp
148148

149149
touch-docs-man-all-linkman-generated.timestamp:
@@ -153,7 +153,7 @@ touch-docs-man-all-linkman-generated.timestamp:
153153
else \
154154
touch -r docs/man/linkman-driver-names.txt -d '-10 seconds' docs/man/.all.nut_linkman-generated.timestamp 2>/dev/null && exit ; \
155155
fi ; \
156-
touch -d '1970-01-01T00:00:00' docs/man/.all.nut_linkman-generated.timestamp && exit ; \
156+
touch -t '197001010000.00' docs/man/.all.nut_linkman-generated.timestamp && exit ; \
157157
touch docs/man/.all.nut_linkman-generated.timestamp
158158

159159
# Verbosity for fanout rule tracing; 0/1 (or "default" that may auto-set

NEWS.adoc

Lines changed: 144 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ https://github.com/networkupstools/nut/milestone/13
5858
attempts on timeout errors, simplifying error recovery. [PR #3414]
5959
* Increased default TCP response timeout to 2000 ms. [PR #3418]
6060

61+
- `dummy-ups` driver updates:
62+
* Added `authconf` driver parameter for repeater mode to control
63+
authentication configuration discovery. It accepts `default`, `none`,
64+
or a specific authconf file path. [issue #3329]
65+
6166
- `nutdrv_qx` driver updates:
6267
* Only claim a USB device as "supported" during discovery out of the box
6368
if `subdriver_command` was assigned (`1A86:7523` is used by CH340/341
@@ -69,14 +74,84 @@ https://github.com/networkupstools/nut/milestone/13
6974
similar to specifying `novendor` in the `ups.conf` (except that the
7075
option bypasses the check altogether, so driver instances handling well
7176
behaved devices would also not show their manufacturer). [issue #3436]
77+
* Modified `armac` subdriver's USB interrupt read logic to request up to
78+
8 bytes per read instead of strictly requiring 6 bytes. This resolves
79+
an initialization failure with certain UPS models (e.g., SVC
80+
VP-1250-LCD) that return a 7-byte report instead of the standard 6 bytes,
81+
allowing the Megatec payload to be successfully reconstructed. [PR #3485]
82+
* In `Voltronic-QS-Hex` subdriver, the format string sanity check added in
83+
recent NUT releases caught a mismatch in `ups.load` reading. [issue #3532]
84+
* Modified `voltronic-qs` subdriver to request the QI command, supplying
85+
NUT with battery charge, runtime, input frequency, output current, and
86+
input transfer low/high values on devices which support it (`H`, `I`, `J`
87+
protocols, e.g. Powershield PSDR800). [#3521]
88+
89+
- Introduced a new NUT driver named `ragtech` which provides support for the
90+
Ragtech "Easy Pro" family of line-interactive UPS units (also sold under
91+
the NEP, TORO, INNERGIE and OneUP brands in Brazil). Devices present a USB
92+
CDC-ACM serial interface (VID `0x04D8`, PID `0x000A`) and speak a proprietary
93+
6-byte register-access protocol with read/write/AND/OR opcodes; the driver
94+
covers the 20 models in the family-10 device table and was validated
95+
end-to-end against an Easy 2000 TI. Shutdown-related instant commands are
96+
opt-in via the `allow_shutdown` flag because the firmware does not
97+
auto-restart on mains return. [Initial PR #3447]
98+
* Put the CDC-ACM port into raw mode at startup. A freshly enumerated
99+
port defaults to canonical mode, where the kernel buffers the firmware's
100+
binary replies waiting for a newline that never arrives, so the first
101+
poll timed out as "no reply to initial status poll" unless the port had
102+
been set raw externally. [issue #3500]
103+
* Retry the initial status poll a few times before bailing out, so the
104+
driver starts cleanly under the stock systemd units when the device has
105+
only just enumerated at boot, instead of leaning on a fatal exit and a
106+
`Restart=on-failure` cycle. [issue #3500]
107+
* Drain the firmware's handshake reply before the first status poll.
108+
Some models (e.g. the Easy Pro 3200 VA GT) are half-duplex and dropped
109+
the read command that was sent while the handshake reply was still in
110+
flight. [issue #3500]
111+
* Compute `battery.charge` as `raw / 2.55` so a fully charged battery
112+
reports exactly 100 % instead of 100.2 %.
113+
* Added a `va` option to override the apparent-power rating when the
114+
firmware model id is shared between product lines, correcting
115+
`ups.power.nominal`, `ups.realpower.nominal` and the computed
116+
`ups.load`. [issue #3500]
117+
118+
- `richcomm_usb` driver updates:
119+
* Completed support for NUT standard USB configuration options, and fixed
120+
some problems possible when iterating devices. [issue #1768, PR #3477]
72121

73122
- `usbhid-ups` driver updates:
74123
* When reconnecting, report success more visibly (not only in debug), and
75124
do not reset driver state to "quiet" when it will loop trying. [PR #3423]
125+
* `idowell-hid` subdriver now also supports GoldenMate 1000VA/800W LiFePO4
126+
battery packs (`0x06da:0xffff`), which carry the same `-BMS-` firmware and
127+
HID descriptor as the existing `0x075d:0x0300` device. The shared
128+
Phoenixtec vendor ID (`0x06da`) is gated by device strings so the other
129+
devices on that ID still fall through to `liebert-hid` / `mge-hid`.
130+
[issue #3501, PR #3502]
131+
* `mge-hid` subdriver updated to suppress `CHRG` status on constant-charge
132+
mode devices when battery is fully charged. [issue #3518, PR #3519]
133+
134+
- `snmp-ups` driver updates:
135+
* Extended the XPPC-MIB subdriver (enterprise 935) to expose
136+
`battery.runtime`, `battery.voltage`, `input.frequency`,
137+
`output.voltage.nominal` and `ups.firmware.aux` from Phoenixtec
138+
based UPS cards that already answer the rest of the subtree. [#2608]
76139

77140
- common code:
78-
* Revised 'dstate' machinery to track socket connections closed mid-way
79-
through a call, to avoid access after `free()`. [#3302]
141+
* Revised 'dstate' machinery to track socket connections closed mid-way
142+
through a call, to avoid access after `free()`. [#3302]
143+
* When dealing with driver `AF_UNIX` sockets (non-WIN32), use non-blocking
144+
`connect()` to ensure a timeout if something does not respond. [PR #3456]
145+
* Windows driver state named pipes now use explicit security attributes
146+
instead of relying on default settings from the launch context. [PR #3479]
147+
* Likewise for named pipes in other NUT daemons and `upssched`. [PR #3527]
148+
* Drivers with libusb-1.0 code path, and `nutdrv_qx` in particular: revise
149+
to fix per-close `libusb_exit()` deadlock, and escalate a persistent
150+
`LIBUSB_ERROR_OVERFLOW` state to USB reset handling. [PR #3448]
151+
* Some driver code paths used buffers sent via USB transfers as fixed-size
152+
chunks populated only partially with bytes we intended. These buffers are
153+
now more diligently pre-zeroed as their siblings were in other code paths,
154+
to avoid sending host stack garbage to a device. [#3529]
80155

81156
- NUT client libraries:
82157
* Complete support for actions documented in `docs/net-protocol.txt`
@@ -110,6 +185,40 @@ https://github.com/networkupstools/nut/milestone/13
110185
allows to pass the `certfile` argument needed for OpenSSL builds. [#3331]
111186
* The `libupsclient` (C) and `libnutclient` (C++) API were updated to
112187
report the ability to check `CERTIDENT` information. [#3331]
188+
* Introduced support for "authconf" files to store and convey NUT client
189+
authentication details. [issue #3329]
190+
191+
- Various clients:
192+
* Flush standard output and error buffers before handling clean exit
193+
rituals, to avoid losing the result of client's work in case that
194+
clean-up crashes (e.g. due to third-party code involved). [#3454]
195+
196+
- `upsimage.cgi` client updates:
197+
* Adjust scaling for small (single-digit) value ranges to avoid division
198+
by zero and not rendering anything. [issue #3469]
199+
200+
- `upsc`, `upscmd`, `upsrw` command-line client updates:
201+
* Enabled support for `nutauth.conf` files to provide credentials and/or
202+
SSL settings in the client which previously only did best-effort attempts
203+
at secure communications without an individual certificate, and only
204+
anonymously for reading. The new `-A filename` option defaults to trying
205+
to use a `nutauth.conf` file (if found in one of the default locations)
206+
but not failing if one is not usable; specific values can require use of
207+
such a file (`default`) or to not even try reading one (`none`).
208+
[issues #3329, #3411]
209+
210+
- `upslog` client/tool updates:
211+
* Added support for best-effort use of `nutauth.conf` files from default
212+
locations or via `-A` option, as described above. Since this client
213+
can establish multiple connections, keep in mind that currently it
214+
can only identify itself with some one (first seen) client certificate,
215+
if `CERTIDENT` settings are used. Multiple `CERTHOST` directives for
216+
specially trusted servers can be used. [#3329]
217+
218+
- `upsstats`, `upsset`, `upsimage` CGI client updates:
219+
* Added support for best-effort use of `nutauth.conf` files from default
220+
locations described above (no way to choose the location, other than
221+
by web-server environment variables for CGI calls). [#3329]
113222

114223
- `upsmon` client updates:
115224
* Introduced support for `CERTFILE` option, so the client can identify
@@ -119,11 +228,36 @@ https://github.com/networkupstools/nut/milestone/13
119228
success of SSL initialization with both backends is more diligently
120229
tracked) should now not cause exit of the client if secure connection
121230
is not required by its configuration in the first place. [#3420]
231+
* Potentially a breaking change for existing deployments with `upsmon` and
232+
`upssched` integration: the `CMDSCRIPT` and `NOTIFYCMD` definitions were
233+
revised for the first token to mean an exact program name (possibly with
234+
spaces in the value), not a shell scriptlet. Documentation in earlier
235+
NUT releases implied that arguments could be passed here -- this is no
236+
longer true. If you need to pass special arguments to a notification
237+
program, please use additional separately quoted tokens, or write a
238+
small helper script to do so and specify its path here.
239+
The `SHUTDOWNCMD` is still a scriptlet, as far as specifying command
240+
arguments is concerned, but it also newly supports parsing multiple
241+
tokens as additional arguments. [PR #3499]
242+
* Introduced a new notification type for unexpected clock change which
243+
is specially handled (data re-initialization), whether due to sleep
244+
and wake-up, or NTP/RTC clock changes during boot, or severe delays
245+
on a stressed system (to name a few practical cases). [issue #3405]
246+
247+
- `upssched` client/tool updates:
248+
* Fixed handling of `NOTIFYMSG` from command line if other arguments are
249+
present (e.g. debugging with `-DDDDDD`). [issues #3105, #3525, PR #3527]
122250

123251
- `NUT-Monitor` Python GUI client:
124252
* Fixed Qt tray tooltips to render in plain text, not rich text which
125253
ended up as literal HTML on KDE Plasma 6; now that rich text formatting
126254
is only used for main window status labels. [PR #3430]
255+
* Fixed both Python 2 and 3 variants to handle automatic client reconnection
256+
(e.g. after system suspend/resume, network interruption, or NUT server
257+
restart). [issue #3509, PR #3523]
258+
259+
- `upssched` client/tool updates:
260+
* Added a `clean_exit()` handler similar to that in `upsmon`. [PR #3499]
127261

128262
- `upsd` data server updates:
129263
* If we hit "Too many open files" during configuration reload, close
@@ -134,6 +268,9 @@ https://github.com/networkupstools/nut/milestone/13
134268
much later (tell the sysadmin to increase `ulimit` or set up a more
135269
conservative `MAXCONN`). If there is a separate soft and hard limit,
136270
and `MAXCONN` exceeds the soft limit, try to raise the bar. [issue #3365]
271+
* If SSL configuration was provided, but the server failed to apply some
272+
aspect of that, it should now abort with an explanation (and not proceed
273+
with insecure start-up like it could do before). [issue #3331, PR #3435]
137274

138275
- Recipes, CI and helper script updates not classified above:
139276
* Introduced `ci_build.sh` settings and respective CI workflow settings
@@ -142,14 +279,18 @@ https://github.com/networkupstools/nut/milestone/13
142279
files. Both can be enabled by `export DO_USE_NUTCI_CACHE=yes` and would
143280
store data under a `${CI_CACHE_NUT_BASEDIR}` directory (defaults to
144281
`~/.cache/nut-ci`); more fine-tuning environment variables are provided.
145-
[issues #3108, #3390, #1711, PR #3109]
282+
Directory names are based on hashes of strings that identify the content,
283+
which are size-limited to some 8 characters.
284+
[issues #3108, #3390, #1711, #3526, PR #3109]
146285
* Rearranged the GHA job to prepare Dist and Docs Tarballs. [PR #3460]
147286
* Updated `scripts/Windows/dllldd.sh` helper script to better detect DLL
148287
names not exposed with dynamic linking metadata (e.g. some Mozilla NSS
149288
dependencies were not previously discovered and bundled). [issue #3420,
150289
PRs #3429, #3432]
151290
* Updated a NUT CI farm worker to FreeBSD 15 and updated the recipes and
152291
documentation according to problems that were found along the way. [#3453]
292+
* Various recipe portability fixes for AIX, NetBSD and OmniOS at least.
293+
[#3489, #3495, #3498]
153294
* Jenkins used as the NUT CI farm core has bumped JDK requirements for its
154295
controllers and build agents, `docs/config-prereqs.txt` revised.
155296

0 commit comments

Comments
 (0)