summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint/files/pkglint.0
blob: 28673d804b17811a33ec292164e88d3c1ab4742c (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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
PKGLINT(1)              NetBSD General Commands Manual              PKGLINT(1)

NNAAMMEE
     ppkkgglliinntt -- a verifier for pkgsrc directories

SSYYNNOOPPSSIISS
     ppkkgglliinntt [--ooppttiioonnss] [_d_i_r _._._.]

DDEESSCCRRIIPPTTIIOONN
     ppkkgglliinntt attempts to detect features of the named pkgsrc packages that are
     likely to be bugs, or that are simply deprecated.  The pkgsrc system is
     changing rapidly towards even more portability.  The job of ppkkgglliinntt is to
     define the rules that make up ``good'' packages and to allow automatic
     conformance tests.  Packages following these rules are assumed to make
     future changes to the pkgsrc infrastructure easier.

     OOppttiioonnss

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

           --FF|----aauuttooffiixx        Repair trivial things automatically.  Currently
                               this only works for the synchronization of cat-
                               egory _M_a_k_e_f_i_l_es.

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

           --RR|----rrccssiiddssttrriinngg    Allow other RCS Id strings than NetBSD.  Multi-
                               ple strings may be concatenated with `|'.

           --VV|----vveerrssiioonn        Print the current ppkkgglliinntt version number and
                               exit.

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

           --ee|----eexxppllaaiinn        Print further explanations for diagnostics.
                               Sometimes the reasons for diagnostics are not
                               obvious and need further explanation.

           --gg|----ggcccc--oouuttppuutt--ffoorrmmaatt
                               Use a format for the diagnostics that is under-
                               stood by most programs, especially editors, so
                               they can provide a point-and-goto interface.

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

           --ii|----iimmppoorrtt         Check if a package is ready to be imported into
                               pkgsrc.  This is especially useful for packages
                               from the pkgsrc-wip project.

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

           --rr                  Check subdirectories, too.  The subdirectories
                               are those that are mentioned in a `SUBDIR+='
                               line.

           --ss|----ssoouurrccee         For all diagnostics having file and line number
                               information, show the source code along with
                               the diagnostics.

           --vv|----vveerrbboossee        Be verbose.  Show the progress report for items
                               that are being checked.  If given more than
                               once, debugging messages are also shown.

     CChheecckkss

           aallll                 Enable all checks.

           nnoonnee                Disable all checks.

           [[nnoo--]]AALLTTEERRNNAATTIIVVEESS   Check the alternatives file.

           [[nnoo--]]IINNSSTTAALLLL        Check the INSTALL and DEINSTALL scripts.

           [[nnoo--]]MMaakkeeffiillee       Check the package Makefile, including all
                               included files.

           [[nnoo--]]MMEESSSSAAGGEE        Check MESSAGE files.

           [[nnoo--]]PPLLIISSTT          Check PLIST files.

           [[nnoo--]]bbll33            Check buildlink3 Makefiles.

           [[nnoo--]]ddiissttiinnffoo       Check the distinfo file.

           [[nnoo--]]eexxttrraa          Check remaining files in the package directory.

           [[nnoo--]]mmkk             Check Makefile fragments besides buildlink3.

           [[nnoo--]]ppaattcchheess        Check the pkgsrc specific patch files.

     WWaarrnniinnggss

           aallll                 Enable all warnings.

           nnoonnee                Disable all warnings.

           [[nnoo--]]aabbssnnaammee        Warn if a file contains an absolute pathname.

           [[nnoo--]]ddeebbuugg          Enable some warnings that are only useful for
                               debugging pkglint itself.

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

           [[nnoo--]]eexxttrraa          Emit some additional warnings that are not
                               enabled by default, for whatever reason.

           [[nnoo--]]oorrddeerr          Warn if Makefile variables are not in the pre-
                               ferred order.

           [[nnoo--]]pplliisstt--ssoorrtt     Warn if items of a PLIST file are not sorted
                               alphabetically.  This warning is disabled by
                               default.

           [[nnoo--]]qquuoottiinngg        Warn for possibly invalid quoting of make vari-
                               ables in shell programs and shell variables
                               themselves.

           [[nnoo--]]ssppaaccee          Emit notes for inconsistent use of white-space.

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

     OOtthheerr aarrgguummeennttss

           _d_i_r _._._.             The pkgsrc directories to be checked.  If omit-
                               ted, the current directory is checked.

FFIILLEESS
     pkgsrc/mk/*  Files from the pkgsrc infrastructure.

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.

     ppkkgglliinntt --rr --RR ''NNeettBBSSDD||IIdd'' //uussrr//ppkkggssrrcc
                 Check the whole pkgsrc tree while allowing `NetBSD' or `Id'
                 as the RCS Id.

DDIIAAGGNNOOSSTTIICCSS
     Diagnostics are written to the standard output.

     ERROR: ...    Errors should be fixed before a package is committed to
                   pkgsrc.

     WARN: ...     Warnings generally should be fixed, but they are not as
                   critical as errors.

     OK: ...       Informational messages are only written in verbose mode
                   (--vv).  Their main use is to aid debugging.

AAUUTTHHOORRSS
     Jun-ichiro Itoh <itojun@itojun.org>
     Yoshishige Arai <ryo2@on.rim.or.jp>
     Roland Illig <rillig@NetBSD.org>

     Many people have contributed patches and comments/suggestions.

BBUUGGSS
     Many more checks could be added.

     If you don't understand the messages, feel free to ask on the
     <tech-pkg@NetBSD.org> mailing list.

pkgsrc                         November 04, 2005                        pkgsrc