From owner-cvs-all@FreeBSD.ORG Fri Dec 2 00:50:56 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F9BF16A41F; Fri, 2 Dec 2005 00:50:56 +0000 (GMT) (envelope-from ambrisko@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C9C2243D58; Fri, 2 Dec 2005 00:50:47 +0000 (GMT) (envelope-from ambrisko@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id jB20oUdR000912; Fri, 2 Dec 2005 00:50:30 GMT (envelope-from ambrisko@repoman.freebsd.org) Received: (from ambrisko@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id jB20oU8c000911; Fri, 2 Dec 2005 00:50:30 GMT (envelope-from ambrisko) Message-Id: <200512020050.jB20oU8c000911@repoman.freebsd.org> From: Doug Ambrisko Date: Fri, 2 Dec 2005 00:50:30 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src Makefile.inc1 src/lib/libc/gen __xuname.c getosreldate.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2005 00:50:56 -0000 ambrisko 2005-12-02 00:50:30 UTC FreeBSD src repository Modified files: . Makefile.inc1 lib/libc/gen __xuname.c getosreldate.c Log: Add support to easily build FreeBSD unpacked in a chroot of another FreeBSD machine. To do this add the man 1 uname changes to __xuname.c so we can override the settings it reports. Add OSVERSION override to getosreldate. Finally which Makefile.inc1 to use uname -m instead of sysctl -n hw.machine_arch to get the arch. type. With these change you can put a complete FreeBSD OS image into a chroot set: UNAME_s=FreeBSD UNAME_r=4.7-RELEASE UNAME_v="FreeBSD $UNAME_r #1: Fri Jul 22 20:32:52 PDT 2005 fake@fake:/usr/obj/usr/src/sys/FAKE" UNAME_m=i386 UNAME_p=i386 OSVERSION=470000 on an amd64 or i386 and it just work including building ports and using pkg_add -r etc. The caveat for this example is that these patches have to be applied to FreeBSD 4.7 and the uname(1) changes need to be merged. This also addresses issue with libtool. This is usefull for when a build machine has been trashed for an old release and we want to do a build on a new machine that FreeBSD 4.7 won't run on ... Revision Changes Path 1.525 +1 -1 src/Makefile.inc1 1.10 +8 -0 src/lib/libc/gen/__xuname.c 1.8 +5 -0 src/lib/libc/gen/getosreldate.c