pkgsrc/pkgtools/pkglint/files/pkglint.1

168 lines
4.7 KiB
Groff
Raw Normal View History

.\" $NetBSD: pkglint.1,v 1.27 2005/11/14 11:45:52 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.
.\"
2005-07-21 04:47:58 +02:00
.\" Roland Illig <roland.illig@gmx.de>, 2004, 2005.
.\" Roland Illig <rillig@NetBSD.org>, 2005.
.\"
.Dd November 04, 2005
.Dt PKGLINT 1
.Sh NAME
.Nm pkglint
.Nd a verifier for pkgsrc directories
.Sh SYNOPSIS
.Nm pkglint
.Op Fl options
2005-09-04 02:04:15 +02:00
.Op Ar dir ...
.Sh DESCRIPTION
.Nm
2005-07-21 11:07:38 +02:00
attempts to detect features of the named pkgsrc packages that are likely
2005-07-21 04:47:58 +02:00
to be bugs, or that are simply deprecated.
The pkgsrc system is changing rapidly towards even more portability.
The job of
.Nm
2005-07-21 04:47:58 +02:00
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
2005-07-21 11:07:38 +02:00
.Bl -tag -width 18n -offset indent
.It Fl C{[no-]check,...}
2005-09-04 20:45:36 +02:00
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 i Ns | Ns Fl -import
Check if a package is ready to be imported into pkgsrc.
2005-09-28 12:06:29 +02:00
.It Fl q Ns | Ns Fl -quiet
Don't print the errors and warnings summary before terminating.
.It Fl R Ns | Ns Fl -rcsidstring
Allow other RCS Id strings than NetBSD.
Multiple strings may be concatenated with
.Ql | .
.It Fl r
Check subdirectories, too.
The subdirectories are those that are mentioned in a
.Ql SUBDIR+=
line.
.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
2005-07-21 11:07:38 +02:00
.Bl -tag -width 18n -offset indent
.It Cm all
Enable all checks.
2005-07-21 11:07:38 +02:00
.It Cm none
Disable all checks.
.It Cm [no-]ALTERNATIVES
Check the alternatives file.
.It Cm [no-]INSTALL
Check the INSTALL and DEINSTALL scripts.
2005-07-21 11:07:38 +02:00
.It Cm [no-]Makefile
2005-07-21 04:47:58 +02:00
Check the package Makefile, including all included files.
2005-07-21 11:07:38 +02:00
.It Cm [no-]MESSAGE
Check MESSAGE files.
2005-07-21 11:07:38 +02:00
.It Cm [no-]PLIST
Check PLIST files.
.It Cm [no-]bl3
Check buildlink3 Makefiles.
2005-07-21 11:07:38 +02:00
.It Cm [no-]distinfo
Check the distinfo file.
2005-07-21 11:07:38 +02:00
.It Cm [no-]extra
Check remaining files in the package directory.
.It Cm [no-]mk
Check Makefile fragments besides buildlink3.
2005-07-21 11:07:38 +02:00
.It Cm [no-]patches
Check the pkgsrc specific patch files.
.El
.Pp
.Sy Warnings
2005-07-21 11:07:38 +02:00
.Bl -tag -width 18n -offset indent
.It Cm all
Enable all warnings.
2005-07-21 11:07:38 +02:00
.It Cm none
Disable all warnings.
2005-07-21 11:07:38 +02:00
.It Cm [no-]absname
Warn if a file contains an absolute pathname.
2005-07-21 11:07:38 +02:00
.It Cm [no-]directcmd
Warn if a system command name is used instead of a variable (e.g. sed
instead of ${SED}).
2005-07-21 11:07:38 +02:00
.It Cm [no-]exec
Warn if a file in the package directory is executable.
Most files should not be executable until they are installed.
2005-07-21 11:07:38 +02:00
.It Cm [no-]order
2005-05-23 00:53:13 +02:00
Warn if Makefile variables are not in the preferred order.
2005-07-21 11:07:38 +02:00
.It Cm [no-]paren
Warn if variables are used like $(VAR) in Makefiles.
They should always be used like ${VAR}.
2005-07-21 11:07:38 +02:00
.It Cm [no-]plist-sort
Warn if items of a PLIST file are not sorted alphabetically.
This warning is disabled by default.
2005-07-21 11:07:38 +02:00
.It Cm [no-]types
Warn for some Makefile variables if their assigned values do not match
their type.
.El
.Pp
.Sy Other arguments
.Bl -tag -width 18n -offset indent
2005-07-21 11:07:38 +02:00
.It Ar dir ...
2005-07-21 04:47:58 +02:00
The pkgsrc directories to be checked.
If omitted, the current directory is checked.
.El
.Sh FILES
.Bl -tag -width pkgsrc/mk/* -compact
.It Pa pkgsrc/mk/*
Files from the pkgsrc infrastructure.
.El
.Sh EXAMPLES
.Bl -tag -width Fl
2005-07-21 11:07:38 +02:00
.It Ic pkglint \-Cnone,patches \&.
Checks the patches of the package in the current directory.
2005-07-21 11:07:38 +02:00
.It Ic pkglint \-Wall /usr/pkgsrc/devel
Checks the category Makefile and reports any warnings it can find.
.It Ic pkglint -r \-R 'NetBSD|Id' /usr/pkgsrc
Check the whole pkgsrc tree while allowing
.Ql NetBSD
or
.Ql Id
as the RCS Id.
.El
.Sh DIAGNOSTICS
2005-07-21 04:47:58 +02:00
Diagnostics are written to the standard output.
.Bl -tag -width "WARN: foobaa"
2005-09-04 02:04:15 +02:00
.It ERROR: ...
Errors should be fixed before a package is committed to pkgsrc.
.It WARN: ...
2005-07-21 04:47:58 +02:00
Warnings generally should be fixed, but they are not as critical as
2005-09-04 02:04:15 +02:00
errors.
.It OK: ...
2005-07-21 04:47:58 +02:00
Informational messages are only written in verbose mode
.Pq Fl v .
2005-07-21 04:47:58 +02:00
Their main use is to aid debugging.
.El
.Sh AUTHORS
2005-07-21 11:07:38 +02:00
.An Jun-ichiro Itoh Aq itojun@itojun.org
.An Yoshishige Arai Aq ryo2@on.rim.or.jp
.An Roland Illig Aq rillig@NetBSD.org
.Pp
2000-09-04 02:48:10 +02:00
Many people have contributed patches and comments/suggestions.
.Sh BUGS
2005-07-21 04:47:58 +02:00
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.