From owner-freebsd-ports@FreeBSD.ORG Sat Oct 1 16:13:01 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB7BF106564A for ; Sat, 1 Oct 2011 16:13:00 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 967408FC0A for ; Sat, 1 Oct 2011 16:13:00 +0000 (UTC) Received: by vcbf13 with SMTP id f13so2807098vcb.13 for ; Sat, 01 Oct 2011 09:12:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=LDqWSrnrUrZDfdhDsBWwecldabSsP9tkn6HTiH4guKY=; b=vjT0lhxbYYC6CJiygtdbCSm9R+PuwarKLdF0aMS2mE8IZJ3rEWcOadZMSXoZGbuljD pJC744+dvlfuqdWcU0a0h5+R23w+kIsQB8ficuzlE1n6m3IL8u2JnIeTlj7RB9ipj7ya jh7AFRzcLjnsKl78piQuF9gWtNl4xssKicgaI= MIME-Version: 1.0 Received: by 10.52.34.240 with SMTP id c16mr2014660vdj.342.1317485579781; Sat, 01 Oct 2011 09:12:59 -0700 (PDT) Received: by 10.220.200.68 with HTTP; Sat, 1 Oct 2011 09:12:59 -0700 (PDT) In-Reply-To: <20111001114316.GF41897@hades.panopticon> References: <20111001114316.GF41897@hades.panopticon> Date: Sat, 1 Oct 2011 18:12:59 +0200 Message-ID: From: =?ISO-8859-1?Q?Fernando_Apestegu=EDa?= To: Dmitry Marakasov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-ports@freebsd.org Subject: Re: Setting up environment for development/testing X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2011 16:13:01 -0000 2011/10/1 Dmitry Marakasov : > * 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 >