Monday, April 26, 2010

Complete local copy (mirror) of pkg.opensolaris.org

As you are aware with every official release of OpenSolaris, comes a full download of all the IPS packages (7GB), but what happens if you want to work on the pkg.opensolaris.org/dev releases and you want a local mirror. I have found this blog which does it. I have modified it slight since I think it had a couple of errors.

1. Create partition to store the packages. I have been told a complete will be around 65GB, but I am using a cut down version.
$ pfexec zfs create -o atime=off rpool/export/pkg
2. Create repository
pfexec pkgsend -s file:///export/pkg create-repository -–set-property publisher.prefix=opensolaris.org
3. Obtain list of packages you want.  In this case everything currently install and the release (134) I am interested in.
$ cd /export/pkg
$ pfexec pkg list -Hva | egrep “134:|install” > /tmp/pkglist.txt
$ head -1 /tmp/pkglist.txt
pkg://opensolaris.org/SUNWcs@0.5.11,5.11-0.134:20100302T005446Z

$ pfexec cat /tmp/pkglist.txt | sed 's/pkg:\/\/opensolaris\.org\///' \
       | cut -f 1 -d ' ' > /tmp/packages.txt
$ head -1 /tmp/packages.txt
SUNWcs@0.5.11,5.11-0.134:20100302T005446Z

4.Now download IPS package and place it into local repository.
$ for i in $(cat /tmp/packages.txt); 
do 
pfexec pkgrecv -s http://pkg.opensolaris.org/dev -d file:///export/pkg "$i"
done
5. You can test it to see all is there (http://localhost:80)

$ pfexec /usr/lib/pkg.depotd -d /export/pkg -p 80

6. To make sure the repository is always available.

$ pfexec svccfg -s application/pkg/server setprop pkg/inst_root=/export/pkg
$ pfexec svcadm refresh pkg/server
$ pfexec svcadm enable pkg/server

London OpenSolaris User Group (LOSUG) - Finally did a talk

Autoinstaller: Past & Present

I gave a talk at the LOSUG meeting on Autoinstaller in OpenSolaris 2009.06 and will talk about what is new in 2010.03. He will talk about and demonstrate how to use Autoinstaller to install OpenSolaris to your own personnel specification, including Autoinstaller Manifests, pkg repository, creating IPS package and SMF service.