Setting up environment for development/testing

Fernando Apesteguía fernando.apesteguia at gmail.com
Sat Oct 1 16:13:01 UTC 2011


2011/10/1 Dmitry Marakasov <amdmi3 at amdmi3.ru>:
> * Fernando Apesteguía (fernando.apesteguia at 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)

These two were my main concern.

> - 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

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   .   55B5 0596 FF1E 8D84 5F56  9510 D35A 80DD F9D2 F77D
> amdmi3 at amdmi3.ru  ..:  jabber: amdmi3 at jabber.ru    http://www.amdmi3.ru
>


More information about the freebsd-ports mailing list