Bug 121141 - fix apcaccess functionality in sysutils/apcupsd package
Summary: fix apcaccess functionality in sysutils/apcupsd package
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Ion-Mihai "IOnut" Tetcu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-27 08:10 UTC by Adrian Penisoara
Modified: 2008-03-31 18:30 UTC (History)
0 users

See Also:


Attachments
file.diff (1.78 KB, patch)
2008-02-27 08:10 UTC, Adrian Penisoara
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Penisoara 2008-02-27 08:10:00 UTC
In recent sysutils/apcupsd package versions the apcaccess tool has been "downsized" to its minimal "status" functionality, thus the developer(s) have stripped down a lot of code from it -- from the Changelog:

2007-08-03 11:17  adk0212

        * src/apcaccess.c:

        Remove lots of obsolete code. 'status' is now the only supported
        option.


However, together with this "downsizing" operation some critical functionality: the tools is not able anymore to fetch the apcuspd daemon binding point (host:port) from its configuration file; by default it can query only the localhost:3551 address.

This will impact running the tool for non-default apcupsd configurations. While it previously was able to correctly read daemon binding point from the configuration file, it can no longer do so in the new versions.

Fix: I have backported some minimal code from the 3.12.4 sources to restore the missing functionality (reading host:port configuration from the configuration file). See patch attached (raises PORTREVISION).


Patch attached with submission follows:
How-To-Repeat: Configure your apcupsd daemon (in /usr/local/etc/apcupsd/apcupsd.conf) to run on a non-default IP and/or port. Running the "apcaccess [status]" command will fail now, including when ran from the default-action scripts like "commok" , "offbattery, "onbattery", etc. This will show up in email reports and web interface.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2008-02-27 08:20:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->itetcu

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Ion-Mihai "IOnut" Tetcu freebsd_committer freebsd_triage 2008-03-31 18:15:44 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 3 dfilter service freebsd_committer freebsd_triage 2008-03-31 18:22:02 UTC
itetcu      2008-03-31 17:21:57 UTC

  FreeBSD ports repository

  Modified files:
    sysutils/apcupsd     Makefile distinfo 
  Added files:
    sysutils/apcupsd/files patch-src__apcaccess.c 
                           patch-src__drivers__usb__bsd__bsd-usb.c 
  Log:
  - update to 3.14.3
  - more OPTIONS to let the user choose what he needs to have compiled
  - don't allow drivers to be compiled if user wants only the client
  - chase netsnmp shared lib version
  - provide internationalization support
  - provide backup location on my server for the pdf manual and don't IGNORE the
  file in distinfo anymore
  - patch apcaccess to be able to fetch the host:port from the config file [1]
  - add patch to allow usb driver to compile [2]
  
  PR:             ports/121141 [1]
  Submitted by:   Adrian Penisoara [1], Stefan Lambrev [2]
  
  Revision  Changes    Path
  1.55      +85 -17    ports/sysutils/apcupsd/Makefile
  1.22      +6 -5      ports/sysutils/apcupsd/distinfo
  1.1       +51 -0     ports/sysutils/apcupsd/files/patch-src__apcaccess.c (new)
  1.1       +32 -0     ports/sysutils/apcupsd/files/patch-src__drivers__usb__bsd__bsd-usb.c (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"