summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint/files/lintpkgsrc.1
blob: c7a63b9deac6f8592c579aa9e6a43a1d93a46c04 (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
.\"	$NetBSD: lintpkgsrc.1,v 1.14 2000/11/17 12:45:31 abs Exp $
.\"
.\" Copyright (c) 1999 by David Brownlee (abs@netbsd.org)
.\" Absolutely no warranty.
.\"
.Dd April 19, 1999
.Dt LINTPKGSRC 1
.Sh NAME
.Nm lintpkgsrc
.Nd a verifier for the pkgsrc tree
.Sh SYNOPSIS
.Nm
.Op Fl BDLRSVdhilmopru
.Op Fl K Ar PACKAGES
.Op Fl M Ar DISTDIR
.Op Fl P Ar PKGSRCDIR
.Op Fl g Ar pkgsrcmap
.Op Pa makefile ...
.Sh DESCRIPTION
.Nm
tries to verify the entire contents of the pkgsrc tree.
.Nm
uses simple regular-expression matching for verifying
files that make up a pkgsrc directory.
Note that it does NOT implement complete Makefile parser.
.Pp
.Sy Options
.Bl -tag -width xxxxxxxxxxxx
.It Fl B
List packages marked as BROKEN.
.It Fl D Ar paths
Parse Makefiles and output contents (Useful for debugging).
.It Fl K Ar PACKAGES
Override binary packages base directory, normally set from
.Pa /etc/mk.conf
or defaulted to PKGSRCDIR/packages.
.Pp
Note: lintpkgsrc treats
.Em PACKAGES
slightly differently to the pkgsrc build system. -p, -R and -V check for
binary packages in any depth of PACKAGES subdirs - this allows packages for all
architectures/OS versions to be checked simultaneously with an
.Pa /etc/mk.conf
construct of the form:
.Bd -literal
\&.ifdef LINTPKGSRC
PACKAGES=${PKGSRCDIR}/packages
\&.else
PACKAGES=${PKGSRCDIR}/packages/${OS_VERSION}/${MACHINE_ARCH}
\&.endif
.Pp
Which would be an alternative to -K.
.Ed
.It Fl L
List the filenames of Makefiles as they are parsed (for debugging).
.It Fl M Ar DISTDIR
Set directory for distfiles, defaults to PKGSRCDIR/distfiles.
.It Fl P Ar PKGSRCDIR
Set base of pkgsrc tree, normally set from
.Pa /etc/mk.conf
or defaulted to
.Pa /usr/pkgsrc .
.It Fl R
Report any binary packages in any subdirs of
.Em PACKAGES ,
for whom the source Makefile lists
.Em NO_BIN_ON_FTP
or
.Em RESTRICTED .
This is intended to help those making binary packages available for ftp.
.It Fl S
List packages missing from category
.Em SUBDIR
lists.
.It Fl V
List any prebuilt packages in any subdirs of
.Em PACKAGES
with known vulnerabilities, based on the data in
PKGSRCDIR/distfiles/vulnerabilities .
.It Fl d
Extract the 'DEPENDS' listing from each pkgsrc package Makefile, then
verify the version specified in each DEPEND correctly matches a current
pkgsrc package.
.It Fl g Ar pkgsrcmap
Generate pkgsrcmap file containing an entry for each package of
'pkgname pkgdir pkgver'.
.It Fl h
Basic help and usage.
.It Fl i
Check the version of each installed package against the current version in
pkgsrc.
.It Fl l
Run pkglint on every package in pkgsrc.
.It Fl m
For each current distfile, verify its checksum against the appropriate
package's md5 file. Also report if any package's md5 file references
the same distfile with a different md5 checksum.
.It Fl o
Report any old distfile (not referenced by any package's md5 file).
.It Fl p
Report any old binary packages in any subdirs of
.Em PACKAGES .
.It Fl r
Remove distfiles which are not referenced from any package's md5 file,
or have an incorrect checksum (usually due to an interrupted download),
and any old binary packages. To remove any given type, additionally
specify the -o, -m, or -p flags respectively.
.It Fl u
For each package current installed, run 'make fetch-list | sh' to ensure
all the distfiles needed for the latest version are present.
.Pp
Warning: The behaviour of this command may change in a later version.
.El
.Sh AUTHOR
David Brownlee <abs@netbsd.org>
.Sh CAVEATS
The
.Fl R ,
.Fl V ,
and
.Fl p
options default to using
.Em PACKAGES
as the base directory from which to
search for binary packages. If this includes OS or architecture information
then packages for other OS/architecture combinations will be missed. 
In this case
.Em PACKAGES
can be overridden with 
.Fl K
or set conditionally in
.Pa /etc/mk.conf
based on the value of
.Em LINTPKGSRC .
.Sh BUGS
The 'Makefile parsing' algorithm used to obtain package versions
and DEPENDS information is geared towards speed rather than
perfection, though it has got somewhat better over time, it only
parses the simplest Makefile conditionals. (a == b, no && etc).
.Pp
Potentially others, but non serious to date.