# How to get poudriere to use my own ports tree (revision)?



## Chris_H (Aug 30, 2014)

Greetings,
 I maintain, and develop FreeBSD ports. Lately it has become the defacto to use ports-mgmt/poudriere.
So I'm forced to learn it. I'm good with pretty much all the options. But all my testing fails to get it to use the ports tree I develop in (my local copy). How, or can I get poudriere to NOT fetch a ports tree, but use the one I use locally? I can't seem to find any example, or mention of it. Even in the very well written how-to, here in the forums.

Thank you for all your time, and consideration.

--Chris


----------



## asteriskRoss (Aug 31, 2014)

*Re: How to get poudriere to use my own ports tree (revision)*

The Poudriere documentation includes instructions for using an existing ports tree (at /ports/custom, for which Poudriere's internal name will be custom), though I've not tested it:

```
# poudriere ports -c -F -f none -M /ports/custom -p custom
```


----------



## Chris_H (Sep 1, 2014)

*Re: How to get poudriere to use my own ports tree (revision)*



			
				asteriskRoss said:
			
		

> The Poudriere documentation includes instructions for using an existing ports tree (at /ports/custom, for which Poudriere's internal name will be custom), though I've not tested it:
> 
> ```
> # poudriere ports -c -F -f none -M /ports/custom -p custom
> ```


Thank you for the reply, asteriskRoss.

I used:
`poudriere ports -c -f none -M /devel/ports -p custom`
Which I thought would give it to me.
But I see your line is a bit different ( *-F* ). I see if that small omission on my part makes the different.

On another note; do you, or anyone else know how I can pack up my currently used kernel, to have poudriere use it, instead of the snapshot version it fetches?

Thanks again, asteriskRoss.

--Chris


----------



## SirDice (Sep 1, 2014)

*Re: How to get poudriere to use my own ports tree (revision)*



			
				Chris_H said:
			
		

> On another note; do you, or anyone else know how I can pack up my currently used kernel, to have poudriere use it, instead of the snapshot version it fetches?


One way would be to make use of release(7) and create your own release. From there you can instruct poudriere to use that to install or upgrade.


```
root@armitage:/usr/local/etc/poudriere.d # poudriere jail -l
JAILNAME  VERSION     ARCH  METHOD                                    TIMESTAMP           PATH
10-stable 10.0-STABLE amd64 url=file:///storage/release/10-stable/ftp 2014-06-29 03:06:40 /storage/poudriere/jails/10-stable
```
The directory /storage/release/10-stable/ftp gets created by the release(7) process.


----------



## kpa (Sep 1, 2014)

*Re: How to get poudriere to use my own ports tree (revision)*

Jails use the host kernel and only that, installing a kernel in a jail has no effect on the jail operation. In other words a jail is not a virtual machine but a very much beefed up chroot(8).


----------



## Chris_H (Sep 1, 2014)

*Re: How to get poudriere to use my own ports tree (revision)*



			
				SirDice said:
			
		

> Chris_H said:
> 
> 
> 
> ...


PERFECT!
Thank you, very much, SirDice!
I think that's exactly what I need. *Greatly* appreciated.

--Chris


----------



## Chris_H (Sep 1, 2014)

*Re: How to get poudriere to use my own ports tree (revision)*



			
				kpa said:
			
		

> Jails use the host kernel and only that, installing a kernel in a jail has no effect on the jail operation. In other words a jail is not a virtual machine but a very much beefed up chroot(8).


Thanks for the reply, kpa.

Yes. I have found the documentation that exists, terribly difficult to follow.
Terms, and nomenclature, are not used correctly. What are currently called "jails". Aren't actually jail(8)'s, but chroot(8)'s. There are other confusing, misrepresented terms, as well. 

Thank's for your thoughtful reply, kpa.

--Chris


----------



## kpa (Sep 1, 2014)

*Re: How to get poudriere to use my own ports tree (revision)*

Yes, the poudriere jails are real jail(8)s. They are created without using any configuration files like /etc/jail.conf but they use the exact same configuration parameters that are set via command line parameters to jail(8) at jail creation time. What I said about jails using the host kernel applies to all jails, poudriere or not.


----------



## Peter2121 (Sep 23, 2020)

I'm trying to follow the recommendation of *asteriskRoss*

```
poudriere ports -c -F -f none -M /portsdev/freebsd-ports -p custom
```
But it does not work:

```
[00:00:00] Creating custom fs at /portsdev/freebsd-ports... fail
[00:00:00] Error: Directory not empty at /portsdev/freebsd-ports
```
Probably because of using ZFS.
What is the correct command?


----------



## Jose (Sep 23, 2020)

Peter2121 said:


> I'm trying to follow the recommendation of *asteriskRoss*
> 
> ```
> poudriere ports -c -F -f none -M /portsdev/freebsd-ports -p custom
> ...


Try adding `-m null`. See poudriere-ports(8).


----------



## Peter2121 (Sep 23, 2020)

Jose said:


> Try adding `-m null`. See poudriere-ports(8).


Great! I needed to remove -F to get it working, but I have the correct result now!


----------

