<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>176339</bug_id>
          
          <creation_ts>2007-04-28 11:12 0000</creation_ts>
          <short_desc>sys-power/apcupsd-3.10.18-r1: /usr/sbin/apcupsd missing (after emerge)</short_desc>
          <delta_ts>2008-05-08 19:41:00 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Ebuilds</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>TEST-REQUEST</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>deepee@gmx.net</reporter>
          <assigned_to>tantive@gentoo.org</assigned_to>
          <cc>david.gardner@yucaipaco.com</cc>
    
    <cc>hellabri@gmail.com</cc>
    
    <cc>henkjans_bagger@hotmail.com</cc>
    
    <cc>lema@ib.cnea.gov.ar</cc>
    
    <cc>me@junc.org</cc>
    
    <cc>rob.pearce@bdt-home.demon.co.uk</cc>
    
    <cc>roman@lebedev.com</cc>

      

      
          <long_desc isprivate="0">
            <who>deepee@gmx.net</who>
            <bug_when>2007-04-28 11:12:14 0000</bug_when>
            <thetext>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=&quot;x86&quot;
AUTOCLEAN=&quot;yes&quot;
CBUILD=&quot;i686-pc-linux-gnu&quot;
CFLAGS=&quot;-O2 -march=pentium4 -fomit-frame-pointer -pipe&quot;
CHOST=&quot;i686-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/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&quot;
CONFIG_PROTECT_MASK=&quot;/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&quot;
CXXFLAGS=&quot;-O2 -march=pentium4 -fomit-frame-pointer -pipe&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;ccache distlocks metadata-transfer sandbox sfperms strict&quot;
GENTOO_MIRRORS=&quot;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/&quot;
MAKEOPTS=&quot;-j2&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_RSYNC_OPTS=&quot;--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-*&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;/usr/local/overlays/gentoo-de&quot;
SYNC=&quot;rsync://rsync.de.gentoo.org/gentoo-portage&quot;
USE=&quot;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&quot; ALSA_CARDS=&quot;intel8x0&quot; ALSA_PCM_PLUGINS=&quot;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&quot; DVB_CARDS=&quot;ttpci nxt200x sp8870 tda1004x or51132 or51211&quot; ELIBC=&quot;glibc&quot; FRITZCAPI_CARDS=&quot;fcpci fcclassic&quot; INPUT_DEVICES=&quot;keyboard mouse evdev&quot; KERNEL=&quot;linux&quot; LCD_DEVICES=&quot;bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text&quot; LIRC_DEVICES=&quot;serial&quot; USERLAND=&quot;GNU&quot; VIDEO_CARDS=&quot;i810 vesa fbdev&quot;
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>deepee@gmx.net</who>
            <bug_when>2007-04-28 11:29:49 0000</bug_when>
            <thetext>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=&quot;ncurses nls snmp threads usb vhosts -cgi -doc&quot; 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 &quot;apcupsd&quot; 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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>deepee@gmx.net</who>
            <bug_when>2007-04-28 11:37:09 0000</bug_when>
            <thetext>ups! In addition to my second message:

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

Nevertheless: the Problem described in msg 1 still exists.



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

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>me@junc.org</who>
            <bug_when>2007-05-19 18:03:04 0000</bug_when>
            <thetext>does 3.14.0 work ?

i see olso some problems with the older versions here, installed 3.14.0 works here now</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>hellabri@gmail.com</who>
            <bug_when>2007-06-04 13:41:13 0000</bug_when>
            <thetext>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&apos;ve got two different servers to be run with apcupsd. One just installed fine, the other didn&apos;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</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sniper@restricted-area.de</who>
            <bug_when>2007-06-21 20:35:24 0000</bug_when>
            <thetext>(In reply to comment #4)
&gt; Hy,
&gt; This seems to be USE related.
&gt; I solved te problem for me by adding the following line to
&gt; /etc/portage/package.use :
&gt; sys-power/apcupsd -apache2 -snmp -threads -doc nls
&gt; 
&gt; I&apos;ve got two different servers to be run with apcupsd. One just installed fine,
&gt; the other didn&apos;t. They have different USE enabled. So I just tuned the USE for
&gt; the one with the binaries missing to match the good one.
&gt; I decided to have a look here, if other have related troubles. Et voila: I
&gt; posted this.
&gt; 
&gt; I do not know what USE flag(s) exactly are the solution. I got no time for
&gt; that...
&gt; 
&gt; Good Luck
&gt; 

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</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>monitor@oops.co.at</who>
            <bug_when>2007-06-26 22:25:56 0000</bug_when>
            <thetext>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 ...)
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>rob.pearce@bdt-home.demon.co.uk</who>
            <bug_when>2007-07-28 10:50:59 0000</bug_when>
            <thetext>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&apos;
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&apos;:
apcupsd.c:(.text+0x3f6): undefined reference to `attach_driver&apos;
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&apos;
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2007-08-21 17:47:04 0000</bug_when>
            <thetext>*** Bug 189730 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jiri.tyr@e-learning.tul.cz</who>
            <bug_when>2007-09-26 07:00:59 0000</bug_when>
            <thetext>I have the same problem. When I set USE=&quot;-snmp&quot; then it works perfectly. I suppose there should be not stable version with this terrible error. There should be disabled &quot;snmp&quot; use flag!</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>fnevgeny@weizmann.ac.il</who>
            <bug_when>2007-10-17 11:48:45 0000</bug_when>
            <thetext>Seems to be related to the parallel build. For me, &quot;MAKEOPTS= emerge -v apcupsd&quot; always succeeds while e.g. &quot;MAKEOPTS=-j4 emerge -v apcupsd&quot; never does.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>billydv1@verizon.net</who>
            <bug_when>2007-10-29 03:57:47 0000</bug_when>
            <thetext>I  had  same  problem,  after  upgrading  to  testing 3.14.1  problem  went  away,  newer  version  seems  to  work.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tantive@gentoo.org</who>
            <bug_when>2007-12-02 18:24:03 0000</bug_when>
            <thetext>The init script uses /sbin.
Did you etc-update the init script as well as you config file?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>henkjans_bagger@hotmail.com</who>
            <bug_when>2008-02-25 21:38:25 0000</bug_when>
            <thetext>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??</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tantive@gentoo.org</who>
            <bug_when>2008-05-08 19:41:00 0000</bug_when>
            <thetext>I just committed the updated ebuilds.
Can anyone confirm that -j1 solves the problem?

If so we can close this bug.</thetext>
          </long_desc>
      
    </bug>

</bugzilla>