[MIR] libmodbus

Bug #2046263 reported by Christian Ehrhardt 
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libmodbus (Ubuntu)
Invalid
Undecided
Unassigned
nut (Debian)
Fix Released
Unknown
nut (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

This is a new dependency from nut due do adding apc_modbus to nut, seen in component mismatches.

It seems to be most commonly found (top hits) in USV devices which is also how we encounter it (nut manages those).
But TBH there are much more devices speaking this protocol, usually (matching the protocol design) from the low level space. There are even HW gateways converting that to network.

It seems this is a general nice lib for Ubuntu users in low level spaces.
Yet OTOH the CVE history looks intense [4]
Maybe we'd want to talk to security in advance?

---

Oddly - using this was always in an extra package that is in universe.
src:nut
\
 \- bin:nut-server suggests nut-modbus

The reason for this is that there are many protocols across HW generations and manufacturers.
And hard depending on all would be quite a punch.

So why is this a component mismatch now to begin with?
Turns out shlibs is now picking this up from bin:nut-server.

$ for p in $(file $(dpkg -L nut-server | xargs) | awk '/executable, x86/ {gsub(":",""); print $1}'); do lddtree $p; done | grep mod

2.8.0-7:
- nothing

2.8.1-1build1:
/lib/nut/apc_modbus (interpreter => /lib64/ld-linux-x86-64.so.2)
    libmodbus.so.5 => /lib/x86_64-linux-gnu/libmodbus.so.5

That matches the debian changelog which said
  14 * New upstream release
  15 - Install new apc_modbus and sms_ser drivers

But why would that not be in nut-modbus?

AFAICS this has ended up in the wrong package.
nut-server has a few very common drivers.
And others - mostly rare or those pulling in extra dependencies are in nut-$name packages.

IMHO
  /lib/nut/apc_modbus
Should go to bin_nut-modbus just like those already there.
 /lib/nut/adelsystem_cbi
 /lib/nut/generic_modbus
 /lib/nut/huawei-ups2000
 /lib/nut/phoenixcontact_modbus
 /lib/nut/socomec_jbus

TODO:
1. discuss
2. move /lib/nut/apc_modbus to bin:but-modbus
3. suggest the same to Debian to avoid modbus being always installed as dependency

[1]: https://www.apc.com/de/de/faqs/FA168406/
[2]: https://download.schneider-electric.com/files?p_Doc_Ref=SPD_MPAO-98KJ7F_EN&p_enDocType=Application+Notes&p_File_Name=MPAO-98KJ7F_R1_EN.pdf
[3]: https://www.modbus.org/devices.php
[4]: https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=modbus

tags: added: server-next
tags: added: server-todo
removed: server-next
description: updated
tags: added: server-triage-discuss
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Marking incomplete (as it isn't yet meant to be reviewed), but subscribing ubuntu-mir so that the tooling finds it.

Changed in nut (Ubuntu):
status: New → Incomplete
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Reported to Debian in [1] and proposed a fix in [2].

If they agree the fix for this will only be a sync.
Otherwise we can decide if we want to promote libmodbus or carry a delta to remove the dependency from main.

[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1059985
[2]: https://salsa.debian.org/debian/nut/-/merge_requests/8

tags: removed: server-triage-discuss
Changed in nut (Debian):
status: Unknown → New
Changed in nut (Debian):
status: New → Fix Released
Changed in nut (Ubuntu):
assignee: nobody → Miriam España Acebal (mirespace)
Changed in libmodbus (Ubuntu):
assignee: nobody → Miriam España Acebal (mirespace)
assignee: Miriam España Acebal (mirespace) → nobody
Changed in nut (Ubuntu):
assignee: Miriam España Acebal (mirespace) → nobody
Bryce Harrington (bryce)
Changed in libmodbus (Ubuntu):
status: Incomplete → Fix Committed
Changed in libmodbus (Ubuntu):
status: Fix Committed → Invalid
Changed in nut (Ubuntu):
status: Incomplete → Fix Committed
Revision history for this message
Christian Ehrhardt  (paelzer) wrote (last edit ):

FYI - Blocked on migration because the new version has tests that on slower machines tend to race and fail.
I bumped some of the sleeps by x10 and it works just fine.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I had no reply yet, but the delta is trivial (just increasing test timers) and noble needs to start to clear proposed migration towards a release in April :-)

I've uploaded the test fix on top of the already Debian accepted file-move as 2.8.1-3ubuntu1.

let us hope this finally moves it out of proposed and in a not too far future the test PRs in Debian will be merged and this can be a sync again.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

And now the build falls apart on launchpad (but not in sbuild) - \o/ [0]
The same build worked last week in [1].

AFAICS this is breaking here:

Good:
checking if we can build man... yes

Bad:
checking if we can build man... <unknown>:1: SyntaxWarning: invalid escape sequence '\S'
...
configure: error: Unable to build pdf documentation

This repeats for "checking if asciidoc version can build html-single" and "checking if a2x version can build html-chunked"

Not sure how much is a red herring, but earlier I see:
  Setting up dblatex (0.3.12py3-2) ...
In good and bad case.

But in the bad case
/usr/lib/python3/dist-packages/dbtexmf/dblatex/grubber/texparser.py:34: SyntaxWarning: invalid escape sequence '\*'

And that is pure python independent to nut and I see
Good case: 3.11.4-5
Bad case: 3.12.1-0ubuntu1

Even sbuild against proposed pulls 3.11.7-2 right now, which is why my sbuild repro does not show this.
Reaching out on ubuntu-devel if that is known and more wide reaching ...

[0]: https://launchpad.net/ubuntu/+source/nut/2.8.1-3ubuntu1/+build/27668595
[1]: https://launchpad.net/~paelzer/+archive/ubuntu/nut-test-timeouts-noble/+build/27631569

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Got:
 <ginggs> cpaelzer: ah, that's in dblatex, I'm looking at that right now!

Thanks++

Now that is what we wit for to trigger the re-build of https://launchpad.net/ubuntu/+source/nut/2.8.1-3ubuntu1/+build/27668595

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nut - 2.8.1-3ubuntu1

---------------
nut (2.8.1-3ubuntu1) noble; urgency=medium

  * d/t/test-nut.py: scale sleeps by x10 to mitigate flaky results
    (LP: #2046263)

nut (2.8.1-3) unstable; urgency=medium

  * debian/control: Add missing Breaks/Replaces on nut-modbus (Closes:
    #1060377)

nut (2.8.1-2) unstable; urgency=medium

  * Move the apc_modbus driver to the nut-modbus package.
    Thanks to Christian Ehrhardt <email address hidden>
    (Closes: #1059985)

nut (2.8.1-1) unstable; urgency=medium

  [ Samuel Thibault ]
  * d/control,libnutscan2.symbols: Generalize hurd-i386 into hurd-any.

  [ Laurent Bigonville ]
  * New upstream release
    - Install new apc_modbus and sms_ser drivers
  * debian/patches/0001-reproductible-build.patch: Refreshed
  * debian/nut-server.install: Fix the name of nut-common tmpfiles
  * Fix installation of some documentation files
  * debian/control: Bump Standards-Version to 4.6.2 (no further changes)
  * debian/libnutscan2.symbols: Add newly exported symbols
  * debian/control: Drop lsb-base, to please lintian
  * debian/rules: Force to use /usr/bin/python3 executable
  * debian/nut-server.lintian-overrides: Remove unused override
  * debian/nut-monitor.install: Only install .ui files
  * Install the NUT-Monitor wrapper script
  * Cherry-pich upstream patches to fix several NUT-Monitor issues
    (Closes: #970240)
  * debian/patches/NoDisplay-nut-monitor-py3qt5.patch: Hide the desktop file
    for nut-monitor-py3qt5

 -- Christian Ehrhardt <email address hidden> Mon, 22 Jan 2024 08:11:47 +0100

Changed in nut (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.