# Switching from pkg to Poudriere



## blackflow (Nov 15, 2014)

Hello forum,

First to say Ohai! as I'm new here. I've been using FreeBSD for a few weeks now, I'm a systemd refugee from Debian and Gentoo. Otherwise I'm a Linux sysadmin of ten years, until recently I've been using GNU/Linux as primary driver, now FreeBSD, hopefully to stay. 

My question is this. I've set up a FreeBSD with MATE on my computer using only pkg to install the ports to save time and get up and running fast. Now I'd like to completely switch over to packages built locally with Poudriere and in the process customize them. I'm perhaps using the term "pkg" here wrongly, since I know pkg is used to install even software built from ports. What I mean is the binary pkg repository. I don't know how else to call it.

Any suggestions where to begin? My idea is to list the ports I explicitly installed and bulk build those with Poudriere. I am assuming the dependencies will be built and packaged automatically. Then, simply reinstall from this custom package repository and later remove anything that remained orphaned and unneeded.


----------



## danger@ (Nov 17, 2014)

If you want to use the third-party ports software built locally on your computer, you don't need Poudriere. You can go just with good old ports stuff. That means getting the ports tree (see portsnap(8)) and then you can reinstall all your installed packages from source with customized options with portmaster(8) for example. Also have a look at https://www.freebsd.org/doc/handbook/ports-using.html.


----------



## jrm@ (Nov 17, 2014)

Everything you install is a package built from ports. What varies is where the package is built, e.g. by you from your local ports tree or the FreeBSD build servers. Here is a nice guide to get you up and running with ports-mgmt/poudriere. As danger@ says you don't necessarily need poudriere to build your own packages, but the advantage is that you get parallel building in a clean environment. Yes, the run-time dependencies will be installed when you install your leaf packages. In other words, you don't need to supply all the dependencies to poudriere.


----------



## SirDice (Nov 17, 2014)

blackflow said:


> Now I'd like to completely switch over to packages built locally with Poudriere and in the process customize them. I'm perhaps using the term "pkg" here wrongly, since I know pkg is used to install even software built from ports. What I mean is the binary pkg repository. I don't know how else to call it.


Packages are built from ports. Regardless of the process on how to build them, they're still called packages. 



> My idea is to list the ports I explicitly installed and bulk build those with Poudriere. I am assuming the dependencies will be built and packaged automatically. Then, simply reinstall from this custom package repository and later remove anything that remained orphaned and unneeded.


That's correct.


----------



## blackflow (Nov 17, 2014)

Thanks for your replies guys. I know about portmaster and I know packages are built from ports. Here's the lack of FreeBSD experience coming through in choosing the wrong words. What I meant was switching over from the default pkg repository to the one built locally with Poudriere. Why? Well, for starters because I want to modify some packages (e.g. x11/nvidia-driver for ACPI support and to remove sysutils/hal and devel/dbus dependencies), and mixing upstream packages and local ports might not be wise (also locking overhead etc...). I also want to learn Poudriere, I think it's jail-based isolated building approach is awesome, and I would like to maintain a few sets/repositories for servers.


----------



## danger@ (Nov 17, 2014)

It looks like you already figured what you want to do and it seems valid. For poudriere, there are a couple of how-tos already so pick one you like and go ahead. I think I used Dan Langille's when I did it for myself.


----------

