From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-user+bounces-133263-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1Ri5QG-0008Ba-Ov
	for garchives@archives.gentoo.org; Tue, 03 Jan 2012 14:33:04 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 28BB621C125;
	Tue,  3 Jan 2012 14:32:41 +0000 (UTC)
Received: from mail-ww0-f53.google.com (mail-ww0-f53.google.com [74.125.82.53])
	by pigeon.gentoo.org (Postfix) with ESMTP id 878F4E0453
	for <gentoo-user@lists.gentoo.org>; Tue,  3 Jan 2012 14:30:58 +0000 (UTC)
Received: by wgbds1 with SMTP id ds1so25373776wgb.10
        for <gentoo-user@lists.gentoo.org>; Tue, 03 Jan 2012 06:30:57 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=from:reply-to:to:subject:date:user-agent:references:in-reply-to
         :mime-version:content-type:content-transfer-encoding:message-id;
        bh=H85dQ++VhR2ygn0rqblsvzTVBiXaCwZU/s7qFSro7Gs=;
        b=ngdmCaO9I1r3UV+dw6vov3XjtTKXuex+VxmtctTwNEnUwWcPP8auB7uggfcRRe7BG+
         3JueuA99tDDKYGNeM+trcKMMBaJR7A/FT6vHwCa4G7CoPyr/7MQLg3pv9pSWSW4lPmCk
         IpvBFWL9ZDqsaK0MrGe7F5BZhQ1gzymeKW4Yk=
Received: by 10.227.208.129 with SMTP id gc1mr64348704wbb.4.1325601057810;
        Tue, 03 Jan 2012 06:30:57 -0800 (PST)
Received: from dell_xps.localnet (230.3.169.217.in-addr.arpa. [217.169.3.230])
        by mx.google.com with ESMTPS id ba4sm28782738wib.5.2012.01.03.06.30.56
        (version=TLSv1/SSLv3 cipher=OTHER);
        Tue, 03 Jan 2012 06:30:57 -0800 (PST)
From: Mick <michaelkintzios@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Gentoo-sources: can't make menuconfig with user? User can't access ncurses?
Date: Tue, 3 Jan 2012 14:30:48 +0000
User-Agent: KMail/1.13.7 (Linux/3.0.6-gentoo; KDE/4.7.3; x86_64; ; )
References: <ieZaW-2xe-9@gated-at.bofh.it> <ieZNE-3qe-19@gated-at.bofh.it> <20120103011317.GA8670@pacific.net.au>
In-Reply-To: <20120103011317.GA8670@pacific.net.au>
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@lists.gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
MIME-Version: 1.0
Content-Type: multipart/signed;
  boundary="nextPart1834887.7Kg6EyrWxY";
  protocol="application/pgp-signature";
  micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <201201031430.59812.michaelkintzios@gmail.com>
X-Archives-Salt: f9281e08-775f-47d0-bcf3-5d08e71b95fe
X-Archives-Hash: 941b7370a814c19fd35a7d5c24e0b8e9

--nextPart1834887.7Kg6EyrWxY
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: quoted-printable

On Tuesday 03 Jan 2012 01:13:17 Gregory Shearman wrote:
> In linux.gentoo.user, you wrote:
> > On Mon, 2 Jan 2012 20:58:18 -0200
> >=20
> > Claudio Roberto Fran=C3=A7a Pereira <spideybr@gmail.com> wrote:
> >> I'm not currently at my Gentoo box, sorry for this, but if I don't
> >> post this now I'll probably forget to post it at all.
> >> Anyways, last time I tried upgrading my kernel, I copied my .config
> >> and ran make menuconfig as my main user, but it whined about missing
> >> ncurses libraries or something. After su'ing, everything went better
> >> than expected.
> >> Was that normal behavior? I remember configuring my kernel as user
> >> before. Even compiling it as user.
> >=20
> > How did you install the kernel sources?
> >=20
> > If you downloaded them as a normal user you should be able to make
> > menuconfig; make; sudo make install just fine.
> >=20
> > If portage installed the sources, then you should
> > configure/compile/install as root. The sources are owned by portage
> > (IIRC) and you can't su to that user, leaving only root. Or, try adding
> > yourself to the portage group. Personally I think that's too much
> > effort for zero gain so I always do it as root.
>=20
> I use a separate output directory that is under control of the user.
> What I do as an ordinary user:
>=20
> mkdir <kerneloutputdir>
>=20
> zcat /proc/config.gz > <kerneloutputdir>/.config
>=20
> # assuming you have this option set in your kernel ie the current kernel
> # config saved in /proc/config.gz
>=20
> cd /usr/src/linux
>=20
> # assuming that /usr/src/linux is a soft link to your new kernel
> # directory.
>=20
> make O=3D<kerneloutputdir> oldconfig
>=20
> # The "O=3D" makes sure that any kernel output goes to the directory under
> # the permissions and control of the kernel builder user rather than in
> # the kernel directory under root permissions.
>=20
> # If you want to make changes to the new kernel then:
>=20
> make O=3D<kerneleoutputdir> menuconfig
>=20
> You can then proceed with building kernel and modules. Yes, I know that
> "make" without a command will automatically build both kernel image and
> modules but I prefer to do things explicitly.
>=20
> make O=3D<kerneleoutputdir> bzImage
> make O=3D<kerneleoutputdir> modules
>=20
> You can then install the new kernel and modules as root:
>=20
> make O=3D<kerneleoutputdir> modules_install
> make O=3D<kerneleoutputdir> install
>=20
> You need to set the following environment variable:
>=20
> KBUILD_OUTPUT=3D<kerneloutputdir>
>=20
> This variable ensures that any emerged app can find the kernel output if
> necessary. I've created a script in /etc/profile.d that automatically
> keeps this environment variable up to date. Oh, remember to unset this
> variable if you do *anything* requiring a busybox build (eg genkernel).
>=20
> An enjoyable side-effect of this system is that when you remove an
> obselete kernel from your system using "emerge -C <oldkernelversion>",
> everything will be removed because there are no changes, no files added
> to those portage added kernel directory.
>=20
> The kernel builder user does nothing but build new kernels. This user's
> home directory is a hierarchy containing current kernel builds.
>=20
> I've been using this system for years now, on all my gentoo systems. It
> is second nature. Of course, the .bash_history of the kernel builder
> user is *very* useful for quickly doing all this from the command line.
>=20
> I used to have a script to automate all this, but it is just as easy to
> do from the command line.

What is the benefit of this approach vis a vis su to root first as the gent=
oo=20
handbook suggests?
=2D-=20
Regards,
Mick

--nextPart1834887.7Kg6EyrWxY
Content-Type: application/pgp-signature; name=signature.asc 
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)

iEYEABECAAYFAk8DESMACgkQVTDTR3kpaLbC1wCg50CpiaCCG67a+mvc5ao2VgS0
u2gAoKi/9aKkgK+jsgFx8KaSUYt/mJ1u
=MUKM
-----END PGP SIGNATURE-----

--nextPart1834887.7Kg6EyrWxY--