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.
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:
- 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.
- 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.
|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.
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.
- (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.
- 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
entirein the repository, instead of just using
# zfs snapshot rpool/export/repos/solaris@old
- Clone the snapshot.
# zfs clone rpool/export/repos/solaris@old rpool/export/repos/solaris_new
- Delete the
solarisrepository content from the clone. Do not delete all content from the clone; delete only the content under the
# rm -rf /export/repos/solaris_new/publisher/solaris/*
- Use the new repository files to repopulate the clone according to the instructions for those repository files.
- 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
- Verify the new repository, update the catalog, restart the
pkg/serverservice, 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
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
fmriargument. Later releases require some packages from earlier releases, and some packages that you need might use a different version numbering system.
The following resources have more information and best practices about IPS package repositories:
- Copying and Creating Package Repositories in Oracle Solaris 11
- Lifecycle Management page, which contains links to other articles about IPS
Alta Elstad is a technical writer supporting Oracle Solaris 11 packaging.
|Revision 1.1, 07/25/2018|
|Revision 1.0, 09/09/2015|