Bug 698512

Summary: Nut 2.6 can't connect to a UPS via USB
Product: [Fedora] Fedora Reporter: David Hampton <bugzilla>
Component: nutAssignee: Michal Hlavinka <mhlavink>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 14CC: mhlavink
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: nut-2.6.0-5.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-09 04:01:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Hampton 2011-04-21 04:49:09 UTC
Description of problem:
Nut fails to start when talking to a USB connected UPS.

Version-Release number of selected component (if applicable):
2.6.0-3

How reproducible:
Every time.

Steps to Reproduce:
1. "/sbin/upsdrvctl start" (taken from /etc/init.d/ups)
2.
3.
  
Actual results:
Network UPS Tools - UPS driver controller 2.6.0
Network UPS Tools - Generic HID driver 0.35 (2.6.0)
USB communication driver 0.31
Using subdriver: APC HID 0.95
libusb_get_report: No error
Can't initialize data from HID UPS
Driver failed to start (exit status=1)


Expected results:
Network UPS Tools - UPS driver controller 2.4.3
Network UPS Tools - Generic HID driver 0.34 (2.4.3)
USB communication driver 0.31
Using subdriver: APC HID 0.95


Additional info:
A google search for "nut libusb_get_report 2011" quickly turned up the culprit.  It seems that upstream lost a two line patch that had originally been applied in 2010. (http://boxster.ghz.cc/projects/nut/changeset/2407).

I downloaded the nut srpm, applied this patch, and rebuilt.  With the tweaked rpm installed, the ups driver starts without complaint.

Comment 1 Michal Hlavinka 2011-04-21 13:27:35 UTC
>  It seems that upstream lost a two line patch that had originally been applied
> in 2010. (http://boxster.ghz.cc/projects/nut/changeset/2407).

That patch broke some other UPSes so it was reverted and it was fixed differently in commit 
http://boxster.ghz.cc/projects/nut/changeset/2719

Could you check if following package fixes problem for you?

http://kojipkgs.fedoraproject.org/scratch/mhlavink/task_3015869/

Comment 2 David Hampton 2011-04-21 13:38:38 UTC
Yes, your package fixes the problem for me.  I had thought there must be a better fix but didn't have time to try and learn the structure of the code.  Thanks.

David

Comment 3 Fedora Update System 2011-04-21 16:01:33 UTC
nut-2.6.0-5.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/nut-2.6.0-5.fc14

Comment 4 Fedora Update System 2011-04-21 16:01:42 UTC
nut-2.6.0-6.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/nut-2.6.0-6.fc15

Comment 5 Fedora Update System 2011-04-21 22:25:06 UTC
Package nut-2.6.0-5.fc14:
* should fix your issue,
* was pushed to the Fedora 14 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing nut-2.6.0-5.fc14'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/nut-2.6.0-5.fc14
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2011-05-09 04:01:37 UTC
nut-2.6.0-6.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2011-05-17 00:59:18 UTC
nut-2.6.0-5.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.