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-2.8.5_1:
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: Replace ./configure.ac patch with ./configure
Replace ./configure.ac patch with a ./configure patch. We do not use
autoconf.sh with the non-devel port. Therefore backport configure.ac
to ./configure. This addresses missing nut group configuration on
FreeBSD 13.5.
PR: 294350
Fixes: 64fec1e56b44
sysutils/nut: Update to 2.8.4
Copied nut-devel Makefile and pkg-plist for the same time period to
avoid having to test rebuild every option. Hopefully this is good
enough.
PR: 294189
sysutils/nut: Remove unnecessary validation for bus_num
The libusb_get_bus_number() function serves as a simple accessor for
the bus number of the opaque device struct. Unlike
libusb_get_port_number(), it does not have the ability to convey
errors back to the caller, and a bus number of 0 is a valid value.
Therefore, any validation around bus_num is redundant.
This commit removes the unnecessary validation code related to bus_num.
Signed-off-by: Xin LI <delphij@FreeBSD.org>
PR: 275293
Upstream commit: 4aeb199eb
Upstream Pull Request: https://github.com/networkupstools/nut/pull/2198/
sysutils/nut: Install nut-usb.conf
devd fails to change UPS device node ownership because the nut port
fails to install ${LOCALBASE}/etc/devd/nut-usb.conf. Install it.
Reported by: Kostas Oikonomou <ko56 _AT_ winlab.rutgers.edu>
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
Remove WWW entries moved into port Makefiles
Commit b7f05445c00f has added WWW entries to port Makefiles based on
WWW: lines in pkg-descr files.
This commit removes the WWW: lines of moved-over URLs from these
pkg-descr files.
Approved by: portmgr (tcberner)
Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.
Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.
There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.
(Only the first 15 lines of the commit message are shown above )
sysutils/nut*: Remove unneeded headers
Remove headers used in the first attempt. Removing them reduces some
namespace pollution and has no nother effect on the resulting package.
sysutils/nut*: Add upslog support for multiple UPSs
upslog is a utility that logs UPS status at regular intervals, specified
by the -i option. Unfortunately upslog supports only on UPS. For sites
that need to monitor multiple UPSs the options are to cobble an rc script
for each or doctor up the nut_upslog.in script to support cloning of the
script. Unfortunately an rc script capable of being cloned would become
the source of more PRs and would require significanly more tehcnical
documentation that by itself might become confusing for the average
system administrator.
Therefore a new -m option is added to support multiple UPSs using the
same invocation of upslog. The patch parses a new -m option and using a
single connection to upsd, queries it for stats about multiple UPSs.
An rc.conf exemple of how to use this new feature:
nut_upslog_flags="-p /var/db/nut/upslog.pid -m ups1@localhost,/var/log/nut\
/ups1.log -m ups2@localhost,/var/log/nut/ups2.log"
PR: 265963
Reported by: vvd@unislabs.com
Revert "sysutils/nut*: Add upslog support for multiple UPSs"
upslog is failing to make multiple connections to upsd resulting
in some UPSs logging and others not. This is likely some bug
in upsd's socket handling.
Even though this patch worked for me locally it did not for the
person reporting the problem.
A better approach would be to use select() instead.
PR: 265963
This reverts commit dec4ecc3afecab035a4d4fa59c35093d9f53ffd5.
sysutils/nut*: Alternate upslog support for multiple UPSs
Add sample rc script to allow a user to copy a sample rc script to
rc.d, allowing the user to use multiple instances of upslog(8) with
multiple instances of the rc script to log multiple UPSs on the same
system.
The sample rc script was provided by vvd@unislabs.com.
PR: 265963
Reported by: vvd@unislabs.com
Submitted by: vvd@unislabs.com
sysutils/nut*: Add upslog support for multiple UPSs
upslog is a utility that logs UPS status at regular intervals, specified
by the -i option. Unfortunately upslog supports only on UPS. For sites
that need to monitor multiple UPSs the options are to cobble an rc script
for each or doctor up the nut_upslog.in script to support cloning of the
script. Unfortunately an rc script capable of being cloned would become
the source of more PRs and would require significanly more tehcnical
documentation that by itself might become confusing for the average
system administrator.
Therefore a new -m option is added to support multiple UPSs using the
same invocation of upslog. The patch parses a -m option and forks
almost immediately following the getopt(3) invokation to monitor each
individual UPS using a separate upslog process. This is not ideal but
(Only the first 15 lines of the commit message are shown above )
sysutils: remove 'Created by' lines
A big Thank You to the original contributors of these ports:
* <jsmith@resonatingmedia.com>
* Aaron Dalton <aaron@FreeBSD.org>
* Aaron Landwehr <aaron@snaphat.com>
* Adam Weinberger <adamw@FreeBSD.org>
* Adrian Chadd
* Adrian Chadd <adrian@FreeBSD.org>
* Akinori MUSHA aka knu <knu@idaemons.org>
* Alan Eldridge <alane@FreeBSD.org>
* Alan Eldridge <alane@geeksrus.net>
* Aldis Berjoza <aldis@bsdroot.lv>
* Alex Deiter <alex.deiter@gmail.com>
(Only the first 15 lines of the commit message are shown above )
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*: Enable all non-experimental options by default
Increasingly binary package users are requesting enablement of all options
to avoid building ports themselves, while others lack the wherewithal to
build ports themselves. Therefore enable all non-experimental options by
default. And, while at it enable openssl support.
Users who either build ports themselves or maintain their own
poudriere infrastructure, the ease of running make config or
poudriere options is certainly the lesser of the two evils.
Reported by: many
MFH: 2022Q3
sysutils/nut: Move patch file back to its proper place
I had moved the file to the root of port's directory to perform some
testing when updating the port to 2.8.0 and forgot to move it to its
rightful place in files/.
The patch file avoids redundantly building systemd and Solaris support
files that are never used in FreeBSD thereby reducing build time.
PORTREVISION doesn't need to change.
Reported by: lwhsu
MFH: No sense doing that so late in the quarter
sysutils/nut*: Correctly use libusb.so
FreeBSD has no libusb-1.0.so, even though pkgconf identifies it as such.
The ABI is the same but the name is different.
Reported by: Paul Arakelyan <paul.arakelyan@gmail.com>
sysutils/nut*: Add MANPAGES option
Provide a MANPAGES option to allow users wishing a leaner install to
deselect them.
PR: 263751
Reported by: Joerg Pulz <Joerg.Pulz@frm2.tum.de>
sysutils/nut: Remove redundant BUILD_DEPENDS
Remove unused asciidoc BUILD_DEPENDS from sysutils/nut as its man pages
are already preformatted.
Also, add a comment to the sysutils/nut-devel port Makefile informing
developers to remove the BUILD_DEPENDS when copying/merging the -devel
port to the main port when a new release of nut is committed.
PR: 263751
Reported by: Joerg Pulz <Joerg.Pulz@frm2.tum.de>
sysutils/nut*: Convert to options helpers
Modernize the sysutils/nut* ports replacing old-school options with
options helpers, cleaning up the Makefiles a lot.
PR: 263751
Reported by: dizzy
sysutils/nut: Remove redundant EXTRACT_ONLY definition
EXTRACT_ONLY is redundant and does nothing in this port.
PR: 263751
Reported by: Joerg Pulz <Joerg.Pulz@frm2.tum.de>
sysutils/nut: Build nut-scanner(8)
Depend on devel/ltdl and ensure that ${LOCALBASE}/include and
${LOCALBASE}/lib are available for ./configure to detect ltdl.h and
libltdl to facilitate building nut-scanner(8).
PR: 259153
Reported by: emaste
MFH: 2021Q4
sysutils/nut: Guarantee that devfs is started
devfs does not always win the race with nut causing nut to fail to
start in some installations.
PR: 258190
Submitted by: hsakamt@tsnr.com
Reported by: hsakamt@tsnr.com
MFH: 2021Q3
Fix build when DOCS is unset
Do not contionaly install the logging files depending on the DOCS option set.
THey should always be installed.
Approved by: portmgr (blanket)
Move default log location so it can be rotated without root privileges.
Add syslog.conf and newsyslog.conf files for installation into their
respective .d directories in $PREFIX.
Allow upslog log format to be customized.
PR: 236700
Submitted by: Daniel O'Connor <darius@dons.net.au> (90%)
Add NSS support with a new NSS option. The new NSS option is mutually
exclusive with the OPENSSL option, previously called the SSL option.
Also add a no SSL option which was previously implied by deselecting
the previous SSL option. Only one of the three options may be selected.
Nut USB drivers report a "permission error" without visible reasons
for the error even though permissions are OK (or the driver is run
as root).
Nut uses libusb-0.1 API, assuming return cods of < 0. FreeBSD provides
a libusb-0.1 wrapper howerver it uses libusb-1.0 error codes (which
are negative). This set of patches "teaches" nut libusb-1.0 error codes
as produced by FreeBSD.
Network UPS Tools (networkupstools.org) has a project to use libusb-1.0.
This commit is a stopgap fix until our upline implments lubusb-1.0
support in nut.
PR: 223117
Submitted by: lev
If nut_upsshut is YES in rc.conf and POWERDOWNFLAG directive is in
upsmon.conf, send a powerdown signal to the UPS to shut down at
poweroff.
Suggested by: Alexander Milanov <a@amilanov.com>
- rename www/neon29 to www/neon and update to neon-0.30.1
- adjust ports depending on neon, bump PORTREVISION
Changelog:
Fix memory leak with GnuTLS (Werner Baumann, Patrick Ohly).
Fix possible crash after DNS lookup errors on Windows (Olivier Goffart).
Don't fail if the SSL cert changes between connections with OpenSSL, behaviour
now matches that with GnuTLS.
Fix PKCS#11 support under OpenSSL with TLS 1.2.
Fix static linking with pkg-config file (Alan H)
PR: 195786
Differential Revision: https://reviews.freebsd.org/D1319
Submitted by: ohauer
Reviewed by: portmgr (bapt, mat)
Approved by: portmgr, lev (implicit)