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.1     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

1.  IPS Design Goals, Concepts, and Terminology

2.  Packaging Software With IPS

3.  Installing, Removing, and Updating Software Packages

4.  Specifying Package Dependencies

5.  Allowing Variations

6.  Modifying Package Manifests Programmatically

Transform Rules

Include Rules

Transform Order

Packaged Transforms

7.  Automating System Change as Part of Package Installation

8.  Advanced Topics For Package Updating

9.  Signing IPS Packages

10.  Handling Non-Global Zones

11.  Modifying Published Packages

A.  Classifying Packages

B.  How IPS Is Used To Package the Oracle Solaris OS

Transform Rules

This section shows an example transform rule and describes the parts of all transform rules.

In Oracle Solaris, files delivering in a subdirectory named kernel are treated as kernel modules and are tagged as requiring a reboot. The following tag is applied to actions whose path attribute value includes kernel:

reboot-needed=true

To apply this tag, the following rule is specified in the pkgmogrify rule file:

<transform file path=.*kernel/.+ -> default reboot-needed true>
delimiters

The rule is enclosed with < and >. The portion of the rule to the left of the -> is the selection section or matching section. The portion to the right of the -> is the execution section of the operation.

transform

The type of the rule.

file

Apply this rule only to file actions. This is called the selection section of the rule.

path=.*kernel/.+

Transform only file actions with a path attribute that matches the regular expression path=.*kernel/.+. This is called the matching section of the rule.

default

Add the attribute and value that follow default to any matching action that does not already have a value set for that attribute.

reboot-needed

The attribute being set.

true

The value of the attribute being set.

The selection or matching section of a transform rule can restrict by action type and by action attribute value. See the pkgmogrify man page for detail about how these matching rules work. Typical uses are for selecting actions that deliver to specified areas of the file system. For example, in the following rule, operation could be used to ensure that usr/bin and everything delivered inside usr/bin defaults to the correct user or group.

<transform file dir link hardlink path=usr/bin.* -> operation>

The pkgmogrify(1) man page describes the many operations that pkgmogrify can perform to add, remove, set, and edit action attributes as well as add and remove entire actions.