From owner-freebsd-ports@FreeBSD.ORG Sat Oct 1 12:13:47 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 3BCD5106566B for ; Sat, 1 Oct 2011 12:13:47 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mx1.freebsd.org (Postfix) with ESMTP id B599B8FC08 for ; Sat, 1 Oct 2011 12:13:46 +0000 (UTC) Received: by wwn22 with SMTP id 22so1705809wwn.1 for ; Sat, 01 Oct 2011 05:13:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=OlRHAd3fSrLsP30IJFEjw4Zz0ECNru/QN9C6JfDTwvw=; b=bryYOE6hmjDz1E8RzPgp+sABI0Rp5cL8pmXM3tH0EpD8fhJHXp4iuXancmLwzgUNzI jw2pNH3j0OgyLk6QotFtHvMm9vU/7DzD+zkbJgl0nYnDyPkePZ/oNCGVfEaIswJFnn3Q eK9WUr4l/YBKaf/KmjA3S6FswfnbHESNw5Wpg= MIME-Version: 1.0 Received: by 10.216.221.1 with SMTP id q1mr10067383wep.5.1317471225558; Sat, 01 Oct 2011 05:13:45 -0700 (PDT) Sender: utisoft@gmail.com Received: by 10.216.90.12 with HTTP; Sat, 1 Oct 2011 05:13:45 -0700 (PDT) Received: by 10.216.90.12 with HTTP; Sat, 1 Oct 2011 05:13:45 -0700 (PDT) In-Reply-To: <20111001114316.GF41897@hades.panopticon> References: <20111001114316.GF41897@hades.panopticon> Date: Sat, 1 Oct 2011 13:13:45 +0100 X-Google-Sender-Auth: bbUDJk5ot8yXrRTtrpcxO68c5tc Message-ID: From: Chris Rees To: Dmitry Marakasov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-ports@freebsd.org, =?ISO-8859-1?Q?Fernando_Apestegu=EDa?= 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 12:13:47 -0000 On 1 Oct 2011 12:43, "Dmitry Marakasov" 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