Hi All,

The config option highlighted by Nick is not in thee current released version of nut.

I eventually found a commit that added that option into nutscan-init.c and found a reference to an issue.

That issue was that the libraries were not found in Ubuntu 24.04. In that issue it was also flagged up as the same problem also for Alpine and probably others.

The issue is that for those distros they only have the .so file if the dev files are installed and not all distros install those by default.

It also looks like this is a regression as back in 2015 there was an issue for nut-scanner with the use od development files which was fixed and closed in nut-2.7.4

Anyway there are a whole bunch of commits in nut for this issue and it has now been closed three days ago.

We will need to wait for the next release 2.8.3, although there is not indication of when that will be. The changes look to many and therefore not easy to just do a patch file for.

When that version comes out, then we will be able to stay with the commenting out of .so files so I think this is now just waiting for nut-2.8.3 to be released.

Regards,
Adolf.

On 19/07/2024 13:03, Adolf Belka wrote:
Hi Nick,

On 19/07/2024 12:38, Nick Howitt wrote:


On 19/07/2024 10:21, Adolf Belka wrote:

Hi Michael & all,

nut has a command nut-scanner which scans for nut systems.

An IPFire user has used that command and it came back saying that it couldn't find the USB library libusb-1.0.so which is commented out in the rootfile.

It looks like nut when it is checking what libraries are available for the nut-scanner is looking for the .so files only and not the .so.0 or .so.0.3.0 files.

The same thing is occurring with avahi and netsnmp where nut is again only looking for the .so files, so in all three cases nut concludes that the usb, avahi and netsnmp libraries are not present even when they are.

It looks like no one has ever used the nut-scanner command and flagged up the issue as it will have had this problem for ever, as the libusb-1.0.so file has always been commented out (standard IPFire practice for rootfiles)

What should we do in this case when nut is only looking for the .so files. Should we uncomment the required .so libs?

The only alternative that I can see would be to comment out the command nut-scanner.

If we do uncomment the .so lib files mentioned above, how do we ensure that they stay uncommented and someone in the future does not see them and comment them out in the rootfiles.

I did that with nut about two years ago. I don't know now if that means that some of nut will not be properly working or not.

Should I now go an uncomment all the nut .so file entries in the nut rootfile?

Feedback and suggestions of the best approach for this gladly accepted.

Regards,
Adolf.

Looking at the sources, https://github.com/networkupstools/nut.git, (which I can't really read), it looks like there is a config option, SOFILE_LIBUSB1 in https://github.com/networkupstools/nut/tree/master/tools/nut-scanner around lines 220 and onwards. Could nut be recompiled to use the so file? It would side-step the rootfile issue.

Thanks for that pointer. I will have a look at it and test it out and see how it goes.

Regards,
Adolf.
Regards,

Nick

-- 
Sent from my laptop

-- 
Sent from my laptop