Subject: toolchain/17041: New section "building as a regular user" for BUILDING.mdoc
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jmmv@hispabsd.org>
List: netbsd-bugs
Date: 05/26/2002 12:49:54
>Number:         17041
>Category:       toolchain
>Synopsis:       New section "building as a regular user" for BUILDING.mdoc
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    toolchain-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun May 26 03:51:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Julio Merino
>Release:        NetBSD 1.6A
>Organization:
HispaBSD
>Environment:
	
	
System: NetBSD darkstar.local 1.6A NetBSD 1.6A (DARKSTAR) #40: Sat May 25 19:22:35 CEST 2002 root@darkstar.local:/home/pub/NetBSD/src/sys/arch/i386/compile/DARKSTAR i386
Architecture: i386
Machine: i386
>Description:
	This patch adds a new section, "Building as a regular user", to
	the document BUILDING.mdoc. I've added this because it is not very
	clear how to do it when you have never done this kind of build
	before.
>How-To-Repeat:
	
>Fix:

--- /usr/src/BUILDING.mdoc	Tue May 14 12:28:24 2002
+++ BUILDING.mdoc	Sun May 26 12:45:32 2002
@@ -948,6 +948,45 @@
 .Sy PATH ,
 or called with an absolute path.
 .
+.Ss Building as a regular user
+.
+The
+.Sy build.sh
+script provides a way to build the system as a regular user who has no
+privileges over the sources. The easiest way to go is to create some
+directories under your home tree. The following are some 
+sample names of the directories you will need (you may call them as
+you want):
+.
+.Bl -tag -width "DIRS"
+.
+.It Sy ~/NetBSD/buildroot
+This will hold the root directory of the built system.
+.It Sy ~/NetBSD/obj
+A directory where all object files will be placed.
+.It Sy ~/NetBSD/toolchain
+Your own copy of the toolchain set. You can build your own set or simply
+copy the system one.
+.El
+.
+.Pp
+You have to call now the 
+.Sy build.sh
+script with the right arguments, so it uses your directories. You should
+check system's
+.Pa mk.conf
+to see if it defines any variable that may override your own directories.
+If it is the case, you can fix it by replacing 
+.Dq =
+with
+.Dq ?= .
+.Pp
+Now fire the build process (beeing in sources' root) with a command
+like this:
+.Bd -filled -literal -offset indent
+.Ic ./build.sh -D ~/NetBSD/buildroot -d -T ~/NetBSD/toolchain -U -M ~/NetBSD/obj
+.Ed
+.
 .Sh OBSOLETE VARIABLES
 .
 .Bl -tag -width "NBUILDJOBS"
>Release-Note:
>Audit-Trail:
>Unformatted: