Hi! 

On Wed, 04 Jul 2012, Greg KH wrote:
> > Recently, I have again bumped into the question whether one
> > should compile the kernel as root. One of the things that puzzles
> > me is why almost every HowTo, blog post and book recommends
> > building as non-root -- yet basically no distribution /helps/ the
> > user with doing that.
> 
> Most distros don't have to do anything, they are not requiring users to
> build their own kernels :)

As I noted in the blog post. There are still people who prefer to
roll their own, but still want to use a binary distro. Those
people usually do the wget+tar xf approach, completely ignoring
the package manager. And that's just dandy.

As I also noted in the blog post, the more radical approach for
binary distros is to not supply kernel sources as a package at
all. Either you use their binary kernel or you're completely on
your own. It's probably what I'd do were I to run such a project.

Problem with that approach for us (as in Gentoo) is of course,
that we need suitable sources (and config) in an easily findable
place since assorted stuff depends on it at build time.

> So in reality, they all do help their users with this, it's trivial to
> build a kernel as a user on those distros.  Actually, it is also on
> Gentoo, there's no need to ever put a kernel anywhere except in your
> home directory when building it.

Mhm? So how do udev, glibc et al then find out if you have the
right options set? What about the assorted ebuilds of
out-of-kernel software that needs to access the sources? I'm well
aware that for some, this is not a strict necessity (they could
just hope you did set them up right or look at /proc/config.gz),
but dropping the kernel source ebuilds would be rather radical --
I don't see that happening any time soon.

> Oh, and one more reason you "never want to build your kernel as root", a
> few years ago, the kernel build process had a bug where it accidentally
> tried to do a 'rm -rf /*' on your filesystem.  None of the kernel
> developers ever noticed that as they didn't build a kernel as root, and
> the bug stuck around for a relativly long time (weeks at least.)  There
> was also some semi-serious talk about leaving it in the build as well,
> just to "catch" people who were doing this, but sanity prevailed and it
> was fixed.  But, you never know if that old bug might slip back in one
> day :)

I vaguely remembered the rm-rf bug, but I was unable to find any
reference to it (at least not easily), do you happen to have a
pointer?

Regards,
Tobias

-- 
Sent from aboard the Culture ship
        Advanced Case Of Chronic Patheticism

Reply via email to