# How to create just packages without installing from ports tree?



## zennybsd (Mar 16, 2012)

Could anyone enlighten me the best way to create packages from the ports tree without needing to install or messing with the runtime environment?

Thanks!


----------



## kpa (Mar 16, 2012)

Some of the ports, actually quite a large part of them, can not be built unless their dependencies are installed for real. I would use a separate build jail for building packages, that would allow you to mess with the build jail as much as you want without affecting the main system.


----------



## SirDice (Mar 16, 2012)

kpa said:
			
		

> I would use a separate build jail for building packages


Yep, that's how I'm building packages. Works like a charm, never any issues with dependencies.


----------



## zennybsd (Mar 16, 2012)

*What about chroot instead of jail?*

Thanks kpa and SirDice.

What about rudimentary chroot? Isn't that good enough to separate the run environment from the port building environment?

I am eager to know what extra security jails provide over chroot for port building?!


----------



## SirDice (Mar 16, 2012)

zennybsd said:
			
		

> What about rudimentary chroot? Isn't that good enough to separate the run environment from the port building environment?


That should work too, it's what ports-mgmt/tinderbox does.



> I am eager to know what extra security jails provide over chroot for port building?!


In this case it has nothing to do with security, a jail is just a little more convenient.


----------



## adam2104 (Mar 16, 2012)

Is there any particular reason why someone would want to build their own packages rather than installing the pre-built ones? I'm working on a nanobsd system and I'm just using pkg_fetch to pull down the ones I need. Should I be building the packages myself?


----------



## phoenix (Mar 16, 2012)

Pre-built packages are built using the default OPTIONS, as set in the port Makefile.  If you want to customise which OPTIONS are set, then you have to build your own packages.


----------



## nORKy (Mar 16, 2012)

Try ports-mgmt/poudriere

I use it to have my own Packagesite for postmaster and pkgng


----------

