JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Packaging and Delivering Software With the Image Packaging System in Oracle® Solaris 11.2
Oracle Technology Network
Library
PDF
Print View
Feedback
search filter icon
search icon

Document Information

Using This Documentation

Chapter 1 IPS Design Goals, Concepts, and Terminology

Chapter 2 Packaging Software With IPS

Chapter 3 Installing, Removing, and Updating Software Packages

Chapter 4 Specifying Package Dependencies

Chapter 5 Allowing Variations

Chapter 6 Modifying Package Manifests Programmatically

Chapter 7 Automating System Change as Part of Package Installation

Chapter 8 Advanced Topics For Package Updating

Avoiding Conflicting Package Content

Renaming, Merging and Splitting Packages

Renaming a Single Package

Merging Two Packages

Splitting a Package

Obsoleting Packages

Preserving Packaged Editable Files that Migrate

Preserving Unpackaged Files

Moving Unpackaged Files on Directory Removal

Packaging the Directory Separately

How to Preserve a Directory After Content Uninstall

Sharing Content Across Boot Environments

Existing Shared Content in Oracle Solaris

Delivering Content to a Shared Area

How to Enable Your Application to Use a Shared Area

How to Migrate Unshared Content to a Shared Area

Delivering a File That Is Also Delivered by Another Package

Delivering Multiple Implementations of an Application

Attributes of Mediated Links

Specifying Mediated Links

Best Practices for Mediated Links

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

Delivering a File That Is Also Delivered by Another Package

You might want to use an IPS package to provide a customized version of a file that is already delivered by another package. By default, only one IPS package can deliver a file to any particular location. To use an IPS package to deliver a custom version of a file that is delivered by another IPS package, make sure the following attributes are set on the file action:

See the descriptions of the overlay and preserve attributes in File Actions.

The version of the file with the overlay=true attribute replaces the version with the overlay=allow attribute, and the version of the file with the overlay=allow attribute is saved in /var/pkg/lost+found/.

For example, suppose you install a package named isvapp that has the following file action:

file opt/isvapp/isvconf path=opt/isvapp/isvconf owner=root group=bin mode=0644 \
    overlay=allow preserve=true

The package installs the following file:

-rw-r--r--   1 root     bin        11358 Apr 17 18:44 /opt/isvapp/isvconf

You want a site-specific version of this file on all of your systems. You create a package named isvconf with the following file action to deliver the new version of the file:

file opt/isvapp/isvconf path=opt/isvapp/isvconf owner=root group=bin mode=0644 \
    overlay=true preserve=renameold

After isvconf is installed, the following files are on the system:

$ ls -l /opt/isvapp/isvconf
-rw-r--r--   1 root     bin        72157 Apr 17 18:47 /opt/isvapp/isvconf
$ ls -l /var/pkg/lost+found/opt/isvapp
total 24
-rw-r--r--   1 root     bin        11358 Apr 17 18:44 isvconf-20140417T184756Z

If you attempt to install another package, isvconf2 in this example, that would deliver a file with the same path, the installation fails with the following explanation:

Creating Plan (Checking for conflicting actions): -
pkg install: The following packages all deliver file actions to opt/isvapp/isvconf:

  pkg://site/isvconf2@1.0,5.11:20140417T190405Z
  pkg://site/isvapp@1.0,5.11:20140417T182316Z
  pkg://site/isvconf@1.0,5.11:20140417T185420Z

These packages may not be installed together. Any non-conflicting set may
be, or the packages must be corrected before they can be installed.

You can deliver a new version of the file in an update of the package that delivered the first replacement file. After isvconf@2.0 is installed, the following files are on the system:

$ ls -l /opt/isvapp/isvconf*
-rw-r--r--   1 root     bin        64064 Apr 17 18:52 /opt/isvapp/isvconf
-rw-r--r--   1 root     bin        54365 Apr 17 18:47 /opt/isvapp/isvconf.old
$ ls -l /var/pkg/lost+found/opt/isvapp
total 24
-rw-r--r--   1 root     bin        11358 Apr 17 18:44 isvconf-20140417T184756Z

The existing file was saved in isvconf.old because both of the following two conditions exist:

The lost+found area has not changed and still contains the original file delivered by isvapp.