Bug 166209 - Review Request: apcupsd - APC UPS Power Control Daemon for Linux
Review Request: apcupsd - APC UPS Power Control Daemon for Linux
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: John Mahowald
David Lawrence
http://www.cora.nwra.com/~orion/fedora/
:
Depends On:
Blocks: FE-ACCEPT
  Show dependency treegraph
 
Reported: 2005-08-17 17:03 EDT by Orion Poplawski
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-11-01 11:40:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
kevin: fedora‑cvs+


Attachments (Terms of Use)
rpmbuild log (52.15 KB, text/x-log)
2005-10-27 01:26 EDT, John Mahowald
no flags Details

  None (edit)
Description Orion Poplawski 2005-08-17 17:03:12 EDT
Spec Name or Url: http://www.cora.nwra.com/~orion/fedora/apcupsd.spec
SRPM Name or Url: http://www.cora.nwra.com/~orion/fedora/apcupsd-3.10.18-1.src.rpm
Description: 

Apcupsd can be used for controlling most APC UPSes. During a
power failure, apcupsd will inform the users about the power
failure and that a shutdown may occur.  If power is not restored,
a system shutdown will follow when the battery is exausted, a
timeout (seconds) expires, or the battery runtime expires based
on internal APC calculations determined by power consumption
rates.  If the power is restored before one of the above shutdown
conditions is met, apcupsd will inform users about this fact.
Some features depend on what UPS model you have (simple or smart).
Comment 1 John Mahowald 2005-10-16 01:20:19 EDT
Build failed, will need some cleaning up.

* rpmbuilding the SRPM it does not create executables. I get the following:
gmake[1]: Entering directory `/home/build/rpmbuild/BUILD/apcupsd-3.10.18/src'
gcc -g -O  apcupsd.o apcoptd.o apcnet.o apcreports.o apcaction.o apcnis.o
apcdevice.o /home/build/rpmbuild/BUILD/apcupsd-3.10.18/src/drivers/libdrivers.a
/home/build/rpmbuild/BUILD/apcupsd-3.10.18/src/lib/libapc.a  -lpthread    -o apcupsd
apcupsd.o(.text+0x36b): In function `main':
/home/build/rpmbuild/BUILD/apcupsd-3.10.18/src/apcupsd.c:266: undefined
reference to `attach_driver'
collect2: ld returned 1 exit status
gmake[1]: *** [apcupsd] Error 1

* Some missing files:
    File not found: /var/tmp/apcupsd-3.10.18-1-root-build/etc/apcupsd/hosts.conf
    File not found: /var/tmp/apcupsd-3.10.18-1-root-build/etc/apcupsd/multimon.conf
    File not found by glob: /var/tmp/apcupsd-3.10.18-1-root-build/usr/sbin/*
    File not found: /var/tmp/apcupsd-3.10.18-1-root-build/etc/apcupsd/apcupsd.css

* cgi package missing %defattr

Good:
* name of package and spec
* license (GPL)
* code, not content
* chkconfig script
* macro usage
Comment 2 Chris Grau 2005-10-16 09:31:05 EDT
I ran into the same problem building on FC-4/x86.  However, the package builds
fine in mock on both FC-3/x86 and FC-4/x86.  I couldn't track down the source of
this difference before running out of the time I had.
Comment 3 Orion Poplawski 2005-10-17 12:08:57 EDT
I can't reproduce the build problem here.  Are you sure that there aren't any
other errors, say in compiling src/drivers/drivers.c which defines "attach_driver".

I also don't get the "File not found" messages.
Comment 4 John Mahowald 2005-10-17 12:49:12 EDT
To reproduce:

fedora-rmdevelrpms
yum install glibc-devel gd-devel dos2unix
rpmbuild --rebuild apcupsd-3.10.18-1.src.rpm

Unclear why mock works.
Comment 5 Orion Poplawski 2005-10-17 15:35:19 EDT
Still can't reproduce.  Can you send me the output of rpmbuild?
Comment 6 John Mahowald 2005-10-27 01:26:50 EDT
Created attachment 120450 [details]
rpmbuild log

rpmbuild log
Comment 7 Orion Poplawski 2005-10-27 11:41:36 EDT
(In reply to comment #6)
> rpmbuild log

Can you try building without %{?_smp_mflags} passed to make?
Comment 8 John Mahowald 2005-10-29 18:24:50 EDT
Works now without %{?_smp_mflags}, so please remove them.

rpmlint says:
W: apcupsd no-reload-entry /etc/rc.d/init.d/apcupsd
W: apcupsd service-default-enabled /etc/rc.d/init.d/apcupsd
W: apcupsd-cgi no-documentation
W: apcupsd-cgi non-conffile-in-etc /etc/apcupsd/apcupsd.css

Change the init script so it doesn't start by default. And mark that css file as
a config file if it indeed is one.

Need to Require chkconfig

Source0 URL doesn't exist. You probably want
http://download.sourceforge.net/apcupsd/apcupsd-3.10.18.tar.gz, which does match.

The following looks good
- package meets packaging guidelines
- spec file legible
- package compiles on FC4 i386
- no locales
- not relocatable
- owns all directories that it creates
- no duplicate files
- permissions ok
- %clean ok
- macro use consistent
- code, not content
- no need for -docs
- nothing in %doc affects runtime
- no need for .desktop file 
Comment 9 Orion Poplawski 2005-10-31 12:41:24 EST
(In reply to comment #8)
> Works now without %{?_smp_mflags}, so please remove them.

Done.

> rpmlint says:
> W: apcupsd no-reload-entry /etc/rc.d/init.d/apcupsd
> W: apcupsd service-default-enabled /etc/rc.d/init.d/apcupsd
> W: apcupsd-cgi no-documentation
> W: apcupsd-cgi non-conffile-in-etc /etc/apcupsd/apcupsd.css
> 
> Change the init script so it doesn't start by default. And mark that css file as
> a config file if it indeed is one.

Done.

> Need to Require chkconfig

Done.

> Source0 URL doesn't exist. You probably want
> http://download.sourceforge.net/apcupsd/apcupsd-3.10.18.tar.gz, which does match.

Thanks, done.


-3 released:

http://www.cora.nwra.com/~orion/fedora/apcupsd-3.10.18-3.src.rpm
Comment 10 John Mahowald 2005-10-31 19:14:05 EST
Couldn't test it, no APC here, but the cgi monitor page displayed, at least.

Don't include README.solaris, but this isn't a blocker.

APPROVED
Comment 11 Orion Poplawski 2005-11-01 11:40:18 EST
Checked in a builds on devel.
Comment 12 Orion Poplawski 2007-03-22 14:10:00 EDT
Package Change Request
======================
Package Name: apcupsd
New Branches: EL-4 EL-5
Comment 13 Orion Poplawski 2007-07-02 12:17:59 EDT
Package Change Request
======================
Package Name: apcupsd
Initial CC: apcupsd-users@lists.sourceforge.net


Please add apcupsd-users@lists.sourceforge.net to the initial CC list.  See
http://sourceforge.net/mailarchive/message.php?msg_name=46859002.9070607%40cora.nwra.com
for more info.
Comment 14 Warren Togami 2007-07-03 11:20:34 EDT
apcupsd-users@lists.sourceforge.net doesn't have a Bugzilla account.  Please
create a Bugzilla account for that address before we can add it.
Comment 15 Orion Poplawski 2007-07-03 11:35:45 EDT
(In reply to comment #14)
> apcupsd-users@lists.sourceforge.net doesn't have a Bugzilla account.  Please
> create a Bugzilla account for that address before we can add it.

Done.
Comment 16 Kevin Fenzi 2007-07-03 21:58:51 EDT
Thanks. 
CC added. 

Note You need to log in before you can comment on or make changes to this bug.