PKGMERGE(1) | User Commands | PKGMERGE(1) |
pkgmerge
— Image
Packaging System package merging utility
pkgmerge |
[-n ] -d
dest_repo [-p
publisher_prefix]...
-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.
After a pkgmerge
operation, if
your destination repository must support
pkg search
operations, run
pkgrepo
refresh on the repository to update search indexes.
The following options are supported:
--help
,
-?
-d
dest_repo-n
-p
publisher_prefixBy default, packages from all publishers in all source repositories are merged.
-s
variant=value[,...],src_repo ...The following operand is supported:
The following environment variable is supported:
TMPDIR
The following exit values are returned:
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/foo@5.11,200:20381001T163427Z dir group=sys mode=0755 owner=root path=usr
Sample package after operation:
set name=pkg.fmri value=pkg://example/foo@5.11,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
Example 5 Merge Packages With Different Publisher Prefixes
Merge only packages with the dev prefix, even though other packages in these repositories have the example.com prefix.
pkgmerge -p dev -s arch=sparc,http://src1.example.com \ -s arch=i386,http://src2.example.com \ -d /path/to/target/repository
February 17, 2022 | OmniOS |