apmd-3.2.0 seems to install properly - it tries to copy apmd to /usr/sbin (the file, not the directory), and tries to install a non-existent apmd_proxy: >>> Install apmd-3.2.0 into /var/tmp/portage/apmd-3.2.0/image/ category sys-apps [ -d /var/tmp/portage/apmd-3.2.0/image//usr/bin ] || install -d /var/tmp/portage/ap md-3.2.0/image//usr/bin [ -d /var/tmp/portage/apmd-3.2.0/image//usr/lib ] || install -d /var/tmp/portage/ap md-3.2.0/image//usr/lib [ -d /var/tmp/portage/apmd-3.2.0/image//usr/include ] || install -d /var/tmp/portag e/apmd-3.2.0/image//usr/include libtool --quiet install -m 644 libapm.la /var/tmp/portage/apmd-3.2.0/image//usr/ lib libtool: install: warning: remember to run `libtool --finish /usr/lib' libtool --quiet install apm /var/tmp/portage/apmd-3.2.0/image//usr/ bin libtool: install: warning: `libapm.la' has not been installed in `/usr/lib' libtool --quiet install apmd /var/tmp/portage/apmd-3.2.0/image//usr/ sbin libtool: install: warning: `libapm.la' has not been installed in `/usr/lib' libtool --quiet install xapm /var/tmp/portage/apmd-3.2.0/image//usr/ bin libtool: install: warning: `libapm.la' has not been installed in `/usr/lib' libtool --quiet install apmsleep /var/tmp/portage/apmd-3.2.0/image//usr/bin libtool: install: warning: `libapm.la' has not been installed in `/usr/lib' install on_ac_power /var/tmp/portage/apmd-3.2.0/image//usr/bin install -m 644 apm.h /var/tmp/portage/apmd-3.2.0/image//usr/include install: cannot stat `debian/apmd_proxy': No such file or directory install xapm /var/tmp/portage/apmd-3.2.0/image//usr/bin man: prepallstrip: strip: strip: usr/bin/apm usr/bin/apmsleep usr/sbin making executable: /usr/lib/libapm.so.1.0.0 >>> Completed installing into /var/tmp/portage/apmd-3.2.0/image/ #qpkg -l sys-apps/apmd sys-apps/apmd-3.2.0 * CONTENTS: /usr /usr/bin /usr/bin/apm /usr/bin/xapm /usr/bin/apmsleep /usr/bin/on_ac_power /usr/lib /usr/lib/libapm.so.1.0.0 /usr/lib/libapm.so.1 -> libapm.so.1.0.0 /usr/lib/libapm.so -> libapm.so.1.0.0 /usr/lib/libapm.la /usr/lib/libapm.a /usr/include /usr/include/apm.h /usr/sbin /usr/share /usr/share/doc /usr/share/doc/apmd-3.2.0 /usr/share/doc/apmd-3.2.0/ANNOUNCE.gz /usr/share/doc/apmd-3.2.0/COPYING.gz /usr/share/doc/apmd-3.2.0/BUGS.apmsleep.gz /usr/share/doc/apmd-3.2.0/README.gz /usr/share/doc/apmd-3.2.0/COPYING.LIB.gz /usr/share/doc/apmd-3.2.0/LSM.gz /usr/share/doc/apmd-3.2.0/README.transfer.gz /usr/share/doc/apmd-3.2.0/ChangeLog.gz /etc /etc/apm /etc/apm/event.d /etc/apm/suspend.d /etc/apm/resume.d /etc/conf.d /etc/conf.d/apmd /etc/init.d /etc/init.d/apmd As you can see apmd doesn't get installed properly to /usr/sbin/apmd. Reproducible: Always Steps to Reproduce: 1. 2. 3. Expected Results: installed apmd to /usr/sbin/apmd Portage 2.0.49-r20 (default-1.0, gcc-2.95.3, glibc-2.2.5-r9, 2.4.23) ============================================================== === System uname: 2.4.23 i686 Transmeta(tm) Crusoe(tm) Processor TM5800 Gentoo Base System version 1.4.3.12 distcc 2.12 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-mcpu=i686 -O3 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-mcpu=i686 -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache digest sandbox strict" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio. org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="X X509 aalib alsa apache2 apm avi berkdb bonobo cdr crypt cups curses dga dvd emacs encode esd ethereal evo fbcon foomaticdb gdbm gif gnome-libs gpm gtk gtk2 gtkhtml guile imap imlib java jpeg lcms ldap libg++ libwww mmx motif mpeg mysql nas ncurses odbc oggvorbis oss pam pcmcia pda pdflib perl pic plotutils png pnp python quicktime readline samba sdl skey slang smooth snmp spell ssl stroke svga tcltk tcpd tetex tiff truetype trusted usb vim-with-x x86 xml xml2 xmms xv zlib"
Okay this bug is totally my fault :).
I wouldn't say it is totally your fault. I was bitten by this bug and, briefly looking into it, a couple things thwarted me from making progress: The Changelog for the ebuild made no mention of 3.2.0. Perhaps just a version bump requires no notice. The homepage for apmd, <http://www.worldvisions.ca/~apenwarr/apmd/> makes no mention of 3.2.0. It claims that latest is 3.0.2. The mailing list referenced on the homepage, <http://open.nit.ca/lists/archives/apmd-list/threads.html>, ends Sat, 13 Jul 2002. Here are a few possible fixes: The reason apmd_proxy isn't being installed is because apmd_proxy is now in the root of the tarball so in src_install() of the ebuild the line exeinto /etc/apm ; doexe debian/apmd_proxy should be replaced with exeinto /etc/apm ; doexe apmd_proxy The reason apmd isn't being installed is because the Makefile doesn't check if it needs to make /usr/sbin (it does for other dirs). In the Makefile [ -d $(DESTDIR)$(SBINDIR) ] || install -d $(DESTDIR)$(SBINDIR) should be added to the install target, near the other commands of a similar form. Finally, I'll voice my opinion that the apmd_proxy in 3.2.0 sux. It no longer calls scripts in /etc/apm/event.d but instead requires one to modify the defintions of the functions power_conserve() and power_performance() in apmd_proxy itself. Any app that needs to respond to apm events will have to hack apmd_proxy to include them rather than simply dropping a script into /etc/apm/event.d. It has, hardwired into it, pcmcia and clock frobb-ing functions. It has no buisiness touching those. It has the configuration varibles UTC, SUSPEND_ON_AC, and PCMCIA_EJECT_ON_SUSPEND set in the script itself, rather than looking at /etc/apm/apmd_proxy.conf as in old versions.
> The reason apmd isn't being installed is because the Makefile doesn't check if > it needs to make /usr/sbin (it does for other dirs). In the Makefile > > [ -d $(DESTDIR)$(SBINDIR) ] || install -d $(DESTDIR)$(SBINDIR) > > should be added to the install target, near the other commands of a similar > form. I've also seen this problem yesterday evening after a world update, and what I did was adding "dodir /usr/sbin" before the "make install" (at the very beginning of src_install). That's faster than patching the Makefile :)
'lo this bug is now, let's see, nearly two weeks old. several working solutions have been posted, and still there is no new release in portage... what about fixing this?
I'm sorry to be so forward, but this is an awfully trivial and debilitating bug to go solved but unfixed for an entire month. What's holding things up?
I'd also be really glad if it was solved...
i think this should be assigned to base-system, since its the herd listed in metadata.xml
Created attachment 25732 [details, diff] patch with 2 fixes against apmd-3.2.0 in portage this patch is based on the comments in this bug that fixes both the installation of /usr/sbin/apmd and apmd_proxy.
The fix against apmd_proxy is incorrect. The reason for the lack of the debian directory is because of the way debian source is distributed. Looks like apmd is now being developed and supported in the debian organization. Debian breaks out the source into two files the .orig file and a patch file that adds the changes for bug fixes etc. apmd_proxy is actually updated in the patch file and the debian directory is created in the patch file. So the ebuild is incorrect.
true, in fact 3.2.1 is out with debian unstable. so its best to probably grab their patches and apmd_proxy. anybody wanna attach their apmd_proxy?
Anybody that actually uses it, feel free. I see its not really been touched since 2002, so open if anybody wants to step up to maintainer.
mobile should probably replace base-system as the maintaining herders for this (including replacing us in the metadata).
I added the "dodir /usr/sbin" to the ebuild and successfully got apmd installed and started the apmd service, however none of my suspend/resume scripts seem to be working. I've noticed a lot of patches in this bug report and they seem a bit confusing. Could someone just fix the ebuild? This is a kinda important program for those of use who use Gentoo on a laptop.
Created attachment 26202 [details] ebuild for apmd 3.2.1 from debian Created a ebuild for apmd 3.2.1 that has been tested to work on kernel 2.6.3 on my dell laptop. This had a valid apmd_proxy. This is the latest release from debian - apmd-3.2.1-3. I have to unload and reload my usb modules for my usb mouse to work across power changes, and the scripts work ok for me. unpack in your portage overlay directory and try this out.
Some additional comments on my ebuild - I have assumed that X exists on the system. I do not make any changes to the build for non X situations. So by default xapm builds and is installed.
alright, i've committed a apmd-3.2.1_p4 which is similar to narendra's ebuild that uses debian's apmd_proxy and various tweaks which should fix the issues here. thanks for everyone's input.