Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to Minimize the Size of Your Oracle Solaris IPS Package Repository

Joost PronkvH-OracleAug 21 2015 — edited Jul 25 2018

How to Minimize the Size of Your Oracle Solaris IPS Package Repository

by Alta Elstad

This article describes the minimal recommended local Image Packaging System (IPS) package repository for Oracle Solaris operating system packages.

Table of Contents
How to Minimize Your Local Repository
How to Replace the Current Repository with the New Repository
How Not to Minimize Your Local Repository
See Also
About the Author

How to Minimize Your Local Repository

The most complete package repository you can create for the Oracle Solaris OS is to copy the Oracle Solaris support repository. The support repository fully supports all versions of Oracle Solaris since Oracle Solaris 11 11/11 and is commensurately large. If you no longer need to support older OS versions and you want to reduce the size of your local repository, performing the following steps will give you the smallest recommended repository for Oracle Solaris OS packages:

  1. Create a new repository that is installed using the repository files for the most recent Oracle Solaris release. These repository files can be downloaded from the Downloads tab on the Oracle Technology Network Oracle Solaris release website, from the Oracle Software Delivery Cloud, or from My Oracle Support.
  2. Add each Support Repository Update (SRU) for the release to the release repository by using the SRU repository files downloaded from My Oracle Support.

Then, when a new release of Oracle Solaris is available, create a new repository using the new repository files. To minimize disruption to clients, replace the current repository with the new repository, as described in "How to Replace the Current Repository with the New Repository." However, do not replace the current repository until you no longer need to install or update systems to a release level that is older than the release level of the new repository. The new repository supports installing new systems at the new release level and updating older systems to the new release level. The new repository does not support installing or updating systems to an older release level. See Table 1 below.

For example, if you create an Oracle Solaris 11.4 package repository from repository files, you can use this new repository to update Oracle Solaris 11.3 systems to Oracle Solaris 11.4 and to update Oracle Solaris 11.2 systems to Oracle Solaris 11.4. However, you cannot use this new Oracle Solaris 11.4 repository to update an Oracle Solaris 11.2 system to Oracle Solaris 11.3. If you create an Oracle Solaris 11.4 package repository from repository files and then add SRU2 but not SRU1, you can install or update to Oracle Solaris 11.4 and Oracle Solaris 11.4 SRU2 but not to Oracle Solaris 11.4 SRU1.

If you replace old repositories and then find that you need to install or update to an older Oracle Solaris release, you can re-create the older repository from the repository files that you saved or from older repository files downloaded from My Oracle Support, or you can install or update from the Oracle Solaris support repository.

The Oracle Solaris support repository contains all packages that Oracle published for all Oracle Solaris 11 releases. The Oracle Solaris support repository can be used to update or install a system to any Oracle Solaris 11 release level, including to any SRU level. However, a local repository created by using the Oracle Solaris support repository as the source will be many times the size of a repository created by using the repository files for a single Oracle Solaris update.

Note that the repository files for each release contain some packages from previous releases. Attempting to reduce the size of your repository by including only packages of a particular version will not result in a usable repository, due to the following:

  • Some older packages are required to support updating from older releases to the new release.
  • Some older packages are still the most current packages in the new release; they have not changed since the older release.

Table 1.  Comparing Repository Files and the Support Repository

| Source of Repository Content | Installed Repository Size | Operations Available |
| Repository files for one release. | ~9 GB | – Update from an older release to this release.
– Install this release. |
| Repository files for one SRU.

Add this content to the repository created from the associated release repository files described above. | ~2 GB | – Update from an older release to this release.
– Update from an older version to this SRU.
– Install this release.
– Install this release plus this SRU. |
| Oracle Solaris support repository. | >130 GB | – Update to any release or SRU.
– Install any release plus any SRU. |

How to Replace the Current Repository with the New Repository

Use the following steps to minimize disruption to clients. With this procedure, the update takes place out of sight, the actual replacement is fast, and clients do not need to change their solaris publisher origin or add a new origin.

  1. (Optional) Copy the current repository to other storage where space is not a problem. If you skip this step, you can rely on repository files that you saved or older repository files downloaded from My Oracle Support, or you can install or update clients from the Oracle Solaris support repository.

  2. Create a snapshot of the current repository.

    Note: If you are going to keep the snapshot, use the version number of the newest version of entire in the repository, instead of just using old.

    # zfs snapshot rpool/export/repos/solaris@old
    
  3. Clone the snapshot.

    # zfs clone rpool/export/repos/solaris@old rpool/export/repos/solaris_new
    
  4. Delete the solaris repository content from the clone. Do not delete all content from the clone; delete only the content under the publisher/solaris directory.

    # rm -rf /export/repos/solaris_new/publisher/solaris/*
    
  5. Use the new repository files to repopulate the clone according to the instructions for those repository files.

  6. Replace the current working repository with the new repository.

    # svcadm disable -st pkg/server:default# zfs promote rpool/export/repos/solaris_new# zfs rename rpool/export/repos/solaris rpool/export/repos/solaris_old# zfs rename rpool/export/repos/solaris_new rpool/export/repos/solaris
    
  7. Verify the new repository, update the catalog, restart the pkg/server service, and destroy the old repository. Optionally, destroy the snapshot.

    # pkgrepo verify -s /export/repos/solaris# pkgrepo refresh -s /export/repos/solaris# svcadm restart pkg/server:default# zfs destroy rpool/export/repos/solaris_old
    

How Not to Minimize Your Local Repository

You cannot successfully minimize your repository by pruning a larger repository.

  • Do not delete from a repository packages that were delivered by Oracle.
  • Do not create a repository by installing just a subset of packages. When you use pkgrecv, specify '*' for the _fmri_ argument. Later releases require some packages from earlier releases, and some packages that you need might use a different version numbering system.

See Also

The following resources have more information and best practices about IPS package repositories:

About the Author

Alta Elstad is a technical writer supporting Oracle Solaris 11 packaging.

| Revision 1.1, 07/25/2018 |
| Revision 1.0, 09/09/2015 |

Follow us:
Blog | Facebook | Twitter | YouTube

Comments

Post Details

Added on Aug 21 2015
0 comments
11,308 views