Go to main content

Packaging and Delivering Software With the Image Packaging System in Oracle® Solaris 11.3

Exit Print View

Updated: July 2017
 
 

Republishing Packages

IPS enables you to easily republish an existing package with your modifications, even if you did not originally publish the package. You can also republish new versions of the modified package so that pkg update continues to work as users expect.

Use the following steps to modify and republish a package:

  1. Use pkgrecv(1) to download the package to be republished in a raw format to a specified directory. All of the files are named by their hash value, and the manifest is named manifest. Remember to set any required proxy configuration in the http_proxy environment variable.

  2. Use pkgmogrify(1) to make the necessary modifications to the manifest. See Add Necessary Metadata to the Generated Manifest and Modifying Package Manifests Programmatically.

    • Remove any time stamp from the internal package FMRI to prevent confusion during publication.

    • Remove any signature actions.

  3. Use pkglint(1) to verify the resulting package.

  4. Use pkgsend(1) to republish the package. Republication strips the package of any signatures that are present and ignores any time stamp specified by pkg.fmri. To prevent a warning message, remove signature actions in the pkgmogrify step.

    If you do not have permission to publish to the original source of the package, use pkgrepo(1) to create a repository, and then use the following command to set the new publisher ahead of the original publisher in the publisher search order:

    $ pkg set-publisher --search-before=original_publisher new_publisher
  5. If necessary, use pkgsign(1) to sign the package. To prevent client caching issues, sign the package before you install the package, even for testing. See Signing IPS Packages.