poudriere-3.1.4 options not working as expected

Bryan Drewery bdrewery at FreeBSD.org
Tue Apr 28 22:10:16 UTC 2015


On 4/28/2015 4:45 PM, Miroslav Lachman wrote:
> I am trying to set up own pkg repository for our servers. We have
> different FreeBSD versions, arch and roles of servers, so I am in the
> stage of finding common set of ports, options etc.
> 
> For example. We have "projectA" with 3 webservers with simmilar set o
> installed ports and used options, but one of them is also mailserver -
> so it have some additional ports.
> Twho servers are on 10.1-RELEASE and the third is on 8.4-RELEASE
> 
> I created to files with list of origins: projectA and projectA-server3
> projectA is a list of common ports for all 3 servers
> projectA-server3 is a list of additional ports for the third server -
> mailserver
> 

I answered questions below but I think your approach is wrong. Just make
1 set / repository and use meta packages. See my blog
http://blog.shatow.net/posts/2013-07-21-managing-role-based-freebsd-servers-with-meta-packages-and-poudriere/

You would make a local/projectA meta package, local/projectB meta
package, etc. Your bulk list would only have the top-level meta-packages.

The one downside is that this would be 1 set with the same options.

> I configured options for common set "projectA" with command
> 
> # poudriere options -z projectA -p default -f
> /usr/local/etc/poudriere.d/pkglists/projectA
> 
> This first problem is that it shows me dialogs for additional options
> which I deselect in previous dialog. For example I configured
> "memcached" without SASL, pecl-memcached without SASL, "libmemcached"
> without SASL but it still asks me to configure Cyrus-SASL options
> 
[...]
> 
> So why poudriere options did ask me for cyrus-sasl option if it is not
> needed and not built?


The 'options' subcommand just calls 'make config-conditional' on the
port and then 'make config-recursive' on it again so that this issue
doesn't happen. Perhaps these commands are broken in the ports framework.

> 
> 
> 
> 
> The second problem is that I tried to combine two ports lists together
> for projectA-server3 and set options for server3 this way:
> 
> # poudriere options -z projectA -p default -j 8_4_amd64 -f
> /usr/local/etc/poudriere.d/pkglists/projectA-server3
> 
> I was expecting this command to asks me for an options only for this
> list of additional ports and it did. (stored in
> 8_4_amd64-projectA-options) So far so good.
> 
> But I need to build all ports (from both lists) for this machine
> (server3) because it is 8.4 and not 10.1, so I used command
> 
> # poudriere bulk -v -j 8_4_amd64 -z projectA -p default -f
> /usr/local/etc/poudriere.d/pkglists/projectA -f
> /usr/local/etc/poudriere.d/pkglists/projectA-server3
> 
> I expected it to use common options from directory
> poudriere.d/projectA-options and additional options from
> poudriere.d/8_4_amd64-projectA-options but all packages not having
> options in poudriere.d/8_4_amd64-projectA-options (but having them in
> poudriere.d/projectA-options) were built with default options.
> 
> libmemcached was built with SASL
> 
>     "options": {
>         "DEBUG": "off",
>         "DTRACE": "off",
>         "MEMASLAP": "on",
>         "SASL": "on",
>         "FNV64": "on",
>         "HSIEH": "off",
>         "MURMUR": "on"
>     }
> 
> After reading the docs on
> https://fossil.etoilebsd.net/poudriere/doc/trunk/doc/poudriere.8.wiki#x437573746f6d206275696c64206f7074696f6e73
> 

That site is not updated anymore. The current documentation is
https://github.com/freebsd/poudriere/wiki/poudriere.8

> I expected poudriere to combine options from both directories together.

No, it won't do that. Each options dir is a specific set. It will never
build _a set_ using _multiple sets_ configs and options. It will only
use files from _that 1 set_.

There is no sane way for Poudriere to do what you want. The 2 options
dirs could easily conflict with each other. I recommend against trying
to make this work and just making a new set.

> Which it didn't and after reading the docs again and again... the word
> "mounting" is what I overlooked on the first reading. So now I read it
> as "only the first found options directory is mounted".
> 

Correct.

> Is it possible to use some kind of union mount / unionfs to overlay all
> found directories according to CUSTOMISATION order?
> 
> And in the meantime - is it possible to use multiple -f for "poudriere
> options" command?

Yes, but again only 1 set will be used. So you have to make a '-z
combined_set' and run options against that set.

> As it is not written in docs, I didn't try it and
> thought it is not possible and there is not need to use it if
> directories are combined.
> Because now I don't have a way to store options in
> 8_4_amd64-projectA-options directory by one "poudriere options" command.
> 
> Or am I doing something wrong?
> 
> Should I use symlinks from projectA-options to
> 8_4_amd64-projectA-options for each port directory to share options
> between these two build sets? Or copy them from common directory
> (projectA-options) to the other (8_4_amd64-projectA-options)?
> What is the best way to maintain this kind of configuration?
> 
> Thank you in advance and thanks for poudriere - really nice tool for
> port builds!
> 
> Miroslav Lachman


-- 
Regards,
Bryan Drewery

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20150428/ca71da8b/attachment.sig>


More information about the freebsd-ports mailing list