Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 515526

Summary: sys-power/apcupsd-3.14.12 on ARM - apcaccess parameter parser does not return negative number if parameter is not found
Product: Gentoo Linux Reporter: David Flogeras <dflogeras2>
Component: [OLD] Core systemAssignee: Matthew Marlowe (RETIRED) <mattm>
Status: RESOLVED OBSOLETE    
Severity: normal CC: base-system
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: ARM   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Fix for apcaccess command line parsing on ARM

Description David Flogeras 2014-06-27 15:19:14 UTC
On ARM, since a char by default is unsigned (yup), the getopt() related stuff in apcaccess does not work correctly.

I found a fix on their mailing list and SVN, and have made a patch that could be included in the ebuild.  Here's where I found the information:

http://apcupsd-ups-control-software.10985.n7.nabble.com/bugreport-apcaccess-parameter-parser-does-not-return-negative-number-if-parameter-is-not-found-td8573.html

http://sourceforge.net/p/apcupsd/svn/2158/#diff-1

Reproducible: Always
Comment 1 David Flogeras 2014-06-27 15:20:08 UTC
Created attachment 379796 [details, diff]
Fix for apcaccess command line parsing on ARM
Comment 2 Matthew Marlowe (RETIRED) gentoo-dev 2014-08-22 06:23:58 UTC
Do we know if this patch is good for all arches or should only be applied when compiling for ARM? In general, gentoo prefers to patch upstream sources only when patches are applicable to all arches.
Comment 3 David Flogeras 2014-08-22 10:17:23 UTC
(In reply to Matthew Marlowe from comment #2)
> Do we know if this patch is good for all arches or should only be applied
> when compiling for ARM?

Yup, it is the correct implementation for all arches.  According to the dev "I've fixed the code to treat getopt() return value as int, which is what it always should have done."
Comment 4 David Flogeras 2016-01-01 20:11:54 UTC
Irrelevant now that the 3.14.13 ebuild entered the tree. Closing