From nobody@FreeBSD.org  Wed May  1 18:51:59 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id D68EC5BE
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  1 May 2013 18:51:59 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [69.147.83.34])
	by mx1.freebsd.org (Postfix) with ESMTP id C6F301F2D
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  1 May 2013 18:51:59 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r41IpxPS002074
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 1 May 2013 18:51:59 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id r41Ipxec002073;
	Wed, 1 May 2013 18:51:59 GMT
	(envelope-from nobody)
Message-Id: <201305011851.r41Ipxec002073@red.freebsd.org>
Date: Wed, 1 May 2013 18:51:59 GMT
From: "Wojciech A. Koszek" <wkoszek@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: make installworld doesn't detect UID correctly and fails due to not having enough permissions
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         178284
>Category:       misc
>Synopsis:       [build] make installworld doesn't detect UID correctly and fails due to not having enough permissions
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 01 19:00:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Wed May  1 22:10:00 UTC 2013
>Originator:     Wojciech A. Koszek
>Release:        FreeBSD 9.1-RELEASE-p3
>Organization:
FreeBSD
>Environment:
FreeBSD freebsd_x64 9.1-RELEASE-p3 FreeBSD 9.1-RELEASE-p3 #0: Mon Apr 29 18:27:25 UTC 2013     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
make installworld will fail if you do it as non-root user.

I think "make installworld" should warn user about running with non-root
UID, and maybe ask for a "Press Y to continue", and should let me install
the world correctly, without failing on "permission denied".

In the perfect case, such installation would create a script e.g.: perms.sh
in $DESTDIR/, so that once booted, I could just do sh /perms.sh and have
everything be fixed.
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:

From: Brooks Davis <brooks@FreeBSD.org>
To: "Wojciech A. Koszek" <wkoszek@FreeBSD.org>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: misc/178284: make installworld doesn't detect UID correctly and
 fails due to not having enough permissions
Date: Wed, 1 May 2013 17:03:27 -0500

 On Wed, May 01, 2013 at 06:51:59PM +0000, Wojciech A. Koszek wrote:
 > >Description:
 > make installworld will fail if you do it as non-root user.
 >
 > I think "make installworld" should warn user about running with non-root UID, and maybe ask for a "Press Y to continue", and should let me install the world correctly, without failing on "permission denied".
 > 
 > In the perfect case, such installation would create a script e.g.: perms.sh in $DESTDIR/, so that once booted, I could just do sh /perms.sh and have everything be fixed.
 
 Other than not being automatic, the NO_ROOT option introduced in HEAD
 in January will accomplish all of this (you set permissions with mtree
 instead of a script, but that's just a detail).  I hope to merge it to 9
 in the next week.  Virtually all the supporting commits are now
 complete.
 
 -- Brooks
>Unformatted:
