Quick OpenSolaris pkg howto

Well, time for me to learn YAPMSTM (Yet Another Package Management System).
Opensolaris 2008.05 ships with the IPS Image Packaging System, which, even if it’s got very few packages, has both command line and gui tools.

search for an installed package:

# pkg list -s | egrep or whatever you like
NAME (AUTHORITY) SUMMARY
FSWxorg-fonts X.Org Foundation X11 fonts
SUNW1394 Sun IEEE1394 Framework
SUNWDTraceToolkit SUNWDTraceToolkit
...

or

# pkg search -l zip
INDEX ACTION VALUE PACKAGE
basename file usr/bin/zip pkg:/SUNWzip@2.32-0.86
# pkg info -l pkg:/SUNWzip@2.32-0.86
Name: SUNWzip
Summary: The Info-Zip (zip) compression utility
State: Installed
Authority: opensolaris.org (preferred)
Version: 2.32
Build Release: 5.11
Branch: 0.86
Packaging Date: Sat Apr 26 18:12:56 2008
Size: 167 kB
FMRI: pkg:/SUNWzip@2.32,5.11-0.86:20080426T181256Z
# pkg contents pkg:/SUNWzip@2.32-0.86
PATH
usr
usr/bin
usr/bin/zip
usr/bin/zipcloak
usr/bin/zipnote
usr/bin/zipsplit

check for updated packages:

# pkg list -u
NAME (AUTHORITY) VERSION STATE UFIX
entire 0.5.11-0.86 installed u---
openoffice 2.4.0-0.86 installed u---

search for and install new packages:

# pkg search -r rdesktop
INDEX ACTION VALUE PACKAGE
basename file usr/bin/rdesktop pkg:/SUNWrdesktop@0.5.11-0.86
basename file usr/bin/rdesktop pkg:/SUNWrdesktop@0.5.11-0.86
# pkg install -n -v SUNWrdesktop
Before evaluation:
UNEVALUATED:
+pkg:/SUNWrdesktop@0.5.11,5.11-0.86:20080426T180128Z


After evaluation:
None -> pkg:/SUNWrdesktop@0.5.11,5.11-0.86:20080426T180128Z
None
# pkg install -v SUNWrdesktop
Before evaluation:
UNEVALUATED:
+pkg:/SUNWrdesktop@0.5.11,5.11-0.86:20080426T180128Z

After evaluation:
None -> pkg:/SUNWrdesktop@0.5.11,5.11-0.86:20080426T180128Z
None
DOWNLOAD PKGS FILES XFER (MB)
Completed 1/1 42/42 0.27/0.27

PHASE ACTIONS
Install Phase 55/55

add other repositories:

# pkg set-authority -O http://pkg.sunfreeware.com:9000 sunfreeware.com
# pkg set-authority -O http://blastwave.network.com:10000 blastwave.org
# pkg authority
AUTHORITY URL
opensolaris.org (preferred) http://pkg.opensolaris.org:80/
blastwave.org http://blastwave.network.com:10000/
sunfreeware.com http://pkg.sunfreeware.com:9000/
# pkg refresh --full

uh?:

# pkg info -l pkg:/openoffice@2.4.0-0.86
Name: openoffice
Summary: Base module for OpenOffice.org 2.4
State: Installed
Authority: opensolaris.org (preferred)
Version: 2.4.0
Build Release: 5.11
Branch: 0.86
Packaging Date: Thu Apr 24 10:48:39 2008
Size: 420.6 MB
FMRI: pkg:/openoffice@2.4.0,5.11-0.86:20080424T104839Z


# pkg info -r pkg:/openoffice@2.4.0-0.86
Name: openoffice
Summary: Base module for OpenOffice.org 2.4
State: Not installed
Authority: opensolaris.org (preferred)
Version: 2.4.0
Build Release: 5.11
Branch: 0.86
Packaging Date: Mon Apr 28 16:36:48 2008
Size: 420.6 MB
FMRI: pkg:/openoffice@2.4.0,5.11-0.86:20080428T163648Z

I wonder why the build release does not increment… oh, well, it does not do it even for entire it does seem…

updating the system:

# pkg image-update -n -v
Before evaluation:
UNEVALUATED:
+pkg:/entire@0.5.11,5.11-0.86:20080504T125439Z

After evaluation:
pkg:/entire@0.5.11,5.11-0.86:20080426T182618Z -> pkg:/entire@0.5.11,5.11-0.86:20080504T125439Z
None
# pkg image-update -v
Before evaluation:
UNEVALUATED:
+pkg:/entire@0.5.11,5.11-0.86:20080504T125439Z

After evaluation:
pkg:/entire@0.5.11,5.11-0.86:20080426T182618Z -> pkg:/entire@0.5.11,5.11-0.86:20080504T125439Z
None
PHASE ACTIONS
Update Phase 1/1
Install Phase 3/3
A clone of opensolaris exists and has been updated and activated. On next boot the Boot Environment opensolaris-1 will be mounted on '/'. Reboot when ready to switch to this updated BE.
# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 3.18G 14.0G 56.5K /rpool
rpool@install 18.5K - 55K -
rpool/ROOT 2.95G 14.0G 18K /rpool/ROOT
rpool/ROOT@install 15K - 18K -
rpool/ROOT/opensolaris 233K 14.0G 2.12G legacy
rpool/ROOT/opensolaris-1 2.95G 14.0G 2.12G legacy
rpool/ROOT/opensolaris-1@install 352M - 2.22G -
rpool/ROOT/opensolaris-1@static:-:2008-05-10-22:50:27 44.0M - 2.12G -
rpool/ROOT/opensolaris-1/opt 450M 14.0G 450M /opt
rpool/ROOT/opensolaris-1/opt@install 121K - 3.61M -
rpool/ROOT/opensolaris-1/opt@static:-:2008-05-10-22:50:27 0 - 450M -
rpool/ROOT/opensolaris/opt 0 14.0G 450M /opt
rpool/export 233M 14.0G 19K /export
rpool/export@install 15K - 19K -
rpool/export/home 233M 14.0G 233M /export/home
rpool/export/home@install 19K - 21K -

interesting links:

how to create your own ips repository, some primers from the os people, either in plain old html, o as a screencast. And here there’s even more links.

3 Responses to “Quick OpenSolaris pkg howto”

  1. Thanks, it’s a very usefull page! I’ll keep an offline copy as reference😉.

  2. Figure out how to make use of Search engine optimisation plugin…

    […]Quick OpenSolaris pkg howto « I see 0xDEAD disks[…]…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: