Bug 268889 - [NEW PORT] sysutils/pcns: PowerChute Network Shutdown
Summary: [NEW PORT] sysutils/pcns: PowerChute Network Shutdown
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Matthias Fechner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-11 17:19 UTC by Steven Stallion
Modified: 2023-01-13 18:50 UTC (History)
1 user (show)

See Also:


Attachments
Patch (32.63 KB, application/mbox)
2023-01-11 17:19 UTC, Steven Stallion
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Stallion 2023-01-11 17:19:08 UTC
Created attachment 239407 [details]
Patch

PowerChute Network Shutdown (PowerChute) works in conjunction with the UPS
Network Management Card (NMC) to provide network-based shutdown of multiple
computer systems.

In the case of a UPS critical event, the software performs a graceful,
unattended system shutdown before the UPS battery is exhausted. The number of
protected systems is limited only by the capacity of the UPS.

WWW: https://www.apc.com/us/en/product-range/61933-powerchute-network-shutdown/
Comment 1 Matthias Fechner freebsd_committer freebsd_triage 2023-01-12 14:12:47 UTC
I just tried to compile it, but it seems that a new version is available and old binary cannot be downloaded anymore?

You want to upgrade to 4.4.1, then I can testbuild and can commit it for you.
Comment 3 Steven Stallion 2023-01-12 17:28:04 UTC
(In reply to Matthias Fechner from comment #1)

I probably should have mentioned this in the original comment, but versions newer than 4.4.0 are actually quite broken and APC has made noise about fixing it in 4.4.3, but have not done so yet for platforms other than virtualization.

To make things worse, APC puts out multiple version for multiple platforms and as far as I've been able to find, only the Linux version seems to be portable to FreeBSD.

If you look under Utilities and Firmware you should be able to find a link for v4.4 titled "PowerChute Network Shutdown v4.4 for Linux x64 (V4.4)"

Frankly, APC is a mess. If apcupsd worked with newer SmartUPS models, I wouldn't bother.
Comment 4 Steven Stallion 2023-01-12 17:38:28 UTC
For reference, here is the issue affecting 4.4.1: https://community.se.com/t5/APC-UPS-Data-Center-Enterprise/PCNS-v4-4-1-Unable-to-replace-the-Default-PowerChute-SSL/td-p/371658

TL;DR solution suggested by APC is to use version 4.4.0 if custom certificates are needed, which is fairly common for larger installs.
Comment 5 Steven Stallion 2023-01-12 17:56:14 UTC
(In reply to Steven Stallion from comment #4)

Reading through the solution again, it looks like there could be a path by patching/replacing a library. I could certainly do that if you think that's a better path than just downgrading the port version.
Comment 6 commit-hook freebsd_committer freebsd_triage 2023-01-13 06:35:37 UTC
A commit in branch main references this bug:

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

commit c6b26ffb714d774bb081e32e1176961ed6844eb8
Author:     Steven Stallion <sstallion@gmail.com>
AuthorDate: 2023-01-11 16:33:43 +0000
Commit:     Matthias Fechner <mfechner@FreeBSD.org>
CommitDate: 2023-01-13 06:34:10 +0000

    sysutils/pcns: New port: PowerChute Network Shutdown

    PR:             268889

 sysutils/Makefile                        |   1 +
 sysutils/pcns/Makefile (new)             |  58 ++++
 sysutils/pcns/distinfo (new)             |   3 +
 sysutils/pcns/files/pcns.in (new)        |  41 +++
 sysutils/pcns/files/pkg-message.in (new) |  20 ++
 sysutils/pcns/pkg-descr (new)            |   7 +
 sysutils/pcns/pkg-plist (new)            | 524 +++++++++++++++++++++++++++++++
 7 files changed, 654 insertions(+)
Comment 7 Matthias Fechner freebsd_committer freebsd_triage 2023-01-13 06:40:05 UTC
I added the port now like it is.
If you would like to fine-tune it or update, just create a new PR ;)

Thanks for your contribution.
Comment 8 Steven Stallion 2023-01-13 18:50:49 UTC
(In reply to Matthias Fechner from comment #7)

Sounds good. Thanks again!