Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 02 Jan 2013 16:49:33 +0100
From:      Guido Falsi <mad@madpilot.net>
To:        David Southwell <david@vizion2000.net>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Experience with portshaker
Message-ID:  <50E4570D.9010401@madpilot.net>
In-Reply-To: <50E44F2C.6060601@vizion2000.net>
References:  <50E44F2C.6060601@vizion2000.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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 
use.

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

this is just an example from a machine of mine:

----
use_zfs="yes"

mirror_base_dir="/var/cache/portshaker"

ports_trees="system tinderbox"

system_ports_tree="/usr/ports"
system_merge_from="freebsd madpilot!"

tinderbox_ports_tree="/usr/local/tinderbox/portstrees/madpilot-test/ports"
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:

freebsd:

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

method="svn"
svn_checkout_path="svn://svn.freebsd.org/ports/head"
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@madpilot.net>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50E4570D.9010401>