# private meta-ports and poudriere



## mtu (May 28, 2021)

I'm building repositories for my servers with poudriere in the usual way. For easier installation, and to have some more clarity in the pkg databases, I'd like to include private meta-ports with the repositories that poudriere builds.

I know how to write a meta-port, and I know how to put it into a ports tree. I know that I could create my own git branch of the ports tree that would contain my meta-ports, and also track the main (or quarterly) branch. However, I hate git (and git hates me), which is why I tend to nuke and re-create the entire /usr/ports directory often. Therefore, I want to save myself the headache of using git for this.

Is there another way to include private meta-ports in a pkg repo built with `poudriere bulk`?


----------



## SirDice (May 28, 2021)

There's a new function in the ports tree called "overlays", with that you can have a custom ports tree and overlay that on a "full" ports tree. That way you don't have to copy the entire tree to build a few custom ports. I'm not sure if that functionality is already working in poudriere but they're definitely working on integrating it.


----------



## mtu (May 28, 2021)

Huh, I hadn't heard. That sounds very useful. Is it implemented using the Makefile code structure of the ports tree?


----------



## SirDice (May 28, 2021)

It should but I haven't had the chance to figure out how it actually works yet.


----------



## SirDice (May 28, 2021)

It appears it's been implemented:

```
-O	overlays
	      Specify extra ports trees	to overlay.
```
From poudriere-bulk(8)


----------



## mtu (May 29, 2021)

For the record: This has worked well. It needs ports-mgmt/poudriere-devel at the moment, but should be included with ports-mgmt/poudriere when version 4.0 comes out.

I created a skeleton overlay ports tree, imported it into poudriere with `poudriere ports -c -p overlay -m null -M /my/tree` and then ran the bulk run with the appropriate arguments: `poudriere bulk -p default -O overlay -j myjail -f myportlist`.

Only shortcut I took was I avoided using my own category like `local/myport`, because I didn't want to deal with overlaying a `VALID_CATEGORIES` entry somehow.


----------

