This is a developing project to monitor a large assortment of UPS hardware.
Network communications are used so that multiple systems can monitor a
single physical UPS and shut down together if necessary without any
special "sharing hardware" on the UPS itself. CGI scripts are provided
to monitor UPS status via a WEB browser.
===> The following configuration options are available for nut-devel-2026.10.23:
AVAHI=on: Zeroconf support via Avahi
BASH=on: Install programmable completions for Bash
CGI=on: Web CGI interface
DEV=off: Install developer tools
DOCS=on: Build and/or install documentation
FREEIPMI=on: freeipmi support
IPMIPSU=off: Use nut-ipmipsu support (experimental)
MANPAGES=on: Build and/or install manual pages
MODBUS=on: Modbus support
NEON=on: NEON XML/HTTP support
PDU=on: Powerman PDU support
SERIAL=on: SERIAL support
SNMP=on: SNMP network protocol support
USB=on: USB support
====> SSL protocol support: you have to select exactly one of them
SSL_OFF=off: No SSL support
OPENSSL=on: SSL/TLS support via OpenSSL
NSS=off: SSL/TLS support via NSS
===> Use 'make config' to modify these settings
Reason:
The nut file ownership fixups due to the UID/GID change from uucp/uucp
to nut/nut may not be desireable for all users. Some users with custom
file ownership may wish ownership to remain untouched. This revision
to the nut family of ports/packages allows users to optionally disable
automatic fixup of nut file ownership.
Affects: users of sysutils/nut and sysutils/nut-devel
Author: cy@freebsd.org
Reason:
As of PR/268960 Network UPS Tools will now run under its own UID and GID
instead of uucp. Users who wish to continue using the uucp user and
group may add NUT_USER=uucp and NUT_GROUP=uucp to their make.conf.
After upgrading sysutils/nut or sysutils/nut-devel with this patch,
restart devd. Then restart nut. This will fix up the permissions of
UPS USB devices and allow nut to start normally.
all: drop support for FreeBSD 13, mips and risc64sf
Reviewed by: many (*)
Differential Revision: https://reviews.freebsd.org/D55624
Differential Revision: https://reviews.freebsd.org/D55642 (merged in from bofh)
many (*)
acm arrowd brooks cmt dch decke dinoex eduardo fluffy fuz gahr garga
jbeich joerg jrm kai kenrap martymac matthew mfechner michaelo mizhka
nobutaka pkubaj se tagattie thj
Anton Saietskii
GenericRikka
Gert Doering
Jan Bramkamp
Oleh Hushchenkov
Oleksandr Kryvulia
Ralf van der Enden
Yamagi
desktop kde python tcltk office
sysutils/nut*: Fix configure when user uses the uucp user account
Users wanting to use the uucp user account will experience configure
faiures because uucp is baked into the configure script. We make the
configure script default to "nothing" to address this edge case. The
default user (nut) is already set by the port and ports plumbing.
PR: 294350
sysutils/nut-devel: Update to the latest networkupstools/nut github commit
This commit effectively reverts upstream cb8e755c8 which ignores
--with-user and --with-group, resulting in a configure error. Upstream
assumes we build nut using the nut UID and nut GID. This is not the case
here.
sysutils/nut-devel: Disable automatic enphase API discovery
Disable automatic enphase API discovery. Any port that enables
the enphase API will result in a pkg-plist error. We do not need
the external enphase API.
Though the documentation states that external enphase API discovery is
disabled, the nut build enables it automatically. Building it in
a clean jail without unneeded ports installed will not discover this
error.
sysutils/nut-devel: Update to the latest networkupstools/nut github commit
This reverses 9dafbfb8c0b8. Upsteam has brought back man pages,
albiet in a different location. Therefore we must tell ./configure
to put them where they were before.
sysutils/nut-devel: Fix plist
Upstream doesn't appear to distribute man pages, in the traditional
sense, anymore. Looking at their git logs, this appears to be
intentional. They say this is to make it easier for distributions,
i.e. us, to package man pages. IMO this is not the case for FreeBSD.
In cbdbd520abc6 I simply copied the man pages to $LOCALBASE/share/doc.
This of course will need to change.
In the mean time the MAN option has been removed and man pages will
remain in share/doc until I can develop a script (in Makefile) to
read the man page volume number in the first line of each .txt file
in order to install the man pages into their correct places in
$LOCALBASE.
This commit temporarily works around the failing build.
sysutils/nut-devel: Update to the latest networkupstools/nut github commit
Also, for the time being copy man page simple ASCII files to
DOCSDIR until upstream has resolved man page issues.
sysutils/nut-devel: Disable augeas, fixing packaging
Autodetection of augeas is not yet understood, resulting in pkg-plist
errors. Disable augeas for now.
sysutils/nut-devel: Replace lpthread with pthread
The -pthread option is preferred these days. It tells the compiler to
do whatever is necessary to enable pthreads whereas -lpthread simply
includes the library. No change is intended.
sysutils/nut-devel: Remove GCC requirement.
Remove the GCC requirement by adding -lpthread and removing the
nullification of CFLAGS and LDFLAGS in the M4 script that verifies
we have a working libltdl.
sysutils/nut-devel: Only install nut-usb.conf with USB option
${LOCALBASE}/etc/devd/nut-usb.conf was installed unconditionally. This is
incorrect. It should only be installed when the USB option is selected.
MFH: 2023Q2
sysutils/nut*: Make nut file ownership fixes optional with default enabled
The nut file ownership fixups due to the UID/GID change from uucp/uucp
to nut/nut may not be desireable for all users. Some users with custom
file ownership may wish ownership to remain untouched. This revision
to the nut family of ports/packages allows users to optionally disable
automatic fixup of nut file ownership.
While at it, rather than use a hardcoded string for user/group ownerships,
use the set parameters in Makefile.
PR: 269497
suggested by: dvl
sysutils/nut*: Fix nut file access
Preexisting nut files will have uucp group permissions, which will no
longer be available to nut because it runs under its own GID. For the
time being add code to nut_prestart() adjusting the ownership of the
files to UID nut and GID nut.
This code should be removed approximately a year from now as it is
expected that most if not all nut installations will have correct file
ownership by then.
While here, also fix nut.newsyslog to refer to the new nut UID/GID.
Reported by: avg, Mathieu <sigsys@gmail.com>
Fixes: 02c038c8cc15
sysutils/nut*: Fix group for serial UPS users.
02c038c8cc15, though more secure, broke access to serial devices for
users of serial UPS devices. Add the nut user to the dialer group.
PR: 268960
Reported by: vvd@unislabs.com
Fixes: 02c038c8cc15
sysutils/nut*: Use a dedicated UID and GID
To reduce conflicts with other packages and improve security, avoid
using the uucp UID and GID. This avoids potential conflicts with the
net/freebsd-uucp port.
Users who wish to continue using the uucp user and group may add
NUT_USER=uucp and NUT_GROUP=uucp to their make.conf.
PR: 268960
Reported by: delphij
MFH: 2023Q1
sysutils/nut*: Remove bash_completion dependency
Even though bash completion scripts are installed, bash_completion
need not be installed, reducing the port and package footprint.
Should a person actually need bash_completion, it can be installed
separately by the user.
PR: 267214
Reported by: Mel Pilgrim <ports.maintainer@evilphi.com>
MFH: 2022Q4
sysutils/nut*: Require devd prior to start
In some cases nut may start before devd causing it to fail because it
lacks permissions to USB attached UPS devices. The nut supplied
devd.conf ensures that nut has read/write access to the UPS.
PR: 267144
Reported by: ml@netfence.it
MFH 2022Q4