Skip Navigation Links | |
Exit Print View | |
man pages section 1: User Commands Oracle Solaris 11.1 Information Library |
- Image Packaging System repository management utility
/usr/bin/pkgrepo create [--version ver] uri_or_path
/usr/bin/pkgrepo add-publisher -s repo_uri_or_path publisher ...
/usr/bin/pkgrepo get [-F format] [-H] [-p publisher ...] -s repo_uri_or_path [section/property ...]
/usr/bin/pkgrepo info [-F format] [-H] [-p publisher ...] -s repo_uri_or_path
/usr/bin/pkgrepo list [-F format] [-H] [-p publisher ...] -s repo_uri_or_path [pkg_fmri_pattern ...]
/usr/bin/pkgrepo rebuild [-p publisher ...] -s repo_uri_or_path [--no-catalog] [--no-index]
/usr/bin/pkgrepo refresh [-p publisher ...] -s repo_uri_or_path [--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 help
/usr/bin/pkgrepo version
pkgrepo provides the ability to create and manage pkg(5) package repositories. 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 network-based access to a package repository is needed, pkg.depotd can provide clients access to the repository to store and/or retrieve package data.
The following options are supported:
Display a usage message.
The following subcommands are supported:
Create a pkg(5) repository at the specified location.
This subcommand can be used only with file system based repositories.
Create a repository in a format compatible with the specified version. By default, version 4 repositories are created. Supported versions are:
Supports storage of packages for a single publisher, catalog version 1, and search version 1.
Supports storage of packages for multiple publishers, catalog version 1, and search version 1.
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.
Display the property information for the repository or its publishers.
By default, each property and its value are printed on separate lines. Empty ASCII string values are represented by a pair of double quotation marks (""). The following Bourne shell metacharacters, 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 property, see the set subcommand below.
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 Notation, formatted for readability).
Omit the headers from the listing.
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.
Operate on the repository located at the given URI or file system path.
Display values for only the specified properties, such as publisher/prefix or repository/version. See the set subcommand for a complete list of properties.
Display a listing of the package publishers known by the repository. The listing includes the number of packages for each publisher, when the publisher's package data was last updated, and the status of the publisher's package data (such as whether it is currently being processed).
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 Notation, formatted for readability).
Omit the headers from the listing.
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.
Operate on the repository located at the given URI or file system path.
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.
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 package is obsolete. A value of r in the status column indicates the package has been renamed, which is a form of obsoletion. The fourth column contains the release and branch versions of the package. See pkg(5) for information about release and branch versions.
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 Notation, formatted for readability).
Omit the headers from the listing.
Only display the packages for the given publisher. If not provided, the packages for all publishers are displayed. This option can be specified multiple times.
Operate on the repository located at the given URI or file system path.
Discard all catalog, search, and other cached information found in the repository, and then recreates it based on the current contents of the repository.
Perform the operation only for the given publisher. If not provided, or if the special value all is specified, the operation is performed for all publishers. This option can be specified multiple times.
Operate on the repository located at the given URI or file system path.
Do not rebuild package data.
Do not rebuild search indexes.
Catalog any new packages found in the repository and updates all search indexes. This is intended for use with deferred publication (--no-catalog or --no-index options of pkgsend).
Perform the operation only for the given publisher. If not provided, or if the special value all is specified, the operation is performed for all publishers. This option can be specified multiple times.
Operate on the repository located at the given URI or file system path.
Do not add any new packages.
Do not update search indexes.
Remove the packages matching the specified patterns from the repository, including any files they reference that are not in use by any other package.
Note - All search index data for related publishers is removed.
This subcommand can be used only with file system based repositories.
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. |
Perform a trial run of the operation with no package changes made. A list of the packages to be removed is displayed before exiting.
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.
Operate on the repository located at the given URI or file system path.
Set the value of the specified properties for the repository or publisher.
This subcommand can be used only with file system based repositories.
Only set property data for the given publisher. If the publisher does not already exist, it is added. The special value all can be used to set the property for all publishers.
Operate on the repository located at the given URI or file system path.
Properties and values can be specified using one of the following forms:
Clear the property value.
Replace the property value with the given value.
Replace the property value with the list of values.
For repository versions 3 and 4, the following properties can be set for the repository:
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 packages 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:
A string that represents the default alias that clients should use when adding a publisher using the repository's configuration 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.
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.
A paragraph of plain text that describes the purpose and contents of the repository.
A URI that represents the location of a document (such as a web page) that provides additional information about the repository.
A list of locations (URIs) for documents that provide additional legal information about the repository.
A list of locations (URIs) of repositories that contain a copy of the repository's package content but not the package metadata.
A plain text string that contains the name of the repository.
A list of locations (URIs) of repositories that contain a complete copy of the repository's package metadata and content.
An integer value that represents the number of seconds clients should wait before checking the repository for updated package data after each update check.
A URI that represents the location of a resource that must be used to obtain credentials for access to the repository. A registration web page is one example.
A list of locations (URIs) of repositories that contain packages that users might be interested in.
Properties not documented here, but listed in the output of the get subcommand, are reserved for internal use and should not be set.
Display a usage message.
Display a unique string that identifies the version of the pkg(5) system. The values produced by the version operation are not sortable and are not safe for comparison beyond equality.
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 repository.
$ 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
The following exit values are returned:
Command succeeded.
An error occurred.
Invalid command line options were specified.
Multiple operations were requested, but only some of them succeeded.
No changes were made, nothing to do.
An unanticipated exception occurred.
See attributes(5) for descriptions of the following attributes:
|
pkg(1), pkgrecv(1), pkgsend(1), pkg.depotd(1M), pkg(5)
http://hub.opensolaris.org/bin/view/Project+pkg/