summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint/files/pkglint.0
blob: f30186ae3c0f2073ab658f2501901efa83fe42d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
PKGLINT(1)                  NetBSD Reference Manual                 PKGLINT(1)

NNAAMMEE
     ppkkgglliinntt - a verifier for pkgsrc directories

SSYYNNOOPPSSIISS
     ppkkgglliinntt [--ooppttiioonnss] [_d_i_r]

DDEESSCCRRIIPPTTIIOONN
     ppkkgglliinntt tries to verify the content of a pkgsrc directory.  The purpose
     of ppkkgglliinntt can be separated into two parts: (1) to let the submitters
     easily polish her/his own pkgsrc directory, and (2) to decrease the labor
     of the committers.

     ppkkgglliinntt uses very simple regular-expression matching for verifying files
     that make up a pkgsrc directory.  Note that it does NOT implement a com-
     plete parser for those files.  Because of this the user may see some ex-
     tra warnings, especially when checking complex _M_a_k_e_f_i_l_es.

     OOppttiioonnss

     --BB _n        Set the number of contiguous blank lines allowed in _M_a_k_e_f_i_l_e
                 to _n (by default, _n is 1.)

     --CC{{[[nnoo--]]cchheecckk,,......}}
                 Enable or disable specific checks. For a list of checks, see
                 below.

     --hh|----hheellpp   Show the summary of command line options, then exit.

     --II          Show the Makefile that is constructed by including all the
                 files that are slurped in via .include directives.  This flag
                 is mainly for debugging.

     --NN          New package flag.  Adds several checks specific to newly sub-
                 mitted packages.  If you are willing to submit the directory
                 to be checked as a new package, use this option.  This option
                 is deprecated.  Use --CC_n_e_w_p_k_g instead.

     --qq|----qquuiieett  Don't print the errors and warnings summary before terminat-
                 ing.

     --vv|----vveerrbboossee
                 Be verbose.  Show the progress report for items that are be-
                 ing checked.

     --WW{{[[nnoo--]]wwaarrnn,,......}}
                 Enable or disable specific warnings.  For a list of warnings,
                 see below.

     CChheecckkss

     all         Enable all checks.

     none        Disable all checks.  Currently the Makefile is checked in ev-
                 ery case to get meta information about the package structure.

     [no-]MESSAGE
                 Check MESSAGE files.

     [no-]PLIST  Check PLIST files.

     [no-]distinfo
                 Check the distinfo file.

     [no-]extra  Check remaining files in the package directory.

     [no-]newpkg
                 Enable special checks for uncommitted packages.

     [no-]patches
                 Check the pkgsrc specific patch files.

     WWaarrnniinnggss

     all         Enable all warnings.

     none        Disable all warnings.

     [no-]absname
                 Warn if a file contains an absolute pathname.

     [no-]directcmd
                 Warn if a system command name is used instead of a variable
                 (e.g. sed instead of ${SED}).

     [no-]exec   Warn if a file in the package directory is executable.  Most
                 files should not be executable until they are installed.

     [no-]paren  Warn if variables are used like $(VAR) in Makefiles.  They
                 should always be used like ${VAR}.

     [no-]sort   Warn if items of a list are not correctly sorted.  Currently
                 this affects PLISTs and the SUBDIRs in category Makefiles.

     [no-]types  Warn for some Makefile variables if their assigned values do
                 not match their type.

     [no-]workdir
                 Warn about existing _w_o_r_k_* directories.  They might be commit-
                 ted to CVS accidentally.

     OOtthheerr aarrgguummeennttss

     dir         The pkgsrc directory to be checked.  If omitted, all checks
                 will be performed on the current directory.

FFIILLEESS
     /usr/pkgsrc/mk/bsd.pkg.mk  master Makefile for pkgsrc
     /usr/pkgsrc/*              pkgsrc collection

EEXXAAMMPPLLEESS
     ppkkgglliinntt --CCnnoonnee,,ppaattcchheess.  Checks the patches of the package in the current
     directory.  ppkkgglliinntt --WWaallll //uussrr//ppkkggssrrcc//ddeevveell Checks the category Makefile
     and reports any warnings it can find.

DDIIAAGGNNOOSSTTIICCSS
     Messages will be sent to standard output, not standard error.

     FATAL: ...    This type of error messages suggests that there is some fa-
                   tal error in the pkgsrc directory.  For example, if some
                   files need a rewrite, or if some necessary files are miss-
                   ing, this message will show up.  This kind of error should
                   be fixed BEFORE submitting a package via send-pr(1).

     WARN: ...     This type of error messages suggests that some files may
                   (or may not) need some fixes.  Basically, warnings are pro-
                   duced when ppkkgglliinntt is not completely sure about the result.
                   For example, complex _M_a_k_e_f_i_l_es may need some statements
                   that can match the regular expression ppkkgglliinntt uses for san-
                   ity checks.  In those cases, the user should evaluate the
                   result manually, and obey/ignore the result.

     OK: ...       This type of messages is used in verbose mode (--vv).

AAUUTTHHOORRSS
     Jun-ichiro Itoh <itojun@itojun.org>, Yoshishige Arai <ryo2@on.rim.or.jp>,
     and Roland Illig <roland.illig@gmx.de>.  Many people have contributed
     patches and comments/suggestions.

BBUUGGSS
     ppkkgglliinntt still emits too many false positive warnings.  Many of the warn-
     ings concerning Makefiles do not print the file and line number where the
     warning originated.

                                 May 15, 2005                                3