debianutils is required by ca-certificates which is why I have it on my system. However, I'm not using the installkernel script that came with it and want to use my own. The kernel looks for this script int ~/bin and /sbin/ and since I don't want to put my custom script in ~/bin I have no way to customize it. Would it be possible to add a use flag for installkernel, or install it somewhere more appropriate (/usr/bin/) and create an (eselect-able?) symlink to it? Better yet, would it be possible to remove the dependency on debianutils? Reproducible: Always
Forgot to mention that this was handled specifically for fbsd by using the linux_kernel flag (see http://bugs.gentoo.org/show_bug.cgi?id=225759). However, I'm using linux so this doesn't help me.
Created attachment 233505 [details, diff] install 'installkernel' to /usr/bin and optionally symlink using a new useflag Add a patch to the latest testing ebuild (debianutils-3.2.3.ebuild)
Created attachment 233507 [details, diff] install 'installkernel' to /usr/bin and optionally symlink using a new useflag Same patch, but to the latest stable ebuild (debianutils-3.1.3.ebuild)
Is there a specific problem you have with using /usr/local over /usr to install custom software? I'd hesitate to change the install location to /usr/sbin just to satisfy your need to have /sbin free of it, even through a USE flag. Just make sure your path setting includes /usr/local/sbin before /sbin and you're OK.
The problem is in the linux kernel makefile - It doesn't look for this script on the $PATH but in specific locations (~/bin/ and /sbin). That's why I still put an (optional) symlink in /sbin/ to point to the actual script. The only reason I put the actual script in /usr is that it is more appropriate since this file is not needed to boot up the system. Putting the script in /usr/local will do no good because the kernel make file doesn't look for it there. Hope I managed to explain the problem...
Here is the relevant code from the install.sh script included with the linux kernel, (lines 36-37 in http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.34.y.git;a=blob;f=arch/x86/boot/install.sh;hb=HEAD): 36 if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi 37 if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
/sbin/installkernel is exactly the right location for the script. If you do not agree with that, then please ask upstream (Linus probably) to not hard-code the path in the kernel sources. You could even write a small script that's automatically executed after every sys-kernel/*-sources merge to change the path for you. Now please stop reopening this bug report.
1) Also note that our documentation[1] does not support running `make install' or invoking installkernel otherwise, but simply advises to copy the kernel image to the correct directory manually. This is mainly because installkernel doesn't work properly on many alternative processor architectures[2]. 2) Another good alternative is to add /sbin/installkernel to the CONFIG_PROTECT variable in make.conf(5). [1] http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=7#compiling [2] https://bugs.gentoo.org/buglist.cgi?quicksearch=ALL+installkernel
Yes, I know the real problem is with the linux kernel and yes, I know Gentoo is not supposed to use that script. But then, what's the point in installing it? I just thought the ebuild can be a little more flexible and not force you to use Debian's script if you don't want to (Isn't Gentoo about choice?). Using CONFIG_PROTECT is a good idea, I will try that. But I'd still prefer the ebuild never installed the script in the first place.
use INSTALL_MASK if you dont want it
Cool - thanks!