svcadm(1M)을 검색하려면 섹션에서 1M 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
pkgmerge(1)
pkgmerge(1) User Commands pkgmerge(1)
NAME
pkgmerge - Image Packaging System package merging utility
SYNOPSIS
/usr/bin/pkgmerge [-n] -d dest_repo
[-p publisher_prefix]...
-s variant=value[,...],src_repo ...
[pkg_fmri_pattern ...]
DESCRIPTION
pkgmerge is a package publication tool for creating multi-variant pack‐
ages. It does this by merging packages with identical names and ver‐
sions (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 repos‐
itory. 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 mani‐
fest 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.
OPTIONS
The following options are supported:
-?
--help
Display a usage message.
-d dest_repo
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.
-n
Perform a trial run with no changes made to the target repository.
-p publisher_prefix
Specify the name of the publisher from which to merge packages.
This option can be specified multiple times.
By default, packages from all publishers in all source repositories
are merged.
-s variant=value[,...],src_repo
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 multi‐
ple times.
OPERANDS
The following operand is supported:
pkg_fmri_pattern
Specifies packages to merge. The pkg_fmri_pattern operand can
include the ? and * characters as glob(3C)-style wildcards to match
one or more packages.
ENVIRONMENT VARIABLES
The following environment variable is supported:
TMPDIR 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.
EXAMPLES
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
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
EXIT STATUS
The following exit values are returned:
0 Command succeeded.
1 An error occurred.
2 Invalid command line options were specified.
99 An unanticipated exception occurred.
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
TRIBUTE VALUE _ Availabilitypackage/pkg _ Interface StabilityUncommit‐
ted
SEE ALSO
pkgrepo(1), pkg(7)
Packaging and Delivering Software With the Image Packaging System in
Oracle Solaris 11.4
https://github.com/oracle/solaris-ips
Oracle Solaris 11.4 14 Nov 2013 pkgmerge(1)