From owner-cvs-all@FreeBSD.ORG Fri Dec 2 07:51:44 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 DDF0A16A420; Fri, 2 Dec 2005 07:51:43 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id F1FD143D62; Fri, 2 Dec 2005 07:51:39 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from localhost (rocky.ip.net.ua [82.193.96.2]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id jB27pcUQ002290; Fri, 2 Dec 2005 09:51:38 +0200 (EET) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua ([82.193.96.10]) by localhost (rocky.ipnet [82.193.96.2]) (amavisd-new, port 10024) with LMTP id 70654-06-2; Fri, 2 Dec 2005 09:51:33 +0200 (EET) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id jB27mt8u002191 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 2 Dec 2005 09:48:55 +0200 (EET) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.4/8.13.4) id jB27mvUS006856; Fri, 2 Dec 2005 09:48:57 +0200 (EET) (envelope-from ru) Date: Fri, 2 Dec 2005 09:48:57 +0200 From: Ruslan Ermilov To: Doug Ambrisko Message-ID: <20051202074857.GP20961@ip.net.ua> References: <200512020050.jB20oU8c000911@repoman.freebsd.org> <20051202005110.21C0916A45A@hub.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6sj9mcRtP+pTWLOo" Content-Disposition: inline In-Reply-To: <20051202005110.21C0916A45A@hub.freebsd.org> User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at ip.net.ua Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: 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 07:51:44 -0000 --6sj9mcRtP+pTWLOo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 02, 2005 at 12:51:10AM +0000, Doug Ambrisko wrote: > ambrisko 2005-12-02 00:50:30 UTC >=20 > FreeBSD src repository >=20 > Modified files: > . Makefile.inc1=20 > lib/libc/gen __xuname.c getosreldate.c=20 > 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. > =20 > With these change you can put a complete FreeBSD OS image into a > chroot set: > UNAME_s=3DFreeBSD > UNAME_r=3D4.7-RELEASE > UNAME_v=3D"FreeBSD $UNAME_r #1: Fri Jul 22 20:32:52 PDT 2005 fa= ke@fake:/usr/obj/usr/src/sys/FAKE" > UNAME_m=3Di386 > UNAME_p=3Di386 > OSVERSION=3D470000 > 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. > =20 > 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 ... > =20 > 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 >=20 >=20 > Index: src/Makefile.inc1 > diff -u src/Makefile.inc1:1.524 src/Makefile.inc1:1.525 > --- src/Makefile.inc1:1.524 Thu Dec 1 17:08:56 2005 > +++ src/Makefile.inc1 Fri Dec 2 00:50:29 2005 > @@ -122,7 +122,7 @@ > .error CPUTYPE global should be set with ?=3D. > .endif > .if make(buildworld) > -BUILD_ARCH!=3D sysctl -n hw.machine_arch > +BUILD_ARCH!=3D uname -m > .if ${MACHINE_ARCH} !=3D ${BUILD_ARCH} > .error To cross-build, set TARGET_ARCH. > .endif >=20 I think you broke native pc98 builds. This should be "uname -p". Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --6sj9mcRtP+pTWLOo Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDj/xpqRfpzJluFF4RAlThAJ4nVxUbKN3Hj3d50FloNuaVKJyBVQCfVqv0 G8n5hDElIx9EGfUufKgvn74= =P9zz -----END PGP SIGNATURE----- --6sj9mcRtP+pTWLOo--