Bug 249041

Summary: sysutils/apcupsd: Add patch to fix APC BE600M1 reporting
Product: Ports & Packages Reporter: Derek Schrock <dereks>
Component: Individual Port(s)Assignee: Danilo G. Baio <dbaio>
Status: Closed FIXED    
Severity: Affects Only Me CC: dereks
Priority: --- Flags: dbaio: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
URL: https://reviews.freebsd.org/D26259
Attachments:
Description Flags
Add patch to fix APC BE600M1 reporting
none
Turn into an optional patch with pkg-message none

Description Derek Schrock 2020-08-31 23:54:44 UTC
Created attachment 217679 [details]
Add patch to fix APC BE600M1 reporting

Reading here [1] and using the patch mentioned here [2] I was able to
get apcupsd running on 12.1 to correctly report data from a BE600M1.

Also, some functions in apctest now work as well.

[1] https://sourceforge.net/p/apcupsd/mailman/apcupsd-users/thread/CAMe0L0Vc9BzCYehm-bZUoPgHaL-43xsjetQ3hi7gD380b7NsqQ%40mail.gmail.com/#msg36287119
[2] http://apcupsd-ups-control-software.10985.n7.nabble.com/Potential-bug-with-USB-driver-and-HID-reports-td10001.html#a10043



portlint: ok? 1 expected warning about /sbin/shutdown
testport: ok. 12amd64.


current review: https://reviews.freebsd.org/D26259
Comment 1 Derek Schrock 2020-08-31 23:56:18 UTC
Hoping to get others feedback on the C++ and if this causes any issues on other APC UPS.
Comment 2 Danilo G. Baio freebsd_committer freebsd_triage 2020-09-01 23:50:56 UTC
Hi Derek.

Thanks for the patch.

I read the maillist, it's a pity that the author still didn't answer it, maybe you can give your feedback, helping resurrect this thread.

For now, I think it's more prudent we push this patch as an option, initially not enabled as default, so we can have more users testing it, is that ok for you?

Regards.
Comment 3 Derek Schrock 2020-09-02 14:45:20 UTC
Yeah, that seems like a better idea.  Maybe include in the pkg-message to enable the option if you see any reporting oddities?
Comment 4 Danilo G. Baio freebsd_committer freebsd_triage 2020-09-03 22:20:22 UTC
(In reply to Derek Schrock from comment #3)

Good idea about the pkg-message... it's possible to let a link to this PR as well.
Comment 5 Derek Schrock 2020-09-04 21:05:41 UTC
I can produce a patch later today to address this.
Comment 6 Derek Schrock 2020-09-04 23:13:13 UTC
Created attachment 217757 [details]
Turn into an optional patch with pkg-message
Comment 7 commit-hook freebsd_committer freebsd_triage 2020-09-04 23:40:37 UTC
A commit references this bug:

Author: dbaio
Date: Fri Sep  4 23:39:39 UTC 2020
New revision: 547577
URL: https://svnweb.freebsd.org/changeset/ports/547577

Log:
  sysutils/apcupsd: Add patch to fix APC BE600M1 reporting

  Patch not enabled as default (initially), so we can have more users testing it.

  PR:		249041
  Submitted by:	Derek Schrock <dereks@lifeofadishwasher.com>
  Differential Revision:	https://reviews.freebsd.org/D26259

Changes:
  head/sysutils/apcupsd/Makefile
  head/sysutils/apcupsd/files/extra-patch-usb-reporting
  head/sysutils/apcupsd/files/pkg-message.in
Comment 8 Danilo G. Baio freebsd_committer freebsd_triage 2020-09-04 23:41:04 UTC
Committed, thanks for your work!