Date: Fri, 2 Dec 2005 18:04:23 +0200 From: Ruslan Ermilov <ru@FreeBSD.org> To: Doug Ambrisko <ambrisko@ambrisko.com> Cc: Doug Ambrisko <ambrisko@FreeBSD.org>, src-committers@FreeBSD.org, cvs-all@FreeBSD.org, cvs-src@FreeBSD.org Subject: Re: cvs commit: src Makefile.inc1 src/lib/libc/gen __xuname.c getosreldate.c Message-ID: <20051202160423.GE9219@ip.net.ua> In-Reply-To: <200512021441.jB2Ef3gj075082@ambrisko.com> References: <20051202075945.GQ20961@ip.net.ua> <200512021441.jB2Ef3gj075082@ambrisko.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--+JUInw4efm7IfTNU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 02, 2005 at 06:41:03AM -0800, Doug Ambrisko wrote: > Ruslan Ermilov writes: > | Hi Doug, > |=20 > | On Fri, Dec 02, 2005 at 12:50:30AM +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 __xunam= e.c > | > so we can override the settings it reports. Add OSVERSION override > | > to getosreldate. Finally which Makefile.inc1 to use uname -m inste= ad > | > 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 200= 5 fake@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 u= sing > | > 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 > | Please document these changes in ENVIRONMENT sections of uname(3) and > | getosreldate(3) manpages, similarly to how this is documented in the > | uname(1) manpage. >=20 > Yep, I'll steal the section from uname. One thing that bothers me > a little is that uname(1) should just use uname(3) to get stuff > instead of sysctl. There might be a reason for it to not use uname(3) > but I can't see it. >=20 uname(3) doesn't know about all things that uname(1) knows, e.g., -p and -i. (See also the commit log for __xuname.c#1.8.) Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --+JUInw4efm7IfTNU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDkHCHqRfpzJluFF4RAkIuAJ9egKwLyiCsedKY/6x3T52fXyoEDQCfcV6t mGQwXKhHk/saYrbWFVkpWss= =r154 -----END PGP SIGNATURE----- --+JUInw4efm7IfTNU--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051202160423.GE9219>