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

개요

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

pkglint(1)

pkglint(1)                       User Commands                      pkglint(1)

NAME
       pkglint - Image Packaging System package lint

SYNOPSIS
       /usr/bin/pkglint [-c cache_dir] [-r repo_uri]... [-p regexp]
           [-e extension_path] [-f config_file] [-b branch]
           [-v] [-l lint_uri]... | manifest ...


       /usr/bin/pkglint -L [-v]

DESCRIPTION
       pkglint  runs  a series of checks on one or more package manifests, op‐
       tionally referencing another repository.


       pkglint should be used during the package authoring process,  prior  to
       package  publication.  pkglint performs exhaustive testing on the mani‐
       fests that might be too expensive to perform during normal operation of
       pkgsend or pkg.depotd. pkglint checks include tests for  duplicate  ac‐
       tions, missing attributes, and unusual file permissions.


       Manifests  for linting can be passed as a space-separated list of local
       files on the command line, or manifests can be retrieved from a reposi‐
       tory.


       When retrieving manifests from repositories, on first run pkglint  cre‐
       ates and populates pkg(7) user images in the specified cache directory.
       If the -r option is supplied, a user image named cache_dir/ref_image is
       created  for  the reference repository. If the -l option is supplied, a
       user image named cache_dir/lint_image is created for the  lint  reposi‐
       tory.  No  content  is installed in these images. These images are only
       used by pkglint to retrieve manifests from the repositories.


       Subsequent invocations of pkglint can reuse the cache directory and can
       omit any -r or -l arguments.


       pkglint provides limited support  for  configuring  publishers  in  the
       cache  directory.  Use pkg to perform more complex publisher configura‐
       tion on these images.


       pkglint allows package authors to bypass checks for a given manifest or
       action. A manifest or action that contains the attribute pkg.linted set
       to True does not produce any lint output for that manifest or action.


       More granular pkg.linted settings  can  be  made  using  substrings  of
       pkglint  check  names. For example, pkg.linted.check.id set to True by‐
       passes all checks with the name check.id for the given manifest or  ac‐
       tion.


       The  behavior  of  pkglint  can be configured by specifying a pkglintrc
       file. By default, pkglint searches in /usr/share/lib/pkg/pkglintrc  and
       $HOME/.pkglintrc  for configuration options. Use the -f option to spec‐
       ify a different configuration file.


       During the lint run, any errors or warnings encountered are printed  to
       stderr.

OPTIONS
       The following options are supported:

       -h
       --help

           Display a usage message.



       -b branch

           Specify  a  branch  used to narrow the list of packages used during
           linting from lint and reference repositories. If no  -b  option  is
           specified,  the  latest versions of packages are used. See also the
           version.pattern configuration property.


       -c cache_dir

           Specify a local directory used for caching  package  metadata  from
           the lint and reference repositories.


       -l lint_uri

           Specify  a  URI  representing  the location of the lint repository.
           Both HTTP and file system based publication are supported.  If  you
           specify  -l,  then  you  must also specify -c. The -l option can be
           specified multiple times.


       -L

           List the known and excluded lint checks and then exit. Display  the
           short name and description of each check. When combined with the -v
           flag,  display  the method that implements the check instead of the
           description.


       -f config_file

           Configure the pkglint session using the  config_file  configuration
           file.


       -e extension_path

           Directory to add to the Python search path when loading pkglint ex‐
           tensions.


       -p regexp

           Specify a regular expression used to narrow the list of packages to
           be  checked from the lint repository. All manifests from the refer‐
           ence repository are loaded (assuming they match the value  for  -b,
           if supplied), ignoring this pattern.


       -r repo_uri

           Specify  a  URI  representing the location of the reference reposi‐
           tory. If you specify -r, then you must also specify -c. The -r  op‐
           tion can be specified multiple times.


       -v

           Run pkglint in a verbose mode, overriding any log_level settings in
           the configuration file.


FILES
       The  pkglintrc  configuration  file takes the following key/value argu‐
       ments:

       log_level

           The minimum level at which to emit  lint  messages.  Lint  messages
           lower than this level are discarded. The default value is INFO.

           Log  levels in order of least to most severe are DEBUG, INFO, WARN‐
           ING, ERROR, and CRITICAL.


       do_pub_checks

           If True, perform checks that might only make  sense  for  published
           packages. The default value is True.


       pkglint.ext.*

           The  plugin mechanism of pkglint allows for additional lint modules
           to be added at runtime. Any key that starts with pkglint.ext. takes
           a value that must be a fully-specified Python module. See the  "De‐
           velopers"  section  for more information. The extension_path option
           specifies additional directory locations to search when loading ex‐
           tensions


       extension_path

           An list of directories, separated by  ':'  no  most  platforms,  to
           search  for  extension  modules. If the -e flag is specified on the
           CLI it is added higher in the search order than  this  config  file
           option.


       pkglint.exclude

           A  space-separated list of fully specified Python modules, classes,
           or function names to omit from the set of checks performed.


       use_progress_tracker

           If True, use a progress tracker when iterating over manifests  dur‐
           ing lint runs. The default value is True.


       version.pattern

           A  version  pattern,  used when specifying a branch to lint against
           (-b). If not specified in the configuration  file,  the  -b  option
           uses the pattern *-, matching all branches.


DEVELOPERS
       To   extend   the   set   of  checks  performed  by  pkglint,  subclass
       pkg.lint.base.Checker and  its  subclasses,  ManifestChecker,  and  Ac‐
       tionChecker.  Add the Python module name that contains those classes to
       a new pkglint.ext. key in the configuration file.


       Instances of those new subclasses are created by  pkglint  on  startup.
       Methods   inside  each  subclass  with  the  special  keyword  argument
       pkglint_id are invoked during the course of  the  lint  session.  Those
       methods  should  have  the  same signature as the corresponding check()
       method  in  the  super  class.  Methods  should  also  be  assigned   a
       pkglint_desc  attribute,  which  is  used as the description printed by
       pkglint -L.


       Parameters are available to Checker subclasses, allowing them  to  tune
       their   behavior.   The  recommended  parameter  naming  convention  is
       pkglint_id.name. Parameter values can be stored  in  the  configuration
       file,  or  accessed  in  manifests  or actions retrieved using the Lin‐
       tEngine.get_param() method. When accessing parameters  from  the  mani‐
       fest,  the  prefix pkg.lint is prepended to the key name to ensure that
       pkglint parameters do not overlap with any existing action or  manifest
       values.

ENVIRONMENT VARIABLES
       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


       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]



       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]...]



EXAMPLES
       Example 1 First Run on a Particular Repository



       Running a pkglint session for the first time on a given repository.


         $ pkglint -c /space/cache -r http://localhost:10000 mymanifest.mf


       Example 2 Subsequent Run on the Same Repository



       A subsequent run against the same repository used in Example 1.


         $ pkglint -c /space/cache mymanifest-fixed.mf


       Example 3 Using a Lint Repository With a Narrowed Manifest Set



       Running  a pkglint session with a lint repository and specifying a sub‐
       set of manifests to check.


         $ pkglint -c /space/othercache -l http://localhost:10000 \
         -p '.*firefox.*'


       Example 4 Specifying a Branch



       Running a pkglint session against a given branch in verbose mode.


         $ pkglint -c /space/cache -r http://localhost:10000 \
         -l http://localhost:12000 -b 11.4.0.0.0.147.0 -v


       Example 5 Modifying a Configuration File



       A configuration file with a new lint module, excluding some checks.


         $ cat ~/.pkglintrc
         [pkglint]

         log_level = DEBUG
         # log_level = INFO

         pkglint.ext.mycheck = org.timf.mychecks
         pkglint.ext.opensolaris = pkg.lint.opensolaris
         pkglint.exclude: pkg.lint.opensolaris.OpenSolarisActionChecker
         pkg.lint.pkglint.PkgActionChecker.unusual_perms pkg.lint.pkglint.PkgManifestChecker
         pkg.lint.opensolaris.OpenSolarisManifestChecker


EXIT STATUS
       The following exit values are returned:

       0     Command succeeded.


       1     One or more package manifests contain lint errors.


       2     An error occurred that is not a lint error in a manifest. For ex‐
             ample, an invalid command line option might have been 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(1), pkg.depotd(8), pkgsend(1), 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               15 Mar 2021                       pkglint(1)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3