Subject: Re: how to install pkgsrc compiled on another machine?
To: Kazushi (Jam) Marukawa <jam@pobox.com>
From: None <aliver@xexil.com>
List: current-users
Date: 10/13/2003 03:36:33
On Sun, 12 Oct 2003, Kazushi (Jam) Marukawa wrote:
> I have one question about pkgsrc stuff.  How can I install pkgsrc
> compiled on another machine?  The another machine is faster, so I
> compiled there.

Here are several strategies to do similar things:

1. Simply use "make package" and then scp or ftp the package over the the
   target box from the source box's /usr/pkgsrc/packages/All

2. If you want to synchronize all the packages from one box to another but
don't care to get all the "/usr/pkgsrc/<tree>/<app>/work" directories on
the target, then you can do this (using borne, ksh, or bash):

for NAME in `pkg_info | awk '{print $1}'` ; do echo "packaging $NAME" ;
pkg_tarup $NAME ; mv /tmp/*.tgz  ~/packages/ ; done

Then you will have ended up with an installable package created for
everything on your "source" system. Next you shoot those files over to the
"target" box (or use NFS) then pkg_add them with a similar loop like this:

for PACKAGE in *.tgz ; do echo Installing $PACKAGE ; pkg_add $PACKAGE ;
done

When using this method I like to also do a one time scp of all the files
in /usr/pkgsrc/distfiles over to the target box.

3. You can use NFS to export your /usr/pkgsrc/ directory to the target(s)
   then install that way. I'd recommend using IPF to add some enhanced
   security to your NFS server.

4. Use this command (assuming you allow ssh as root):

export RSYNC_RSH=ssh ; rsync --progress -pogtvr /usr/pkgsrc root@targethost:/usr/pkgsrc/

-- 

aliver