Date: Sat, 1 Oct 2011 18:12:59 +0200 From: =?ISO-8859-1?Q?Fernando_Apestegu=EDa?= <fernando.apesteguia@gmail.com> To: Dmitry Marakasov <amdmi3@amdmi3.ru> Cc: freebsd-ports@freebsd.org Subject: Re: Setting up environment for development/testing Message-ID: <CAGwOe2Zr6XWu-t4nuX-0DLsovjm0j2Gj-9itm9%2BVuY=KAMahvw@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
2011/10/1 Dmitry Marakasov <amdmi3@amdmi3.ru>: > * 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 > =A0requires to build) > - plist completeness and clean deinstall (a port does not leave > =A0files after deinstallation and it doesn't delete/overwrite other > =A0ports' or system files) These two were my main concern. > - the port builds on different FreeBSD versions and, if possible, > =A0architectures > > 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 > =A0it's needed (e.g when dependency port is updated) > - it makes clean environement for you by creating fresh chroot from > =A0an 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 > =A0on 8.x host you can test your port for both 7.x and 8.x. For me, > =A0even 9.x on 8.x host have worked most of the time. > - with some hacks, you can even test different architecture, e.g. > =A0i386 on amd64 host. > - queue into which you can stick as many ports as you need and left > =A0it unattended until everything is built > - web interface from which you can check status of your ports, and > =A0examine build logs > - as a side effect, you have recent package set you may use to > =A0install software on your FreeBSD machines The handbook warns about the difficulty in the configuration of tinderbox, but I will give it a try anyway. Thank you very much! > > -- > Dmitry Marakasov =A0 . =A0 55B5 0596 FF1E 8D84 5F56 =A09510 D35A 80DD F9D= 2 F77D > amdmi3@amdmi3.ru =A0..: =A0jabber: amdmi3@jabber.ru =A0 =A0http://www.amd= mi3.ru >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGwOe2Zr6XWu-t4nuX-0DLsovjm0j2Gj-9itm9%2BVuY=KAMahvw>