Bug 265014 - sysutils/nut{-devel}: Add MODBUS support and option
Summary: sysutils/nut{-devel}: Add MODBUS support and option
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Cy Schubert
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2022-07-03 12:31 UTC by tomli
Modified: 2022-07-06 00:33 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (cy)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tomli 2022-07-03 12:31:07 UTC
Network UPS Tools (NUT) is a package for Uninterruptible Power Supply management. Since NUT v2.8.0, drivers for several new UPS models, including generic_modbus, phoenixcontact_modbus, huawei-ups2000, socomec_jbus, and adelsystem_cbi are added (I'm the author of one of the drivers). However, the use of these drivers requires an external library comms/libmodbus installed and the build option --with-modbus switched on when building NUT.

On FreeBSD, two packages sysutils/nut and sysutils/nut-devel are provided, but none has Modbus support enabled. Thus, users of Modbus-based UPS systems cannot manage them on FreeBSD via NUT.

sysutils/nut and sysutils/nut-devel should add a Modbus build option. Further, it should be enabled by default to allow users of these UPS models to use the binary package without rebuilding from port.
Comment 1 Cy Schubert freebsd_committer freebsd_triage 2022-07-05 03:21:13 UTC
This can be done. But to be fair to everyone of all other UPS types, all other options will also be enabled. This will make the package significantly bigger and requiring many more prerequisites but I'm sure you will agree it's worth it.

You can expedite this by providing a patch. Otherwise I will put this onto my work queue.
Comment 2 commit-hook freebsd_committer freebsd_triage 2022-07-05 14:30:55 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b792fe675c33e7f40ecba03404890d82958e0706

commit b792fe675c33e7f40ecba03404890d82958e0706
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2022-07-05 03:44:02 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2022-07-05 14:28:50 +0000

    sysutils/nut*: Add Modbus support

    Some newer UPS models require modbus support. Add and enable modbus
    support by default for binary package users.

    PR:             265014
    Reported by:    tomli@tomli.me
    MFH:            2022Q3

 sysutils/nut-devel/Makefile  | 10 +++++++---
 sysutils/nut-devel/pkg-plist | 10 ++++++++++
 sysutils/nut/Makefile        | 10 +++++++---
 sysutils/nut/pkg-plist       | 10 ++++++++++
 4 files changed, 34 insertions(+), 6 deletions(-)
Comment 3 Cy Schubert freebsd_committer freebsd_triage 2022-07-05 15:18:50 UTC
Every single non-experimental option has been enabled for binary users. The package will be bigger and there will be an order of magnitude more dependencies, in the order of megabytes of additional software required to support sysutils/nut*. My estimate is approximately an additional 600 MB space will be required.

Committed and will be MFHed this week.
Comment 4 tomli 2022-07-05 16:39:57 UTC
Thanks for fixing it, I just wanted to code a patch and found it has already committed to the port tree.

(In reply to Cy Schubert from comment #2)
> This can be done. But to be fair to everyone of all other UPS types, all other > options will also be enabled. This will make the package significantly bigger > and requiring many more prerequisites but I'm sure you will agree it's worth it. [...]

(In reply to Cy Schubert from comment #3)
> Every single non-experimental option has been enabled for binary
> users. The package will be bigger and there will be an order of
> magnitude more dependencies, [...]

If the increase of dependencies is objectionable as you've commented, and the decision to enable all build-time options is just meant to be fair to users of all other UPS models, isn't it enough to only enable all the device drivers only? Then at least SSL, CGI, AVAHI, OPENSSL can be skipped.
Comment 5 Cy Schubert freebsd_committer freebsd_triage 2022-07-05 16:56:54 UTC
Everyone has a valid point in saying that the binary package should contain their specific needs.

Previously most people would build their own ports. Most would also buildworld but we have a different user community. When pkgbase replaces binary updates there will be a greater emphasis on catering to the non-technical end-user. Linux is already there -- many of the people I work with are package jockeys and do not know or understand how Linux, BSD or UNIX works, so providing packages that include everything is better for them (like most people).

More sophisticated users can either build by hand or build using their own poudriere infrastructure (like I do) and use the poudriere-options command to customize builds.

This is certainly in keeping with the Linux approach.
Comment 6 commit-hook freebsd_committer freebsd_triage 2022-07-06 00:33:45 UTC
A commit in branch 2022Q3 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f5e103cefaf582e83ac4a719c72b24deec0c3859

commit f5e103cefaf582e83ac4a719c72b24deec0c3859
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2022-07-05 03:44:02 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2022-07-06 00:31:55 +0000

    sysutils/nut*: Add Modbus support

    Some newer UPS models require modbus support. Add and enable modbus
    support by default for binary package users.

    PR:             265014
    Reported by:    tomli@tomli.me

    (cherry picked from commit b792fe675c33e7f40ecba03404890d82958e0706)

 sysutils/nut-devel/Makefile  | 10 +++++++---
 sysutils/nut-devel/pkg-plist | 10 ++++++++++
 sysutils/nut/Makefile        | 10 +++++++---
 sysutils/nut/pkg-plist       | 10 ++++++++++
 4 files changed, 34 insertions(+), 6 deletions(-)