Sun Studio users often ask about the structure of recommended Solaris patches. In this article we take a look inside a typical Solaris patch for the Sun Studio C++ compiler - SUNWlibC patch that contains Solaris C++ shared libraries. Download A PatchFirst log in to sunsolve.sun.com and to download the current version of Sun SUNWlibC patch 119963, at: http://sunsolve.sun.com/search/document.do?assetkey=119963 Click on the "Download patch" link, to download the patch ZIP file to your local system. When this article was published, patch version number was 119963-08. Now we'll run the following commands:
# unzip 119963-08.zip
# ls -F 119963-08 legal_license.txt README.119963-08 SUNWlibC/ patchinfo Look Inside
The rest of the data in the patch is defined by the Application Binary Interface (ABI) for the System V Interface Definition (SVID). The SUNWlibC DirectoryThe SUNWlibC directory contains the files to be installed by the patch. Lets take a look inside. # cd SUNWlibC
The
install/ directory
contains scripts and a copyright file:# ls -CF install/ pkginfo pkgmap reloc/ # ls -F install
install: checkinstall i.none patch_postinstall preinstall copyright patch_checkinstall postinstall SUNWlibC/pkginfo is a file describing the package as a whole, including special environment variables and installation directives # cat pkginfo
SUNWlibC/pkgmap is a file
describing each object (file, directory, etc...) to be installed
including the correct size and checksum for all action scripts
ARCH=sparc BASEDIR=/ CATEGORY=system CLASSES=none DESC=Sun Workshop Compilers Bundled libC EMAIL= HOTLINE=Please contact your local service provider MAXINST=1000 NAME=Sun Workshop Compilers Bundled libC PKG=SUNWlibC SUNW_PKGTYPE=usr SUNW_PRODNAME=SunOS SUNW_PKGVERS=1.0 VENDOR=Sun Microsystems, Inc. SUNW_PRODVERS=5.10 VERSION=5.10,REV=2004.12.22 PSTAMP=ouioui20041222170548 SUNW_PATCHID=119963-08 SUNW_PATCH_PROPERTIES= # cat pkgmap
: 1 11772 1 i checkinstall 4985 7139 1159561508 1 i copyright 59 5214 1159561509 1 i i.none 5768 46312 1159561508 1 i patch_checkinstall 1555 54237 1159561509 1 i patch_postinstall 824 1074 1159561509 1 i pkginfo 421 33070 1159561509 1 i postinstall 6703 341 1159561509 1 i preinstall 6926 2171 1159561509 1 d none usr 0755 root sys 1 d none usr/include 0755 root bin 1 f none usr/include/demangle.h 0644 root bin 1403 48952 1158782637 1 d none usr/lib 0755 root bin 1 d none usr/lib/cpu 0755 root bin 1 d none usr/lib/cpu/sparcv8plus 0755 root bin 1 f none usr/lib/cpu/sparcv8plus/libCstd_isa.so.1 0755 root bin 167352 53201 1158782637 1 f none usr/lib/libC.so.5 0755 root bin 390808 48866 1158782637 1 f none usr/lib/libCrun.so.1 0755 root bin 63444 54865 1158782637 1 f none usr/lib/libCstd.so.1 0755 root bin 1907612 11581 1158782637 1 f none usr/lib/libExbridge.so.1 0755 root bin 33040 6054 1158782637 1 f none usr/lib/libdemangle.so.1 0755 root bin 161296 38587 1158782637 1 f none usr/lib/libiostream.so.1 0755 root bin 240876 11931 1158782637 1 d none usr/lib/sparcv9 0755 root bin 1 f none usr/lib/sparcv9/libCrun.so.1 0755 root bin 79144 62307 1158782637 1 f none usr/lib/sparcv9/libCstd.so.1 0755 root bin 2352496 24007 1158782638 1 f none usr/lib/sparcv9/libdemangle.so.1 0755 root bin 179984 47207 1158782638 1 f none usr/lib/sparcv9/libiostream.so.1 0755 root bin 312408 28098 1158782638 reloc/ is a directory containing the relocatable object files to be installed by this patch relative to the base directory as determined by the BASEDIR environment variable in the pkginfo file, or by the patchadd command. # ls -R reloc
reloc: usr reloc/usr: include lib reloc/usr/include: demangle.h reloc/usr/lib: cpu libCrun.so.1 libExbridge.so.1 libiostream.so.1 libC.so.5 libCstd.so.1 libdemangle.so.1 sparcv9 reloc/usr/lib/cpu: sparcv8plus reloc/usr/lib/cpu/sparcv8plus: libCstd_isa.so.1 reloc/usr/lib/sparcv9: libCrun.so.1 libCstd.so.1 libdemangle.so.1 libiostream.so.1 In our case the base directory is / , but it can be always changed by "patchadd". The libraries included here are:
Summary
References |
![]() Misha Bykov is a staff software engineer currently working in the Sun Studio sustaining group. For the last 6 years at Sun he worked on compilers support for Solaris and Linux including C/C++, Fortran compilers, NetBeans IDE and Solaris Components for Sun Studio. Before joining Sun he worked in Unipro, in Novosibirsk, Russia as a software developer for Sun Workshop TeamWare project including the cross-platform Java IDE for developing software products based on source code control system and distributive "make". | ||||||||||
|
| ||||||||||||