pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_chk Re-import pkgtools/pkgchk as pkg_chk ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/067e22b41983
branches:  trunk
changeset: 471339:067e22b41983
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Sat Mar 27 00:02:34 2004 +0000

description:
Re-import pkgtools/pkgchk as pkg_chk so that program name, PKGNAME,
and directory path match. Addresses PR 23679.

diffstat:

 pkgtools/pkg_chk/DESCR            |    5 +
 pkgtools/pkg_chk/Makefile         |   32 ++
 pkgtools/pkg_chk/PLIST            |    3 +
 pkgtools/pkg_chk/files/pkg_chk.8  |  302 +++++++++++++++++++
 pkgtools/pkg_chk/files/pkg_chk.sh |  593 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 935 insertions(+), 0 deletions(-)

diffs (truncated from 955 to 300 lines):

diff -r b82c1aa46253 -r 067e22b41983 pkgtools/pkg_chk/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/pkg_chk/DESCR    Sat Mar 27 00:02:34 2004 +0000
@@ -0,0 +1,5 @@
+pkgchk verifies that the versions of installed packages matches those in
+pkgsrc, optionally adding missing or updating mismatched packages.
+
+It can verify all installed packages, or check against a set of packages
+based on the hostname, architecture, and other characteristics.
diff -r b82c1aa46253 -r 067e22b41983 pkgtools/pkg_chk/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/pkg_chk/Makefile Sat Mar 27 00:02:34 2004 +0000
@@ -0,0 +1,32 @@
+# $NetBSD: Makefile,v 1.1.1.1 2004/03/27 00:02:34 wiz Exp $
+
+DISTNAME=      pkg_chk-1.45
+CATEGORIES=    pkgtools
+MASTER_SITES=  # empty
+DISTFILES=     # empty
+
+MAINTAINER=    abs%NetBSD.org@localhost
+HOMEPAGE=      ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/Packages.txt
+COMMENT=       Check installed package versions against pkgsrc
+
+WRKSRC=                ${WRKDIR}
+EXTRACT_ONLY=  # empty
+USE_LANGUAGES= # empty
+NO_CHECKSUM=   YES
+
+CONFLICTS=     pkgchk-[0-9]*
+
+.include "../../mk/bsd.prefs.mk"
+
+MAKECONF?=     /etc/mk.conf
+
+do-build:
+       ${SED} -e 's#@MAKE@#${MAKE}#g' \
+         -e 's#@MAKECONF@#${MAKECONF}#g' \
+         ${FILESDIR}/pkg_chk.sh >${WRKSRC}/pkg_chk.sh
+
+do-install:
+       ${INSTALL_SCRIPT} ${WRKSRC}/pkg_chk.sh ${PREFIX}/sbin/pkg_chk
+       ${INSTALL_MAN} ${FILESDIR}/pkg_chk.8 ${PREFIX}/man/man8/pkg_chk.8
+
+.include "../../mk/bsd.pkg.mk"
diff -r b82c1aa46253 -r 067e22b41983 pkgtools/pkg_chk/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/pkg_chk/PLIST    Sat Mar 27 00:02:34 2004 +0000
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2004/03/27 00:02:34 wiz Exp $
+sbin/pkg_chk
+man/man8/pkg_chk.8
diff -r b82c1aa46253 -r 067e22b41983 pkgtools/pkg_chk/files/pkg_chk.8
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/pkg_chk/files/pkg_chk.8  Sat Mar 27 00:02:34 2004 +0000
@@ -0,0 +1,302 @@
+.\"    $NetBSD: pkg_chk.8,v 1.1.1.1 2004/03/27 00:02:37 wiz Exp $
+.\"
+.\" Copyright (c) 2001 by David Brownlee (abs%netbsd.org@localhost)
+.\" Absolutely no warranty.
+.\"
+.Dd October 4, 2003
+.Dt PKGCHK 1
+.Sh NAME
+.Nm pkg_chk
+.Nd check, and optionally update, installed packages
+.Sh SYNOPSIS
+.Nm
+.Op Fl aBbcfhiklnrsuv
+.Op Fl C Ar conf
+.Op Fl D Ar tags
+.Op Fl L Ar file
+.Op Fl U Ar tags
+.Sh DESCRIPTION
+.Nm
+verifies that the versions of installed packages matches those in
+pkgsrc, optionally adding missing or updating mismatched packages.
+.Pp
+It can verify all installed packages, or check against a set of packages
+based on the hostname, architecture, and other characteristics.
+.Pp
+When updating packages that depend on each other
+.Nm
+will skip dependent packages to reduce unnecessary rebuilding.
+.Pp
+.Sy Options
+.Bl -tag -width xxxxxxxx
+.It Fl a
+Automatically add any missing packages.
+If a binary package exists in
+.Ev ${PACKAGES}
+it will be used in preference to building from source, unless the
+.Fl b
+or
+.Fl s
+options are given.
+.It Fl B
+Check the "Build version" (see option -b of pkg_info(1)) of packages.
+.It Fl b
+Limit additions or updates to using binary packages.
+If DEPENDS_TARGET=package is set in
+.Pa /etc/mk.conf ,
+then
+.Nm
+will automatically generate binary packages for later reuse.
+.It Fl C Ar conf
+Use the
+.Pa pkgchk.conf
+file
+.Sq Ar conf .
+.It Fl c
+Check versions of packages specified in
+.Pa pkgchk.conf .
+.It Fl D Ar tags
+Add the comma separated list of tags to those checked when parsing
+.Pa pkgchk.conf .
+Also includes
+.Ev PKGCHK_TAGS .
+.It Fl f
+Fetch all missing/mismatched packages found.
+Can be used with
+.Fl a
+or
+.Fl u
+to perform the fetch before any building, or with
+.Fl c
+or
+.Fl i
+to just fetch missing/mismatches packages.
+.It Fl g
+Generate an initial
+.Pa pkgchk.conf
+file based upon the packages installed on the host machine.
+.It Fl h
+Brief help.
+.It Fl i
+Check versions of installed packages, ignoring
+.Pa pkgchk.conf .
+.It Fl k
+Continue with further packages if errors are encountered.
+.It Fl L Ar file
+Redirect the output for all commands run into the logfile
+.Pa file .
+Should be specified as a full pathname.
+On any error the tail end of the logfile will be displayed.
+.It Fl l
+List the filename for all binary packages (including the exact dependencies
+against which each package was built) based on
+.Pa pkgchk.conf .
+Will abort if a binary package is missing.
+This can be used (in conjunction with -U and -D) to determine what
+packages would need to be copied to a remote machine to ensure it
+was completely up to date.
+.It Fl n
+Display actions that would be taken, but do not change anything.
+.It Fl r
+Recursively delete any mismatched packages found.
+Use with care, this does not record which packages were installed
+for later update.
+.It Fl s
+Limit additions or updates to building from source.
+.It Fl U Ar tags
+Remove the comma separated list of tags from those checked when
+parsing
+.Pa pkgchk.conf .
+Also includes
+.Ev PKGCHK_NOTAGS .
+Package directories can also be skipped by listing them under
+.Fl U
+.It Fl u
+Automatically update any missing packages.
+If a binary package exists in PACKAGES it will be used in preference
+to building from source, unless the
+.Fl b
+or
+.Fl s
+options are given.
+.Pp
+Note: If the update fails (particularly when building from source), the system
+will be left with missing packages.
+.It Fl v
+Verbose - list the tags set when checking
+.Pa pkgchk.conf ,
+and all packages checked.
+.El
+.Sh FILE FORMAT
+Each non comment line in
+.Pa pkgchk.conf
+should contain a package
+directory (such as sysutils/skill) followed by an optional list of
+tags.
+Tags are checked against the current machine's set:
+.Bl -bullet
+.It
+If a matched tag starts with a hyphen
+.Sq - ,
+the package is always excluded.
+.It
+Otherwise if any tags match the package will be included.
+.It
+A line without any tags matches all machines.
+.It
+An asterisk
+.Em *
+matches any tag.
+.It
+Tags cannot contain a hypen
+.Sq -
+or plus
+.Sq + .
+.It
+Tags separated by spaces are treated as
+.Dq or .
+.Dq taga tagb
+means if
+.Em tag_a
+or
+.Em tag_b
+match the current machine.
+.It
+Tags separated by a plus are treated as
+.Dq and .
+.Dq taga+tagb
+means if
+.Em tag_a
+and
+.Em tag_b
+match the current machine.
+.El
+.Pp
+The default set of tags used to determine which packages to match
+in
+.Pa pkgchk.conf
+are equivalent to the output of the following with
+any spaces converted to hypens (-): hostname -s, hostname, uname
+-srm, uname -sr, uname -sm, uname -s, uname -r, uname -m.
+If
+.Pa /usr/X11R6/lib/libX11.so
+or
+.Pa /usr/X11R6/lib/libX11.a
+is present,
+.Em x11
+is added to the list of tags.
+Tags should not contain the - or + characters.
+To see tags for the current machine, run
+.Nm
+with the
+.Fl v
+option.
+.Sh ENVIRONMENT
+.Nm
+uses the following environment variables.
+.Bl -tag -width xxxx
+.It Ev PKGSRCDIR
+Base of pkgsrc tree.
+If not set in environment then read from
+.Pa ${MAKECONF}
+or
+.Pa /etc/mk.conf .
+Defaults to
+.Pa /usr/pkgsrc
+.It Ev PKG_DBDIR
+pkgsrc database directory.
+If not set in environment then read from
+.Pa ${MAKECONF}
+or
+.Pa /etc/mk.conf .
+Defaults to
+.Pa /var/db/pkg
+.It Ev PACKAGES
+Location of binary packages.
+If not set in environment then read from
+.Pa /etc/mk.conf .
+Defaults to
+.Pa ${PKGSRCDIR}/packages .
+.Pp
+Unless in a completely homogeneous environment (every machine running
+exactly the same OS version and architecture) setting
+.Ev ${PACKAGES}
+in
+.Pa /etc/mk.conf
+to a value such as
+.Bd -literal
+${PKGSRCDIR}/packages/${LOWER_OPSYS}-${OS_VERSION}-${MACHINE_ARCH}
+.Ed
+.Pp
+is strongly recommended.
+If
+.Em cpuflags
+(devel/cpuflags) is being used to optimally target individual CPU types,
+then
+.Ev ${CPU_DIR}
+should be appended to
+.Ev ${PACKAGES} .
+.It Ev PKGCHK_CONF
+Pathname to pkg_chk configuration file.
+If not set in environment then read from
+.Pa /etc/mk.conf .
+Defaults to
+.Pa ${PKGSRCDIR}/pkgchk.conf .



Home | Main Index | Thread Index | Old Index