Skip to content

nut-scanner: suggest allow_duplicates for ambiguous USB devices - #3670

Open
user01010111 wants to merge 9 commits into
networkupstools:masterfrom
user01010111:fix/nut-scanner-allow-duplicates
Open

user01010111 wants to merge 9 commits into
networkupstools:masterfrom
user01010111:fix/nut-scanner-allow-duplicates

Conversation

@user01010111

Copy link
Copy Markdown
Contributor

USB devices with missing or repeated identifiers can produce ambiguous ups.conf entries. Add a commented allow_duplicates suggestion for supported drivers, with a warning that the association between configured names and physical devices may change.

The check accounts for active selectors and reuses NUT's existing matching and comment support. The suggestion is advisory: users still need to check the matching expressions before enabling it.

Add a focused C regression test for scanner output and update the scanner manual and NEWS.

Fixes #2998.

Validation on Linux using synthetic discovery records: all 45 scanner-output cases pass; the unchanged code fails the 24 positive cases and passes the 21 controls. Clean parallel GCC build, Clang and GNU89 regression builds, ASan/UBSan with leak detection, and a scanner build with USB and regex support disabled pass. Project make check passes all 14 compiled tests, alongside the existing script checks; an existing root-only become_user() subcheck is skipped. The updated manual builds, and make distcheck-light passes with the regression included in the distribution archive.

Full spelling checks use a local supplementary dictionary for kernel's and firmware's, both present in unchanged upstream documentation. The updated scanner manual passes with the standard project dictionary.

Developed with assistance from OpenAI Codex (gpt-6-astra).

USB devices with missing or repeated identifiers can produce ambiguous ups.conf
entries. Add a commented allow_duplicates suggestion for supported drivers,
with a warning that the association between configured names and physical
devices may change.

Add a focused C regression test for scanner output and update the scanner
manual and NEWS.

Fixes networkupstools#2998.

Developed with assistance from OpenAI Codex (gpt-6-astra).

Signed-off-by: user01010111 <lapses.50.booster@icloud.com>
@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

A ZIP file with standard source tarball and another tarball with pre-built docs for commit 42157f1 is temporarily available: NUT-tarballs-PR-3670.zip.

Comment thread tests/nutscan-display-test.c Fixed
Document the observed attribute pairs and expected suggestion bitmask in
the scanner display regression cases.

Developed with assistance from OpenAI Codex (gpt-6-astra).

Signed-off-by: user01010111 <lapses.50.booster@icloud.com>
@jimklimov jimklimov added enhancement nut-scanner USB-duplicate-devices Track bugs and issues about monitoring several devices that seem identical to NUT or libusb AI For good or bad, machine tools are upon us. Humans are still the responsible ones. labels Sep 29, 2026
@jimklimov jimklimov added this to the 2.8.6 milestone Sep 29, 2026
…ess questioned by different `make` implementations [networkupstools#3670]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…efer to PR [networkupstools#3670]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@jimklimov

Copy link
Copy Markdown
Member

Various minor compiler/linker complaints, including some missing flags for LIBNSS on systems that do not have those libs in common dirs.

@jimklimov
jimklimov marked this pull request as draft October 10, 2026 14:01
Cast the captured-output allocation explicitly for strict Clang builds.
Pass the configured SSL libraries and runtime search path when linking
the scanner display test, matching the existing scanner build rules.

Developed with assistance from OpenAI Codex.

Signed-off-by: user01010111 <lapses.50.booster@icloud.com>
@user01010111
user01010111 marked this pull request as ready for review October 12, 2026 08:23
@github-actions github-actions Bot deleted a comment from AppVeyorBot Oct 14, 2026
@github-actions github-actions Bot deleted a comment from AppVeyorBot Oct 14, 2026
@github-actions github-actions Bot deleted a comment from AppVeyorBot Oct 14, 2026
@github-actions github-actions Bot deleted a comment from AppVeyorBot Oct 14, 2026
@github-actions github-actions Bot deleted a comment from AppVeyorBot Oct 14, 2026
@github-actions github-actions Bot deleted a comment from AppVeyorBot Oct 14, 2026
@github-actions github-actions Bot deleted a comment from AppVeyorBot Oct 14, 2026
@github-actions github-actions Bot deleted a comment from AppVeyorBot Oct 18, 2026
@github-actions github-actions Bot deleted a comment from AppVeyorBot Oct 23, 2026
@AppVeyorBot

Copy link
Copy Markdown

✅ Build nut 2.8.5.5898-master completed (commit b22f7969e9 by @jimklimov)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI For good or bad, machine tools are upon us. Humans are still the responsible ones. enhancement nut-scanner USB-duplicate-devices Track bugs and issues about monitoring several devices that seem identical to NUT or libusb

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extend nut-scanner to suggest (commented-away) allow_duplicates when it may be applicable

4 participants