Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 515526 - sys-power/apcupsd-3.14.12 on ARM - apcaccess parameter parser does not return negative number if parameter is not found
Summary: sys-power/apcupsd-3.14.12 on ARM - apcaccess parameter parser does not return...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: ARM Linux
: Normal normal (vote)
Assignee: Matthew Marlowe (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-06-27 15:19 UTC by David Flogeras
Modified: 2016-01-01 20:11 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix for apcaccess command line parsing on ARM (apcupsd-fix-apcaccess-on-arm-r2158.patch,394 bytes, patch)
2014-06-27 15:20 UTC, David Flogeras
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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