Bug 494020

Summary: nut do not provide any mechanism to grant access to /dev/ttyS0
Product: [Fedora] Fedora Reporter: Sergei LITVINENKO <sergei.litvinenko>
Component: nutAssignee: Michal Hlavinka <mhlavink>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: mhlavink
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-04-14 11:18:24 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 Sergei LITVINENKO 2009-04-03 18:08:53 UTC
Description of problem:
/sbin/powercom do not have access to /dev/ttyS0 to manage UPS on /dev/ttyS0

Version-Release number of selected component (if applicable):
nut-2.4.1-2.fc11.i586

How reproducible:
service ups start


Steps to Reproduce:
1. Setup UPS on /dev/ttyS0
2. /sbin/upsdrvctl
3.
  
Actual results:
Access to /dev/ttyS0 is denied

Expected results:
/sbin/upsdrvctl start and work

Additional info:
Changing owner of /dev/ttyS0 to 'nut' in /etc/rc.d/init.d/ups (section 'start') can avoid the problem.

Comment 1 Michal Hlavinka 2009-04-07 08:17:06 UTC
In rawhide is new version of nut (2.4.x instead of 2.2.x), do you know if it worked in older versions (for example in Fedora 10) ?

Comment 2 Michal Hlavinka 2009-04-14 08:41:05 UTC
well, it seems some change in udev package caused this problem:
F-10
/lib/udev/rules.d/50-udev-default.rules:KERNEL=="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="uucp"
F-11
/lib/udev/rules.d/50-udev-default.rules:KERNEL=="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="dialout"

/dev/ttyS* changed it's group from uucp to dialout, the change came from udev's upstream, so I'm going to made necessary changes in nut.

Comment 3 Michal Hlavinka 2009-04-14 11:18:24 UTC
fixed since nut-2.4.1-3.fc11 ( https://koji.fedoraproject.org/koji/buildinfo?buildID=97850 )

Please test, I have only usb connected ups.

Comment 4 Sergei LITVINENKO 2009-04-14 17:23:04 UTC
https://koji.fedoraproject.org/koji/buildinfo?buildID=97850
Sorry, but your URL is not accessible:

[quote]
An error occurred during a connection to koji.fedoraproject.org.
SSL peer was unable to negotiate an acceptable set of security parameters.
(Error code: ssl_error_handshake_failure_alert)
[/quote]

Can you send me patch by Email?

Comment 5 Michal Hlavinka 2009-04-15 06:16:09 UTC
It's just because you have no account in koji. Use this link (http instead of https).

http://koji.fedoraproject.org/koji/buildinfo?buildID=97850

I think now it should be possible to just update nut using yum update nut (check if it offers you 2.4.1-3.fc11 version, if not use packages from the link). Both packages should be the same. I've provided this link only because this is a little faster so we don't have to wait repository process.

Testing packages that have been built using present rawhide buildroot is more accurate, then use patch and build your own. The patch is really simple: replace all occurrences of 'uucp' in spec file with 'dialout'.