From owner-freebsd-ports@FreeBSD.ORG Fri Apr 4 14:26:40 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D2E1914; Fri, 4 Apr 2014 14:26:40 +0000 (UTC) Received: from mail-lb0-x22b.google.com (mail-lb0-x22b.google.com [IPv6:2a00:1450:4010:c04::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 59089608; Fri, 4 Apr 2014 14:26:39 +0000 (UTC) Received: by mail-lb0-f171.google.com with SMTP id w7so2535872lbi.16 for ; Fri, 04 Apr 2014 07:26:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=8eYOrOyunSTBCHNRP/dEzbZAy4L1xD4NUXzEKJCBd7A=; b=z9s/e+0tEYNwCW5/Phl8yW9JbebTR8sIDZtlBr9EAfrJRgROQhnFaKZIgILM491T9w NkOrwMZx+dHBImbWYpc0qsrQz+COfU9ILlRSkOB0y5dfhfCuF8qFfm59sRDepb7BHYFA OYyCNTOfQ08GUOKnnsa77LDzDvwxb77yyrGuAwTfj+gYdGFdNe1VeksyuHDjClepofcw 4JZfz5swAvqaGhtvy/86+Um3WRTB/wan5zWehYXCE4dGUyEWHgNVcTVnfNuEu8B/Smyo Hb322YFmhpt9hIgSXMSsrsdw7EL3UzoEJ4le2Z3ro2sUWp4RSJTprIR+RYixCaYJfBV0 CaVQ== X-Received: by 10.152.42.196 with SMTP id q4mr8917282lal.14.1396621597244; Fri, 04 Apr 2014 07:26:37 -0700 (PDT) Received: from ar1l0u.maxima.local (mau.donbass.com. [92.242.127.250]) by mx.google.com with ESMTPSA id tq9sm5782337lbb.10.2014.04.04.07.26.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Apr 2014 07:26:36 -0700 (PDT) Message-ID: <533EC11A.3030600@b1t.name> Date: Fri, 04 Apr 2014 17:26:34 +0300 From: Volodymyr Kostyrko User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Bryan Drewery , Volodymyr Kostyrko , FreeBSD Ports Subject: Re: working with port options from commandline References: <533D293D.1050902@b1t.name> <533E91E9.3080305@FreeBSD.org> In-Reply-To: <533E91E9.3080305@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Apr 2014 14:26:40 -0000 04.04.2014 14:05, Bryan Drewery написав(ла): > On 4/3/2014 4:26 AM, Volodymyr Kostyrko wrote: >> Hi all. >> >> I'm all about automation. I'd like to automate most tasks so I can >> schedule them or write a script with which everything would be done >> automatically. >> >> I have some difficulties with current port options framework: >> >> 1. Is there a good way to set/unset any option from command line without >> firing up dialog? Something like 'make -C port/dir -DSET=OPT1,OPT2 >> -DUNSET=OPT3 updateconfig'. > > This should work: > make ... OPTIONS_SET="OPT OPT OPT" OPTIONS_UNSET="OPT OPT OPT" BATCH=1 I know but my target is to manage different machines with different options remotely. I'm currently experimenting with sysutils/py-salt and I found it already has required functionality in ports.config - I can remotely update ports configuration without building them. The given line actually doesn't change port configuration, it just makes port behave differently in the current run. Why I didn't like this is because it works only on current port but not on the ports required by this one. Imagine you have a number of _differently_ configured machines and you want to manage updates remotely. Poudriere doesn't help as packages actually may very from system to system, what I need is number of command line tools to inspect what should be build, inspect what options should be changed, update options from central datastore and rebuild ports - without using a GUI. >> 2. Is there a good way to query for option updates? You know when you >> are building a port the option dialog will still be shown if there are >> new options not present in current config. Can I get those options >> somehow like 'make -C port/dir changedconfig'? > > The current handling uses: > make -V NEWOPTIONS Exactly what I needed. > You can also use 'make pretty-print-config' for a parseable output. Nice thing, I'll remember this one. -- Sphinx of black quartz, judge my vow.