161 lines
4.2 KiB
Groff
161 lines
4.2 KiB
Groff
.\" $NetBSD: pkglint.1,v 1.15 2005/07/21 02:47:58 rillig Exp $
|
|
.\" From FreeBSD: portlint.1,v 1.8 1997/11/25 14:53:14 itojun Exp
|
|
.\"
|
|
.\" Copyright (c) 1997 by Jun-ichiro Itoh <itojun@itojun.org>.
|
|
.\" All Rights Reserved. Absolutely no warranty.
|
|
.\"
|
|
.\" Roland Illig <roland.illig@gmx.de>, 2004, 2005.
|
|
.\"
|
|
.Dd Jul 21, 2005
|
|
.Dt PKGLINT 1
|
|
.Sh NAME
|
|
.Nm pkglint
|
|
.Nd a verifier for pkgsrc directories
|
|
.Sh SYNOPSIS
|
|
.Nm pkglint
|
|
.Op Fl options
|
|
.Op Ar dir
|
|
.Sh DESCRIPTION
|
|
.Nm
|
|
attempts to detect features of the names 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
|
|
.Nm
|
|
is to define the rules that make up
|
|
.Dq good
|
|
packages and to allow automatic conformance tests.
|
|
Packages following these rules are assumed to make future changes to the
|
|
pkgsrc infrastructure easier.
|
|
.Pp
|
|
.Sy Options
|
|
.Bl -tag -width Fl
|
|
.It Fl B Ar n
|
|
Set the number of contiguous blank lines allowed in
|
|
.Pa Makefile
|
|
to
|
|
.Ar n
|
|
(by default,
|
|
.Ar n
|
|
is 1.)
|
|
.It Fl C{[no-]check,...}
|
|
Enable or disable specific checks. For a list of checks, see below.
|
|
.It Fl h Ns | Ns Fl -help
|
|
Show the summary of command line options, then exit.
|
|
.It Fl I
|
|
Show the Makefile that is constructed by including all the files that
|
|
are slurped in via .include directives.
|
|
This flag is mainly for debugging.
|
|
.It Fl q Ns | Ns Fl -quiet
|
|
Don't print the errors and warnings summary before terminating.
|
|
.It Fl v Ns | Ns Fl -verbose
|
|
Be verbose.
|
|
Show the progress report for items that are being checked.
|
|
.It Fl W{[no-]warn,...}
|
|
Enable or disable specific warnings.
|
|
For a list of warnings, see below.
|
|
.El
|
|
.Pp
|
|
.Sy Checks
|
|
.Bl -tag -width Fl
|
|
.It all
|
|
Enable all checks.
|
|
.It none
|
|
Disable all checks.
|
|
.It [no-]Makefile
|
|
Check the package Makefile, including all included files.
|
|
.It [no-]MESSAGE
|
|
Check MESSAGE files.
|
|
.It [no-]PLIST
|
|
Check PLIST files.
|
|
.It [no-]distinfo
|
|
Check the distinfo file.
|
|
.It [no-]extra
|
|
Check remaining files in the package directory.
|
|
.It [no-]patches
|
|
Check the pkgsrc specific patch files.
|
|
.El
|
|
.Pp
|
|
.Sy Warnings
|
|
.Bl -tag -width Fl
|
|
.It all
|
|
Enable all warnings.
|
|
.It none
|
|
Disable all warnings.
|
|
.It [no-]absname
|
|
Warn if a file contains an absolute pathname.
|
|
.It [no-]directcmd
|
|
Warn if a system command name is used instead of a variable (e.g. sed
|
|
instead of ${SED}).
|
|
.It [no-]exec
|
|
Warn if a file in the package directory is executable.
|
|
Most files should not be executable until they are installed.
|
|
.It [no-]order
|
|
Warn if Makefile variables are not in the preferred order.
|
|
.It [no-]paren
|
|
Warn if variables are used like $(VAR) in Makefiles.
|
|
They should always be used like ${VAR}.
|
|
.It [no-]plist-sort
|
|
Warn if items of a PLIST file are not sorted alphabetically.
|
|
This warning is disabled by default.
|
|
.It [no-]types
|
|
Warn for some Makefile variables if their assigned values do not match
|
|
their type.
|
|
.It [no-]workdir
|
|
Warn about existing
|
|
.Pa work*
|
|
directories.
|
|
They might be committed to CVS accidentally.
|
|
.El
|
|
.Pp
|
|
.Bl -tag -width Fl
|
|
.Sy Other arguments
|
|
.It dir ...
|
|
The pkgsrc directories to be checked.
|
|
If omitted, the current directory is checked.
|
|
.El
|
|
.Sh FILES
|
|
.Bl -tag -width /usr/pkgsrc/mk/bsd.pkg.mk -compact
|
|
.It Pa /usr/pkgsrc/mk/bsd.pkg.mk
|
|
The pkgsrc master Makefile
|
|
.It Pa /usr/pkgsrc/*
|
|
The files of the
|
|
.Nx
|
|
packages collection
|
|
.El
|
|
.Sh EXAMPLES
|
|
.Bl -tag -width Fl
|
|
.Ic pkglint \-Cnone,patches \ .
|
|
Checks the patches of the package in the current directory.
|
|
.Pp
|
|
.Ic pkglint \-Wall /usr/pkgsrc/devel
|
|
Checks the category Makefile and reports any warnings it can find.
|
|
.El
|
|
.Sh DIAGNOSTICS
|
|
Diagnostics are written to the standard output.
|
|
.Bl -tag -width "WARN: foobaa"
|
|
.It FATAL: ...
|
|
Fatal errors are those that must be fixed before a package may be
|
|
committed to pkgsrc.
|
|
.It WARN: ...
|
|
Warnings generally should be fixed, but they are not as critical as
|
|
fatal errors.
|
|
.It OK: ...
|
|
Informational messages are only written in verbose mode
|
|
.Pq Fl v .
|
|
Their main use is to aid debugging.
|
|
.El
|
|
.Sh AUTHORS
|
|
Jun-ichiro Itoh
|
|
.Aq itojun@itojun.org ,
|
|
Yoshishige Arai
|
|
.Aq ryo2@on.rim.or.jp ,
|
|
Roland Illig
|
|
.Aq rillig@NetBSD.org .
|
|
Many people have contributed patches and comments/suggestions.
|
|
.Sh BUGS
|
|
Many more checks could be added.
|
|
.Pp
|
|
If you don't understand the messages, feel free to ask on the
|
|
.Aq tech-pkg@NetBSD.org
|
|
mailing list.
|