Gentoo Archives: gentoo-user

From: Gregory Shearman <zekeyg@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] sudo in kernel config ?
Date: Sun, 12 Sep 2010 07:31:21
Message-Id: 20100912072949.GA17122@pacific.net.au
1 In linux.gentoo.user, you wrote:
2 >
3 > Some people, such as myself, use kernel sources outside of portage (I
4 > follow a git repo) and do so as a non-root user. In this case the
5 > kernel tree is not owned by root and the config/compile is easily done
6 > as a non-root user.
7 >
8 > If you are super-paranoid. You can make a non-root copy
9 > of /usr/src/linux and compile it as a non-root user.
10 >
11 > But there really isn't any point in using sudo. It's effectively doing
12 > the same thing that you are trying to avoid.
13
14 I agree there's no point in using sudo, but what's the problem? You
15 don't need to edit the kernel sources merely to build a new kernel. You
16 can build your kernel outside the tree using for example:
17 make O=/home/user/kernel/tree/ menuconfig
18 make O=/home/user/kernel/tree/
19
20 All files are put into the user's directory.
21
22 All that's need is the KBUILD_OUTPUT environment variable set, so that
23 drivers can find the kernel .config file etc.
24
25 I've built my kernels like this for years now. All kernels are built by
26 a specific user and then installed as root. No problem, no worries about
27 permissions and no altering the portage installed kernel sources so that
28 a purge (emerge -P gentoo-sources) will automatically remove the whole
29 tree.
30
31 --
32 Regards,
33
34 Gregory.

Replies

Subject Author
Re: [gentoo-user] sudo in kernel config ? Bill Longman <bill.longman@×××××.com>