Giter Site home page Giter Site logo

CI: add support for "custom" dependencies in the codebase? Case in question: how to best handle modbus extensions for NUT drivers? about nut HOT 4 OPEN

jimklimov avatar jimklimov commented on June 25, 2024
CI: add support for "custom" dependencies in the codebase? Case in question: how to best handle modbus extensions for NUT drivers?

from nut.

Comments (4)

EchterAgo avatar EchterAgo commented on June 25, 2024 1

I wasn't aware we could add drivers to libmodbus like in #1671, I like that approach and I would have used it for #2063 if I had figured that out. Adding a modbus backend like that does rely on internals of libmodbus that could change at any time though.

Adding our own fork would avoid this and having our changes battle-tested would make a good case for upstream to accept changes. The lack of upstream updates and the stability of the protocol also make it attractive to use our own fork.

What we also have to consider is that libmodbus is LGPL licensed, so I'm not sure we can actually distribute binaries statically linked to libmodbus.

from nut.

aquette avatar aquette commented on June 25, 2024 1

Static link with LGPL is not an issue here, since nut is gpl (code available), our derivative of libmodbus is also available and everything is provided to users to be able to recompile / relink and get the modifications made for nut.

The essence of LGPL is to ensure that the libs code gets the same attention as gpl (any mods must be contributed back!), but allowing for linking to proprietary code. As long as we fit, no issues. And we would fit here.

You may want to check https://copyleft.org/guide/comprehensive-gpl-guidech11.html#x14-10800010.8 and look for
β€œwork based on the library.” around Β§10.5

Also fully aligned with our mod that would help testing and giving confidence to the upstream. Hopefully, our changes could be merged back, so that we don't have to maintain our fork in the long run. If that helps, I can contact the upstream, he's french 😁

from nut.

clepple avatar clepple commented on June 25, 2024

I haven't had time to follow this too closely, but when I looked at libmodbus a few years ago, the extra code needed to communicate with USB-based APC hardware was almost worthy of a fork (so as to clearly indicate the additional USB focus). I haven't looked at how hard it would be to make sure that the fork doesn't conflict with a system-provided serial-only libmodbus.

I think the more modern equivalent of a contrib directory is a separate Git repository for the dependency, with a tag and/or submodule reference.

from nut.

jimklimov avatar jimklimov commented on June 25, 2024

FWIW, added https://github.com/networkupstools/libmodbus to at least bookmark the useful custom code involved in enhanced NUT custom builds...

from nut.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.