Converting from portmaster to pkg/poudriere

I am looking to switch from using portmaster management to pkg/poudriere for management. I already have poudriere setup on an outside system and I am using it for some machines which I built using the poudriere setup from the beginning. I would like to begin using the poudriere/pkg setup for my older machines which have been using ports/portmaster from the beginning. All of the machines are running FreeBSD 11.0.

I found this post which seems to go into detail about the necessary steps but I am unsure of the date and I am curious if these steps are still necessary.

https://people.freebsd.org/~wollman/converting-to-pkg-repository.html

Has anyone performed a conversion like this or have any tips/guidance for getting this done?

Any help would be greatly appreciated.
 
Basically the linked guide should work ... but
1. Do not expect that you will succeed on the first try
2. Give you time for playing with Poudriere first before starting to deploy to your production systems
3. You will need to setup a local webserver i.e. Nginx in your LAN.
4. You will need to config pkg to use the new repository/s
5. Think about what your systems (not) have in common to make use of what Poudriere calls "sets".
6. You might want to use Ccache which has to be activated in poudriere.conf

No 1) in the guide only has the purpose to get a list of your installed ports for creating a "bulk" list which Poudriere uses for building the ports. You will need such a list from every system you want to deploy to. You will need to merge these lists and probably split them for use with sets. But this task I would start when Poudriere is installed and tested thoroughly.

Edit after 2nd reading ;)
I already have poudriere setup on an outside system and I am using it for some machines which I built using the poudriere setup from the beginning. I would like to begin using the poudriere/pkg setup for my older machines which have been using ports/portmaster from the beginning. All of the machines are running FreeBSD 11.0.
So do you want to use your existing "outside" Poudriere? Then your task is mainly No 1) of the guide and what I wrote under 4.
 
Basically the linked guide should work ... but
1. Do not expect that you will succeed on the first try
2. Give you time for playing with Poudriere first before starting to deploy to your production systems
3. You will need to setup a local webserver i.e. Nginx in your LAN.
4. You will need to config pkg to use the new repository/s
5. Think about what your systems (not) have in common to make use of what Poudriere calls "sets".
6. You might want to use Ccache which has to be activated in poudriere.conf

No 1) in the guide only has the purpose to get a list of your installed ports for creating a "bulk" list which Poudriere uses for building the ports. You will need such a list from every system you want to deploy to. You will need to merge these lists and probably split them for use with sets. But this task I would start when Poudriere is installed and tested thoroughly.

Edit after 2nd reading ;)

So do you want to use your existing "outside" Poudriere? Then your task is mainly No 1) of the guide and what I wrote under 4.


Thanks for the quick reply. Yes I will be using my existing poudriere and configuring pkg to use that repo. Going to give the guide a try and see how it goes on a test machine. My main concern was with dependencies and ensuring a smooth conversion from one to the other.
 
In regards to consistency (however it is not needed), when you have everything built by Poudriere and configured, you can:

  1. save your origins files list
  2. pkg delete them all, and pkg autoremove (basically remove everything)
  3. delete everything in /var/db/pkg
  4. reinstall the origins files.
It will not touch your configuration files, or anything you customized. Quite safe procedure.
 
In regards to consistency (however it is not needed), when you have everything built by Poudriere and configured, you can:

  1. save your origins files list
  2. pkg delete them all, and pkg autoremove (basically remove everything)
  3. delete everything in /var/db/pkg
  4. reinstall the origins files.
It will not touch your configuration files, or anything you customized. Quite safe procedure.

Hmm, I may test this out on a test machine but for my sanity I would be hesitant to do this on the production machines. Though it does seem like a good way to ensure a clean build.


One question I have about the guide I found is when he says:

Switch your system to pkgng if you haven't already. Unfortunately, this will not result in the right ports being marked as "automatic", so you'll need to do a bit of post-conversion surgery:

Does he mean anything in particular about "Switch your system to pkgng" besides installing pkg?
 
Alternatively, when you have all packages built and everything configured, you can run pkg upgrade -f, what will force the reinstall of all installed packages, and then pkg autoremove.
 
Back
Top