pkgsrc/pkgtools/pkglint/files/pkglint.1
wiz 8510a511d9 3.91:
- added options for enabling/disabling specific checks
- added options for enabling/disabling specific warnings
- improved the --help message
and corresponding man page updates.
From Roland Illig with slight fixes by me.
2004-09-24 15:33:26 +00:00

178 lines
4.9 KiB
Groff

.\" $NetBSD: pkglint.1,v 1.8 2004/09/24 15:33:26 wiz 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.
.\"
.Dd September 23, 2004
.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
tries to verify the content of a pkgsrc directory.
The purpose of
.Nm
can be separated into two parts:
.Pq 1
to let the submitters easily polish her/his own pkgsrc directory, and
.Pq 2
to decrease the labor of the committers.
.Pp
.Nm
uses very simple regular-expression matching for verifying
files that make up a pkgsrc directory.
Note that it does NOT implement a complete parser for those files.
Because of this the user may see some extra warnings,
especially when checking complex
.Pa Makefile Ns No s .
.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 N
New package flag.
Adds several checks specific to newly submitted packages.
If you are willing to submit the directory to be checked as a new package,
use this option.
This option is deprecated.
Use
.Fl C Ns Ar newpkg
instead.
.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.
Currently the Makefile is checked in every case to
get meta information about the package structure.
.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-]newpkg
Enable special checks for uncommitted packages.
.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-]paren
Warn if variables are used like $(VAR) in Makefiles.
They should always be used like ${VAR}.
.It [no-]patches
Warn if a patch file patches more than one file or if the patches differ
from what is recorded in the distinfo file.
.El
.Pp
.Bl -tag -width Fl
.Sy Other arguments
.It dir
The pkgsrc directory to be checked.
If omitted, all checks will be performed on the current directory.
.El
.Sh FILES
.Bl -tag -width /usr/share/mk/bsd.port.mk -compact
.It Pa /usr/pkgsrc/mk/bsd.pkg.mk
master Makefile for pkgsrc
.It Pa /usr/pkgsrc/*
pkgsrc collection
.El
.Sh EXAMPLES
.Bl -tag -width Fl
.Ic "pkglint -Cnone,patches ."
Checks the patches of the package in the current directory.
.Ic "pkglint -Wall /usr/pkgsrc/devel"
Checks the category Makefile and reports any warnings it can find.
.El
.Sh DIAGNOSTICS
Messages will be sent to standard output, not standard error.
.Bl -tag -width "WARN: foobaa"
.It FATAL: ...
This type of error messages suggests that there is some fatal error
in the pkgsrc directory.
For example, if some files need a rewrite, or if
some necessary files are missing, this message will show up.
This kind of error should be fixed BEFORE submitting a package via
.Xr send-pr 1 .
.\"If a submitter submit it without update, committers will need to rewrite
.\"on behalf of the submitters, which may result in delay of
.\"the development of operating system itself.
.It WARN: ...
This type of error messages suggests that some files may (or may not)
need some fixes.
Basically, warnings are produced when
.Nm
is not completely sure about the result.
For example, complex
.Pa Makefile Ns No s
may need some statements that can match the regular expression
.Nm
uses for sanity checks.
In those cases, the user should evaluate the result manually,
and obey/ignore the result.
.It OK: ...
This type of messages is used in verbose mode
.Pq Fl v .
.El
.Sh AUTHORS
Jun-ichiro Itoh
.Aq itojun@itojun.org ,
Yoshishige Arai
.Aq ryo2@on.rim.or.jp ,
and Roland Illig
.Aq roland.illig@gmx.de .
Many people have contributed patches and comments/suggestions.
.Sh BUGS
.Nm
still emits too many false positive warnings.
Many of the warnings concerning Makefiles do not print the file
and line number where the warning originated.