svcadm(8)을 검색하려면 섹션에서 8 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
pkgrepo(1)
pkgrepo(1) User Commands pkgrepo(1)
NAME
pkgrepo - Image Packaging System repository management utility
SYNOPSIS
/usr/bin/pkgrepo create [--version ver] uri_or_path
/usr/bin/pkgrepo add-publisher -s repo_uri_or_path
publisher ...
/usr/bin/pkgrepo remove-publisher [-n] [--synchronous]
-s repo_uri_or_path publisher ...
/usr/bin/pkgrepo get [-F format] [-H] [-p publisher]...
-s repo_uri_or_path [--key ssl_key --cert ssl_cert]...
[section/property ...]
/usr/bin/pkgrepo info [-F format] [-H] [-p publisher]...
-s repo_uri_or_path [--key ssl_key --cert ssl_cert]...
/usr/bin/pkgrepo list [-F format] [-H] [-p publisher]...
-s repo_uri_or_path [--key ssl_key --cert ssl_cert]...
[pkg_fmri_pattern ...]
/usr/bin/pkgrepo contents [-m]
[-t action_name[,action_name]...]... -s repo_uri_or_path
[--key ssl_key --cert ssl_cert]... [pkg_fmri_pattern...]
/usr/bin/pkgrepo rebuild [-p publisher]...
-s repo_uri_or_path [--key ssl_key --cert ssl_cert]...
[--no-catalog] [--no-index]
/usr/bin/pkgrepo refresh [-p publisher]...
-s repo_uri_or_path [--key ssl_key --cert ssl_cert]...
[--no-catalog] [--no-index]
/usr/bin/pkgrepo remove [-n] [-p publisher]...
-s repo_uri_or_path pkg_fmri_pattern ...
/usr/bin/pkgrepo set [-p publisher]... -s repo_uri_or_path
section/property=[value] ...
/usr/bin/pkgrepo set [-p publisher]... -s repo_uri_or_path
section/property=([value]) ...
/usr/bin/pkgrepo verify [-d] [-p publisher]...
[-i ignored_dep_file]... [--disable verification]...
-s repo_uri_or_path
/usr/bin/pkgrepo fix [-v] [-p publisher]...
-s repo_uri_or_path
/usr/bin/pkgrepo diff [-vq] [--strict] [--parsable] [-p publisher]...
-s first_repo_uri_or_path [--key ssl_key --cert ssl_cert]...
-s second_repo_uri_or_path [--key ssl_key --cert ssl_cert]...
/usr/bin/pkgrepo help
/usr/bin/pkgrepo version
DESCRIPTION
pkgrepo provides the ability to create and manage pkg(7) package repos‐
itories. Package repositories are a predefined set of directories and
files that permit the storage and retrieval of package data by pkg and
publication clients such as pkgsend or pkgrecv. In addition, when net‐
work-based access to a package repository is needed, pkg.depotd can
provide clients access to the repository to store and/or retrieve pack‐
age data.
OPTIONS
The following options are supported:
-?
--help
Display a usage message.
SUB-COMMANDS
The following subcommands are supported:
pkgrepo create [--version ver] uri_or_path
Create a pkg(7) repository at the specified location.
This subcommand can be used only with file system based reposito‐
ries.
--version
Create a repository in a format compatible with the specified
version. By default, version 4 repositories are created. Sup‐
ported versions are:
3 Supports storage of packages for a single publisher, cata‐
log version 1, and search version 1.
4 Supports storage of packages for multiple publishers, cat‐
alog version 1, and search version 1.
pkgrepo add-publisher -s repo_uri_or_path publisher ...
Add the specified publishers to the repository. The new publishers
have no packages or content.
This subcommand can be used only with version 4 file system based
repositories.
-s repo_uri_or_path
Operate on the repository located at the given URI or file sys‐
tem path.
pkgrepo remove-publisher [-n] [--synchronous] -s repo_uri_or_path pub‐
lisher ...
Remove the specified publishers from the repository. Remove all
packages and all other data for the specified publishers.
If the default publisher is removed, and only one publisher remains
in the repository, that remaining publisher becomes the default.
The publisher/prefix property of the repository is set to that
remaining publisher.
If the default publisher is removed, and multiple publishers remain
in the repository, or if the last publisher is removed from the
repository, the publisher/prefix property is unset.
This subcommand can be used only with version 4 file system based
repositories.
-n
Perform a trial run of the operation with no publisher changes
made. The number of packages to be removed for each publisher
is displayed before exiting.
-s repo_uri_or_path
Operate on the repository located at the given URI or file sys‐
tem path.
--synchronous
Wait for the operation to complete before returning. If this
option is not specified, the command returns immediately while
the publisher is removed asynchronously in the background.
pkgrepo get [-F format] [-H] [-p publisher]... -s repo_uri_or_path
[--key ssl_key --cert ssl_cert]... [section/property ...]
Display the property information for the repository or its publish‐
ers.
By default, each property and its value are printed on separate
lines. Empty ASCII string values are represented by a pair of dou‐
ble quotation marks (""). The following Bourne shell metacharac‐
ters, and newline, space, and tab, in ASCII string values must be
escaped by backslash characters (\):
; & ( ) | ^ < > \ " ' `
See the "Examples" section for examples displaying publisher and
repository properties.
For a list of properties and the purpose and value of each prop‐
erty, see the set subcommand below.
-F format
Specify an alternative output format. The value of format can
be tsv (Tab Separated Values), json (JavaScript Object Notation
as a single line), or json-formatted (JavaScript Object Nota‐
tion, formatted for readability).
-H
Omit the headers from the listing.
-p publisher
Display the property information for the given publisher. The
special value all displays the properties for all publishers.
This option can be specified multiple times.
-s repo_uri_or_path
Operate on the repository located at the given URI or file sys‐
tem path.
--key ssl_key --cert ssl_cert
Use the --key option to specify a client SSL key file to use
for package retrieval from an HTTPS repository. Use the --cert
option to specify a client SSL certificate file to use for
package retrieval from an HTTPS repository. This option pair
can be specified multiple times.
section/property
Display values for only the specified properties, such as pub‐
lisher/prefix or repository/version. See the set subcommand for
a complete list of properties.
pkgrepo info [-F format] [-H] [-p publisher]... -s repo_uri_or_path
[--key ssl_key --cert ssl_cert]...
Display a listing of the package publishers known by the reposi‐
tory. The listing includes the number of packages for each pub‐
lisher, when the publisher's package data was last updated, and the
status of the publisher's package data (such as whether it is cur‐
rently being processed).
-p publisher
Only display the data for the given publisher. If not provided,
the data for all publishers is displayed. This option can be
specified multiple times.
For descriptions of all other options, see the pkgrepo get command
above.
pkgrepo list [-F format] [-H] [-p publisher]... -s repo_uri_or_path
[--key ssl_key --cert ssl_cert]... [pkg_fmri_pattern ...]
List the packages in the repo_uri_or_path repository that match the
specified pkg_fmri_pattern patterns. If no patterns are specified,
all packages in the repository are listed. The pkg_fmri_pattern
pattern can include the ? and * characters as glob(3C)-style wild‐
cards to match one or more packages.
In the default output, the first column contains the name of the
publisher of the package. The second column contains the name of
the package. The third column is a flag that shows the status of
the package. A value of o in the status column indicates the pack‐
age is obsolete. A value of r in the status column indicates the
package has been renamed, which is a form of obsoletion. A value of
l in the status column indicates the package is legacy, meaning
that it will be removed in the future. The fourth column contains
the release and branch versions of the package. See pkg(7) for
information about release and branch versions.
-p publisher
Only display the packages for the given publisher. If not pro‐
vided, the packages for all publishers are listed. This option
can be specified multiple times.
For descriptions of all other options, see the pkgrepo get command
above.
pkgrepo contents [-m [-t action_name[,action_name]...]... -s
repo_uri_or_path [--key ssl_key --cert ssl_cert]... [pkg_fmri_pat‐
tern...]
List all packages in the repo_uri_or_path repository. If
pkg_fmri_pattern is specified, display the contents (action
attributes) of all matching packages in the repository.
-m
Display all attributes of actions in the specified packages.
-t action_name
Display only the specified actions in the specified packages.
The -t option can be specified multiple times, or multiple
actions can be specified as the argument to one -t option by
separating the action names with commas. The value of
action_name is one of the actions listed in "Actions" in the
pkg(7) man page, such as file, dir, driver, depend, or set.
For descriptions of all other options, see the pkgrepo get command
above.
pkgrepo rebuild [-p publisher]... -s repo_uri_or_path [--key ssl_key
--cert ssl_cert]... [--no-catalog] [--no-index]
Discard all catalog, search, and other cached information found in
the repository, and then recreate it based on the current contents
of the repository.
-p publisher
Perform the operation only for the given publisher. If not pro‐
vided, or if the special value all is specified, the operation
is performed for all publishers. This option can be specified
multiple times.
--no-catalog
Do not rebuild package data.
--no-index
Do not rebuild search indexes.
For descriptions of all other options, see the pkgrepo get command
above.
pkgrepo refresh [-p publisher]... -s repo_uri_or_path [--key ssl_key
--cert ssl_cert]... [--no-catalog] [--no-index]
Catalog any new packages found in the repository and update all
search indexes. This is intended for use with deferred publication
(--no-catalog or --no-index options of pkgsend).
-p publisher
Perform the operation only for the given publisher. If not pro‐
vided, or if the special value all is specified, the operation
is performed for all publishers. This option can be specified
multiple times.
--no-catalog
Do not add any new packages.
--no-index
Do not update search indexes.
For descriptions of all other options, see the pkgrepo get command
above.
pkgrepo remove [-n] [-p publisher]... -s repo_uri_or_path pkg_fmri_pat‐
tern ...
Remove packages that match the specified pkg_fmri_pattern pattern
from the repository, including any files they reference that are
not in use by any other package. The pkg_fmri_pattern pattern can
include the ? and * characters as glob(3C)-style wildcards to match
one or more packages.
Note -
All search index data for related publishers is removed.
This subcommand can be used only with file system based reposito‐
ries.
Caution -
This operation is not reversible and should not be used while
other clients are accessing the repository since it might cause
them to fail during retrieval operations.
-n
Perform a trial run of the operation with no package changes
made. A list of the packages to be removed is displayed before
exiting.
-p publisher
Only remove matching packages for the given publisher. If not
provided, any matching packages are removed for all publishers.
This option can be specified multiple times.
-s repo_uri_or_path
Operate on the repository located at the given URI or file sys‐
tem path.
pkgrepo set [-p publisher]... -s repo_uri_or_path section/prop‐
erty=[value] ...
pkgrepo set [-p publisher]... -s repo_uri_or_path section/prop‐
erty=([value]) ...
Set the value of the specified properties for the repository or
publisher.
This subcommand can be used only with file system based reposito‐
ries.
-p publisher
Only set property data for the given publisher. If the pub‐
lisher does not already exist, it is added. The special value
all can be used to set the property for all publishers.
-s repo_uri_or_path
Operate on the repository located at the given URI or file sys‐
tem path.
Properties and values can be specified using one of the following
forms:
section/property=
Clear the property value.
section/property=value
Replace the property value with the given value.
section/property=(value1 value2 valueN)
Replace the property value with the list of values.
For repository versions 3 and 4, the following properties can be
set for the repository:
publisher/prefix
A string that represents the name of the default publisher. The
first character must be a-z, A-Z, or 0-9. The remainder of the
string can only contain the characters 0-9, -, ., a-z, and A-Z.
This value indicates the publisher that should be used when
more than one publisher's packages are present, or when pack‐
ages are published to the repository and a publisher is not
specified.
For repository versions 3 and 4, the following properties can be
set for individual publishers in the repository. Use the -p option
to specify at least one publisher when you set these properties:
publisher/alias
A string that represents the default alias that clients should
use when adding a publisher using the repository's configura‐
tion data. The first character must be a-z, A-Z, or 0-9. The
remainder of the string can only contain the characters 0-9, -,
., a-z, and A-Z.
repository/check-certificate-revocation
A boolean to check whether a certificate has been revoked. When
this property is set to True, the pkgrepo verify and pkgrepo
fix commands attempt to contact any CRL distribution points in
the certificates used for signature verification to determine
whether the certificate has been revoked since being issued.
The default value is False. This property is only used by the
verify and fix subcommands to validate the contents of the
repository. This property does not affect client settings. This
value should be the same as the corresponding pkg(1) property
value.
repository/collection_type
Can have the value core or supplemental, indicating the type of
packages offered in this repository.
The core type indicates that the repository contains all of the
dependencies declared by packages in the repository. The core
type is primarily used for operating system repositories.
The supplemental type indicates that the repository contains
packages that rely on or are intended to be used with packages
located in another repository.
repository/description
A paragraph of plain text that describes the purpose and con‐
tents of the repository.
repository/detailed_url
A URI that represents the location of a document (such as a web
page) that provides additional information about the reposi‐
tory.
repository/legal_uris
A list of locations (URIs) for documents that provide addi‐
tional legal information about the repository.
repository/mirrors
A list of locations (URIs) of repositories that contain a copy
of the repository's package content but not the package meta‐
data.
repository/name
A plain text string that contains the name of the repository.
repository/origins
A list of locations (URIs) of repositories that contain a com‐
plete copy of the repository's package metadata and content.
repository/refresh_seconds
An integer value that represents the number of seconds clients
should wait before checking the repository for updated package
data after each update check.
repository/registration_uri
A URI that represents the location of a resource that must be
used to obtain credentials for access to the repository. A reg‐
istration web page is one example.
repository/related_uris
A list of locations (URIs) of repositories that contain pack‐
ages that users might be interested in.
repository/signature-required-names
A list of names that must be seen as common names of certifi‐
cates while validating the signatures of a package. This prop‐
erty is only used by the verify and fix subcommands to validate
the contents of the repository. This property does not affect
client settings. These values should be the same as the corre‐
sponding pkg(1) property values.
repository/trust-anchor-directory
The absolute path name of the directory that contains the trust
anchors for packages in this repository. If not specified,
/etc/certs/CA/ is used. This property is only used by the ver‐
ify and fix subcommands to validate the contents of the reposi‐
tory. This property does not affect client settings. This value
should be the same as the corresponding pkg(1) property value.
Properties not documented here, but listed in the output of the get
subcommand, are reserved for internal use and should not be set.
pkgrepo verify [-d] [-p publisher]... [-i ignored_dep_file]... [--dis‐
able verification]... -s repo_uri_or_path
Verify that the following attributes of the package repository con‐
tents are correct:
o File checksums
o File permissions
The path leading to the repository is also checked to
ensure that the pkg5srv user can read the repository
contents. This check can be necessary for repositories
that are made available using the svc:/applica‐
tion/pkg/server service, or using the svc:/applica‐
tion/pkg/system-repository service when the system has
non-global zones.
o Package manifest permissions
o Package manifest content, including dependencies
The dependency check verifies that every file referenced
in each package manifest is in the repository. See also
the -d, -i, and --disable options below.
o Package signatures
Package manifest signatures are calculated based on the
values of the repository/signature-required-names,
repository/trust-anchor-directory, and repository/check-
certificate-revocation properties.
Errors are emitted to stdout. The pkgrepo command exits with a non-
zero return code if any errors are emitted.
This subcommand can be used only with version 4 file system based
repositories.
-p publisher
Perform the operation only for the specified publisher. If no
publisher is specified, or if the special value all is speci‐
fied, the operation is performed for all publishers. This
option can be specified multiple times.
-d
Perform complete dependency verification. This option cannot be
used together with --disable dependency.
-i ignored_dep_file
Perform dependency verification but ignore dependencies speci‐
fied in the file. This option cannot be used together with
--disable dependency.
--disable verification
Disable verification specified. The current allowed value:
dependency.
-s repo_uri_or_path
Operate on the repository located at the given URI or file sys‐
tem path.
pkgrepo fix [-v] [-p publisher]... -s repo_uri_or_path
Fix the contents of a repository by first verifying the repository,
and then moving any invalid repository contents into a quarantine
directory within the repository.
If repository errors are found, a repository rebuild is automati‐
cally performed. If any errors are found, a message is emitted to
stdout showing which packages must be re-imported using pkgsend(1)
or pkgrecv(1) in order to restore the repository contents.
This subcommand can be used only with version 4 file system based
repositories.
-v
Include output detailing the errors found during repository
verification.
-p publisher
Perform the operation only for the specified publisher. If no
publisher is specified, or if the special value all is speci‐
fied, the operation is performed for all publishers. This
option can be specified multiple times.
-s repo_uri_or_path
Operate on the repository located at the given URI or file sys‐
tem path.
pkgrepo diff [-vq] [--strict] [--parsable] [-p publisher]... -s
first_repo_uri_or_path... [--key ssl_key --cert ssl_cert]... -s sec‐
ond_repo_uri_or_path... [--key ssl_key --cert ssl_cert]...
Compare two repositories and show the differences.
- symbol in the beginning of an output line indicates the item
found only in the first repository, while + symbol indicates the
item found only in the second repository. No symbol in the begin‐
ning means it is a common item.
-v
Include output detailing the comparison including per-fmri out‐
put.
-q
Perform quiet comparison; no output will be generated.
--strict
Compare catalog last modified time stamp. This is useful to
determine whether one repository is the exact clone of the
other one.
--parsable
Generate parsable output in JSON format.
-p publisher
Perform the operation only for the specified publisher. If no
publisher is specified, or if the special value all is speci‐
fied, the operation is performed for all publishers. This
option can be specified multiple times.
-s repo_uri_or_path
Operate on the repository located at the given URI or file sys‐
tem path.
--key ssl_key --cert ssl_cert
Use the --key option to specify a client SSL key file to use
for package retrieval from an HTTPS repository. Use the --cert
option to specify a client SSL certificate file to use for
package retrieval from an HTTPS repository. This option pair
can be specified multiple times. The pair specified after the
first -s but before the second -s will be applied to the first
repository. The pair specified after the second -s will be
applied to the second repository.
pkgrepo help
Display a usage message.
pkgrepo version
Display a unique string that identifies the version of the pkg(7)
system. The values produced by the version operation are not
sortable and are not safe for comparison beyond equality.
EXAMPLES
Example 1 Create a Package Repository
$ pkgrepo create /my/repository
Example 2 Display Information
Display a summary of publishers and the number of packages in a reposi‐
tory.
$ pkgrepo info -s /my/repository
PUBLISHER PACKAGES STATUS UPDATED
example.com 5 online 2011-07-22T18:09:09.769106Z
$ pkgrepo info -s http://pkg.oracle.com/solaris/release/
PUBLISHER PACKAGES STATUS UPDATED
solaris 3941 online 2010-11-12T19:24:25.967246Z
Example 3 Rebuild Catalogs and Search Data
Rebuild the repository's catalogs and search data.
$ pkgrepo rebuild -s /my/repository
Example 4 Refresh Catalogs and Search Data
Refresh the repository's catalogs and search data.
$ pkgrepo refresh -s /my/repository
$ pkgrepo refresh -s http://example.com/repository
Example 5 Display All Repository Properties
$ pkgrepo get -s /export/repoSolaris11
SECTION PROPERTY VALUE
publisher prefix solaris
repository description Local\ copy\ of\ the\ Oracle\ Solaris\ 11\ repository
repository name Oracle\ Solaris\ 11
repository version 4
$ pkgrepo get -s http://pkg.oracle.com/solaris/release/
SECTION PROPERTY VALUE
deployment content s11_11-11
deployment pubdate 20111102T222051Z
publisher prefix solaris
repository version 4
Example 6 Display All Publisher Properties
$ pkgrepo get -s http://pkg.oracle.com/solaris/release/ -p all
PUBLISHER SECTION PROPERTY VALUE
solaris publisher alias
solaris publisher prefix solaris
solaris repository collection-type core
solaris repository description This\ repository\ serves\ the\ Oracle\
Solaris\ 11\ Package\ repository.
solaris repository legal-uris ()
solaris repository mirrors (http://pkg-cdn1.oracle.com/solaris.release/)
solaris repository name Oracle\ Solaris\ 11\ Package\ Repository
solaris repository origins ()
solaris repository refresh-seconds
solaris repository registration-uri ""
solaris repository related-uris ()
Example 7 Set the Default Publisher
$ pkgrepo set -s /my/repository publisher/prefix=example.com
Example 8 Set a Publisher Property
$ pkgrepo set -s /my/repository -p example.com \
repository/origins=http://example.com/repository
Example 9 Add a New Publisher To the Repository
$ pkgrepo add-publisher -s /my/repository example.com
EXIT STATUS
The following exit values are returned:
0 Command succeeded (or no differences encountered for pkgrepo
diff).
1 An error occurred.
2 Invalid command line options were specified.
3 Multiple operations were requested, but only some of them suc‐
ceeded.
4 No changes were made, nothing to do.
5 Differences found for pkgrepo diff.
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
pkg(1), pkgrecv(1), pkgsend(1), pkg.depotd(8), pkg(7)
Creating Package Repositories in Oracle Solaris 11.4
https://github.com/oracle/solaris-ips
NOTES
Most pkgrepo operations are not available for package archives. A pack‐
age archive is a file, typically with a .p5p extension, as described in
the -a option in the pkgrecv(1) man page. A package archive contains
packages but does not contain repository configuration. However, the
pkgrepo list, pkgrepo info, and pkgrepo contents commands work with
package archives.
Oracle Solaris 11.4 2 Apr 2020 pkgrepo(1)