working with port options from commandline

Volodymyr Kostyrko c.kworr at gmail.com
Fri Apr 4 15:30:05 UTC 2014


04.04.2014 18:25, Bryan Drewery wrote:
> On 2014-04-04 09:26, Volodymyr Kostyrko wrote:
>> 04.04.2014 14:05, Bryan Drewery wrote:
>>> 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,
>
> Poudriere handles that situation fine.
>
> You setup sets for each configuration you want. Your options can either
> be in the /var/db/ports format or in a make.conf with
> OPTIONS_SET/OPTIONS_UNSET/uniquename_OPTIONS...
>
>    poudriere bulk -j JAIL -z SET
>
> This will use:
>
>    /usr/local/etc/poudriere.d/SET-make.conf
>    /usr/local/etc/poudriere.d/make.conf
>    /usr/local/etc/poudriere.d/SET-options
>
> So with 1 jail you can build package sets for each target machine.
>
> You can use poudriere options to configure these in the /var/db/ports
> format which automatically creates the SET-options dir:
>
>    poudriere options -z SET
>
> Poudriere will rebuild packages when the selected options change or new
> defaults are added.

That sounds interesting. Looks like I missed a lot about it, time to 
catch up. :)

-- 
Sphinx of black quartz, judge my vow.


More information about the freebsd-ports mailing list