4. Optimized packaging proposal

Note

The below proposed packages split is subject to discussion.

The aim of this is to:

This standard was created by:

4.1. Overview of the package tree

FIXME: make a dependency graph

4.2. Detailed view of the package tree

Note

  • The Desc field represent the package’s description, as exposed by the packaging system. Each package’s description is composed of a paragraph common to all NUT packages, and a part that is specific to the package. The common part (further referenced by COMMON DESC) is:
Network UPS Tools (NUT) is a client/server monitoring system that allows
computers to share uninterruptible power supply (UPS) and power distribution
unit (PDU) hardware. Clients access the hardware through the server, and are
notified whenever the power status changes.
  • The Files field lists the content of the package.
  • The mentioned Size is a rough estimation of packaged and installed size. This may varies across the systems and architecture, and is based upon the Debian x86 packages.
  • The Deps field lists the dependencies of the packages. The exact name may vary across the various systems.
  • The Comment field is used to place comment for points subject to discussion.

nut

  • Desc:
  • Files: dummy/serial/USB drivers + upsd + upslog
  • Size:
  • Deps:

libupsclient1

  • Desc:
  • Files:
  • Size:
  • Deps:

libupsclient1-dev

  • Desc:
  • Files:
  • Size:
  • Deps:

Note

the "-dev" suffix is to be replaced by "-devel" on RPM based platforms.

nut-cgi

  • Desc:
  • Files:
  • Size:
  • Deps:

nut-scanner

  • Desc:
  • Files:
  • Size:
  • Deps:

Note

hard third-party dependency on libltdl; recommends libsnmp, libneon, and the libusb variant (0.1 or 1.0) it was built against.

nut-powerman-pdu

  • Desc:
  • Files:
  • Size:
  • Deps:

nut-snmp

  • Desc:
  • Files:
  • Size:
  • Deps:

nut-xml

  • Desc:
  • Files:
  • Size:
  • Deps:

nut-ipmi

  • Desc:
  • Files:
  • Size:
  • Deps:

nut-modbus

  • Desc:
  • Files:
  • Size:
  • Deps:

nut-gpio

  • Desc: (currently platform-dependent)
  • Files:
  • Size:
  • Deps:

nut-linux-i2c

  • Desc: (platform-dependent)
  • Files:
  • Size:
  • Deps:

nut-macosx-ups

  • Desc: (platform-dependent)
  • Files:
  • Size:
  • Deps:

nut-clients

  • Desc:
  • Files:
  • Size:
  • Deps:

python-pynut

  • Desc:
  • Files:
  • Size:
  • Deps:

python-nut-gui

(or nut-control-center or Ultimate NUT Tool…)

  • Desc:
  • Files:
  • Size:
  • Deps:

nut-doc

  • Desc:
  • Files:
  • Size:
  • Deps:
*sandbox*
nut-server
^^^^^^^^^^
                        Desc:
                        Files: dummy/serial/USB drivers + upsd + upslog
                        Size:
                        Deps: nut-client, libusb, libc/ld

                B) nut-snmp

                        Desc:
                        Files: SNMP driver [/ manager ]
                        Deps: nut-server, net-snmp, libc/ld

                C) nut-client

                        Desc: don't force to have the server part/deps if not needed
                        Files: upsmon, upsc, upscmd, upsrw + driver.list [+nut-dev (lib, .h, .pc, man]
                        Deps: libc/ld

                E) nut-cgi

                        Deps:
                        Files: snmp-ups and powernet + manpages

                F) nut-doc:

                        Deps:
                        Files: dummycons + manpage

                G) nut-dev:

                        Deps:
                        Files: upsmon, upsc, upscmd, upsrw

                H) nut-scanner:

                        Deps: hard dependency on `libltdl`; recommends `libsnmp`, `libneon`, and the `libusb` variant (0.1 or 1.0) it was built against.
                        Files: nut-scanner tool and libnutscan + manpages


Note: "nut" can be a meta package

This kind of tree obviously needs modification on the conf/make
files of NUT to allow build/install in a separate way.


...
TO BE CONTINUED
...

Configuration option
^^^^^^^^^^^^^^^^^^^^

Example:

name= "ups" or "nut"
./configure \
            --prefix=/ \
            --sysconfdir=/etc/$name \
            --mandir=/usr/share/man \
            --libdir=/usr/lib \
            --includedir=/usr/include \
            --datadir=/usr/share/$name \
            --with-statepath=/var/run/nut \
            --with-altpidpath=/var/run/nut \
            --with-drvpath=/lib/nut \
            --with-cgipath=/usr/lib/cgi-bin/$name \
html-path
            --with-pidpath=/var/run/$name \
            --with-user=$name \
            --with-cgi \
            --without-ssl
...

NOTE: For packaging (OS distribution or in-house) it is recommended to
primarily `./configure --with-all` and then excise `--without-something`
explicitly for items not supported on your platform, so you do not miss
out on new NUT features as they come with new releases. Some may require
that you update your build environment with new third-party dependencies,
so a broken build of a new NUT release would let you know how to act.