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

개요

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

pkgdepend(1)

pkgdepend(1)                     User Commands                    pkgdepend(1)

NAME
       pkgdepend - Image Packaging System dependency analyzer

SYNOPSIS
       /usr/bin/pkgdepend [options] command [cmd_options] [operands]


       /usr/bin/pkgdepend generate [-IMm] -d dir [-d dir]
           [-D name=value] [-k path] manifest_file


       /usr/bin/pkgdepend resolve [-EmoSv] [-d output_dir]
           [-e external_package_file]... [-s suffix]
           manifest_file ...

DESCRIPTION
       The pkgdepend command generates and resolves dependencies for packages.
       A package might depend on files from other packages. The pkgdepend com‐
       mand  is  typically  used in two passes: file dependency generation and
       file-to-package resolution.


       The generate subcommand examines the content of a  package  and  deter‐
       mines what external files the package needs.


       The  resolve subcommand takes the list of files from the generate step,
       and searches a reference set of packages to determine the names of  the
       packages that contain those dependent files. The reference set of pack‐
       ages  that  are  searched for the dependent files are the packages that
       are currently installed on the publisher's system.


       Several components of delivered files are used as sources of dependency
       information:

       ELF           ELF headers in delivered files are  analyzed  for  depen‐
                     dency  information,  with the -k and -D options modifying
                     the information obtained. For more details on ELF  depen‐
                     dencies,  see ldd and the Oracle Solaris 11.4 Linkers and
                     Libraries Guide.


       Scripts       Shell scripts that contain #! lines referencing an inter‐
                     preter result in a dependency on the package that  deliv‐
                     ers that interpreter.


       Python        Python  scripts  are  first analyzed as scripts. In addi‐
                     tion, any imports the script declares might also serve as
                     sources of dependency information.


       Hard links    Hard links in manifests result in  a  dependency  on  the
                     package that delivers the link target.


       SMF           Delivered  SMF service manifests that include require_all
                     dependencies result in dependencies on the packages  that
                     deliver the SMF manifests that provide those FMRIs.


OPTIONS
       The following options are supported:

       -?
       --help

           Display a usage message.



       -R dir

           Operate  on  the image rooted at dir. If no directory was specified
           or determined based on environment, the default is /. See the  "En‐
           vironment Variables" section for more information.


SUB-COMMANDS
       The following subcommands are supported:

       pkgdepend generate [-IMm] -d dir [-d dir] [-D name=value] [-k path]
       manifest_file

           Produce the dependencies on files of the manifest specified by man‐
           ifest_file.


           -I

               Show  the dependencies that are satisfied within manifest_file.
               Do not use the result of -I with pkgdepend resolve.


           -M

               Display a list of file types that could not be analyzed.


           -m

               Repeat the original manifest with any  discovered  dependencies
               added after.


           -d dir

               Add  dir  to a list of directories to search for the manifest's
               files.


           -D name=value

               Add the value as a way to expand the token name  in  run  paths
               for ELF file dependencies.


           -k path

               Add the path to the list of run paths to search for kernel mod‐
               ules.  Using the -k option removes the default paths, which are
               /kernel and /usr/kernel.

               Run paths such as those specified by the -k option can also  be
               specified  per  action  or  per manifest by using the action or
               manifest attribute pkg.depend.runpath. The value of the pkg.de‐
               pend.runpath attribute is a colon-separated string of the paths
               to use. Setting any pkg.depend.runpath attributes in the  mani‐
               fest or action overrides paths specified with the -k option.

               The  special token $PKGDEPEND_RUNPATH can be used as one compo‐
               nent of the pkg.depend.runpath attribute value in order to  in‐
               clude the standard system run path for the file being analyzed.

           In  some  cases,  you might want to prevent automatic generation of
           dependencies. For example, if a package delivers  a  sample  Python
           script that imports a set of modules, those modules imported by the
           sample  script  are  not dependencies for the package that delivers
           the sample script. Use the action  or  manifest  attribute  pkg.de‐
           pend.bypass-generate to prevent generating dependencies against the
           specified files.

           The  pkg.depend.bypass-generate  values  are Python regular expres‐
           sions that match file names. The regular expressions are implicitly
           anchored at the start and end of the file path. The value given  in
           the  following  example  matches this/that but does not match some‐
           thing/this/that/the/other.


             pkg.depend.bypass-generate=this/that

           For more information about Python regular  expression  syntax,  use
           the  command  pydoc  re  or  see  more  complete  documentation  at
           http://docs.python.org/dev/howto/regex.html.

           When pkgdepend generate input manifests contain SMF manifest files,
           any SMF services or instances declared by those SMF manifest  files
           are  included  in  the  pkgdepend output. These SMF services or in‐
           stances are included in the form of a  set  action  with  the  name
           org.opensolaris.smf.fmri.


       pkgdepend resolve [-EmoSv] [-d output_dir] [-e external_pack‐
       age_file]... [-s suffix] manifest_file ...

           Transform  dependencies  on files into dependencies on the packages
           that deliver those files. Dependencies are first  resolved  against
           the  manifests given on the command line and then against the pack‐
           ages installed on the system. By default, the dependencies for each
           manifest are placed in a file named manifest_file.res.

           -e external_package_file

               Only resolve against packages from the system whose names match
               a pattern in external_package_file. This option can  be  speci‐
               fied  multiple  times. The -e option cannot be used with the -S
               option.


           -E

               If -e is specified, show the packages that were expected to  be
               external dependencies but were not external dependencies. Pack‐
               ages  that  were expected to be external dependencies are pack‐
               ages from the system whose names  match  a  pattern  in  exter‐
               nal_package_file.

               If  -e  is not specified, show the external dependencies of the
               resolved packages. External dependencies of the resolved  pack‐
               ages  are  packages not named on the command line that are tar‐
               gets of dependencies in the resolved packages.


           -m

               Repeat the manifest, with any dependencies produced by the gen‐
               erate step removed, before adding the resolved dependencies.


           -o

               Write the results to standard output. This option  is  intended
               for  human  consumption.  Appending this output to a file might
               result in an  invalid  manifest.  The  -d  or  -s  options  are
               strongly  recommended  instead  of -o for use in a pipeline for
               manifest processing.


           -d output_dir

               Write the resolved dependencies for each manifest provided in a
               separate file in output_dir. By default, each file has the same
               base name as the manifest that was the source of the  dependen‐
               cies written to that file.


           -s suffix

               For  each  output  file,  append suffix to the base name of the
               file that was the source of the resolved dependencies. If  suf‐
               fix is not .suffix, a period (.) is prepended to suffix.


           -S

               Only  resolve  against  the manifests given on the command line
               and not against the manifests installed on the system.


           -v

               Include additional package dependency debugging metadata.



EXAMPLES
       Example 1 Generate Dependencies



       Generate the dependencies for the manifest written in foo,  whose  con‐
       tent directory is in ./bar/baz, and store the results in foo.fdeps.


         $ pkgdepend generate -d ./bar/baz foo > foo.fdeps


       Example 2 Resolve Dependencies



       Resolve  the  file dependencies in foo.fdeps and bar.fdeps against each
       other and against the packages currently installed on the system.


         $ pkgdepend resolve foo.fdeps bar.fdeps
         $ ls *.res
         foo.fdeps.res    bar.fdeps.res


       Example 3 Generate and Resolve Dependencies For Two Manifests



       Generate the file dependencies for two manifests (foo and bar) and  re‐
       tain  all  the  information in the original manifests. Then resolve the
       file dependencies and place the resulting manifests in ./res. These re‐
       sulting manifests can be used with pkgsend publish.


         $ pkgdepend generate -d /proto/foo -m foo > ./deps/foo
         $ pkgdepend generate -d /proto/bar -m bar > ./deps/bar
         $ pkgdepend resolve -m -d ./res ./deps/foo ./deps/bar
         $ ls ./res
         foo    bar


       Example 4 Add Values To Tokens For ELF File Dependencies



       Replace all PLATFORM tokens in the run paths in ELF  files  with  sun4v
       and sun4u while generating the dependencies for the manifest written in
       foo whose content directory is in /.


         $ pkgdepend generate -d / -D 'PLATFORM=sun4v' \
         -D 'PLATFORM=sun4u' foo


       Example 5 Specify a Kernel Module Directory



       Specify  /kmod  as  the  directory in which to find kernel modules when
       generating the dependencies for the manifest written in foo whose  con‐
       tent directory is in /.


         $ pkgdepend generate -d / -k /kmod foo


       Example 6 Bypass Dependency Generation



       Append  opt/python  to  the standard Python run path for a given Python
       script, and bypass dependency generation  against  all  Python  modules
       called test for a file delivered as opt/python/foo/file.py.



       Avoid   generating   dependencies   against   any   file  delivered  in
       usr/lib/python2.7/vendor-packages/xdg.


         $ cat manifest.py
         set name=pkg.fmri value=pkg:/mypackage@1.0,1.0
         set name=pkg.summary value="My test package"
         dir path=opt mode=0755 group=sys owner=root
         dir path=opt/python mode=0755 group=sys owner=root
         dir path=opt/python/foo mode=0755 group=sys owner=root
         file path=opt/python/__init__.py mode=0644 group=sys owner=root
         file path=opt/python/foo/__init__.py mode=0644 group=sys owner=root
         #
         # Add runpath and bypass-generate attributes:
         #
         file path=opt/python/foo/file.py mode=0644 group=sys owner=root \
             pkg.depend.bypass-generate=.*/test.py.* \
             pkg.depend.bypass-generate=.*/testmodule.so \
             pkg.depend.bypass-generate=.*/test.so \
             pkg.depend.bypass-generate=usr/lib/python2.7/vendor-packages/xdg/.* \
             pkg.depend.runpath=$PKGDEPEND_RUNPATH:/opt/python

         $ pkgdepend generate -d proto manifest.py


ENVIRONMENT VARIABLES
       PKG_IMAGE    Specifies the directory that contains the image to use for
                    package operations. This value is ignored if -R is  speci‐
                    fied.


EXIT STATUS
       The following exit values are returned:

       0     Everything worked.


       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
       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               17 Nov 2017                     pkgdepend(1)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3