So, having installed a few (honestly, it's 3..) openindiana boxes I found myself doing the same thing over and over again to bring what I could be rather cocky and call, a little bit of sanity, to the default pkg setup.

First of all, we take care of the 'pkg' managed things, disable opensolaris.org because I'm not entirely sure that it's being maintained, and then adding what's called Spec Files Extra Repository both the normal and the encumbered version. (I'm not entirely sure what encumbered implies for the invidial packages, but it's something with licensing.. isn't it always ;-))

I've left in the command to set the openindiana.org/dev publisher (a package repository is called a publisher) because it seemed a suitable place to mention it so I have the command ready if for some reason I need it.

# pkg set-publisher -p http://pkg.openindiana.org/dev/
pkg set-publisher --disable opensolaris.org
pkg set-publisher -p http://pkg.openindiana.org/sfe/
pkg set-publisher -p http://pkg.openindiana.org/sfe-encumbered/

And then refresh the repository.

pkg refresh --full

That's the normal pkg structure done, then there's opencsw. I found it because I was looking for a packaged version of postgresql because I wanted to try that on solaris in a newer version that was found in the normal packages. Installing it is pretty straight forward, and then there's a tricky bit to make it cryptographically authenticate what goes on.

pkgadd -d http://get.opencsw.org/now

That's the install done.. now for the cryptostuff :-)

/opt/csw/bin/pkgutil -y -i cswpki
/opt/csw/bin/gpg --homedir=/var/opt/csw/pki --gen-key
/opt/csw/bin/cswpki --import
/opt/csw/bin/gpg --homedir=/var/opt/csw/pki --edit-key board trust
/opt/csw/bin/gpg --homedir=/var/opt/csw/pki --edit-key dm trust

Enabling up the actual gpg/md5 verfication of packages in opencws

cat >>/etc/opt/csw/pkgutil.conf<<EOF
use_gpg=true
use_md5=true
EOF

Found I could also alter the mirror where packages where downloaded from, since I now have more than 1 machine it made sense for me to create an internal mirror and use that instead of having all machines download across the internet. Gigabit is so much nicer than what I usually have for internet :-)

cat &gt;&gt;/etc/opt/csw/pkgutil.conf&lt;<eof<br></eof<br>
mirror=http://ftp.example.com/pub/opencsw/testing
EOF

Finally, install few packages I've really grown to enjoy having on my machines.

/opt/csw/bin/pkgutil -y -i tmux vim git
/usr/bin/pkg install pkg:/file/gnu-coreutils
/usr/bin/pkg install pkg:/text/gnu-diffutils

The trick with finding the opencsw software seems to be to look for a csw folder, /etc/opt/csw and /opt/csw seems to be really good starting points for finding stuff.


Comments

comments powered by Disqus