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


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

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

Republishing Packages

Changing Package Metadata

Changing Package Publisher

A.  Classifying Packages

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

Changing Package Publisher

Another common use case is to republish packages under a new publisher name. One case when this is useful is to consolidate packages from multiple repositories into a single repository. For example, you might want to consolidate packages from repositories of several different development teams into a single repository for integration testing.

To republish under a new publisher name, use the pkgrecv, pkgmogrify, pkgrepo, and pkgsend steps shown in the previous example.

The following sample transform changes the publisher to mypublisher:

<transform set name=pkg.fmri -> edit value pkg://[^/]+/ pkg://mypublisher/>

You can use a simple shell script to iterate over all packages in the repository. Use the output from pkgrecv --newest to process only the newest packages from the repository.

The following script saves the above transform in a file named change-pub.mog, and then republishes from development-repo to a new repository mypublisher, changing the package publisher along the way:

pkgrepo create mypublisher
pkgrepo -s mypublisher set publisher/prefix=mypublisher
mkdir incoming
for package in $(pkgrecv -s ./development-repo --newest); do
    pkgrecv -s development-repo -d incoming --raw $package
for pdir in incoming/*/* ; do
    pkgmogrify $pdir/manifest change-pub.mog > $pdir/manifest.newpub
    pkgsend -s mypublisher publish -d $pdir $pdir/manifest.newpub

This script could be modified to do tasks such as select only certain packages, make additional changes to the versioning scheme of the packages, and show progress as it republishes each package.