How to manually add locale pkgs on Solaris 10 PDF Print E-mail
Written by Patrick H. Piper   
Recently while installing Sybase, I discovered the need to install additional locale pkgs on my Solaris 10 system.  The currently installed locale was en_US, but NOT all the pkgs were installed.  I required en_US.UTF-8 to remove some annoying locale messages.   Solaris 10 now ships a new CLI for controlling the installation and configuration of locale support on the system, called localeadm.  To view the currently installed locale, you simply type the following:
localeadm -l -v
This command will list the currently installed locale related pkg files.  The output of this report is saved in /usr/sadm/lib/localeadm/locales.list.   I attempted to use the following command to upate my current (partial) installation of the en_US locale:
localeadm -a en_US.UTF-8 -d /cdrom/cdrom0
But this produced the following error message:
Warning! No Solaris packages exist in /cdrom/cdrom0
Warning! No Solaris packages exist in /cdrom/cdrom0
Warning! No Solaris packages exist in /cdrom/cdrom0
Warning! No Solaris packages exist in /cdrom/cdrom0
Warning! No Solaris packages exist in /cdrom/cdrom0
Warning! No Solaris packages exist in /cdrom/cdrom0
You need at least a solaris1 image to add any locales.
Please provide the path to a solaris1 image. Please enter the path to this image/disk, or enter 'q' to quit:
(if this image is on CD-ROM, please mount the disk and give the path to the CD-ROM drive e.g. /cdrom/cdrom0)

After several attempts, I opted to perform the manual method of updating my locale support.  I decided that the best course of action was to perform the following:

  1. remove all currently installed en_US locale pkgs
  2. identify all possible en_US.UTF-8 locale pkgs
  3. create a script to install those packages right off the Solaris CD

To remove the currently installed en_US locale pkgs, you issue the following command:

localeadm -r en_US

Once removed, I was able to identify the names of all pkg files that are required for the en_US.UTF-8 locale on Solaris 10 Sparc.  Please see the following URL for your particular release of Solaris 10 OS:
http://developers.sun.com/global/products_platforms/solaris/reference/faqs/solaris-10-locale-packages.html 
Since my installation was the 06/06 version, I used the following URL: http://developers.sun.com/global/products_platforms/solaris/reference/faqs/Locale_config_S10.txt-s10u2-sparc.txt
From that page i was able to identify all packages for en_US.UTF-8.  I created a shell script to install these packages one at a time.  I started with  a file that contained nothing but the package names lifted right from that page. Here is an abbreviated copy of that file:

SUNW5ttf
SUNWale
SUNWaled
SUNWcttf
SUNWebrg
SUNWedcl
SUNWedhcm
SUNWefdl
SUNWeladm
SUNWelvma
SUNWelvmg

Next, I created a response file that would be used to pass responses to questions that are normally asked by the pkgadd command when installing pkg files.  The response file can be passed to the pkgadd command so you can bypass having to supply arguments to pkg installation commands. Here is my response file:

mail=
instance=overwrite
partial=nocheck
runlevel=nocheck
idepend=nocheck
rdepend=nocheck
space=nocheck
setuid=nocheck
conflict=nocheck
action=nocheck
networktimeout=60
networkretries=3
authentication=quit
keystore=/var/sadm/security
proxy=
basedir=default

Last, I had to create a shell script that would read the pkg file and use the response file in a loop and perform the appropriate pkgadd command.  Here is a copy of the installpkg.sh file that was used to perform the installations:

#!/bin/sh

for pkg in `cat pkg`
do
        echo "PROCESSING $pkg"
        cp -r /cdrom/cdrom0/s0/Solaris_10/Product/$pkg /tmp
        pkgadd -S -n -a response -d /tmp $pkg done 

Quite simply, this script copies the directory containing the pkg files and places the directory in /tmp.  Next, the pkgadd command is called on the pkg directory and passes the response file in.  Each package is installed one at a time, until they are all installed.  You will have output that shows the success and/or failure for each and every pkg.

At then end of the script, you can verify the installation of the desired locale support:

localeadm -q en_US.UTF-8 -v 
localeadm -l -v

This satisfied my need to manually install locale support for the en_US.UTF-8 pkg files.


Add this page to your favorite Social Bookmarking websites

Digg! Del.icio.us! Google! Live! Facebook! StumbleUpon! TwitThis

Last Updated on Monday, 23 February 2009 19:17
 

Add comment


Security code
Refresh