Tuesday Apr 29, 2014

New in IPS Documentation for Oracle Solaris 11.2

Documentation of the Image Packaging System on docs.oracle.com is in three books. All three books contain new information for the Oracle Solaris 11.2 release.

See also Tim Foster's Web Log


  • New pkg/mirror service
  • New pkg/depot service
  • New chapter about web server configuration, including a new section about configuring https access
  • New pkgrecv --clone option
  • New pkg install and pkg update troubleshooting section
  • New chapter about updating an image
  • New options for pkg subcommands:
    • -r: perform operation recursively on specified non-global zones
    • --sync-actuators: do not return until all actuators have finished
    • --ignore-missing: when updating or uninstalling, ignore packages that are not installed
  • New pkg exact-install command
  • New file attribute for setting system attributes

Copying and Creating Package Repositories in Oracle Solaris 11.2

Chapter 1, "Image Packaging System Package Repositories"
- New section about best practices

Chapter 2, "Copying IPS Package Repositories"
- Copying from a zip file (see also Release Engineering's blog) or iso file
- Using the pkgrecv command
- Using the new pkg/mirror service to automatically periodically update a repository

Chapter 3, "Providing Access To Your Repository"
- Using a ZFS share
- Using the pkg/server service

Chapter 4, "Maintaining Your Local IPS Package Repository"
- New repository update procedure
- Using the pkgrecv --clone option to clone a repository
- Using the new pkg/depot service to serve multiple repositories from a single location

Chapter 5, "Running the Depot Server Behind a Web Server"
- Caching, load balancing
- New section about configuring HTTPS repository access

Adding and Updating Software in Oracle Solaris 11.2

Chapter 1, "Introduction to the Image Packaging System"
- Incorporations and group packages, FMRIs, images

Chapter 2, "Getting Information About Software Packages"
- Packages that can be installed
- Package descriptions, licenses, dependencies, dependents
- Searching for packages

Chapter 3, "Installing and Updating Software Packages"
- New options for pkg subcommands regarding non-global zones, SMF actuators, and ignoring missing packages in a pkg update or uninstall
- New pkg exact-install command (see also Bart's blog)
- Updated information about non-global zones

Chapter 4, "Updating or Upgrading an Oracle Solaris Image"
- Ways to control the version to which to upgrade, including creating a custom incorporation package

Chapter 5, "Configuring Installed Images"
- Configuring publishers
- Variants and facets
- Freezing
- Incorporation constraints
- Mediations
- Groups

Appendix A, "Troubleshooting Package Installation and Update"
- All new - Begins with steps you should always do and then is organized by error message

Appendix B, "IPS Graphical User Interfaces"
- Package Manager and Package Update

Packaging and Delivering Software With the Image Packaging System in Oracle Solaris 11.2

Chapter 1, "IPS Design Goals, Concepts, and Terminology"
- General information about software self-assembly and package lifecycle
- Definitions, package components
- New file attribute, sysattr, for setting system attributes

Chapter 2, "Packaging Software With IPS"
- Updated procedures for publishing and delivering your package

Chapter 3, "Installing, Removing, and Updating Software Packages"
- How this works in the Image Packaging System

Chapter 4, "Specifying Package Dependencies"
- New firmware value for the fmri attribute of the origin dependency for specifying driver firmware compatibility

Chapter 5, "Allowing Variations"
- Variants and facets

Chapter 6, "Modifying Package Manifests Programmatically"
- Using pkgmogrify

Chapter 7, "Automating System Change as Part of Package Installation"
- Specifying actuators on package actions
- Delivering SMF services in IPS packages
- New or updated examples of a run-once service and a self-assembly service

Chapter 8, "Advanced Topics For Package Updating"
- Renaming, merging, splitting, obsoleting packages
- New or updated examples of preserving editable packaged content, preserving unpackaged content, sharing content across boot environments, overlaying files, and delivering a mediation

Chapter 9, "Signing IPS Packages"

Chapter 10, "Handling Non-Global Zones"

Chapter 11, "Modifying Published Packages"

Appendix A, "Classifying Packages"

Appendix B, "How IPS Is Used To Package the Oracle Solaris OS"


Wednesday Dec 12, 2012

Oracle Solaris 11 pkg fix

Bob Netherton explains why Solaris 11 pkg fix is his new friend.

"So far so good. Then comes an oops... This is where you generally say a few things to yourself, and then promise to quit deleting configuration files and directories when you don't know what you are doing. Then you recall that the new Solaris 11 packaging system has some ability to correct common mistakes (like the one I just made)."

[Read More]

Thursday Dec 16, 2010

Obsolete Packages

In my previous entry I talked about packages that were not brought forward into the Solaris 11 Express repository. However, those packages are still available and can be installed from the opensolaris.org repository.

There's another category of packages that have technically been brought forward into the Solaris 11 Express repository, but for various reasons are now marked as obsolete. You can read a nice write-up of what it means to obsolete a package, but basically the design is to intentionally mark that a particular package is no longer supplied by the repository.

The primary difference is that a "missing" package is left untouched when the system is updated. An obsolete package will be uninstalled (if possible) when the system is updated.

There are a couple of ways to see the packages that are obsolete. Using pkg search:

bleonard@solaris:~$ pkg search ::pkg.obsolete: 
pkg.obsolete set    true  pkg:/SUNWinleu@0.5.11-0.130
pkg.obsolete set    true  pkg:/SUNWsfwhea@0.5.11-0.130
pkg.obsolete set    true  pkg:/SUNWupdatemgr@0.5.11-0.130
pkg.obsolete set    true  pkg:/database/postgres-83/documentation@8.3.11-0.146
pkg.obsolete set    true  pkg:/SUNWcleue@0.5.11-0.130
pkg.obsolete set    true  pkg:/SUNWpostgr-82-client@8.2.15-0.146

Or using pkg list with a grep on the o flag:

bleonard@solaris:~$ pkg list -a | grep -e '[-u]-[o]--' FSWfontconfig-devel-docs 0.5.11-0.130 known --o-- FSWxorg-devel-docs 0.5.11-0.130 known --o-- FSWxwpft 0.5.11-0.130 known --o-- OSOLvpanels-hypervisor 0.5.11-0.151 known --o-- OSOLvpanels-mysql 0.5.11-0.130 known --o-- ... 

I mention all of this because packages that are obsolete have some interesting side effects. The highest profile obsolete package is PostgreSQL, and you'll note it's marked Obsolete in the output of pkg info:

bleonard@solaris:~$ pkg info -r pkg://solaris/database/postgres-84
          Name: database/postgres-84
         State: Not installed (Obsolete)
     Publisher: solaris
       Version: 8.4.4
 Build Release: 5.11
        Branch: 0.146
Packaging Date: October 27, 2010 06:31:28 PM 
          Size: 0.00 B
          FMRI: pkg://solaris/database/postgres-84@8.4.4,5.11-0.146:20101027T183128Z

And if you try to install it, you get a somewhat obscure error message:

bleonard@solaris:~$ sudo pkg install pkg://solaris/database/postgres-84
No updates necessary for this image.

The message is a little more clear if you try to install a package that depends on a package that's been marked as obsolete (I'm not aware of any such packages currently in the solaris release repository, so this example's using the opensolaris.org repository):

bleonard@solaris:~$ sudo pkg install amp-dev
Creating Plan \\pkg: No version of amp-dev can be installed:
pkg://opensolaris.org/amp-dev@0.5.11,5.11-0.86:20080424T113414Z: Required dependency pkg:/SUNWphp524-pgsql@5.2.4,5.11-0.86 is obsolete

I already mentioned an obsolete package will be uninstalled (if possible) when the system is updated. The if possible part is key, and it did trip up several folks trying to upgrade from OpenSolaris to Solaris 11 Express. The assumption is made that if you have a package installed that has not been marked as obsolete (such as amp-dev) that depends on a package that's been marked as obsolete (such as SUNWphp52-pgsql), you still depend on the functionality provided by the dependent package and the update is prevented.

I don't have insight as to why a particular package is marked as obsolete, however, I would assume most of it has to do with support (everything in the solaris release repository is supported). My primary point here was to shed some additional light on the concept of an obsolete package.

Wednesday Oct 06, 2010

IPS Search and Actions

When searching for an IPS package, I usually type something quick and simple like:

bleonard@opensolaris:~$ pkg search netbeans
INDEX      ACTION    VALUE                     PACKAGE
description set       NetBeans                  pkg:/libnb-php@6.5.1-0.111
description set       NetBeans                  pkg:/libnb-groovy@6.5-0.86
description set       NetBeans                  pkg:/netbeans-java@6.5.1-0.111

And scroll through the result list hoping to find what I'm looking for. However, in my example above, that's 437 lines!

bleonard@opensolaris:~$ pkg search netbeans | wc -l

Often times I'll shorten the list by grepping for my build:

bleonard@opensolaris:~$ pkg search netbeans | grep 111
description set       NetBeans                  pkg:/libnb-php@6.5.1-0.111
description set       NetBeans                  pkg:/netbeans-java@6.5.1-0.111
description set       NetBeans                  pkg:/libnb-visualweb@6.5.1-0.111

Which reduces the list down to 134 for this example:

bleonard@opensolaris:~$ pkg search netbeans | grep 111 | wc -l

However, I generally tend to ignore the first two columns, INDEX and ACTION. Actions, in the case of IPS, are actually nouns and not verbs as the name would lead you to expect. Actions are the things that get installed (files, directories, links, drivers, licenses, users, groups, etc). Here's a nice description of the Actions in IPS.

When you perform a search, the search string is checked against all of these actions types, which as seen above, can produce a lot of results. For example, 5 of the 134 results above all refer to the same package, pkg:/sunstudioexpress@0.2009.3.1:

bleonard@opensolaris:~$ pkg search netbeans | grep 111 | grep pkg:/sunstudioexpress@0.2009.3.1
basename   dir       opt/SunStudioExpress/prod/nb-dbxtool/ide10/docs/org/netbeans pkg:/sunstudioexpress@0.2009.3.1-0.111
basename   dir       opt/netbeans-6.5ss/ide10/docs/org/netbeans pkg:/sunstudioexpress@0.2009.3.1-0.111
basename   file      opt/SunStudioExpress/prod/nb-dbxtool/bin/netbeans pkg:/sunstudioexpress@0.2009.3.1-0.111
basename   file      opt/netbeans-6.5ss/bin/netbeans pkg:/sunstudioexpress@0.2009.3.1-0.111
basename   link      opt/SunStudioExpress/netbeans pkg:/sunstudioexpress@0.2009.3.1-0.111

That's because the search results are returning 3 directories, 2 files and 1 link, all in the same package, that contain the search string "netbeans".

If you just want to see a list packages that match the search string, use the -p option.

bleonard@opensolaris:~$ pkg search -p netbeans | grep 111 
pkg:/amp-dev@0.5.11-0.111 (opensolaris.org)
pkg:/developer/netbeans/plugin/nb-dtrace@1.0-0.111 (opensolaris.org)
pkg:/developer/sunstudio12u1@12.1.1-0.111 (opensolaris.org)

This returns a much more reasonable 60 results with just the package names, making the result list much more easier to read through. I wish -p was the default option, rather than the -a (which shows the matching actions).

Friday Aug 06, 2010

Distribution Constructor

One of the features that shipped with OpenSolaris 2008.11 was the ability to create your own custom distributions of the product. This is pretty powerful if you want to deploy OpenSolaris throughout your organization tailored to your users' needs. [Read More]

Friday Feb 12, 2010

Correctly Setting Up the Development Repository

OpenSolaris comes with a single repository configured, known as the release repository: http://pkg.opensolaris.org/release. The packages in the release repository are updated roughly every 6 months when a new release of OpenSolaris occurs, that last being OpenSolaris 2009.06 (June 2009).

Meanwhile, development toward the next release of OpenSolaris is happening at a rapid pace. For those of you unwilling to wait for next scheduled release, you have the option of upgrading to a development build of OpenSolaris, which is produced every 2 weeks (the development repository is updated roughly 10 days after the wod of stuff (WOS) build - see the WOS schedule).

Understandably, the development build will not have gone through the same quality assurance process as the release build, so be sure to read the release notes and expect some bumps along the way.

If you're going to update to a development build, it's important to note that as of build 127, you can no longer assign random names to the repositories (see bug 11532). The publisher name must match that which is set in the repository, and for the http://pkg.opensolaris.org/dev/ repository, the publisher name is opensolaris.org.

If you're on a build prior to 127, it's not uncommon to find yourself with a setup like the following:

bleonard@os200906:~$ pkg publisher
PUBLISHER                             TYPE     STATUS   URI
dev                      (preferred)  origin   online   http://pkg.opensolaris.org/dev/
opensolaris.org                       origin   online   http://pkg.opensolaris.org/release/
To fix this erroneous configuration, just correctly set opensolaris.org as the preferred publisher pointing to the development repository:
bleonard@os200906:~$ pfexec pkg set-publisher -PO http://pkg.opensolaris.org/dev/ opensolaris.org

Then remove the incorrectly named development publisher:

bleonard@os200906:~$ pfexec pkg unset-publisher dev

And now your development repository is correctly configured:

bleonard@os200906:~$ pkg publisher
PUBLISHER                             TYPE     STATUS   URI
opensolaris.org                       origin   online   http://pkg.opensolaris.org/dev/

Note, when build 133 comes out, you will no longer have to specify a publisher name when setting a publisher. The new syntax will be as follows:
pkg set-publisher -p http://pkg.opensolaris.org/dev

Friday Jan 29, 2010

Updating To A Specific Development Build

The development builds of OpenSolaris provide access to some great new features, but they also commonly bring with them some great new headaches. Fortunately, OpenSolaris' boot environments make it easy to get back on your feet.  However, that doesn't help you get any closer to that great new feature.

A common question on the various help aliases is how to upgrade to a specific development build of OpenSolaris? The pkg image-update command currently doesn't address this, but there's and enhancement request in to solve it: pkg image-update should provide the possibility to specify a build.

In that enhancement request you'll find a workaround, which I'll walk through in more detail here.[Read More]

Thursday Oct 01, 2009

Screencast: Configuring a Local IPS Repository Mirror

I've had my local IPS repository mirror running for about 1 month now and I find it extremely beneficial. So much so that I've gone ahead and produced a short 6 minute screencast on the process of creating it.

[Read More]

Thursday Sep 10, 2009

NetBeans Python Editor

NetBeans 6.7, released earlier this summer, has a pretty nifty Python editor. To give it a spin a decided to set up a project for the Image Packaging System. If you want to try it yourself, here's the steps I took:[Read More]

Wednesday Sep 09, 2009

IPS Cache

[Read More]

Friday Jul 31, 2009

Local Repository Mirror

In my previous entry I wrote about creating a portable version of the repository using a USB stick. That option is great for taking the repository on the road; however, a more practical use of this repository image to many of you may be setting up a local mirror. In this situation, you get the best of both words - fast access to the repository with continued access to updates as they become available.

[Read More]

Repo on a Stick

A snapshot of the OpenSolaris release repository has been made available for download as an ISO image, where it can be mounted directly or transfered to a USB stick. This will certainly come in handy if you plan to travel somewhere with limited network access but would like access to the repository. In this entry I'll review setting up a USB stick, which gives you a portable repository.[Read More]

Tuesday Sep 09, 2008

NetBeans 6.1

NetBeans 6.5 o the IPS repository:

bleonard@opensolaris:~$ pkg info -r netbeans
          Name: netbeans
       Summary: Open-source Integrated Development Environment for enterprise, web and mobile applications in Java, C/C++, and Ruby
      Category: Development/Integrated Development Environments
         State: Not installed
     Authority: opensolaris.org
       Version: 6.5
 Build Release: 5.11
        Branch: 0.86
Packaging Date: Thu Dec  4 03:56:43 2008
          Size: 2.84 MB
          FMRI: pkg:/netbeans@6.5,5.11-0.86:20081204T035643Z

To install it:

bleonard@opensolaris:~$ pfexec pkg install netbeans
DOWNLOAD                                    PKGS       FILES     XFER (MB)
Completed                                  20/20   4669/4669 309.90/309.90 

PHASE                                        ACTIONS
Install Phase                              5921/5921 
PHASE                                          ITEMS
Reading Existing Index                           8/8 
Indexing Packages                              20/20 

And to start it:

Tuesday Aug 12, 2008

Querying IPS Package Contents

Kuldip Oberoi pointed out to me that because not all tokens are searched by pkg search, the results might not always list all packages of interest. 

[Read More]

Wednesday Jun 25, 2008

Updating OpenOffice

OpenOffice is not included in the base installation of OpenSolaris 2008.05 (there's only so much we can fit on a CD), however, it is available via the Package Manager, which I have gone ahead and installed.

[Read More]

The Observatory is a blog for users of Oracle Solaris. Tune in here for tips, tricks and more as we explore the Solaris operating system from Oracle.

Connect with Oracle Solaris:


« March 2015