Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 322075 - sys-apps/debianutils irrevocably installs '/sbin/installkernel' preventing a custom one from being installed
Summary: sys-apps/debianutils irrevocably installs '/sbin/installkernel' preventing a ...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-30 13:14 UTC by Assaf Berg
Modified: 2010-06-04 20:09 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
install 'installkernel' to /usr/bin and optionally symlink using a new useflag (debianutils-3.2.3.patch,973 bytes, patch)
2010-05-30 13:39 UTC, Assaf Berg
Details | Diff
install 'installkernel' to /usr/bin and optionally symlink using a new useflag (debianutils-3.1.3.patch,961 bytes, patch)
2010-05-30 13:40 UTC, Assaf Berg
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Assaf Berg 2010-05-30 13:14:03 UTC
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
Comment 1 Assaf Berg 2010-05-30 13:15:10 UTC
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.
Comment 2 Assaf Berg 2010-05-30 13:39:41 UTC
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)
Comment 3 Assaf Berg 2010-05-30 13:40:26 UTC
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)
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2010-05-31 22:50:06 UTC
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.
Comment 5 Assaf Berg 2010-06-01 11:06:11 UTC
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...
Comment 6 Assaf Berg 2010-06-01 13:27:56 UTC
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
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2010-06-01 16:13:08 UTC
/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.
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2010-06-01 17:18:04 UTC
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
Comment 9 Assaf Berg 2010-06-03 10:34:52 UTC
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.
Comment 10 SpanKY gentoo-dev 2010-06-03 20:35:42 UTC
use INSTALL_MASK if you dont want it
Comment 11 Assaf Berg 2010-06-04 20:09:45 UTC
Cool - thanks!