summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2009-02-02 11:55:15 +0000
committerjoerg <joerg@pkgsrc.org>2009-02-02 11:55:15 +0000
commit71c68513e57de4826ba3b9a139079b45694befc4 (patch)
tree2728b4a0c301dd03b81eb827849d18ab6c2a2b72
parent0cb91e67714bd32a1ff2a33a523906f4962d5e31 (diff)
downloadpkgsrc-pkg_install-renovation.tar.gz
pkg_install-20090201:pkg_install-renovation
- sync DESCR and MESSAGE with HEAD and the branch state - sync Makefile - regen configure - cleanup __RCSID - merge audit logic in pkg_add and pkg_admin into new audit_packages function. As side effect, pkg_add will list all vulnerabilities before asking the user whether it should continue - sort config_variable array
-rw-r--r--pkgtools/pkg_install/DESCR5
-rw-r--r--pkgtools/pkg_install/MESSAGE29
-rw-r--r--pkgtools/pkg_install/Makefile10
-rw-r--r--pkgtools/pkg_install/files/add/main.c10
-rw-r--r--pkgtools/pkg_install/files/add/perform.c59
-rw-r--r--pkgtools/pkg_install/files/admin/audit.c66
-rw-r--r--pkgtools/pkg_install/files/admin/check.c6
-rw-r--r--pkgtools/pkg_install/files/admin/main.c6
-rwxr-xr-xpkgtools/pkg_install/files/configure360
-rw-r--r--pkgtools/pkg_install/files/configure.ac2
-rw-r--r--pkgtools/pkg_install/files/create/build.c10
-rw-r--r--pkgtools/pkg_install/files/create/main.c10
-rw-r--r--pkgtools/pkg_install/files/create/perform.c10
-rw-r--r--pkgtools/pkg_install/files/create/pl.c10
-rw-r--r--pkgtools/pkg_install/files/delete/main.c10
-rw-r--r--pkgtools/pkg_install/files/delete/perform.c10
-rw-r--r--pkgtools/pkg_install/files/info/main.c10
-rw-r--r--pkgtools/pkg_install/files/info/perform.c10
-rw-r--r--pkgtools/pkg_install/files/info/show.c10
-rw-r--r--pkgtools/pkg_install/files/lib/automatic.c6
-rw-r--r--pkgtools/pkg_install/files/lib/fexec.c6
-rw-r--r--pkgtools/pkg_install/files/lib/file.c10
-rw-r--r--pkgtools/pkg_install/files/lib/global.c10
-rw-r--r--pkgtools/pkg_install/files/lib/lib.h4
-rw-r--r--pkgtools/pkg_install/files/lib/opattern.c10
-rw-r--r--pkgtools/pkg_install/files/lib/parse-config.c10
-rw-r--r--pkgtools/pkg_install/files/lib/path.c6
-rw-r--r--pkgtools/pkg_install/files/lib/pkgdb.c6
-rw-r--r--pkgtools/pkg_install/files/lib/plist.c10
-rw-r--r--pkgtools/pkg_install/files/lib/str.c10
-rw-r--r--pkgtools/pkg_install/files/lib/var.c6
-rw-r--r--pkgtools/pkg_install/files/lib/version.c6
-rw-r--r--pkgtools/pkg_install/files/lib/version.h4
-rw-r--r--pkgtools/pkg_install/files/lib/vulnerabilities-file.c74
34 files changed, 366 insertions, 455 deletions
diff --git a/pkgtools/pkg_install/DESCR b/pkgtools/pkg_install/DESCR
index 263d7535e5d..f59aa3b77e6 100644
--- a/pkgtools/pkg_install/DESCR
+++ b/pkgtools/pkg_install/DESCR
@@ -12,3 +12,8 @@ pkg_delete delete installed packages
pkg_info display information about installed or binary packages
pkg_view manage package views
linkfarm manage symbolic links for package views
+
+For the following tools compatibility wrappers are included:
+
+audit-packages audit installed packages for security vulnerabilities
+download-vulnerability-list download the latest vulnerabilities list
diff --git a/pkgtools/pkg_install/MESSAGE b/pkgtools/pkg_install/MESSAGE
index 07b3f544782..a178f676ba2 100644
--- a/pkgtools/pkg_install/MESSAGE
+++ b/pkgtools/pkg_install/MESSAGE
@@ -1,12 +1,12 @@
===========================================================================
-$NetBSD: MESSAGE,v 1.4 2008/01/13 22:31:25 rillig Exp $
+$NetBSD: MESSAGE,v 1.4.4.1 2009/02/02 11:55:15 joerg Exp $
You may wish to have the vulnerabilities file downloaded daily so that
it remains current. This may be done by adding an appropriate entry
to a user's crontab(5) entry. For example the entry
# download vulnerabilities file
-0 3 * * * ${PREFIX}/sbin/download-vulnerability-list >/dev/null 2>&1
+0 3 * * * ${PREFIX}/sbin/pkg_admin fetch-pkg-vulnerabilities >/dev/null 2>&1
will update the vulnerability list every day at 3AM. You may wish to do
this more often than once a day.
@@ -15,28 +15,23 @@ In addition, you may wish to run the package audit from the daily
security script. This may be accomplished by adding the following
lines to /etc/security.local
-if [ -x ${PREFIX}/sbin/audit-packages ]; then
- ${PREFIX}/sbin/audit-packages
+if [ -x ${PREFIX}/sbin/pkg_admin ]; then
+ ${PREFIX}/sbin/pkg_admin audit
fi
Alternatively this can also be acomplished by adding an entry to a user's
crontab(5) file. e.g.:
# run audit-packages
-0 3 * * * ${PREFIX}/sbin/audit-packages
+0 3 * * * ${PREFIX}/sbin/pkg_admin audit
-audit-packages and/or download-vulnerability-list need not be run by
-the root user. They will function as an unprivileged user, as long
-as the user chosen has permission to write the pkg-vulnerabilites
-to ${PKGVULNDIR}.
+Both pkg_admin subcommands can be run as as an unprivileged user,
+as long as the user chosen has permission to read the pkgdb and to write
+the pkg-vulnerabilites to ${PKGVULNDIR}.
-A sample audit-packages.conf has been installed to:
+The behavior of pkg_admin and pkg_add can be customised with
+pkg_install.conf. Please see pkg_install.conf(5) for details.
- ${EGDIR}/audit-packages.conf
-
-You may want to customise this file and copy it to
-${PKG_SYSCONFDIR}/audit-packages.conf.
-If you want to use signature verification you will need to install GnuPG and
-set the path for GPG appropriately in your audit-packages.conf. See
-audit-packages.conf(5) and audit-packages(8) for further information.
+If you want to use GPG signature verification you will need to install
+GnuPG and set the path for GPG appropriately in your pkg_install.conf.
===========================================================================
diff --git a/pkgtools/pkg_install/Makefile b/pkgtools/pkg_install/Makefile
index cfa88a891c7..e7a8b52511e 100644
--- a/pkgtools/pkg_install/Makefile
+++ b/pkgtools/pkg_install/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.152.2.4 2008/10/29 10:38:53 joerg Exp $
+# $NetBSD: Makefile,v 1.152.2.5 2009/02/02 11:55:15 joerg Exp $
# Notes to package maintainers:
#
@@ -17,6 +17,7 @@ COMMENT= Package management and administration tools for pkgsrc
#LICENSE= modified-bsd
PKG_DESTDIR_SUPPORT= user-destdir
+BOOTSTRAP_PKG= yes
CONFLICTS+= audit-packages-[0-9]*
@@ -44,11 +45,18 @@ CHECK_PERMS= no
# We also use the newly built pkg_{add,create,delete} since upgrading
# from an older pkg_install might required features of the new program.
#
+# Note that the definitions are only overriden for the phases that are
+# supposed to use them. pkg_admin pmatch might be used when looking for
+# dependencies. If that is ever changed in a incompatible way, this has to
+# be rethought.
USE_NATIVE_GCC= yes
+
+.if defined(_PKGSRC_BARRIER)
PKG_ADD_CMD= ${WRKSRC}/add/pkg_add
PKG_CREATE_CMD= ${WRKSRC}/create/pkg_create
PKG_DELETE_CMD= ${WRKSRC}/delete/pkg_delete
PKG_INFO_CMD= ${WRKSRC}/info/pkg_info
+.endif
CPPFLAGS+= -D_LARGEFILE_SOURCE -D_LARGE_FILES
CPPFLAGS+= -D_FILE_OFFSET_BITS=64
diff --git a/pkgtools/pkg_install/files/add/main.c b/pkgtools/pkg_install/files/add/main.c
index 765606db5ef..ed75cdbe816 100644
--- a/pkgtools/pkg_install/files/add/main.c
+++ b/pkgtools/pkg_install/files/add/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.14.4.5 2008/07/30 15:38:37 joerg Exp $ */
+/* $NetBSD: main.c,v 1.14.4.6 2009/02/02 11:55:16 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,13 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-#ifndef lint
-#if 0
-static char *rcsid = "from FreeBSD Id: main.c,v 1.16 1997/10/08 07:45:43 charnier Exp";
-#else
-__RCSID("$NetBSD: main.c,v 1.14.4.5 2008/07/30 15:38:37 joerg Exp $");
-#endif
-#endif
+__RCSID("$NetBSD: main.c,v 1.14.4.6 2009/02/02 11:55:16 joerg Exp $");
/*
*
diff --git a/pkgtools/pkg_install/files/add/perform.c b/pkgtools/pkg_install/files/add/perform.c
index 0dda1ec7e5f..b7b5ce4ed93 100644
--- a/pkgtools/pkg_install/files/add/perform.c
+++ b/pkgtools/pkg_install/files/add/perform.c
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.70.4.21 2009/01/08 00:04:53 joerg Exp $ */
+/* $NetBSD: perform.c,v 1.70.4.22 2009/02/02 11:55:16 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
#endif
@@ -6,7 +6,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-__RCSID("$NetBSD: perform.c,v 1.70.4.21 2009/01/08 00:04:53 joerg Exp $");
+__RCSID("$NetBSD: perform.c,v 1.70.4.22 2009/02/02 11:55:16 joerg Exp $");
/*-
* Copyright (c) 2003 Grant Beattie <grant@NetBSD.org>
@@ -1170,37 +1170,9 @@ check_signature(struct pkg_task *pkg, void *signature_cookie, int invalid_sig)
}
static int
-check_ignored_entry(struct pkg_vulnerabilities *pv, size_t i)
-{
- const char *iter, *next;
- size_t entry_len, url_len;
-
- if (ignore_advisories == NULL)
- return 0;
-
- url_len = strlen(pv->advisory[i]);
-
- for (iter = ignore_advisories; *iter; iter = next) {
- if ((next = strchr(iter, '\n')) == NULL) {
- entry_len = strlen(iter);
- next = iter + entry_len;
- } else {
- entry_len = next - iter;
- ++next;
- }
- if (url_len != entry_len)
- continue;
- if (strncmp(pv->advisory[i], iter, entry_len) == 0)
- return 1;
- }
- return 0;
-}
-
-static int
check_vulnerable(struct pkg_task *pkg)
{
static struct pkg_vulnerabilities *pv;
- size_t i;
int require_check;
char *line;
size_t len;
@@ -1224,23 +1196,18 @@ check_vulnerable(struct pkg_task *pkg)
return require_check;
}
- for (i = 0; i < pv->entries; ++i) {
- if (check_ignored_entry(pv, i))
- continue;
- if (!pkg_match(pv->vulnerability[i], pkg->pkgname))
- continue;
- if (strcmp("eol", pv->classification[i]) == 0)
- continue;
- warnx("Package %s has a %s vulnerability, see %s",
- pkg->pkgname, pv->classification[i], pv->advisory[i]);
- fprintf(stderr, "Do you want to proceed with "
- "the installation of %s [y/n]?\n", pkg->pkgname);
- line = fgetln(stdin, &len);
- if (check_input(line, len)) {
- fprintf(stderr, "Cancelling installation\n");
- return 1;
- }
+ if (!audit_package(pv, pkg->pkgname, NULL, 0, 2))
return 0;
+
+ if (require_check)
+ return 1;
+
+ fprintf(stderr, "Do you want to proceed with the installation of %s"
+ " [y/n]?\n", pkg->pkgname);
+ line = fgetln(stdin, &len);
+ if (check_input(line, len)) {
+ fprintf(stderr, "Cancelling installation\n");
+ return 1;
}
return 0;
}
diff --git a/pkgtools/pkg_install/files/admin/audit.c b/pkgtools/pkg_install/files/admin/audit.c
index b421703a610..fe6fd14c9e8 100644
--- a/pkgtools/pkg_install/files/admin/audit.c
+++ b/pkgtools/pkg_install/files/admin/audit.c
@@ -1,4 +1,4 @@
-/* $NetBSD: audit.c,v 1.8.2.6 2008/11/27 19:24:13 joerg Exp $ */
+/* $NetBSD: audit.c,v 1.8.2.7 2009/02/02 11:55:16 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,9 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-#ifndef lint
-__RCSID("$NetBSD: audit.c,v 1.8.2.6 2008/11/27 19:24:13 joerg Exp $");
-#endif
+__RCSID("$NetBSD: audit.c,v 1.8.2.7 2009/02/02 11:55:16 joerg Exp $");
/*-
* Copyright (c) 2008 Joerg Sonnenberger <joerg@NetBSD.org>.
@@ -117,66 +115,10 @@ parse_options(int argc, char **argv)
}
static int
-check_ignored_entry(size_t i)
-{
- const char *iter, *next;
- size_t entry_len, url_len;
-
- if (ignore_advisories == NULL)
- return 0;
-
- url_len = strlen(pv->advisory[i]);
-
- for (iter = ignore_advisories; *iter; iter = next) {
- if ((next = strchr(iter, '\n')) == NULL) {
- entry_len = strlen(iter);
- next = iter + entry_len;
- } else {
- entry_len = next - iter;
- ++next;
- }
- if (url_len != entry_len)
- continue;
- if (strncmp(pv->advisory[i], iter, entry_len) == 0)
- return 1;
- }
- return 0;
-}
-
-static int
check_exact_pkg(const char *pkg)
{
- int ret;
- size_t i;
-
- ret = 0;
- for (i = 0; i < pv->entries; ++i) {
- if (check_ignored_entry(i))
- continue;
- if (limit_vul_types != NULL &&
- strcmp(limit_vul_types, pv->classification[i]))
- continue;
- if (!pkg_match(pv->vulnerability[i], pkg))
- continue;
- if (strcmp("eol", pv->classification[i]) == 0) {
- if (!check_eol)
- continue;
- if (quiet)
- puts(pkg);
- else
- printf("Package %s has reached end-of-life (eol), "
- "see %s/eol-packages\n", pkg,
- tnf_vulnerability_base);
- continue;
- }
- if (quiet)
- puts(pkg);
- else
- printf("Package %s has a %s vulnerability, see %s\n",
- pkg, pv->classification[i], pv->advisory[i]);
- ret = 1;
- }
- return ret;
+ return audit_package(pv, pkg, limit_vul_types, check_eol,
+ quiet ? 0 : 1);
}
static int
diff --git a/pkgtools/pkg_install/files/admin/check.c b/pkgtools/pkg_install/files/admin/check.c
index 3d3f0022061..92c0a83d919 100644
--- a/pkgtools/pkg_install/files/admin/check.c
+++ b/pkgtools/pkg_install/files/admin/check.c
@@ -1,4 +1,4 @@
-/* $NetBSD: check.c,v 1.2.4.5 2008/08/25 18:31:14 joerg Exp $ */
+/* $NetBSD: check.c,v 1.2.4.6 2009/02/02 11:55:16 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,9 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-#ifndef lint
-__RCSID("$NetBSD: check.c,v 1.2.4.5 2008/08/25 18:31:14 joerg Exp $");
-#endif
+__RCSID("$NetBSD: check.c,v 1.2.4.6 2009/02/02 11:55:16 joerg Exp $");
/*-
* Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
diff --git a/pkgtools/pkg_install/files/admin/main.c b/pkgtools/pkg_install/files/admin/main.c
index 6a9c3bfde87..992651542dd 100644
--- a/pkgtools/pkg_install/files/admin/main.c
+++ b/pkgtools/pkg_install/files/admin/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.42.2.9 2008/12/30 15:55:57 joerg Exp $ */
+/* $NetBSD: main.c,v 1.42.2.10 2009/02/02 11:55:16 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,9 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-#ifndef lint
-__RCSID("$NetBSD: main.c,v 1.42.2.9 2008/12/30 15:55:57 joerg Exp $");
-#endif
+__RCSID("$NetBSD: main.c,v 1.42.2.10 2009/02/02 11:55:16 joerg Exp $");
/*-
* Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
diff --git a/pkgtools/pkg_install/files/configure b/pkgtools/pkg_install/files/configure
index ce724c8d489..98bff3ce3dd 100755
--- a/pkgtools/pkg_install/files/configure
+++ b/pkgtools/pkg_install/files/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.62 for pkg_install 20080524.
+# Generated by GNU Autoconf 2.63 for pkg_install 20090201.
#
# Report bugs to <joerg@NetBSD.org>.
#
@@ -596,8 +596,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='pkg_install'
PACKAGE_TARNAME='pkg_install'
-PACKAGE_VERSION='20080524'
-PACKAGE_STRING='pkg_install 20080524'
+PACKAGE_VERSION='20090201'
+PACKAGE_STRING='pkg_install 20090201'
PACKAGE_BUGREPORT='joerg@NetBSD.org'
ac_unique_file="lib/plist.c"
@@ -637,89 +637,89 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL
-PATH_SEPARATOR
-PACKAGE_NAME
-PACKAGE_TARNAME
-PACKAGE_VERSION
-PACKAGE_STRING
-PACKAGE_BUGREPORT
-exec_prefix
-prefix
-program_transform_name
-bindir
-sbindir
-libexecdir
-datarootdir
-datadir
-sysconfdir
-sharedstatedir
-localstatedir
-includedir
-oldincludedir
-docdir
-infodir
-htmldir
-dvidir
-pdfdir
-psdir
-libdir
-localedir
-mandir
-DEFS
-ECHO_C
-ECHO_N
-ECHO_T
-LIBS
-build_alias
-host_alias
-target_alias
-build
-build_cpu
-build_vendor
-build_os
-host
-host_cpu
-host_vendor
-host_os
-CANONICAL_HOST
-INCLUDES
-SET_MAKE
-CC
-CFLAGS
-LDFLAGS
-CPPFLAGS
-ac_ct_CC
-EXEEXT
-OBJEXT
-INSTALL_PROGRAM
-INSTALL_SCRIPT
-INSTALL_DATA
-LN_S
-RANLIB
-AR
-CHMOD
-CMP
-CP
-ENV
-FIND
-GREP
-LN
-MKDIR
-RMDIR
-RM
-SED
-SORT
-TOUCH
-AUTOCONF
-AUTOHEADER
-pkgdbdir
-ssl_support
-bootstrap
-CPP
-EGREP
+ac_subst_vars='LTLIBOBJS
LIBOBJS
-LTLIBOBJS'
+EGREP
+CPP
+bootstrap
+ssl_support
+pkgdbdir
+AUTOHEADER
+AUTOCONF
+TOUCH
+SORT
+SED
+RM
+RMDIR
+MKDIR
+LN
+GREP
+FIND
+ENV
+CP
+CMP
+CHMOD
+AR
+RANLIB
+LN_S
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+SET_MAKE
+INCLUDES
+CANONICAL_HOST
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
@@ -1158,9 +1158,9 @@ fi
if test -n "$ac_unrecognized_opts"; then
case $enable_option_checking in
no) ;;
- fatal) { $as_echo "$as_me: error: Unrecognized options: $ac_unrecognized_opts" >&2
+ fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
{ (exit 1); exit 1; }; } ;;
- *) $as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
fi
@@ -1213,7 +1213,7 @@ test "$silent" = yes && exec 6>/dev/null
ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- { $as_echo "$as_me: error: Working directory cannot be determined" >&2
+ { $as_echo "$as_me: error: working directory cannot be determined" >&2
{ (exit 1); exit 1; }; }
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
{ $as_echo "$as_me: error: pwd does not report name of working directory" >&2
@@ -1288,7 +1288,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures pkg_install 20080524 to adapt to many kinds of systems.
+\`configure' configures pkg_install 20090201 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1353,7 +1353,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of pkg_install 20080524:";;
+ short | recursive ) echo "Configuration of pkg_install 20090201:";;
esac
cat <<\_ACEOF
@@ -1445,8 +1445,8 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-pkg_install configure 20080524
-generated by GNU Autoconf 2.62
+pkg_install configure 20090201
+generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
@@ -1459,8 +1459,8 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by pkg_install $as_me 20080524, which was
-generated by GNU Autoconf 2.62. Invocation command line was
+It was created by pkg_install $as_me 20090201, which was
+generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -1583,8 +1583,8 @@ _ASBOX
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
@@ -1787,6 +1787,8 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
fi
done
if $ac_cache_corrupted; then
+ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
{ { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
@@ -2066,12 +2068,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
@@ -2270,12 +2268,8 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
@@ -2285,11 +2279,13 @@ fi
fi
-test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
See \`config.log' for more details." >&5
$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ { (exit 1); exit 1; }; }; }
# Provide some information about the compiler.
$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
@@ -2419,11 +2415,13 @@ if test -z "$ac_file"; then
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
See \`config.log' for more details." >&5
$as_echo "$as_me: error: C compiler cannot create executables
See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
+ { (exit 77); exit 77; }; }; }
fi
ac_exeext=$ac_cv_exeext
@@ -2451,13 +2449,15 @@ $as_echo "$ac_try_echo") >&5
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
- { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details." >&5
$as_echo "$as_me: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ { (exit 1); exit 1; }; }; }
fi
fi
fi
@@ -2500,11 +2500,13 @@ for ac_file in conftest.exe conftest conftest.*; do
esac
done
else
- { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&5
$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ { (exit 1); exit 1; }; }; }
fi
rm -f conftest$ac_cv_exeext
@@ -2558,11 +2560,13 @@ else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
See \`config.log' for more details." >&5
$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ { (exit 1); exit 1; }; }; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
@@ -3096,12 +3100,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
RANLIB=$ac_ct_RANLIB
@@ -3770,7 +3770,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_db___db185_open" >&5
$as_echo "$ac_cv_lib_db___db185_open" >&6; }
-if test $ac_cv_lib_db___db185_open = yes; then
+if test "x$ac_cv_lib_db___db185_open" = x""yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBDB 1
_ACEOF
@@ -4177,11 +4177,13 @@ rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
:
else
- { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&5
$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ { (exit 1); exit 1; }; }; }
fi
ac_ext=c
@@ -4564,8 +4566,9 @@ ac_res=`eval 'as_val=${'$as_ac_Header'}
$as_echo "$as_val"'`
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-if test `eval 'as_val=${'$as_ac_Header'}
- $as_echo "$as_val"'` = yes; then
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -4741,8 +4744,9 @@ ac_res=`eval 'as_val=${'$as_ac_Header'}
$as_echo "$ac_res" >&6; }
fi
-if test `eval 'as_val=${'$as_ac_Header'}
- $as_echo "$as_val"'` = yes; then
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -4893,8 +4897,9 @@ ac_res=`eval 'as_val=${'$as_ac_Header'}
$as_echo "$ac_res" >&6; }
fi
-if test `eval 'as_val=${'$as_ac_Header'}
- $as_echo "$as_val"'` = yes; then
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -5060,8 +5065,9 @@ ac_res=`eval 'as_val=${'$as_ac_Header'}
$as_echo "$ac_res" >&6; }
fi
-if test `eval 'as_val=${'$as_ac_Header'}
- $as_echo "$as_val"'` = yes; then
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -5167,8 +5173,9 @@ ac_res=`eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'`
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-if test `eval 'as_val=${'$as_ac_var'}
- $as_echo "$as_val"'` = yes; then
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -5415,7 +5422,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
$as_echo "$ac_cv_lib_socket_socket" >&6; }
-if test $ac_cv_lib_socket_socket = yes; then
+if test "x$ac_cv_lib_socket_socket" = x""yes; then
LIBS="-lsocket -lnsl $LIBS"
fi
@@ -6088,11 +6095,13 @@ done
case $ac_lo in
?*) ac_cv_sizeof_int=$ac_lo;;
'') if test "$ac_cv_type_int" = yes; then
- { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int)
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int)
See \`config.log' for more details." >&5
$as_echo "$as_me: error: cannot compute sizeof (int)
See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
+ { (exit 77); exit 77; }; }; }
else
ac_cv_sizeof_int=0
fi ;;
@@ -6168,11 +6177,13 @@ sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
if test "$ac_cv_type_int" = yes; then
- { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int)
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int)
See \`config.log' for more details." >&5
$as_echo "$as_me: error: cannot compute sizeof (int)
See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
+ { (exit 77); exit 77; }; }; }
else
ac_cv_sizeof_int=0
fi
@@ -6443,11 +6454,13 @@ done
case $ac_lo in
?*) ac_cv_sizeof_long=$ac_lo;;
'') if test "$ac_cv_type_long" = yes; then
- { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
See \`config.log' for more details." >&5
$as_echo "$as_me: error: cannot compute sizeof (long)
See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
+ { (exit 77); exit 77; }; }; }
else
ac_cv_sizeof_long=0
fi ;;
@@ -6523,11 +6536,13 @@ sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
if test "$ac_cv_type_long" = yes; then
- { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
See \`config.log' for more details." >&5
$as_echo "$as_me: error: cannot compute sizeof (long)
See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
+ { (exit 77); exit 77; }; }; }
else
ac_cv_sizeof_long=0
fi
@@ -6798,11 +6813,13 @@ done
case $ac_lo in
?*) ac_cv_sizeof_long_long=$ac_lo;;
'') if test "$ac_cv_type_long_long" = yes; then
- { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
See \`config.log' for more details." >&5
$as_echo "$as_me: error: cannot compute sizeof (long long)
See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
+ { (exit 77); exit 77; }; }; }
else
ac_cv_sizeof_long_long=0
fi ;;
@@ -6878,11 +6895,13 @@ sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
if test "$ac_cv_type_long_long" = yes; then
- { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
See \`config.log' for more details." >&5
$as_echo "$as_me: error: cannot compute sizeof (long long)
See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
+ { (exit 77); exit 77; }; }; }
else
ac_cv_sizeof_long_long=0
fi
@@ -6945,8 +6964,8 @@ _ACEOF
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
@@ -7337,8 +7356,8 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by pkg_install $as_me 20080524, which was
-generated by GNU Autoconf 2.62. Invocation command line was
+This file was extended by pkg_install $as_me 20090201, which was
+generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -7351,6 +7370,15 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q`
_ACEOF
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
config_files="$ac_config_files"
@@ -7363,16 +7391,17 @@ ac_cs_usage="\
\`$as_me' instantiates files from templates according to the
current configuration.
-Usage: $0 [OPTIONS] [FILE]...
+Usage: $0 [OPTION]... [FILE]...
-h, --help print this help, then exit
-V, --version print version number and configuration settings, then exit
- -q, --quiet do not print progress messages
+ -q, --quiet, --silent
+ do not print progress messages
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
+ --file=FILE[:TEMPLATE]
instantiate the configuration file FILE
- --header=FILE[:TEMPLATE]
+ --header=FILE[:TEMPLATE]
instantiate the configuration header FILE
Configuration files:
@@ -7386,8 +7415,8 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-pkg_install config.status 20080524
-configured by $0, generated by GNU Autoconf 2.62,
+pkg_install config.status 20090201
+configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Copyright (C) 2008 Free Software Foundation, Inc.
@@ -7591,7 +7620,8 @@ for ac_last_try in false false false false false :; do
$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
{ (exit 1); exit 1; }; }
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` = $ac_delim_num; then
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
break
elif $ac_last_try; then
{ { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -7796,9 +7826,9 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
}
split(mac1, mac2, "(") #)
macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
if (D_is_set[macro]) {
# Preserve the white space surrounding the "#".
- prefix = substr(line, 1, index(line, defundef) - 1)
print prefix "define", macro P[macro] D[macro]
next
} else {
@@ -7806,7 +7836,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
if (defundef == "undef") {
- print "/*", line, "*/"
+ print "/*", prefix defundef, macro, "*/"
next
}
}
@@ -7830,8 +7860,8 @@ do
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
-$as_echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+ :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
+$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
{ (exit 1); exit 1; }; };;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
@@ -8154,7 +8184,7 @@ if test "$no_create" != yes; then
$ac_cs_success || { (exit 1); exit 1; }
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
- { $as_echo "$as_me:$LINENO: WARNING: Unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
diff --git a/pkgtools/pkg_install/files/configure.ac b/pkgtools/pkg_install/files/configure.ac
index f3e6d8b962a..9262635829c 100644
--- a/pkgtools/pkg_install/files/configure.ac
+++ b/pkgtools/pkg_install/files/configure.ac
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
-AC_INIT([pkg_install], [20080524], [joerg@NetBSD.org])
+AC_INIT([pkg_install], [20090201], [joerg@NetBSD.org])
AC_CONFIG_SRCDIR([lib/plist.c])
AC_CONFIG_HEADER(lib/config.h)
diff --git a/pkgtools/pkg_install/files/create/build.c b/pkgtools/pkg_install/files/create/build.c
index c61337b3bd3..413403b6060 100644
--- a/pkgtools/pkg_install/files/create/build.c
+++ b/pkgtools/pkg_install/files/create/build.c
@@ -1,4 +1,4 @@
-/* $NetBSD: build.c,v 1.8.2.1 2008/08/02 20:33:50 joerg Exp $ */
+/* $NetBSD: build.c,v 1.8.2.2 2009/02/02 11:55:16 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,13 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-#ifndef lint
-#if 0
-static const char *rcsid = "from FreeBSD Id: perform.c,v 1.38 1997/10/13 15:03:51 jkh Exp";
-#else
-__RCSID("$NetBSD: build.c,v 1.8.2.1 2008/08/02 20:33:50 joerg Exp $");
-#endif
-#endif
+__RCSID("$NetBSD: build.c,v 1.8.2.2 2009/02/02 11:55:16 joerg Exp $");
/*-
* Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>.
diff --git a/pkgtools/pkg_install/files/create/main.c b/pkgtools/pkg_install/files/create/main.c
index f5d69fe59f3..e17f052aec2 100644
--- a/pkgtools/pkg_install/files/create/main.c
+++ b/pkgtools/pkg_install/files/create/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.11 2007/08/03 13:15:59 joerg Exp $ */
+/* $NetBSD: main.c,v 1.11.8.1 2009/02/02 11:55:16 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,13 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-#ifndef lint
-#if 0
-static const char *rcsid = "from FreeBSD Id: main.c,v 1.17 1997/10/08 07:46:23 charnier Exp";
-#else
-__RCSID("$NetBSD: main.c,v 1.11 2007/08/03 13:15:59 joerg Exp $");
-#endif
-#endif
+__RCSID("$NetBSD: main.c,v 1.11.8.1 2009/02/02 11:55:16 joerg Exp $");
/*
* FreeBSD install - a package for the installation and maintainance
diff --git a/pkgtools/pkg_install/files/create/perform.c b/pkgtools/pkg_install/files/create/perform.c
index c30970952fb..f10e192be3c 100644
--- a/pkgtools/pkg_install/files/create/perform.c
+++ b/pkgtools/pkg_install/files/create/perform.c
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.19.2.4 2008/08/11 15:58:15 joerg Exp $ */
+/* $NetBSD: perform.c,v 1.19.2.5 2009/02/02 11:55:16 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,13 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-#ifndef lint
-#if 0
-static const char *rcsid = "from FreeBSD Id: perform.c,v 1.38 1997/10/13 15:03:51 jkh Exp";
-#else
-__RCSID("$NetBSD: perform.c,v 1.19.2.4 2008/08/11 15:58:15 joerg Exp $");
-#endif
-#endif
+__RCSID("$NetBSD: perform.c,v 1.19.2.5 2009/02/02 11:55:16 joerg Exp $");
/*
* FreeBSD install - a package for the installation and maintainance
diff --git a/pkgtools/pkg_install/files/create/pl.c b/pkgtools/pkg_install/files/create/pl.c
index 96c2b78540b..4d6f884cea1 100644
--- a/pkgtools/pkg_install/files/create/pl.c
+++ b/pkgtools/pkg_install/files/create/pl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pl.c,v 1.10.8.3 2008/08/25 18:31:14 joerg Exp $ */
+/* $NetBSD: pl.c,v 1.10.8.4 2009/02/02 11:55:16 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,13 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-#ifndef lint
-#if 0
-static const char *rcsid = "from FreeBSD Id: pl.c,v 1.11 1997/10/08 07:46:35 charnier Exp";
-#else
-__RCSID("$NetBSD: pl.c,v 1.10.8.3 2008/08/25 18:31:14 joerg Exp $");
-#endif
-#endif
+__RCSID("$NetBSD: pl.c,v 1.10.8.4 2009/02/02 11:55:16 joerg Exp $");
/*
* FreeBSD install - a package for the installation and maintainance
diff --git a/pkgtools/pkg_install/files/delete/main.c b/pkgtools/pkg_install/files/delete/main.c
index c72dd43a8b0..3ed24f15d28 100644
--- a/pkgtools/pkg_install/files/delete/main.c
+++ b/pkgtools/pkg_install/files/delete/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.21.8.2 2008/08/02 20:33:50 joerg Exp $ */
+/* $NetBSD: main.c,v 1.21.8.3 2009/02/02 11:55:16 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,13 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-#ifndef lint
-#if 0
-static char *rcsid = "from FreeBSD Id: main.c,v 1.11 1997/10/08 07:46:48 charnier Exp";
-#else
-__RCSID("$NetBSD: main.c,v 1.21.8.2 2008/08/02 20:33:50 joerg Exp $");
-#endif
-#endif
+__RCSID("$NetBSD: main.c,v 1.21.8.3 2009/02/02 11:55:16 joerg Exp $");
/*
*
diff --git a/pkgtools/pkg_install/files/delete/perform.c b/pkgtools/pkg_install/files/delete/perform.c
index 1caf4d64191..c203598d059 100644
--- a/pkgtools/pkg_install/files/delete/perform.c
+++ b/pkgtools/pkg_install/files/delete/perform.c
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.23.2.11 2008/08/10 22:08:16 joerg Exp $ */
+/* $NetBSD: perform.c,v 1.23.2.12 2009/02/02 11:55:16 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,13 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-#ifndef lint
-#if 0
-static const char *rcsid = "from FreeBSD Id: perform.c,v 1.15 1997/10/13 15:03:52 jkh Exp";
-#else
-__RCSID("$NetBSD: perform.c,v 1.23.2.11 2008/08/10 22:08:16 joerg Exp $");
-#endif
-#endif
+__RCSID("$NetBSD: perform.c,v 1.23.2.12 2009/02/02 11:55:16 joerg Exp $");
/*
* FreeBSD install - a package for the installation and maintainance
diff --git a/pkgtools/pkg_install/files/info/main.c b/pkgtools/pkg_install/files/info/main.c
index b5d75ce8bf1..4b3e82284af 100644
--- a/pkgtools/pkg_install/files/info/main.c
+++ b/pkgtools/pkg_install/files/info/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.22.6.1 2008/08/02 20:33:50 joerg Exp $ */
+/* $NetBSD: main.c,v 1.22.6.2 2009/02/02 11:55:16 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,13 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-#ifndef lint
-#if 0
-static char *rcsid = "from FreeBSD Id: main.c,v 1.14 1997/10/08 07:47:26 charnier Exp";
-#else
-__RCSID("$NetBSD: main.c,v 1.22.6.1 2008/08/02 20:33:50 joerg Exp $");
-#endif
-#endif
+__RCSID("$NetBSD: main.c,v 1.22.6.2 2009/02/02 11:55:16 joerg Exp $");
/*
*
diff --git a/pkgtools/pkg_install/files/info/perform.c b/pkgtools/pkg_install/files/info/perform.c
index 318e3183ac6..811538110f8 100644
--- a/pkgtools/pkg_install/files/info/perform.c
+++ b/pkgtools/pkg_install/files/info/perform.c
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.46.2.5 2008/08/10 22:09:38 joerg Exp $ */
+/* $NetBSD: perform.c,v 1.46.2.6 2009/02/02 11:55:16 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -13,13 +13,7 @@
#if HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
-#ifndef lint
-#if 0
-static const char *rcsid = "from FreeBSD Id: perform.c,v 1.23 1997/10/13 15:03:53 jkh Exp";
-#else
-__RCSID("$NetBSD: perform.c,v 1.46.2.5 2008/08/10 22:09:38 joerg Exp $");
-#endif
-#endif
+__RCSID("$NetBSD: perform.c,v 1.46.2.6 2009/02/02 11:55:16 joerg Exp $");
/*-
* Copyright (c) 2008 Joerg Sonnenberger <joerg@NetBSD.org>.
diff --git a/pkgtools/pkg_install/files/info/show.c b/pkgtools/pkg_install/files/info/show.c
index 0a80dad5c93..30de22f2959 100644
--- a/pkgtools/pkg_install/files/info/show.c
+++ b/pkgtools/pkg_install/files/info/show.c
@@ -1,4 +1,4 @@
-/* $NetBSD: show.c,v 1.21.4.1 2008/05/23 15:57:04 joerg Exp $ */
+/* $NetBSD: show.c,v 1.21.4.2 2009/02/02 11:55:16 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,13 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-#ifndef lint
-#if 0
-static const char *rcsid = "from FreeBSD Id: show.c,v 1.11 1997/10/08 07:47:38 charnier Exp";
-#else
-__RCSID("$NetBSD: show.c,v 1.21.4.1 2008/05/23 15:57:04 joerg Exp $");
-#endif
-#endif
+__RCSID("$NetBSD: show.c,v 1.21.4.2 2009/02/02 11:55:16 joerg Exp $");
/*
* FreeBSD install - a package for the installation and maintainance
diff --git a/pkgtools/pkg_install/files/lib/automatic.c b/pkgtools/pkg_install/files/lib/automatic.c
index 865f9ecdd43..9749dfc0f44 100644
--- a/pkgtools/pkg_install/files/lib/automatic.c
+++ b/pkgtools/pkg_install/files/lib/automatic.c
@@ -1,4 +1,4 @@
-/* $NetBSD: automatic.c,v 1.4 2007/08/15 02:08:40 joerg Exp $ */
+/* $NetBSD: automatic.c,v 1.4.8.1 2009/02/02 11:55:16 joerg Exp $ */
/*-
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -39,9 +39,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-#ifndef lint
-__RCSID("$NetBSD: automatic.c,v 1.4 2007/08/15 02:08:40 joerg Exp $");
-#endif
+__RCSID("$NetBSD: automatic.c,v 1.4.8.1 2009/02/02 11:55:16 joerg Exp $");
#if HAVE_ASSERT_H
#include <assert.h>
diff --git a/pkgtools/pkg_install/files/lib/fexec.c b/pkgtools/pkg_install/files/lib/fexec.c
index 99280f7a96d..840b8307e71 100644
--- a/pkgtools/pkg_install/files/lib/fexec.c
+++ b/pkgtools/pkg_install/files/lib/fexec.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fexec.c,v 1.9.8.3 2008/08/05 22:32:12 joerg Exp $ */
+/* $NetBSD: fexec.c,v 1.9.8.4 2009/02/02 11:55:16 joerg Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -59,9 +59,7 @@
#include "lib.h"
-#ifndef lint
-__RCSID("$NetBSD: fexec.c,v 1.9.8.3 2008/08/05 22:32:12 joerg Exp $");
-#endif
+__RCSID("$NetBSD: fexec.c,v 1.9.8.4 2009/02/02 11:55:16 joerg Exp $");
static int vfcexec(const char *, int, const char *, va_list);
diff --git a/pkgtools/pkg_install/files/lib/file.c b/pkgtools/pkg_install/files/lib/file.c
index 1109cb182ba..5d2d8a7c61b 100644
--- a/pkgtools/pkg_install/files/lib/file.c
+++ b/pkgtools/pkg_install/files/lib/file.c
@@ -1,4 +1,4 @@
-/* $NetBSD: file.c,v 1.23.8.3 2008/09/16 19:03:54 joerg Exp $ */
+/* $NetBSD: file.c,v 1.23.8.4 2009/02/02 11:55:16 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -13,13 +13,7 @@
#if HAVE_SYS_QUEUE_H
#include <sys/queue.h>
#endif
-#ifndef lint
-#if 0
-static const char *rcsid = "from FreeBSD Id: file.c,v 1.29 1997/10/08 07:47:54 charnier Exp";
-#else
-__RCSID("$NetBSD: file.c,v 1.23.8.3 2008/09/16 19:03:54 joerg Exp $");
-#endif
-#endif
+__RCSID("$NetBSD: file.c,v 1.23.8.4 2009/02/02 11:55:16 joerg Exp $");
/*
* FreeBSD install - a package for the installation and maintainance
diff --git a/pkgtools/pkg_install/files/lib/global.c b/pkgtools/pkg_install/files/lib/global.c
index e76cc3c160b..58bb38ff65e 100644
--- a/pkgtools/pkg_install/files/lib/global.c
+++ b/pkgtools/pkg_install/files/lib/global.c
@@ -1,4 +1,4 @@
-/* $NetBSD: global.c,v 1.4 2003/09/23 07:13:53 grant Exp $ */
+/* $NetBSD: global.c,v 1.4.38.1 2009/02/02 11:55:16 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,13 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-#ifndef lint
-#if 0
-static const char *rcsid = "from FreeBSD Id: global.c,v 1.6 1997/10/08 07:47:58 charnier Exp";
-#else
-__RCSID("$NetBSD: global.c,v 1.4 2003/09/23 07:13:53 grant Exp $");
-#endif
-#endif
+__RCSID("$NetBSD: global.c,v 1.4.38.1 2009/02/02 11:55:16 joerg Exp $");
/*
* FreeBSD install - a package for the installation and maintainance
diff --git a/pkgtools/pkg_install/files/lib/lib.h b/pkgtools/pkg_install/files/lib/lib.h
index 7ab5b9ad695..bbac4438e05 100644
--- a/pkgtools/pkg_install/files/lib/lib.h
+++ b/pkgtools/pkg_install/files/lib/lib.h
@@ -1,4 +1,4 @@
-/* $NetBSD: lib.h,v 1.42.2.18 2009/01/27 22:24:05 joerg Exp $ */
+/* $NetBSD: lib.h,v 1.42.2.19 2009/02/02 11:55:16 joerg Exp $ */
/* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */
@@ -368,6 +368,8 @@ struct pkg_vulnerabilities *parse_pkg_vulnerabilities(const char *, size_t, int)
/* Read pkg_vulnerabilities from file */
struct pkg_vulnerabilities *read_pkg_vulnerabilities(const char *, int, int);
void free_pkg_vulnerabilities(struct pkg_vulnerabilities *);
+int audit_package(struct pkg_vulnerabilities *, const char *, const char *,
+ int, int);
/* Parse configuration file */
void pkg_install_config(void);
diff --git a/pkgtools/pkg_install/files/lib/opattern.c b/pkgtools/pkg_install/files/lib/opattern.c
index cf41237ad16..584ccda1665 100644
--- a/pkgtools/pkg_install/files/lib/opattern.c
+++ b/pkgtools/pkg_install/files/lib/opattern.c
@@ -1,4 +1,4 @@
-/* $NetBSD: opattern.c,v 1.4.6.2 2008/08/02 20:33:50 joerg Exp $ */
+/* $NetBSD: opattern.c,v 1.4.6.3 2009/02/02 11:55:16 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,13 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-#ifndef lint
-#if 0
-static const char *rcsid = "Id: str.c,v 1.5 1997/10/08 07:48:21 charnier Exp";
-#else
-__RCSID("$NetBSD: opattern.c,v 1.4.6.2 2008/08/02 20:33:50 joerg Exp $");
-#endif
-#endif
+__RCSID("$NetBSD: opattern.c,v 1.4.6.3 2009/02/02 11:55:16 joerg Exp $");
/*
* FreeBSD install - a package for the installation and maintainance
diff --git a/pkgtools/pkg_install/files/lib/parse-config.c b/pkgtools/pkg_install/files/lib/parse-config.c
index 336a50d50e7..e3cc3a04a66 100644
--- a/pkgtools/pkg_install/files/lib/parse-config.c
+++ b/pkgtools/pkg_install/files/lib/parse-config.c
@@ -1,4 +1,4 @@
-/* $NetBSD: parse-config.c,v 1.1.2.7 2009/01/27 22:24:05 joerg Exp $ */
+/* $NetBSD: parse-config.c,v 1.1.2.8 2009/02/02 11:55:16 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,9 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-#ifndef lint
-__RCSID("$NetBSD: parse-config.c,v 1.1.2.7 2009/01/27 22:24:05 joerg Exp $");
-#endif
+__RCSID("$NetBSD: parse-config.c,v 1.1.2.8 2009/02/02 11:55:16 joerg Exp $");
/*-
* Copyright (c) 2008 Joerg Sonnenberger <joerg@NetBSD.org>.
@@ -82,12 +80,12 @@ static struct config_variable {
{ "CERTIFICATE_CHAIN", &cert_chain_file },
{ "CHECK_VULNERABILITIES", &check_vulnerabilities },
{ "GPG", &gpg_cmd },
- { "IGNORE_PROXY", &ignore_proxy },
- { "IGNORE_URL", &ignore_advisories },
{ "GPG_KEYRING_PKGVULN", &gpg_keyring_pkgvuln },
{ "GPG_KEYRING_SIGN", &gpg_keyring_sign },
{ "GPG_KEYRING_VERIFY", &gpg_keyring_verify },
{ "GPG_SIGN_AS", &gpg_sign_as },
+ { "IGNORE_PROXY", &ignore_proxy },
+ { "IGNORE_URL", &ignore_advisories },
{ "PKGVULNDIR", &pkg_vulnerabilities_dir },
{ "PKGVULNURL", &pkg_vulnerabilities_url },
{ "VERBOSE_NETIO", &verbose_netio },
diff --git a/pkgtools/pkg_install/files/lib/path.c b/pkgtools/pkg_install/files/lib/path.c
index fac576ca850..59d0d4142dc 100644
--- a/pkgtools/pkg_install/files/lib/path.c
+++ b/pkgtools/pkg_install/files/lib/path.c
@@ -1,4 +1,4 @@
-/* $NetBSD: path.c,v 1.6.28.1 2008/08/02 20:33:50 joerg Exp $ */
+/* $NetBSD: path.c,v 1.6.28.2 2009/02/02 11:55:16 joerg Exp $ */
/*-
* Copyright (c)2002 YAMAMOTO Takashi,
@@ -33,9 +33,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-#ifndef lint
-__RCSID("$NetBSD: path.c,v 1.6.28.1 2008/08/02 20:33:50 joerg Exp $");
-#endif
+__RCSID("$NetBSD: path.c,v 1.6.28.2 2009/02/02 11:55:16 joerg Exp $");
#if HAVE_ERR_H
#include <err.h>
diff --git a/pkgtools/pkg_install/files/lib/pkgdb.c b/pkgtools/pkg_install/files/lib/pkgdb.c
index 1e6caf11297..cce14a9a9ea 100644
--- a/pkgtools/pkg_install/files/lib/pkgdb.c
+++ b/pkgtools/pkg_install/files/lib/pkgdb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pkgdb.c,v 1.29.4.2 2008/08/02 20:33:50 joerg Exp $ */
+/* $NetBSD: pkgdb.c,v 1.29.4.3 2009/02/02 11:55:16 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,9 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-#ifndef lint
-__RCSID("$NetBSD: pkgdb.c,v 1.29.4.2 2008/08/02 20:33:50 joerg Exp $");
-#endif
+__RCSID("$NetBSD: pkgdb.c,v 1.29.4.3 2009/02/02 11:55:16 joerg Exp $");
/*-
* Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
diff --git a/pkgtools/pkg_install/files/lib/plist.c b/pkgtools/pkg_install/files/lib/plist.c
index 4437630fedb..481ad1dd81e 100644
--- a/pkgtools/pkg_install/files/lib/plist.c
+++ b/pkgtools/pkg_install/files/lib/plist.c
@@ -1,4 +1,4 @@
-/* $NetBSD: plist.c,v 1.17.4.12 2008/08/25 18:43:04 joerg Exp $ */
+/* $NetBSD: plist.c,v 1.17.4.13 2009/02/02 11:55:16 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,13 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-#ifndef lint
-#if 0
-static const char *rcsid = "from FreeBSD Id: plist.c,v 1.24 1997/10/08 07:48:15 charnier Exp";
-#else
-__RCSID("$NetBSD: plist.c,v 1.17.4.12 2008/08/25 18:43:04 joerg Exp $");
-#endif
-#endif
+__RCSID("$NetBSD: plist.c,v 1.17.4.13 2009/02/02 11:55:16 joerg Exp $");
/*
* FreeBSD install - a package for the installation and maintainance
diff --git a/pkgtools/pkg_install/files/lib/str.c b/pkgtools/pkg_install/files/lib/str.c
index ca8bf7db833..3b4b750f6e7 100644
--- a/pkgtools/pkg_install/files/lib/str.c
+++ b/pkgtools/pkg_install/files/lib/str.c
@@ -1,4 +1,4 @@
-/* $NetBSD: str.c,v 1.22.2.1 2008/04/26 17:44:23 joerg Exp $ */
+/* $NetBSD: str.c,v 1.22.2.2 2009/02/02 11:55:16 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,13 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-#ifndef lint
-#if 0
-static const char *rcsid = "Id: str.c,v 1.5 1997/10/08 07:48:21 charnier Exp";
-#else
-__RCSID("$NetBSD: str.c,v 1.22.2.1 2008/04/26 17:44:23 joerg Exp $");
-#endif
-#endif
+__RCSID("$NetBSD: str.c,v 1.22.2.2 2009/02/02 11:55:16 joerg Exp $");
/*
* FreeBSD install - a package for the installation and maintainance
diff --git a/pkgtools/pkg_install/files/lib/var.c b/pkgtools/pkg_install/files/lib/var.c
index 75827357229..499b2a99a52 100644
--- a/pkgtools/pkg_install/files/lib/var.c
+++ b/pkgtools/pkg_install/files/lib/var.c
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.6.4.1 2008/08/02 20:33:50 joerg Exp $ */
+/* $NetBSD: var.c,v 1.6.4.2 2009/02/02 11:55:16 joerg Exp $ */
/*-
* Copyright (c) 2005, 2008 The NetBSD Foundation, Inc.
@@ -39,9 +39,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-#ifndef lint
-__RCSID("$NetBSD: var.c,v 1.6.4.1 2008/08/02 20:33:50 joerg Exp $");
-#endif
+__RCSID("$NetBSD: var.c,v 1.6.4.2 2009/02/02 11:55:16 joerg Exp $");
#if HAVE_SYS_STAT_H
#include <sys/stat.h>
diff --git a/pkgtools/pkg_install/files/lib/version.c b/pkgtools/pkg_install/files/lib/version.c
index b45913cad77..648579ab959 100644
--- a/pkgtools/pkg_install/files/lib/version.c
+++ b/pkgtools/pkg_install/files/lib/version.c
@@ -1,4 +1,4 @@
-/* $NetBSD: version.c,v 1.4.38.1 2008/05/23 15:57:04 joerg Exp $ */
+/* $NetBSD: version.c,v 1.4.38.2 2009/02/02 11:55:16 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,9 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-#ifndef lint
-__RCSID("$NetBSD: version.c,v 1.4.38.1 2008/05/23 15:57:04 joerg Exp $");
-#endif
+__RCSID("$NetBSD: version.c,v 1.4.38.2 2009/02/02 11:55:16 joerg Exp $");
/*
* Copyright (c) 2001 Thomas Klausner. All rights reserved.
diff --git a/pkgtools/pkg_install/files/lib/version.h b/pkgtools/pkg_install/files/lib/version.h
index a55a697bf17..eaa5a5a8a8c 100644
--- a/pkgtools/pkg_install/files/lib/version.h
+++ b/pkgtools/pkg_install/files/lib/version.h
@@ -1,4 +1,4 @@
-/* $NetBSD: version.h,v 1.102.2.21 2009/01/27 22:24:06 joerg Exp $ */
+/* $NetBSD: version.h,v 1.102.2.22 2009/02/02 11:55:16 joerg Exp $ */
/*
* Copyright (c) 2001 Thomas Klausner. All rights reserved.
@@ -27,6 +27,6 @@
#ifndef _INST_LIB_VERSION_H_
#define _INST_LIB_VERSION_H_
-#define PKGTOOLS_VERSION "20090127"
+#define PKGTOOLS_VERSION "20090201"
#endif /* _INST_LIB_VERSION_H_ */
diff --git a/pkgtools/pkg_install/files/lib/vulnerabilities-file.c b/pkgtools/pkg_install/files/lib/vulnerabilities-file.c
index 7f70fdcfddf..1638cf868bc 100644
--- a/pkgtools/pkg_install/files/lib/vulnerabilities-file.c
+++ b/pkgtools/pkg_install/files/lib/vulnerabilities-file.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vulnerabilities-file.c,v 1.3.4.9 2009/01/27 22:24:06 joerg Exp $ */
+/* $NetBSD: vulnerabilities-file.c,v 1.3.4.10 2009/02/02 11:55:16 joerg Exp $ */
/*-
* Copyright (c) 2008 Joerg Sonnenberger <joerg@NetBSD.org>.
@@ -38,7 +38,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-__RCSID("$NetBSD: vulnerabilities-file.c,v 1.3.4.9 2009/01/27 22:24:06 joerg Exp $");
+__RCSID("$NetBSD: vulnerabilities-file.c,v 1.3.4.10 2009/02/02 11:55:16 joerg Exp $");
#if HAVE_SYS_STAT_H
#include <sys/stat.h>
@@ -516,3 +516,73 @@ free_pkg_vulnerabilities(struct pkg_vulnerabilities *pv)
free(pv->advisory);
free(pv);
}
+
+static int
+check_ignored_entry(struct pkg_vulnerabilities *pv, size_t i)
+{
+ const char *iter, *next;
+ size_t entry_len, url_len;
+
+ if (ignore_advisories == NULL)
+ return 0;
+
+ url_len = strlen(pv->advisory[i]);
+
+ for (iter = ignore_advisories; *iter; iter = next) {
+ if ((next = strchr(iter, '\n')) == NULL) {
+ entry_len = strlen(iter);
+ next = iter + entry_len;
+ } else {
+ entry_len = next - iter;
+ ++next;
+ }
+ if (url_len != entry_len)
+ continue;
+ if (strncmp(pv->advisory[i], iter, entry_len) == 0)
+ return 1;
+ }
+ return 0;
+}
+
+int
+audit_package(struct pkg_vulnerabilities *pv, const char *pkgname,
+ const char *limit_vul_types, int check_eol, int output_type)
+{
+ FILE *output = output_type == 1 ? stdout : stderr;
+ size_t i;
+ int retval;
+
+ retval = 0;
+
+ for (i = 0; i < pv->entries; ++i) {
+ if (check_ignored_entry(pv, i))
+ continue;
+ if (limit_vul_types != NULL &&
+ strcmp(limit_vul_types, pv->classification[i]))
+ continue;
+ if (!pkg_match(pv->vulnerability[i], pkgname))
+ continue;
+ if (strcmp("eol", pv->classification[i]) == 0) {
+ if (!check_eol)
+ continue;
+ if (output_type == 0) {
+ puts(pkgname);
+ continue;
+ }
+ fprintf(output,
+ "Package %s has reached end-of-life (eol), "
+ "see %s/eol-packages\n", pkgname,
+ tnf_vulnerability_base);
+ continue;
+ }
+ retval = 1;
+ if (output_type == 0) {
+ puts(pkgname);
+ } else {
+ fprintf(output,
+ "Package %s has a %s vulnerability, see %s\n",
+ pkgname, pv->classification[i], pv->advisory[i]);
+ }
+ }
+ return retval;
+}