src/man/pkgrecv.1.txt
changeset 2219 60ad60f7592c
parent 2152 623da55258c6
child 2258 ca4d89069b17
equal deleted inserted replaced
2218:f025ba1faae7 2219:60ad60f7592c
     3 
     3 
     4 NAME
     4 NAME
     5      pkgrecv - image packaging system content retrieval utility
     5      pkgrecv - image packaging system content retrieval utility
     6 
     6 
     7 SYNOPSIS
     7 SYNOPSIS
     8      /usr/bin/pkgrecv [-s src_uri] [-d (path|dest_uri)] [-c cache_dir]
     8      /usr/bin/pkgrecv [-s src_uri] [-a] [-d (path|dest_uri)] [-c cache_dir]
     9          [-kr] [-m match] [-n] [--raw] [--key keyfile --cert certfile] 
     9          [-kr] [-m match] [-n] [--raw] [--key keyfile --cert certfile] 
    10          (fmri|pattern) ...
    10          (fmri|pattern) ...
    11      /usr/bin/pkgrecv [-s src_uri] --newest
    11      /usr/bin/pkgrecv [-s src_uri] --newest
    12 
    12 
    13 DESCRIPTION
    13 DESCRIPTION
    14      pkgrecv allows the user to retrieve the contents of a package
    14      pkgrecv allows the user to retrieve packages from a pkg(5) repository
    15      from a pkg(5) repository.  With the default options, the contents
    15      or package archive.  It can also optionally republish the retreived
    16      are retrieved in a repository format suitable for use with
    16      packages to a different package repository or archive them.  By
    17      pkg.depotd(1M).
    17      default, packages are retrieved in package repository format suitable
       
    18      for use with pkg(1), pkg.depotd(1M), and package publication tools.
    18 
    19 
    19 OPTIONS
    20 OPTIONS
    20      The following options are supported:
    21      The following options are supported:
       
    22 
       
    23      -a              Store the retrieved package data in a pkg(5) archive
       
    24                      at the location specified by -d.  The file may not
       
    25                      already exist, and this option may only be used with
       
    26                      filesystem-based destinations.  Although not required,
       
    27                      it is strongly suggested that a file extension of
       
    28                      '.p5p' is used (e.g. 'archive.p5p').  This option may
       
    29                      not be combined with --raw.
    21 
    30 
    22      -c cache_dir    The path to a directory that will be used to cache
    31      -c cache_dir    The path to a directory that will be used to cache
    23                      downloaded content.  If one is not supplied, the
    32                      downloaded content.  If one is not supplied, the
    24                      client will automatically pick a cache directory.
    33                      client will automatically pick a cache directory.
    25                      In the case where a download is interrupted, and a
    34                      In the case where a download is interrupted, and a
    28 
    37 
    29      -d path_or_uri  The filesystem path or URI of the target repository to
    38      -d path_or_uri  The filesystem path or URI of the target repository to
    30                      republish packages to.  If not provided, the default
    39                      republish packages to.  If not provided, the default
    31                      value is the current working directory.  The target
    40                      value is the current working directory.  The target
    32                      must already exist.  New repositories can be created
    41                      must already exist.  New repositories can be created
    33                      using pkgrepo(1).
    42                      using pkgrepo(1).  If -a is specified, the target is
       
    43                      assumed to be a new package archive.
    34 
    44 
    35      -h              Display usage message.
    45      -h              Display usage message.
    36 
    46 
    37      -k              Keep the retrieved package content compressed, ignored
    47      -k              Keep the retrieved package content compressed, ignored
    38                      when republishing.  Should not be used with pkgsend(1).
    48                      when republishing.  Should not be used with pkgsend(1).
    66                      directory structures by stem and version at the location
    76                      directory structures by stem and version at the location
    67                      specified by -d.  May only be used with filesystem-
    77                      specified by -d.  May only be used with filesystem-
    68                      based destinations.  This can be used with pkgsend(1)
    78                      based destinations.  This can be used with pkgsend(1)
    69                      include to conveniently modify and republish packages,
    79                      include to conveniently modify and republish packages,
    70                      perhaps by correcting file contents or providing
    80                      perhaps by correcting file contents or providing
    71                      additional package metadata.
    81                      additional package metadata.  This option may not be
       
    82                      combined with -a.
    72 
    83 
    73 
    84 
    74 
    85 
    75 EXAMPLES
    86 EXAMPLES
    76      Example 1:  List newest packages available from the repository on
    87      Example 1:  List newest packages available from the repository on
   122      Example 8: Receive all packages that do not already exist from the
   133      Example 8: Receive all packages that do not already exist from the
   123      repository located at 'http://example.com:10000':
   134      repository located at 'http://example.com:10000':
   124 
   135 
   125      $ pkgrecv -s http://example.com:10000 -d /my/pkg/repo '*'
   136      $ pkgrecv -s http://example.com:10000 -d /my/pkg/repo '*'
   126 
   137 
       
   138      Example 9: Create a package archive containing the package "SUNWemacs"
       
   139      and all of its dependencies from the repository located at
       
   140      http://example.com:10000:
       
   141 
       
   142      $ pkgrecv -s http://example.com:10000 -d /my/emacs.p5p -a -r SUNWemacs
       
   143 
       
   144      Example 10: Copy all of the packages in a package archive to an
       
   145      existing repository located at '/export/repo':
       
   146 
       
   147      $ pkgrecv -s /my/archive.p5p -d /export/repo '*'
       
   148 
   127 ENVIRONMENT VARIABLES
   149 ENVIRONMENT VARIABLES
   128      The following environment variables are supported:
   150      The following environment variables are supported:
   129 
   151 
   130      PKG_DEST           The path of a directory to save the retrieved
   152      PKG_DEST           The path of a directory to save the retrieved
   131                         package to, or the URI of a repository to
   153                         package to, or the filesystem path or URI of a
   132                         republish it to.  If not provided, the default
   154                         repository to republish it to.  If not provided,
   133                         value is the current working directory.
   155                         the default value is the current working directory.
   134 
   156 
   135      PKG_SRC            A URI representing the location of a pkg(5)
   157      PKG_SRC            A URI or filesystem path representing the location
   136                         repository to retrieve package data from.
   158                         of a pkg(5) repository or package archive to
       
   159                         retrieve package data from.
   137 
   160 
   138 EXIT STATUS
   161 EXIT STATUS
   139      The following exit values are returned:
   162      The following exit values are returned:
   140 
   163 
   141      0     Command succeeded.
   164      0     Command succeeded.