Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

View File

@@ -0,0 +1 @@
lintpkgsrc checks various things on the complete pkgsrc tree.

View File

@@ -0,0 +1,51 @@
# $NetBSD: Makefile,v 1.13 2013/05/31 12:41:46 wiz Exp $
DISTNAME= lintpkgsrc-4.86
PKGREVISION= 1
CATEGORIES= pkgtools
MASTER_SITES= # none
DISTFILES= # none
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.NetBSD.org/Documentation/pkgsrc/
COMMENT= Sanity checks on the complete pkgsrc tree
DEPENDS+= digest>=20010101:../../pkgtools/digest
CONFLICTS+= pkglint<4.82
PKG_INSTALLATION_TYPES= overwrite pkgviews
USE_TOOLS+= perl:run
WRKSRC= ${WRKDIR}
NO_BUILD= yes
USE_LANGUAGES= # none
AUTO_MKDIRS= yes
SUBST_CLASSES+= lp
SUBST_STAGE.lp= post-configure
SUBST_FILES.lp+= lintpkgsrc.0 lintpkgsrc.1 lintpkgsrc.pl
.if defined(BATCH)
SUBST_SED.lp+= -e s\|@PKGSRCDIR@\|/usr/pkgsrc\|g
.else
SUBST_SED.lp+= -e s\|@PKGSRCDIR@\|${PKGSRCDIR}\|g
.endif
SUBST_SED.lp+= -e s\|@PREFIX@\|${PREFIX}\|g
SUBST_SED.lp+= -e s\|@MAKE@\|${MAKE:Q}\|g
SUBST_SED.lp+= -e s\|@PERL@\|${PERL5:Q}\|g
.include "../../mk/bsd.prefs.mk"
do-extract:
cd ${FILESDIR} && cp lintpkgsrc.* ${WRKSRC}/
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/lintpkgsrc.pl ${DESTDIR}${PREFIX}/bin/lintpkgsrc
.if !empty(MANINSTALL:Mcatinstall)
${INSTALL_MAN} ${WRKSRC}/lintpkgsrc.0 ${DESTDIR}${PREFIX}/${PKGMANDIR}/cat1
.endif
.if !empty(MANINSTALL:Mmaninstall)
${INSTALL_MAN} ${WRKSRC}/lintpkgsrc.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
.endif
.include "../../mk/bsd.pkg.mk"

View File

@@ -0,0 +1,4 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2008/01/03 17:43:15 rillig Exp $
bin/lintpkgsrc
man/cat1/lintpkgsrc.0
man/man1/lintpkgsrc.1

View File

@@ -0,0 +1,131 @@
LINTPKGSRC(1) NetBSD General Commands Manual LINTPKGSRC(1)
NNAAMMEE
lliinnttppkkggssrrcc -- verifier for the pkgsrc tree
SSYYNNOOPPSSIISS
lliinnttppkkggssrrcc [--BBDDLLOORRSSVVddhhiillmmoopprruu] [--EE _f_i_l_e] [--gg _p_k_g_s_r_c_m_a_p] [--II _f_i_l_e]
[--KK _P_A_C_K_A_G_E_S] [--MM _D_I_S_T_D_I_R] [--PP _P_K_G_S_R_C_D_I_R] [_m_a_k_e_f_i_l_e _._._.]
DDEESSCCRRIIPPTTIIOONN
lliinnttppkkggssrrcc tries to verify the entire contents of the pkgsrc tree.
lliinnttppkkggssrrcc uses simple regular-expression matching for verifying files
that make up a pkgsrc directory. Note that it does NOT implement com-
plete Makefile parser.
OOppttiioonnss
--BB List packages marked as BROKEN.
--DD _p_a_t_h_s Parse Makefiles and output contents (useful for debugging).
--dd Extract the `DEPENDS' listing from each pkgsrc package
Makefile, then verify the version specified in each DEPEND
correctly matches a current pkgsrc package.
--EE _f_i_l_e Exports the internal database generated from the pkgsrc
Makefiles to a file for faster loading at a later time.
Note that some of the stored data is, in all likelihood,
dependent on the architecture and operating system of the
machine where it is generated. However, the database does
make the task of, eg, checking for out of date packages on
a set of similarly configured machines (in the absence of
extra copies of the pkgsrc tree) both quick and possible.
--gg _p_k_g_s_r_c_m_a_p Generate pkgsrcmap file containing an entry for each pack-
age of `pkgname pkgdir pkgver'.
--hh Basic help and usage.
--II _f_i_l_e Imports the data to construct the internal database for
checking the installed versions of packages, among other
things, against the current version found in pkgsrc. This
database provides most or all of the data required for run-
ning lliinnttppkkggssrrcc with any combination of --BB, --OO, --RR, --SS, --VV,
--dd, --gg, --ii, --pp, or --uu.
--ii Check the version of each installed package against the
current version in pkgsrc.
--KK _P_A_C_K_A_G_E_S Override binary packages base directory, normally set from
_/_e_t_c_/_m_k_._c_o_n_f or defaulted to _$_{_P_K_G_S_R_C_D_I_R_}_/_p_a_c_k_a_g_e_s.
Note: lintpkgsrc treats _P_A_C_K_A_G_E_S slightly differently to
the pkgsrc build system. --pp, --RR and --VV check for binary
packages in any depth of PACKAGES subdirs - this allows
packages for all architectures/OS versions to be checked
simultaneously with an _/_e_t_c_/_m_k_._c_o_n_f construct of the form:
.ifdef LINTPKGSRC
PACKAGES=${PKGSRCDIR}/packages
.else
PACKAGES=${PKGSRCDIR}/packages/${OS_VERSION}/${MACHINE_ARCH}
.endif
Which would be an alternative to --KK.
--LL List the filenames of Makefiles as they are parsed (for
debugging).
--MM _D_I_S_T_D_I_R Set directory for distfiles, defaults to
_$_{_P_K_G_S_R_C_D_I_R_}_/_d_i_s_t_f_i_l_e_s.
--mm For each current distfile, verify its checksum against the
appropriate package's distinfo file. Also report if any
package's distinfo file references the same distfile with a
different distinfo checksum.
--OO Report any binary packages in any subdirs of _P_A_C_K_A_G_E_S, for
whom the source Makefile lists _O_S_V_E_R_S_I_O_N___S_P_E_C_I_F_I_C. This is
intended to help those making binary packages available for
ftp.
--oo Report any old distfiles (not referenced by any package's
distinfo file).
--PP _P_K_G_S_R_C_D_I_R Set base of pkgsrc tree, normally set from _/_e_t_c_/_m_k_._c_o_n_f or
defaulted to _/_u_s_r_/_p_k_g_s_r_c.
--pp Report any old binary packages in any subdirs of _P_A_C_K_A_G_E_S.
--RR Report any binary packages in any subdirs of _P_A_C_K_A_G_E_S, for
whom the source Makefile lists _N_O___B_I_N___O_N___F_T_P or _R_E_S_T_R_I_C_T_E_D.
This is intended to help those making binary packages
available for ftp.
--rr Remove distfiles which are not referenced from any pack-
age's distinfo file, or have an incorrect checksum (usually
due to an interrupted download), and any old binary pack-
ages. To remove any given type, additionally specify the
--oo, --mm, or --pp flags respectively.
--SS List packages missing from category _S_U_B_D_I_R lists.
--uu As --ii plus for mismatched packages, display REQUIRED
details and run `@MAKE@ fetch-list | sh' to ensure all the
distfiles needed for the latest version are present.
Warning: The behaviour of this command may change in a
later version.
--VV List any prebuilt packages in any subdirs of _P_A_C_K_A_G_E_S with
known vulnerabilities, based on the data in
_$_{_P_K_G_S_R_C_D_I_R_}_/_d_i_s_t_f_i_l_e_s_/_p_k_g_-_v_u_l_n_e_r_a_b_i_l_i_t_i_e_s.
AAUUTTHHOORRSS
David Brownlee <abs@netbsd.org>
BBUUGGSS
The --RR, --VV, and --pp options default to using _P_A_C_K_A_G_E_S as the base direc-
tory from which to search for binary packages. If this includes OS or
architecture information then packages for other OS/architecture combina-
tions will be missed. In this case _P_A_C_K_A_G_E_S can be overridden with --KK or
set conditionally in _/_e_t_c_/_m_k_._c_o_n_f based on the value of _L_I_N_T_P_K_G_S_R_C.
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).
Potentially others, but non serious to date.
pkgsrc November 8, 2005 pkgsrc

View File

@@ -0,0 +1,194 @@
.\" $NetBSD: lintpkgsrc.1,v 1.1 2012/07/13 21:12:07 abs Exp $
.\"
.\" Copyright (c) 1999 by David Brownlee (abs@netbsd.org)
.\" Absolutely no warranty.
.\"
.Dd November 8, 2005
.Dt LINTPKGSRC 1
.Sh NAME
.Nm lintpkgsrc
.Nd verifier for the pkgsrc tree
.Sh SYNOPSIS
.Nm
.Op Fl BDLORSVdhilmopru
.Op Fl E Ar file
.Op Fl g Ar pkgsrcmap
.Op Fl I Ar file
.Op Fl K Ar PACKAGES
.Op Fl M Ar DISTDIR
.Op Fl P Ar PKGSRCDIR
.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.
.Ss 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 d
Extract the
.Ql DEPENDS
listing from each pkgsrc package Makefile, then
verify the version specified in each DEPEND correctly matches a current
pkgsrc package.
.It Fl E Ar file
Exports the internal database generated from the pkgsrc Makefiles to a
file for faster loading at a later time.
Note that some of the stored data is, in all likelihood, dependent on
the architecture and operating system of the machine where it is
generated.
However, the database does make the task of, eg, checking for out of
date packages on a set of similarly configured machines (in the
absence of extra copies of the pkgsrc tree) both quick and possible.
.It Fl g Ar pkgsrcmap
Generate pkgsrcmap file containing an entry for each package of
.Ql pkgname pkgdir pkgver .
.It Fl h
Basic help and usage.
.It Fl I Ar file
Imports the data to construct the internal database for checking the
installed versions of packages, among other things, against the
current version found in pkgsrc.
This database provides most or all of the data required for running
.Nm
with any combination of
.Fl B ,
.Fl O ,
.Fl R ,
.Fl S ,
.Fl V ,
.Fl d ,
.Fl g ,
.Fl i ,
.Fl p ,
or
.Fl u .
.It Fl i
Check the version of each installed package against the current version in
pkgsrc.
.It Fl K Ar PACKAGES
Override binary packages base directory, normally set from
.Pa /etc/mk.conf
or defaulted to
.Pa ${PKGSRCDIR}/packages .
.Pp
Note: lintpkgsrc treats
.Em PACKAGES
slightly differently to the pkgsrc build system.
.Fl p ,
.Fl R
and
.Fl 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
.Ed
.Pp
Which would be an alternative to
.Fl K .
.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
.Pa ${PKGSRCDIR}/distfiles .
.It Fl m
For each current distfile, verify its checksum against the appropriate
package's distinfo file. Also report if any package's distinfo file references
the same distfile with a different distinfo checksum.
.It Fl O
Report any binary packages in any subdirs of
.Em PACKAGES ,
for whom the source Makefile lists
.Em OSVERSION_SPECIFIC .
This is intended to help those making binary packages available for ftp.
.It Fl o
Report any old distfiles (not referenced by any package's distinfo file).
.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 p
Report any old binary packages in any subdirs of
.Em PACKAGES .
.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 r
Remove distfiles which are not referenced from any package's distinfo 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
.Fl o ,
.Fl m ,
or
.Fl p
flags respectively.
.It Fl S
List packages missing from category
.Em SUBDIR
lists.
.It Fl u
As
.Fl i
plus for mismatched packages, display REQUIRED details and run
.Ql @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.
.It Fl V
List any prebuilt packages in any subdirs of
.Em PACKAGES
with known vulnerabilities, based on the data in
.Pa ${PKGSRCDIR}/distfiles/pkg-vulnerabilities .
.El
.Sh AUTHORS
.An David Brownlee Aq abs@netbsd.org
.Sh BUGS
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 .
.Pp
The
.Ql 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 \*[Am]\*[Am] etc).
.Pp
Potentially others, but non serious to date.

File diff suppressed because it is too large Load Diff