blastwave.org: Offline package install

I have Solaris10 x86 server in network isolated environment. Today, I had to install cvs package from Blastwave.

I wrote a bash script to dowload all required packages. Be forewarned! This script includes recursion. Be ready to kill before you run.
$ cat blastwaveOffline.sh
#!/bin/bash
[ -z "$2" ] && echo "Usage: $0 {i386|sparc} package" && exit

if [ ! -d /tmp/blastwave ]; then
mkdir /tmp/blastwave
wget -P /tmp/blastwave -nH --cut-dirs=5 http://ibiblio.org/pub/packages/solaris/opencsw/unstable/$1/5.10/catalog
fi

awk "\\$3 == \\"$2\\"" /tmp/blastwave/$1/5.10/catalog > /tmp/.blastwave
[ ! -s /tmp/.blastwave ] && awk "\\$1 == \\"$2\\"" /tmp/blastwave/$1/5.10/catalog > /tmp/.blastwave
# echo ".blastwave has $(wc -l /tmp/.blastwave) lines!"

exec 3<&0
exec < /tmp/.blastwave
read w1 w2 w3 PKG_FILE w5 w6 PREREQPKG w8
exec 0<&3
exec 3<&-

#download target package first
if [ ! -s /tmp/blastwave/$1/5.10/$PKG_FILE ]; then
wget -P /tmp/blastwave -nH --cut-dirs=5 http://ibiblio.org/pub/packages/solaris/opencsw/unstable/$1/5.10/$PKG_FILE
else
exit
fi

#download prerequisite packages recursively
if [ $2 != "CSWcommon" -a $PREREQPKG != "none" ]; then
for i in $(echo $PREREQPKG | sed "s/|/ /g")
do
$0 $1 $i
done
fi

This script downloads packages under /tmp/blastwave.
I ran this on Windows cygwin environment like this.
$ ./blastwaveOffline.sh i386 cvs

Now transfer the downloaded 'blastwave' directory, via USB thumb drive, CD-ROM for examples. As root, install the package.
# /opt/csw/bin/pkg-get -i -s file:///cdrom/cdrom0/blastwave cvs

Answer 20 or more confirmations. It ends up with 11 new packages installed.
# /opt/csw/bin/pkg-get -l -s file:///cdrom/cdrom0/blastwave
WARNING: gpg not found
common
cvs
expat
ggettext
gsed
krb5_lib
libiconv
ncurses
openssl_rt
pkg_get
texinfo
zlib
Comments:

[Trackback] I wanted to run Wireshark on Solaris10 where I don't have root privelege. Wireshark itself is on blastwave already. Blastwave.org - An OpenSolaris Community Site description Wireshark (was Ethereal) is a free network protocol analyzer vendor url ...

Posted by Let the Sunshine In on August 15, 2009 at 07:22 PM JST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today