pkgrecv(1) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

pkgrecv(1)

pkgrecv(1)                       User Commands                      pkgrecv(1)

NAME
       pkgrecv - Image Packaging System content retrieval utility

SYNOPSIS
       /usr/bin/pkgrecv [-aknrv] [-s (src_path|src_uri)]
           [-d (dest_path|dest_uri)] [-c cache_dir]
           [-m match] [--mog-file file_path ...] [--raw]
           [--key src_key --cert src_cert]
           [--dkey dest_key --dcert dest_cert]
           (fmri|pattern) ...


       /usr/bin/pkgrecv [-s (src_path|src_uri)] --newest


       /usr/bin/pkgrecv [-nv] [-s (src_path|src_uri)]
           [-d (dest_path|dest_uri)] [-p publisher]...
           [--key src_key --cert src_cert] --clone

DESCRIPTION
       pkgrecv  retrieves  all  versions of each matching fmri or pattern from
       the pkg(7) repository or package archive specified by the -s option and
       optionally republishes the retrieved packages to the package repository
       or package archive specified  by  the  -d  option.  This  republication
       copies  the  package intact - including package signatures - except for
       the time stamp. To preserve the same time stamp, see  the  --clone  op‐
       tion.


       By  default,  packages are retrieved in package repository format suit‐
       able for use with pkg, pkg.depotd, and package publication tools.


       Packages that have not changed are not republished. Therefore, the time
       to update an existing repository depends  on  the  number  of  new  and
       changed packages.


       Use  the  -m option to specify whether to retrieve all versions of each
       matching package, or only the newest version of each matching package.


       If you do not specify '*' to be retrieved, you might  want  to  specify
       the -r option to be sure to retrieve all the dependencies of the speci‐
       fied packages.

       Note -



         Do  not use multiple instances of pkgrecv simultaneously to republish
         packages to the same destination repository or archive. In this case,
         newly received packages could contain duplicate actions.



       After a pkgrecv operation that retrieves packages into a  dest_uri,  if
       the dest_uri repository must support pkg search operations, run pkgrepo
       refresh on that repository to update search indexes.

OPTIONS
       The following options are supported:

       -h

           Display a usage message.


       -a

           Store  the  retrieved package data in a pkg(7) archive at the loca‐
           tion specified by the -d option. The file specified  by  -d  cannot
           already  exist.  The  -a  option  can be used only with file system
           based destinations. Although not required, using a  file  extension
           of  .p5p  (for  example, archive.p5p) is strongly suggested. The -a
           option cannot be combined with the --raw option.


       -c cache_dir

           Specify the path to a directory that will be used  to  cache  down‐
           loaded content. If this directory is not supplied, the client auto‐
           matically  selects  a cache directory. In the case where a download
           is interrupted, and a cache directory was automatically chosen, use
           this option to resume the download. See the "Environment Variables"
           section below for details about how to set the  location  used  for
           temporary data storage.


       -d (dest_path|dest_uri)

           Specify  the  file  system path or URI where the retrieved packages
           should be republished. If -a is specified, this destination must be
           a package archive that does not already exist. If -a is not  speci‐
           fied,  this  destination  must be a package repository that already
           exists. Use the pkgrepo command to create a new package repository.
           If -d is not specified, the value of PKG_DEST is used.  See  "Envi‐
           ronment Variables" below.


       -k

           Keep  the  retrieved package content compressed. This option is ig‐
           nored when republishing. Compressed package content should  not  be
           used with pkgsend.


       -m match

           Control  which  versions  of  packages  are retrieved if pattern is
           specified or if fmri is not fully specified. For this  description,
           the  following  four example packages exist in the source specified
           by the -s option. In these FMRI, the characters between the  @  and
           the  : denote the numbered package version, and the characters from
           the : to the end  denote  the  timestamp  portion  of  the  version
           string.

             pkg://solaris/package/pkg@0.5.11,5.11-0.175.1.0.0.24.0:20120904T180335Z
             pkg://solaris/package/pkg@0.5.11,5.11-0.175.1.0.0.24.0:20120903T170234Z
             pkg://solaris/package/pkg@0.5.11,5.11-0.175.1.0.0.23.0:20120820T165108Z
             pkg://solaris/package/pkg@0.5.11,5.11-0.175.1.0.0.23.0:20120819T155007Z


           all-timestamps

               Retrieve all versions of each matching fmri or pattern (implies
               all-versions). This is the default behavior if the -m option is
               not  specified. In the example above, all four packages are re‐
               trieved.


           all-versions

               Retrieve the latest timestamp for each version of each matching
               fmri or pattern. In the example above, the following two  pack‐
               ages are retrieved:

                 pkg://solaris/package/pkg@0.5.11,5.11-0.175.1.0.0.24.0:20120904T180335Z
                 pkg://solaris/package/pkg@0.5.11,5.11-0.175.1.0.0.23.0:20120820T165108Z



           latest

               Retrieve  only the newest version of each matching fmri or pat‐
               tern. In the example above, only the following package  is  re‐
               trieved:

                 pkg://solaris/package/pkg@0.5.11,5.11-0.175.1.0.0.24.0:20120904T180335Z





       -n

           Perform a trial run with no changes made.


       -p publisher

           Only  clone  the  specified publisher. This option can be specified
           multiple times. The -p option is valid only with  the  --clone  op‐
           tion.


       -r

           Recursively  retrieve  all  dependencies  for each matching fmri or
           pattern.


       -s (src_path|src_uri)

           Specify the file system path or URI of a pkg(7) repository or pack‐
           age archive from which to receive package data. If -s is not speci‐
           fied, the value of PKG_SRC is used. See "Environment Variables" be‐
           low.


       -v

           Display verbose output, including the number of packages  retrieved
           and  their full FMRIs, the number of files retrieved, and the esti‐
           mated size of the transfer.


       --key src_key

           Specify a client SSL key file to use for package retrieval from the
           source HTTPS repository.


       --cert src_cert

           Specify a client SSL certificate file to use for package  retrieval
           from the source HTTPS repository.


       --dkey dest_key

           Specify a client SSL key file to use for package publication to the
           destination HTTPS repository.


       --dcert dest_cert

           Specify  a  client SSL certificate file to use for package publica‐
           tion to the destination HTTPS repository.


       --clone

           Make an exact copy of the source repository. By default, the  clone
           operation  succeeds only if publishers in the source repository are
           also present in the destination. To limit the  clone  operation  to
           specified  publishers,  use  the -p option. Publishers specified by
           using the -p option are added to the destination repository if they
           are not already present.  Packages  that  are  in  the  destination
           repository  but not in the source repository are removed. The clone
           operation leaves the destination repository altered if an error oc‐
           curs. Therefore, the destination repository should be  in  its  own
           ZFS  dataset,  and a snapshot should be created prior to performing
           the clone operation.


       --mog-file

           Specifies a file containing pkgmogrify(1) transforms to be  applied
           to the manifest of each package before it is copied to the destina‐
           tion  package  repository. '-' can be specified to use stdin as in‐
           put. If both files and '-' are specified together, '-' will be  ig‐
           nored  and  only  files specified are used. Use of this option will
           automatically cause any existing package signatures to  be  dropped
           from the package. Adding new hashable actions such as files and li‐
           censes is not allowed. This option can be specified multiple times.
           This option may not be combined with --clone.


       --newest

           List  the  most  recent versions of the packages available from the
           repository specified by the -s option. All other  options  are  ig‐
           nored.


       --raw

           Retrieve  and  store  the  raw  package  data in a set of directory
           structures by stem and version at the location specified by -d. The
           --raw option can be used only with file system based  destinations.
           This  package data can be used to conveniently modify and republish
           packages, perhaps by correcting file contents  or  providing  addi‐
           tional  package  metadata. The --raw option cannot be combined with
           -a.


EXAMPLES
       Example 1 List Newest Packages



       List the newest packages available from the repository  on  the  system
       named test.


         $ pkgrecv -s http://test --newest
         pkg://solaris/system/library/c++-runtime@0.5.11,5.11-0.175.0.0.0.2.1:20120921T190358Z
         pkg://solaris/system/library/freetype-2@2.4.8,5.11-0.175.1.0.0.7.1234:20120109T215840Z
         pkg://solaris/system/library/math@0.5.11,5.11-0.175.0.0.0.2.1:20120921T190432Z


       Example 2 Retrieve Raw Package Data



       Receive the c++-runtime package from Example 1 in a format suitable for
       use with pkgsend publish.


         $ pkgrecv -s http://test \
         -d /local/repo --raw \
         c++-runtime@0.5.11,5.11-0.175.0.0.0.2.1:20120921T190358Z
         Processing packages for publisher solaris ...
         Retrieving and evaluating 1 package(s)...
         PROCESS       ITEMS     GET (MB)    SEND (MB)
         Completed       1/1      3.5/3.5      0.0/0.0
         $ ls /local/repo
         pkg5.repository  publisher  system%2Flibrary%2Fc%2B%2B-runtime




       Because  packages  that have not changed are not republished, the MB to
       SEND (republish) can be fewer than the MB to GET (examine). This  exam‐
       ple is retrieving raw data, not republishing to a -d repository.

       Example 3 Retrieve Dependencies From a System



       Receive  the  package  editor/vim  and all of its dependencies from the
       system named test.


         $ pkgrecv -s http://test -d /local/repo -r editor/vim


       Example 4 Retrieve Only the Latest Version



       Receive only the latest version of the package editor/vim from the sys‐
       tem named test.


         $ pkgrecv -s http://test -d /local/repo -m latest -v \
         editor/vim
         Processing packages for publisher solaris ...
         Retrieving and evaluating 1 package(s)...

         Retrieving packages ...
                 Packages to add:       1
               Files to retrieve:    1557
         Estimated transfer size: 9.21 MB

         Packages to transfer:
         editor/vim@7.3.600,5.11-0.175.1.0.0.24.0:20120904T172128Z

         PROCESS                                     ITEMS    GET (MB) SEND (MB)
         Completed                                     1/1     9.2/9.2 25.4/25.4


       Example 5 Retrieve All Versions and Republish Remotely



       Receive all versions of the package library/zlib from the system  named
       test  and  republish  it to a remote repository on the system named re‐
       mote.


         $ pkgrecv -s http://test -d http://remote:10000 \
         -m all-versions library/zlib


       Example 6 Retrieve Dependencies From a Repository



       Receive the package editor/gnu-emacs and all of its  dependencies  from
       the repository located at /export/repo.


         $ pkgrecv -s /export/repo -d /local/repo -r editor/gnu-emacs


       Example 7 Retrieve Additional Packages and Changed Content



       Receive  all packages that do not already exist and all changed content
       from the repository located  at  http://pkg.oracle.com/solaris/release/
       to the repository located at /export/repoSolaris11.


         $ pkgrecv -s http://pkg.oracle.com/solaris/release/ \
         -d /export/repoSolaris11 -m all-timestamps '*'




       Receive  all packages that do not already exist and all changed content
       from  the  secure  repository  located  at   https://pkg.oracle.com/so‐
       laris/support/ to the repository located at /export/repoSolaris11.


         $ pkgrecv -s https://pkg.oracle.com/solaris/support/ \
         -d /export/repoSolaris11 -m all-timestamps \
         --key /var/pkg/ssl/Oracle_Solaris_11_Support.key.pem \
         --cert /var/pkg/ssl/Oracle_Solaris_11_Support.certificate.pem '*'


       Example 8 Create a Package Archive



       Create  a  package  archive containing the package editor/gnu-emacs and
       all of its dependencies from the  repository  located  at  http://exam‐
       ple.com:10000.


         $ pkgrecv -s http://example.com:10000 -d /my/emacs.p5p -a \
         -r editor/gnu-emacs


       Example 9 Copy Packages From an Archive to a Repository



       Copy all of the packages in a package archive to an existing repository
       located at /export/repo.


         $ pkgrecv -s /my/archive.p5p -d /export/repo '*'


       Example 10 Change publisher name



       Change the publisher name of the package 'foo' and all its dependencies
       into 'extra' during republishing.


         $ echo '<transform set name=pkg.fmri -> edit value
         (pkg://).*?(/.*) \\\1extra\\\2>' | pkgrecv -s repo1 -d repo2 --mog-file - foo


ENVIRONMENT VARIABLES
       The following environment variables are supported:

       PKG_CLIENT_CONNECT_TIMEOUT

           Seconds  to wait trying to connect during transport operations (for
           each attempt) before the client aborts the operation. A value of  0
           means wait indefinitely.

           Default value: 60


       PKG_CLIENT_LOWSPEED_TIMEOUT

           Seconds  below the lowspeed limit (1024 bytes/second) during trans‐
           port operations before the client aborts the operation. A value  of
           0 means do not abort the operation.

           Default value: 30


       PKG_CLIENT_MAX_CONSECUTIVE_ERROR

           Maximum  number  of  transient  transport  errors before the client
           aborts the operation. A value of 0 means do not  abort  the  opera‐
           tion.

           Default value: 4


       PKG_CLIENT_MAX_REDIRECT

           Maximum  number of HTTP or HTTPS redirects allowed during transport
           operations before a connection is aborted. A value of  0  means  do
           not abort the operation.

           Default value: 5


       PKG_CLIENT_MAX_TIMEOUT

           Maximum  number  of  transport  attempts per host before the client
           aborts the operation. A value of 0 means do not  abort  the  opera‐
           tion.

           Default value: 4


       PKG_DEST

           The  path  of  a directory to save the retrieved package to, or the
           file system path or URI of a repository or  package  archive  where
           the packages will be copied.


       PKG_SRC

           A  URI  or  file  system path representing the location of a pkg(7)
           repository or package archive from which to retrieve packages.


       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.


       http_proxy, https_proxy

           HTTP or HTTPS proxy server. Use the following syntax to set  either
           http_proxy or https_proxy:


             http_proxy [protocol://]host[:port]

           See "Specifying a Proxy" in Updating Systems and Adding Software in
           Oracle Solaris 11.4.


       no_proxy

           List  of host names that should not go through any proxy. If set to
           asterisk (*) only, all hosts are matched: no hosts will be proxied.
           Use the following syntax to set no_proxy:

             no_proxy [* | host[,host]...]



EXIT STATUS
       The following exit values are returned:

       0     Command succeeded.


       1     An error occurred.


       2     Invalid command line options were specified.


       3     Multiple operations were requested, but only some  of  them  suc‐
             ceeded.


       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), pkgsend(1), pkg(7)


       Creating Package Repositories in Oracle Solaris 11.4


       https://github.com/oracle/solaris-ips

NOTES
       When  using  a file system based destination repository, any pkg.depotd
       processes that are serving that  repository  must  be  restarted  after
       package  transfer  is  completed for the changes to be reflected in its
       web interface or search responses. See pkg.depotd(8) for more  informa‐
       tion.

Oracle Solaris 11.4               3 May 2018                        pkgrecv(1)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3