Date: Tue, 22 Apr 2003 20:47:34 +0200 From: Alexander Leidinger <Alexander@Leidinger.net> To: freebsd-ports@freebsd.org Subject: Re: Building ports in a chrooted tree Message-ID: <20030422204734.6d8c0070.Alexander@Leidinger.net> In-Reply-To: <1051027119.75648.25.camel@comrie> References: <1051027119.75648.25.camel@comrie>
next in thread | previous in thread | raw e-mail | index | archive | help
On 22 Apr 2003 11:58:39 -0400 Mike Patterson <mpatters@cs.uwaterloo.ca> wrote: > I'm interested in creating a clean build environment for ports, > something like the one used on bento. (See last paragraph for my > reasons, and feel free to let me know if I've apparently been smoking > substances of doubtful legality.) If you just want to have a pristine environment like after a freshly installed FreeBSD you don't need something like the bento scripts. In the work in progress for my SystemOnCD port I implemented some Makefile-fu which builds other ports in a pristine environment. You just need the complete source of the target version of the OS and it should be buildable on the actual version of the build machine. Just grab http://www.leidinger.net/FreeBSD/SystemOnCD-WIP.tar.bz2, extract it to somewhere with a lot of space and create the /usr/ports/packages directory. Now you just need to cd into the SystemOnCD directory, and run e.g. make -DCREATE_PACKAGES -DCOPY_DISTFILES WANTED_PORTS="www/apache13 www/mod_php4 shells/zsh" You need to run this as root, as we have to mount an instance of devfs into the fresh build environment. Simplified explanation of what this does: This builds the world, installs it into a subdir, copies /usr/ports into subdir/usr/ports (so you should have no build of a port in progress, else every object and source file of this port will get copied into the subdir too), chroots into it and then builds all ports in WANTED_PORTS. If you already have a /usr/obj with a finished buildworld and/or buildkernel you can add -DNO_BUILDWORLD and/or -DNO_BUILDKERNEL to the command line of make. When it finishes without errors, you should have some packages in /usr/ports/packages. Bye, Alexander. P.S.: Don't burn the generated ISO image on a CD, it doesn't do anything useful at the moment. -- The best things in life are free, but the expensive ones are still worth a look. http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030422204734.6d8c0070.Alexander>