Gentoo Archives: gentoo-dev

From: Tobias Klausmann <klausman@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Kernel compiles and you
Date: Thu, 05 Jul 2012 08:28:40
Message-Id: 20120705082749.GA59112@kaini.schwarzvogel.de
In Reply to: Re: [gentoo-dev] Kernel compiles and you by Greg KH
1 Hi!
2
3 On Wed, 04 Jul 2012, Greg KH wrote:
4 > > Recently, I have again bumped into the question whether one
5 > > should compile the kernel as root. One of the things that puzzles
6 > > me is why almost every HowTo, blog post and book recommends
7 > > building as non-root -- yet basically no distribution /helps/ the
8 > > user with doing that.
9 >
10 > Most distros don't have to do anything, they are not requiring users to
11 > build their own kernels :)
12
13 As I noted in the blog post. There are still people who prefer to
14 roll their own, but still want to use a binary distro. Those
15 people usually do the wget+tar xf approach, completely ignoring
16 the package manager. And that's just dandy.
17
18 As I also noted in the blog post, the more radical approach for
19 binary distros is to not supply kernel sources as a package at
20 all. Either you use their binary kernel or you're completely on
21 your own. It's probably what I'd do were I to run such a project.
22
23 Problem with that approach for us (as in Gentoo) is of course,
24 that we need suitable sources (and config) in an easily findable
25 place since assorted stuff depends on it at build time.
26
27 > So in reality, they all do help their users with this, it's trivial to
28 > build a kernel as a user on those distros. Actually, it is also on
29 > Gentoo, there's no need to ever put a kernel anywhere except in your
30 > home directory when building it.
31
32 Mhm? So how do udev, glibc et al then find out if you have the
33 right options set? What about the assorted ebuilds of
34 out-of-kernel software that needs to access the sources? I'm well
35 aware that for some, this is not a strict necessity (they could
36 just hope you did set them up right or look at /proc/config.gz),
37 but dropping the kernel source ebuilds would be rather radical --
38 I don't see that happening any time soon.
39
40 > Oh, and one more reason you "never want to build your kernel as root", a
41 > few years ago, the kernel build process had a bug where it accidentally
42 > tried to do a 'rm -rf /*' on your filesystem. None of the kernel
43 > developers ever noticed that as they didn't build a kernel as root, and
44 > the bug stuck around for a relativly long time (weeks at least.) There
45 > was also some semi-serious talk about leaving it in the build as well,
46 > just to "catch" people who were doing this, but sanity prevailed and it
47 > was fixed. But, you never know if that old bug might slip back in one
48 > day :)
49
50 I vaguely remembered the rm-rf bug, but I was unable to find any
51 reference to it (at least not easily), do you happen to have a
52 pointer?
53
54 Regards,
55 Tobias
56
57 --
58 Sent from aboard the Culture ship
59 Advanced Case Of Chronic Patheticism

Replies

Subject Author
Re: [gentoo-dev] Kernel compiles and you "vivo75@×××××.com" <vivo75@×××××.com>