Experience with portshaker

Guido Falsi mad at madpilot.net
Wed Jan 2 15:49:51 UTC 2013

On 01/02/13 16:15, David Southwell wrote:
> Best wishes for the new year. I decided I needed texlive so I installed
> portshaker with the intention of adding texlive to my ports tree.
> After installing portshaker and running portshaker -v I found  the
> existing ports tree /usr/ports/**** deleted and portshaker had created a
> new directory /var/cache/portshaker with the following sub directories:
> bsd_sharp
> freebsd_texlive
> freebsd_texlive_releng
> ports
> The /var/cache/portshaker/ports was empty
> /bsd-sharp contained a ports hierarchy but with a very limited range of
> ports within the hierarchy.
> freebsd_texlive contained .svn , Tools, print
> freebsd_texlive_releng contained .svn, MOVED, print
> I was expecting the default portshaker.conf to have retained the
> original /usr/ports/ tree and put the texlive ports in
> /usr/ports/prints - however finding my original tree deleted was an
> unexpected outcome.
> Would that be due to a run error on an incorrectly configured
> postshaker.conf?

First you should read carefully the portshaker man page. There it is 
clearly stated that your /usr/ports directory will be subject to heavy 
modifications, and, if you're using zfs and enabled zfs support in 
portshaker, will be simply destroyed and rebuilt by creating a clone.

The way portshaker works is by using a base ports tree(usually the 
official full one) and overlaying other partial trees on it. So you 
should define the main ports tree first and then which overlays you will 

> 1. How should portshaker.conf be set for an appropriate configuration

this is just an example from a machine of mine:



ports_trees="system tinderbox"

system_merge_from="freebsd madpilot!"

tinderbox_merge_from="freebsd madpilot-test!"

use_zfs is optional and requires the system to use zfs and all the 
involved filesystems and their parents to be zfs ones.

With this config I'm telling portshaker to create fetch ports trees and 
overlays in /var/cache/portshaker and create two portstrees, one in 
.usr/ports and one for use with tinderbox. The "!" tells it to just 
o9verwrite ports without asking for confirmation in case a warning 
happens(it usually asks for confirmation if the port in the overlay is 
not a newer version than the original one)

freebsd is the freebsd ports tree. madpilot and madpilot-test are 
fetched from a subversion repo on my own machine. You tell portshaker hw 
to work with them using configuration files in 
/usr/local/etc/portshaker.d, for example for the base ports tree:


. /usr/local/share/portshaker/portshaker.subr

run_portshaker_command $*

documentation has more examples. I hope I gave you the general idea.

Point is, first define the official ports tree and then overlay it with 
the other partial ones.

Hope this helps.

Guido Falsi <mad at madpilot.net>

More information about the freebsd-ports mailing list