To update Ruby, or any other application on OpenSolaris . . .

My recent post about updating Ruby on OpenSolaris can be summed up with the following steps:

(1) set the OpenSolaris developer repository as the package authority(pkg set-authority -O http://pkg.opensolaris.org/dev opensolaris.org)

(2) run "pkg image-update".

This raised questions about whether an image update was necessary just to update Ruby, which is a well behaved application with no direct ties to operating system internals.

The answer, quite simply, is a YES.  This applies to any application that is provided by  the main OpenSolaris (or dev) repositories, not just Ruby.  One can only update the application to a level of the package that is delivered on the build of the OS that one is running. 

Does that sound confusing?

 Lets say your OS level is 101 ( use "uname -a" to find that out).

root@domU-12-31-39-02-F5-56:/var/ruby/1.8/gem_home/bin# uname -a
SunOS domU-12-31-39-02-F5-56 5.11 snv_101b i86pc i386 i86xpv Solaris

Now lets look at an application installed on this machine (gmake, for example).  Use "pkg info" to get information about an installed package.

root@domU-12-31-39-02-F5-56:/var/ruby/1.8/gem_home/bin# pkg info SUNWgmake
          Name: SUNWgmake
       Summary: gmake - GNU make
      Category: Development/GNU
         State: Installed
     Authority: opensolaris.org
       Version: 3.81
 Build Release: 5.11
        Branch: 0.101
Packaging Date: Wed Nov 19 22:11:01 2008
          Size: 696.26 kB
          FMRI: pkg:/SUNWgmake@3.81,5.11-0.101:20081119T221101Z

gmake 3.81 is installed, and this was built on build 101 of Solaris Nevada (build 101 is the value that corresponds to the "Branch" tag).

Now, what this means is that one will not be able to update gmake to a version higher than the one bundled with build 101 without running "pkg image-update".  In this case, that is gmake version 3.81.

Updating individual packages is possible with the IPS framework, and that means that non Sun packages can be updated.  The packages that are delivered by Sun, however, cannot be updated thus.  These packages are listed as dependencies for the meta-package called "entire". "entire" imposes the restriction on what build number a package could be updated to. 

The IPS team is working on loosening this (reboot required) restriction.   But until then, please point your pkg command to http://pkg.opensolaris.org/dev  (by uttering pkg set-authority -O http://pkg.opensolaris.org/dev opensolaris.org ) and then say " pkg image-update ".

This will bring up Ruby 1.8.7p72 and Rubygems 1.3.1.  There is work happening to make Rails available too. stay tuned.






Comments:

You probably forgot to mention that a reboot is required after "pkg image-update" for the upgrade to take effect. Reminds me of windows :-)

Posted by anon on April 17, 2009 at 03:30 PM PDT #

Post a Comment:
Comments are closed for this entry.
About

prashant

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