Re: [gentoo-dev] Kernel compiles and you

2012-07-05 Thread Tobias Klausmann
Hi! On Thu, 05 Jul 2012, Dan Douglas wrote: > On Wednesday, July 04, 2012 10:30:20 PM Peter Stuge wrote: > > You may recall there was a kernel build system bug which ran > > -rf / which would be bad if you built as root. > > So there isn't anything during the build that requires writing > outsid

Re: [gentoo-dev] Kernel compiles and you

2012-07-05 Thread Dan Douglas
On Wednesday, July 04, 2012 10:30:20 PM Peter Stuge wrote: > You may recall there was a kernel build system bug which ran -rf / > which would be bad if you built as root. So there isn't anything during the build that requires writing outside the source tree? Since I use a custom script for automa

Re: [gentoo-dev] Kernel compiles and you

2012-07-05 Thread Albert W. Hopkins
On Wed, 2012-07-04 at 22:22 -0400, Mike Frysinger wrote: > On Wednesday 04 July 2012 21:36:02 Albert W. Hopkins wrote: > > Might it be better if you could tell portage to look for kernel > builds > > in another location than /usr/src/linux. Perhaps you can already and > I'm > > not aware. > > expo

Re: [gentoo-dev] Kernel compiles and you

2012-07-05 Thread Rick "Zero_Chaos" Farina
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/05/2012 06:23 AM, Matthew Marlowe wrote: >> The Linux kernel should not and really must not be built as root. >> This is neither supported nor recommended nor tested by upstream. >> You may recall there was a kernel build system bug which ran -rf

Re: [gentoo-dev] Kernel compiles and you

2012-07-05 Thread viv...@gmail.com
Il 05/07/2012 10:27, Tobias Klausmann ha scritto: 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 neither I, but look at this bug for an example http://lkml.indiana.edu/hypermail/linux/ker

Re: [gentoo-dev] Kernel compiles and you

2012-07-05 Thread Matthew Marlowe
> The Linux kernel should not and really must not be built as root. > This is neither supported nor recommended nor tested by upstream. > You may recall there was a kernel build system bug which ran -rf / > which would be bad if you built as root. > > The administrator usually has a normal user acc

Re: [gentoo-dev] Kernel compiles and you

2012-07-05 Thread Martin Gysel
Am 05.07.2012 01:58, schrieb Rich Freeman: > About the only really "safe" approach would be to run as a limited > user, install it into some offset/chroot, package it, and then > install it using portage as a binpkg. That actually has advantages > on many levels, and it basically is what we do wit

Re: [gentoo-dev] Kernel compiles and you

2012-07-05 Thread Tobias Klausmann
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 /

Re: [gentoo-dev] Kernel compiles and you

2012-07-04 Thread Maxim Kammerer
On Thu, Jul 5, 2012 at 4:36 AM, Albert W. Hopkins wrote: > There are kernel-dependent packages that (seem to) always look for > configuration options, symbols, etc. in /usr/src/linux. When you use O= > then those features do not exist in /usr/src/linux and thus those > packages will fail. So I h

Re: [gentoo-dev] Kernel compiles and you

2012-07-04 Thread Mike Frysinger
On Wednesday 04 July 2012 21:36:02 Albert W. Hopkins wrote: > Might it be better if you could tell portage to look for kernel builds > in another location than /usr/src/linux. Perhaps you can already and I'm > not aware. export KBUILD_OUTPUT=... -mike signature.asc Description: This is a digital

Re: [gentoo-dev] Kernel compiles and you

2012-07-04 Thread Albert W. Hopkins
On Thu, 2012-07-05 at 02:49 +0300, Maxim Kammerer wrote: > On Wed, Jul 4, 2012 at 9:56 PM, William Hubbs wrote: > > Actually the directories do not need write permissions either. Take a > > look at the O= option documented in /usr/src/linux/README. > > The KBUILD_OUTPUT / O= option seems like the

Re: [gentoo-dev] Kernel compiles and you

2012-07-04 Thread Richard Yao
On 07/04/2012 07:58 PM, Rich Freeman wrote: > On Wed, Jul 4, 2012 at 7:49 PM, Maxim Kammerer wrote: >> The KBUILD_OUTPUT / O= option seems like the best solution to me >> (especially so as I build three kernel images from a single sources >> tree), and it works well, except that it sometimes doesn

Re: [gentoo-dev] Kernel compiles and you

2012-07-04 Thread Rich Freeman
On Wed, Jul 4, 2012 at 7:49 PM, Maxim Kammerer wrote: > The KBUILD_OUTPUT / O= option seems like the best solution to me > (especially so as I build three kernel images from a single sources > tree), and it works well, except that it sometimes doesn't with > especially monstrous and hard to config

Re: [gentoo-dev] Kernel compiles and you

2012-07-04 Thread Maxim Kammerer
On Wed, Jul 4, 2012 at 9:56 PM, William Hubbs wrote: > Actually the directories do not need write permissions either. Take a > look at the O= option documented in /usr/src/linux/README. The KBUILD_OUTPUT / O= option seems like the best solution to me (especially so as I build three kernel images

Re: [gentoo-dev] Kernel compiles and you

2012-07-04 Thread Greg KH
On Wed, Jul 04, 2012 at 07:46:47PM +0200, Tobias Klausmann wrote: > Hi! > > 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 b

Re: [gentoo-dev] Kernel compiles and you

2012-07-04 Thread Michał Górny
On Wed, 4 Jul 2012 20:06:58 +0200 Tobias Klausmann wrote: > Hi! > > On Wed, 04 Jul 2012, Michał Górny wrote: > > There's a very simple yet custom solution I'm using. Shortly saying: > > checkout the kernel git to /usr/src/linux and chown to your user. As > > far as it goes, it's superior to hav

Re: [gentoo-dev] Kernel compiles and you

2012-07-04 Thread Peter Stuge
Michael Weber wrote: > I think running kernels from non-root checkouts is a pretty big > security hole. Suggest think again. The Linux kernel should not and really must not be built as root. This is neither supported nor recommended nor tested by upstream. You may recall there was a kernel build

Re: [gentoo-dev] Kernel compiles and you

2012-07-04 Thread Michael Weber
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 07/04/2012 08:56 PM, William Hubbs wrote: > On Wed, Jul 04, 2012 at 02:20:36PM -0400, Rick "Zero_Chaos" Farina > wrote: >> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 >> >> On 07/04/2012 01:58 PM, Michał Górny wrote: >> We could allow writes i

Re: [gentoo-dev] Kernel compiles and you

2012-07-04 Thread William Hubbs
On Wed, Jul 04, 2012 at 02:20:36PM -0400, Rick "Zero_Chaos" Farina wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 07/04/2012 01:58 PM, Michał Górny wrote: > > On Wed, 4 Jul 2012 19:46:47 +0200 > > Tobias Klausmann wrote: > > > >> Recently, I have again bumped into the question w

Re: [gentoo-dev] Kernel compiles and you

2012-07-04 Thread Rick "Zero_Chaos" Farina
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/04/2012 01:58 PM, Michał Górny wrote: > On Wed, 4 Jul 2012 19:46:47 +0200 > Tobias Klausmann 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 w

Re: [gentoo-dev] Kernel compiles and you

2012-07-04 Thread Tobias Klausmann
Hi! On Wed, 04 Jul 2012, Michał Górny wrote: > There's a very simple yet custom solution I'm using. Shortly saying: > checkout the kernel git to /usr/src/linux and chown to your user. As > far as it goes, it's superior to having kernel sources installed by > ebuilds. > > I just have to remember

Re: [gentoo-dev] Kernel compiles and you

2012-07-04 Thread Michał Górny
On Wed, 4 Jul 2012 19:46:47 +0200 Tobias Klausmann 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 dist

[gentoo-dev] Kernel compiles and you

2012-07-04 Thread Tobias Klausmann
Hi! 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. I've discussed thi