Skip Navigation Links | |
Exit Print View | |
man pages section 1: User Commands Oracle Solaris 11.1 Information Library |
- Image Packaging System package merging utility
/usr/bin/pkgmerge [-n] -d dest_repo -s variant=value[,...],src_repo ... [pkg_fmri_pattern ...]
pkgmerge is a package publication tool for creating multi-variant packages. It does this by merging packages with identical names and versions (excluding time stamp), tagging actions that are unique in the versions being merged with the specified variant name and value for the given source, and then publishing the new packages to the target repository. Only the newest version of every package from each source is used.
If an action has the attribute pkg.merge.blend set to the name of the variant being merged, that action is copied to the other manifests prior to merging so that the action appears without any added variant tags in the final output. Note that the attribute pkg.merge.blend itself is removed from any actions in the output manifest. This attribute can be repeated with different values for multiple pass merges.
Non-identical actions that deliver to the same path in an input manifest result in pkgmerge exiting with an error.
The following options are supported:
Display a usage message.
Specify the file system path or URI of the target repository to publish the merged packages to. The target repository must already exist. New repositories can be created using pkgrepo.
Perform a trial run with no changes made to the target repository.
Specify the variant name and value to use for packages from this source, followed by the file system path or URI of the source repository or package archive to retrieve packages from. Multiple variants can be specified separated by commas. The same variants must be named for all sources. This option can be specified multiple times.
The following environment variable is supported:
The absolute path of the directory where temporary data should be stored during program execution. If not set, the default is to store temporary data in /var/tmp.
Example 1 Specify Variant Name and Value
Tag each package found in the specified source with the given variant name and value specified for the source it was retrieved from:
$ pkgmerge -s arch=sparc,http://src.example.com \ -d http://dest.example.com
Sample package:
set name=pkg.fmri value=pkg://example.com/foo@5.11,5.11-0.200:20381001T163427Z dir group=sys mode=0755 owner=root path=usr
Sample package after operation:
set name=pkg.fmri value=pkg://example.com/foo@5.11,5.11-0.200:20381001T163427Z set name=variant.arch value=sparc dir group=sys mode=0755 owner=root path=usr
Example 2 Merge and Publish Packages
Merge the newest version of each package from the given sources and publish the new packages to the target repository:
$ pkgmerge -s arch=sparc,http://src1.example.com \ -s arch=i386,http://src2.example.com \ -d /path/to/target/repository
Sample package from source 1 (SPARC):
set name=pkg.fmri value=pkg://example.com/foo@5.11,5.11-0.200:20381001T121410Z file id mode=0555 owner=root group=bin path=usr/bin/foo dir group=sys mode=0755 owner=root path=usr
Sample package from source 2 (i386):
set name=pkg.fmri value=pkg://example.com/foo@5.11,5.11-0.200:20381001T163427Z file id mode=0555 owner=root group=bin path=usr/bin/foo dir group=sys mode=0755 owner=root path=usr
Merged package:
set name=pkg.fmri value=pkg://example.com/foo@5.11,5.11-0.200:20381001T163427Z set name=variant.arch value=sparc value=i386 file id mode=0555 owner=root group=bin path=usr/bin/foo variant.arch=sparc file id mode=0555 owner=root group=bin path=usr/bin/foo variant.arch=i386 dir group=sys mode=0755 owner=root path=usr
Example 3 Merge Debug and Non-Debug Packages for i386 and SPARC Systems
Merge the newest version of each package in a set of debug and non-debug repositories for i386 and SPARC systems:
$ pkgmerge -s arch=sparc,debug=false,/repo/sparc-nondebug \ -s arch=sparc,debug=true,/repo/sparc-debug \ -s arch=i386,debug=false,/repo/i386-nondebug \ -s arch=i386,debug=true,/repo/i386-debug \ -d /path/to/target/repository
Sample package from source 1 (SPARC non-debug):
set name=pkg.fmri value=pkg://example.com/foo@5.11,5.11-0.200:20381001T121410Z file id mode=0555 owner=root group=bin path=usr/bin/foo dir group=sys mode=0755 owner=root path=usr
Sample package from source 2 (SPARC debug):
set name=pkg.fmri value=pkg://example.com/foo@5.11,5.11-0.200:20381001T121411Z file id mode=0555 owner=root group=bin path=usr/bin/foo dir group=sys mode=0755 owner=root path=usr
Sample package from source 3 (i386 non-debug):
set name=pkg.fmri value=pkg://example.com/foo@5.11,5.11-0.200:20381001T163427Z file id mode=0555 owner=root group=bin path=usr/bin/foo dir group=sys mode=0755 owner=root path=usr
Sample package from source 4 (i386 debug):
set name=pkg.fmri value=pkg://example.com/foo@5.11,5.11-0.200:20381001T163428Z file id mode=0555 owner=root group=bin path=usr/bin/foo dir group=sys mode=0755 owner=root path=usr
Merged package:
set name=pkg.fmri value=pkg://example.com/foo@5.11,5.11-0.200:20381001T163428Z set name=variant.arch value=sparc value=i386 set name=variant.debug value=false value=true file id mode=0555 owner=root group=bin path=usr/bin/foo variant.arch=sparc variant.debug=false file id mode=0555 owner=root group=bin path=usr/bin/foo variant.arch=sparc variant.debug=true file id mode=0555 owner=root group=bin path=usr/bin/foo variant.arch=i386 variant.debug=false file id mode=0555 owner=root group=bin path=usr/bin/foo variant.arch=i386 variant.debug=true dir group=sys mode=0755 owner=root path=usr
Example 4 Merge Using pkg.merge.blend
Merge packages for two architectures that do not collide, using the pkg.merge.blend attribute.
$ pkgmerge -s arch=sparc,http://src1/example.com \ -s arch=i386,http://src2.example.com \ -d /path/to/target/repository
Sample package from source 1 (SPARC):
set name=pkg.fmri value=pkg://example.com/foo@5.11,5.11-0.200:20381001T121410Z file 1d5eac1aab628317f9c088d21e4afda9c754bb76 mode=0555 owner=root \ group=bin path=usr/bin/sparc/foo pkg.merge.blend=arch file d285ada5f3cae14ea00e97a8d99bd3e357caadc0 mode=0555 owner=root \ group=bin path=usr/bin/foo dir group=sys mode=0755 owner=root path=usr
Sample package from source 2 (i386):
set name=pkg.fmri value=pkg://example.com/foo@5.11,5.11-0.200:20381001T163427Z file a285ada5f3cae14ea00e97a8d99bd3e357cb0dca mode=0555 owner=root \ group=bin path=usr/bin/i386/foo pkg.merge.blend=arch file d285ada5f3cae14ea00e97a8d99bd3e357caadc0 mode=0555 owner=root \ group=bin path=usr/bin/foo dir group=sys mode=0755 owner=root path=usr
Merged package:
set name=pkg.fmri value=pkg://example.com/foo@5.11,5.11-0.200:20381001T163427Z set name=variant.arch value=sparc value=i386 file d285ada5f3cae14ea00e97a8d99bd3e357caadc0 mode=0555 owner=root \ group=bin path=usr/bin/foo file a285ada5f3cae14ea00e97a8d99bd3e357cb0dca mode=0555 owner=root \ group=bin path=usr/bin/i386/foo file 1d5eac1aab628317f9c088d21e4afda9c754bb76 mode=0555 owner=root \ group=bin path=usr/bin/sparc/foo dir group=sys mode=0755 owner=root path=usr
The following exit values are returned:
Command succeeded.
An error occurred.
Invalid command line options were specified.
An unanticipated exception occurred.
See attributes(5) for descriptions of the following attributes:
|
http://hub.opensolaris.org/bin/view/Project+pkg/