Date: Sat, 1 Oct 2011 13:13:45 +0100 From: Chris Rees <crees@freebsd.org> To: Dmitry Marakasov <amdmi3@amdmi3.ru> Cc: freebsd-ports@freebsd.org, =?ISO-8859-1?Q?Fernando_Apestegu=EDa?= <fernando.apesteguia@gmail.com> Subject: Re: Setting up environment for development/testing Message-ID: <CADLo838Edb0Y5Y%2BSMZHaqGDqg9Jq0XdMT4xOPn2RuY3n08KDpQ@mail.gmail.com> In-Reply-To: <20111001114316.GF41897@hades.panopticon> References: <CAGwOe2bdi=CjmFJcttP5emN4mx9NvM94Mo6F%2BJ7mhAjyDTUuSg@mail.gmail.com> <20111001114316.GF41897@hades.panopticon>
next in thread | previous in thread | raw e-mail | index | archive | help
On 1 Oct 2011 12:43, "Dmitry Marakasov" <amdmi3@amdmi3.ru> wrote: > > * Fernando Apestegu=EDa (fernando.apesteguia@gmail.com) wrote: > > > Could anyone give me some hints on how to set up an environment to > > develop and test new ports? I see some people use tinderbox. Are > > tinderbox's jails the best way to write and test ports? > > Of tools which are is available, tinderbox is likely the best. > > > What are the alternatives? > > `port test` (from ports-mgmt/porttools), or custom chroot, for > example, but these are not really an alternatives as they can't > test everything that tinderbox does. > > > Would be enough to have a fresh freebsd installation on a virtual > > machine or is it better to prepare a chroot? > > After you make a port work for you on your machine, there's still > a list of thinks to check: > > - dependency list (i.e. *DEPENDS doesn't miss anything the port > requires to build) > - plist completeness and clean deinstall (a port does not leave > files after deinstallation and it doesn't delete/overwrite other > ports' or system files) > - the port builds on different FreeBSD versions and, if possible, > architectures > > First two things can only be reliably checked in a clean enviromenent. > For example, if you test a port with `port test` on your development > machine, its dependency list may be incomplete, but it will still > build and install fine, as you may have installed a port it requires > before. The same may happen in a chroot or VM, unless you clean (or > recreate) it before each build, which implies either rebuilding all > dependencies from scratch, or maintaining up-to-date package set, > which is quite inconvenient to do by hand. > > Tinderbox does everything for you: > - it maintains up to date packages set, rebuilding stuff only when > it's needed (e.g when dependency port is updated) > - it makes clean environement for you by creating fresh chroot from > an image for each build and filling it with required packages > - it checks filesystem state so you'll know if plist is incomplete > - it manages multiple chroots with different FreeBSD versions, so > on 8.x host you can test your port for both 7.x and 8.x. For me, > even 9.x on 8.x host have worked most of the time. > - with some hacks, you can even test different architecture, e.g. > i386 on amd64 host. > - queue into which you can stick as many ports as you need and left > it unattended until everything is built > - web interface from which you can check status of your ports, and > examine build logs > - as a side effect, you have recent package set you may use to > install software on your FreeBSD machines > Also, it has a fairly large development team, many of whom are very high profile porters alongside the odd portmgr member. These guys _really_ know what they're talking about, and are always very helpful. Chris
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLo838Edb0Y5Y%2BSMZHaqGDqg9Jq0XdMT4xOPn2RuY3n08KDpQ>