Bug 176339 - sys-power/apcupsd-3.10.18-r1: /usr/sbin/apcupsd missing (after emerge)
Bug#: 176339 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: critical Priority: P2
Resolution: TEST-REQUEST Assigned To: tantive@gentoo.org Reported By: deepee@gmx.net
Component: Ebuilds
URL: 
Summary: sys-power/apcupsd-3.10.18-r1: /usr/sbin/apcupsd missing (after emerge)
Keywords:  
Status Whiteboard: 
Opened: 2007-04-28 11:12 0000
Description:   Opened: 2007-04-28 11:12 0000
hostname # /etc/init.d/apcupsd start
 * Caching service dependencies                                                 
 * Starting APC UPS daemon ...
/sbin/start-stop-daemon: stat /usr/sbin/apcupsd: No such file or directory (No
such file or directory)

hostname / # find / -type f -name apcupsd
/var/lib/init.d/exitcodes/apcupsd
/etc/init.d/apcupsd

Reproducible: Always

Steps to Reproduce:
1. emerge apcupsd
2. /etc/init.d/apcupsd start
3. bang ;-)




Portage 2.1.2.2 (default-linux/x86/2006.1, gcc-4.1.1, glibc-2.5-r0,
2.6.18-gentoo-r6 i686)
=================================================================
System uname: 2.6.18-gentoo-r6 i686 Intel(R) Pentium(R) M processor 1.80GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Sat, 28 Apr 2007 01:20:01 +0000
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.31-r5
dev-lang/python:     2.3.5-r3, 2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.15-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config
/usr/kde/3.4/shutdown /usr/lib/fax /usr/share/X11/xkb /usr/share/config
/var/bind /var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf
/etc/java-config/vms/ /etc/php/apache1-php4/ext-active/
/etc/php/apache1-php5/ext-active/ /etc/php/apache2-php4/ext-active/
/etc/php/apache2-php5/ext-active/ /etc/php/cgi-php4/ext-active/
/etc/php/cgi-php5/ext-active/ /etc/php/cli-php4/ext-active/
/etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo
http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/
ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/
http://ftp.uni-erlangen.de/pub/mirrors/gentoo
ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo
ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo
ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo
ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo
ftp://ftp6.uni-muenster.de/pub/linux/distributions/gentoo
http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/
http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude=/distfiles --exclude=/local --exclude=/packages
--filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlays/gentoo-de"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="a52 aac aalib acpi alsa apache2 audiofile bash-completion bcmath berkdb
bitmap-fonts bzlib caps cdb cdparanoia cdr cli cracklib crypt ctype cups curl
curlwrappers dedicated directfb dri dvd dvdr ethereal exif fam fbcon flash
fortran freetype ftp gd gif gpm gps iconv icq ieee1394 imagemagick imlib ipv6
isdnlog jabber java javascript jpeg kde kerberos ldap libg++ libwww lm_sensors
logrotate mhash midi milter mime mmx mng mysql ncurses nls nptl nptlonly
offensive opengl pam pcntl pcre pdf perl php png posix ppds pppd python qt
readline reflection rrdtool ruby sasl session sharedext slp snmp sockets socks5
spell spl sse sse2 ssl svg svgalib symlink tcltk tcpd threads tidy tiff
truetype truetype-fonts type1-fonts unicode usb vhosts wmf x86 xml xml2 xmlrpc
xorg xpm xsl xv zlib" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym
copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat
linear meter mulaw multi null plug rate route share shm softvol"
DVB_CARDS="ttpci nxt200x sp8870 tda1004x or51132 or51211" ELIBC="glibc"
FRITZCAPI_CARDS="fcpci fcclassic" INPUT_DEVICES="keyboard mouse evdev"
KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001
mtxorb ncurses text" LIRC_DEVICES="serial" USERLAND="GNU" VIDEO_CARDS="i810
vesa fbdev"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS,
LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #1 From Daniel 2007-04-28 11:29:49 0000 -------
After keywording apcupsd using ~x86, the problem is half-solved... ;-)

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] sys-power/apcupsd-3.12.4  USE="ncurses nls snmp threads usb
vhosts -cgi -doc" 0 kB

Init-script still does not find the daemon-binary:

hostname # /etc/init.d/apcupsd start
 * Caching service dependencies ...                                            
                                                                               
     [ok]
 * Starting APC UPS daemon ...
/sbin/start-stop-daemon: stat /usr/sbin/apcupsd: No such file or directory (No
such file or directory) [!!]

But now the daemon "apcupsd" is found under /sbin/apcupsd (see below) ?!?!?!

hostname sbin # find / -type f -name apcupsd
/var/lib/init.d/exitcodes/apcupsd
/sbin/apcupsd
/etc/init.d/apcupsd

Just guessing:
It seems to me the location of apcupsd has been changed to /sbin but the
init-script has not been updated. /sbin/apcupsd makes sense to me, because
apcupsd perhabs is needed there in case of system-shutdown when all other
filesystems have been unmounted before, to finally shutdown the UPS-Hardware
itself.

------- Comment #2 From Daniel 2007-04-28 11:37:09 0000 -------
ups! In addition to my second message:

Keywording completely solved my problem:
Shame on my, I've just forgotten to "etc-update" - sorry for that
false-positive! ;-)

Nevertheless: the Problem described in msg 1 still exists.



(In reply to comment #1)
> After keywording apcupsd using ~x86, the problem is half-solved... ;-)
> 
> These are the packages that would be merged, in order:
> 
> Calculating dependencies... done!
> [ebuild   R   ] sys-power/apcupsd-3.12.4  USE="ncurses nls snmp threads usb
> vhosts -cgi -doc" 0 kB
> 
> Init-script still does not find the daemon-binary:
> 
> hostname # /etc/init.d/apcupsd start
>  * Caching service dependencies ...                                            
>                                                                                
>      [ok]
>  * Starting APC UPS daemon ...
> /sbin/start-stop-daemon: stat /usr/sbin/apcupsd: No such file or directory (No
> such file or directory) [!!]
> 
> But now the daemon "apcupsd" is found under /sbin/apcupsd (see below) ?!?!?!
> 
> hostname sbin # find / -type f -name apcupsd
> /var/lib/init.d/exitcodes/apcupsd
> /sbin/apcupsd
> /etc/init.d/apcupsd
> 
> Just guessing:
> It seems to me the location of apcupsd has been changed to /sbin but the
> init-script has not been updated. /sbin/apcupsd makes sense to me, because
> apcupsd perhabs is needed there in case of system-shutdown when all other
> filesystems have been unmounted before, to finally shutdown the UPS-Hardware
> itself.
> 

------- Comment #3 From Benny Pedersen 2007-05-19 18:03:04 0000 -------
does 3.14.0 work ?

i see olso some problems with the older versions here, installed 3.14.0 works
here now

------- Comment #4 From Oz 2007-06-04 13:41:13 0000 -------
Hy,
This seems to be USE related.
I solved te problem for me by adding the following line to
/etc/portage/package.use :
sys-power/apcupsd -apache2 -snmp -threads -doc nls

I've got two different servers to be run with apcupsd. One just installed fine,
the other didn't. They have different USE enabled. So I just tuned the USE for
the one with the binaries missing to match the good one.
I decided to have a look here, if other have related troubles. Et voila: I
posted this.

I do not know what USE flag(s) exactly are the solution. I got no time for
that...

Good Luck

------- Comment #5 From snIP3r 2007-06-21 20:35:24 0000 -------
(In reply to comment #4)
> Hy,
> This seems to be USE related.
> I solved te problem for me by adding the following line to
> /etc/portage/package.use :
> sys-power/apcupsd -apache2 -snmp -threads -doc nls
> 
> I've got two different servers to be run with apcupsd. One just installed fine,
> the other didn't. They have different USE enabled. So I just tuned the USE for
> the one with the binaries missing to match the good one.
> I decided to have a look here, if other have related troubles. Et voila: I
> posted this.
> 
> I do not know what USE flag(s) exactly are the solution. I got no time for
> that...
> 
> Good Luck
> 

hi!

yes there seem to be USE flag depedencies. i recompiled it with this use flags:

sys-power/apcupsd -apache2 -snmp -threads -doc nls usb cgi

and now it runs again after having the same problem as described above...

HTH
snIP3r

------- Comment #6 From Stefan G. Weichinger 2007-06-26 22:25:56 0000 -------
hit the same problem today, this reminded me of having hit that 2 or 3 times
before ...

USE=-snmp emerge apcupsd

(in fact I edited package.use ...)

solved it for me, compilation failed otherwise without throwing an explicit
error at the end of emerge-output (had to scroll up to see the failing steps
...)

------- Comment #7 From Robert Pearce 2007-07-28 10:50:59 0000 -------
I have found this too, and noticed that the emerge transcript shows a build
error that does not get trapped.

gmake[1]: Entering directory
`/tmp/portage/portage/sys-power/apcupsd-3.10.17-r1/work/apcupsd-3.10.17/src'
gcc -g -O  apcupsd.o apcoptd.o apcnet.o apcreports.o apcaction.o apcnis.o
apcdevice.o
/tmp/portage/portage/sys-power/apcupsd-3.10.17-r1/work/apcupsd-3.10.17/src/drivers/libdrivers.a
/tmp/portage/portage/sys-power/apcupsd-3.10.17-r1/work/apcupsd-3.10.17/src/lib/libapc.a
     -o apcupsd
apcupsd.o: In function `main':
apcupsd.c:(.text+0x3f6): undefined reference to `attach_driver'
collect2: ld returned 1 exit status
distcc[3811] ERROR: compile (null) on localhost failed
gmake[1]: *** [apcupsd] Error 1
gmake[1]: Leaving directory
`/tmp/portage/portage/sys-power/apcupsd-3.10.17-r1/work/apcupsd-3.10.17/src'

------- Comment #8 From Jakub Moc (RETIRED) 2007-08-21 17:47:04 0000 -------
*** Bug 189730 has been marked as a duplicate of this bug. ***

------- Comment #9 From Jiri Tyr 2007-09-26 07:00:59 0000 -------
I have the same problem. When I set USE="-snmp" then it works perfectly. I
suppose there should be not stable version with this terrible error. There
should be disabled "snmp" use flag!

------- Comment #10 From Evgeny Stambulchik 2007-10-17 11:48:45 0000 -------
Seems to be related to the parallel build. For me, "MAKEOPTS= emerge -v
apcupsd" always succeeds while e.g. "MAKEOPTS=-j4 emerge -v apcupsd" never
does.

------- Comment #11 From Billy DeVincentis 2007-10-29 03:57:47 0000 -------
I  had  same  problem,  after  upgrading  to  testing 3.14.1  problem  went 
away,  newer  version  seems  to  work.

------- Comment #12 From Michael Imhof 2007-12-02 18:24:03 0000 -------
The init script uses /sbin.
Did you etc-update the init script as well as you config file?

------- Comment #13 From moesasji 2008-02-25 21:38:25 0000 -------
This error is indeed the result of a parallel build error as pointed out in
comment #10. 

Also on my system (x86) using makeopts=-j3 does not generate the
/usr/sbin/apcupsd file, while makeopts=-j1 does generate the file and the
startup script works again.

Please fix this soon as this one could catch people badly leading to corrupt
filesystems (xfs!!) after power-outage. 

ps) On my system(x86) the init-script refers to /usr/sbin/apcupsd, I guess
comment #11 is from testing??

------- Comment #14 From Michael Imhof 2008-05-08 19:41:00 0000 -------
I just committed the updated ebuilds.
Can anyone confirm that -j1 solves the problem?

If so we can close this bug.