Hi! Please find attached lt_hotswap-0.3.6.ebuild and a patch so that it will work with acpi action scripts. lt_hotswap is an ACPI kernel driver to support hot-swapping of common 'bay' type peripherals on laptops. It is particularly useful for supporting Ultrabay drives on IBM Thinkpad models. Jason Morawski
Created attachment 92039 [details] app-laptop/lt_hotswap-0.3.6
Created attachment 92040 [details, diff] lt_hotswap-0.3.6-acpi-action-fix.patch
*** Bug 177346 has been marked as a duplicate of this bug. ***
I have made an overlay in paludis to use this ebuild. However, I get an error when I try to install it (using kernel 2.6.20-gentoo-r7): * Preparing lt_hotswap module make -j2 HOSTCC=i686-pc-linux-gnu-gcc CC=i686-pc-linux-gnu-gcc LDFLAGS= KDIR= default make -C SUBDIRS=/var/tmp/paludis/app-laptop/lt_hotswap-0.3.6/work/lt_hotswap-0.3.6 modules make: *** SUBDIRS=/var/tmp/paludis/app-laptop/lt_hotswap-0.3.6/work/lt_hotswap-0.3.6: No such file or directory. Stop. make: *** [default] Error 2 !!! ERROR in app-laptop/lt_hotswap-0.3.6: !!! In linux-mod_src_compile at line 3306 !!! Unable to make KDIR= default. !!! Call stack: !!! * linux-mod_src_compile (/var/tmp/paludis/app-laptop/lt_hotswap-0.3.6/temp/loadsaveenv:3306) !!! * src_compile (/var/tmp/paludis/app-laptop/lt_hotswap-0.3.6/temp/loadsaveenv:4039) !!! * ebuild_f_compile (/usr/libexec/paludis/src_compile.bash:51) !!! * ebuild_main (/usr/libexec/paludis/ebuild.bash:363) !!! * main (/usr/libexec/paludis/ebuild.bash:381)
(In reply to comment #4) > I have made an overlay in paludis to use this ebuild. However, I get an error > when I try to install it (using kernel 2.6.20-gentoo-r7): > > * Preparing lt_hotswap module > make -j2 HOSTCC=i686-pc-linux-gnu-gcc CC=i686-pc-linux-gnu-gcc LDFLAGS= KDIR= > default > make -C > SUBDIRS=/var/tmp/paludis/app-laptop/lt_hotswap-0.3.6/work/lt_hotswap-0.3.6 > modules > make: *** > SUBDIRS=/var/tmp/paludis/app-laptop/lt_hotswap-0.3.6/work/lt_hotswap-0.3.6: No > such file or directory. Stop. > make: *** [default] Error 2 > > !!! ERROR in app-laptop/lt_hotswap-0.3.6: > !!! In linux-mod_src_compile at line 3306 > !!! Unable to make KDIR= default. > > !!! Call stack: > !!! * linux-mod_src_compile > (/var/tmp/paludis/app-laptop/lt_hotswap-0.3.6/temp/loadsaveenv:3306) > !!! * src_compile > (/var/tmp/paludis/app-laptop/lt_hotswap-0.3.6/temp/loadsaveenv:4039) > !!! * ebuild_f_compile (/usr/libexec/paludis/src_compile.bash:51) > !!! * ebuild_main (/usr/libexec/paludis/ebuild.bash:363) > !!! * main (/usr/libexec/paludis/ebuild.bash:381) > It seems that your kernel directory is not setup properly. The KDIR variable is empty meaning that the linux-mod eclass cannot locate your kernel source directory. I am not sure how this is happening on your machine. When I remove /usr/src/linux and try to emerge, the ebuild throws an error indicating that the directory is missing. You should have gotten the same error.
Created attachment 120034 [details] lt_hotswap-0.3.6.ebuild This ebuild fixes the problem I was having with the KDIR= default
Created attachment 120036 [details, diff] lt_hotswap-0.3.6-kernel-2.6.20.patch This patch is required for kernels >= 2.6.20. In lt_hotswap.c it was including linux/config.h. The patch changes that to include linux/autoconf.h
(In reply to comment #5) > > !!! ERROR in app-laptop/lt_hotswap-0.3.6: > > !!! In linux-mod_src_compile at line 3306 > > !!! Unable to make KDIR= default. [...] > It seems that your kernel directory is not setup properly. The problem is that it uses the variable KV_DIR in global space when it is only set by linux-mod_pkg_setup in pkg_setup().
added hotswap 0.4.0 ebuild
Created attachment 143593 [details] hotswap-0.4.0.ebuild ebuild for hotswap 0.4.0
Created attachment 171471 [details] app-laptop/hotswap-0.5.0. hotswap 0.5.0 ebuild. gnome panel app works with gnome use flag kde use flag does not seem to work (didn't work in 0.4.0, either) dependencies need work, of course. This application works marvelously on a Dell D600.