Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/pkg_install/dist pkg_install-20100616:
details: https://anonhg.NetBSD.org/src/rev/6e8c191c8738
branches: trunk
changeset: 755864:6e8c191c8738
user: joerg <joerg%NetBSD.org@localhost>
date: Sat Jun 26 00:14:26 2010 +0000
description:
pkg_install-20100616:
- Recognize -C for pkg_add like the rest of the tools do
- Do the existing check for pkg_add -f, it makes the combination of
-f and -U a bit less surprising
- Fix option handling for CHECK_VULNERABILITIES (from spz@)
- Make end-of-life check the default. pkg_install.conf(5) can be used
to override the default. The existing admin -e & co continue to work as
before.
diffstat:
external/bsd/pkg_install/dist/add/main.c | 6 +++---
external/bsd/pkg_install/dist/add/perform.c | 16 ++++++++--------
external/bsd/pkg_install/dist/add/pkg_add.1 | 9 +++++++--
external/bsd/pkg_install/dist/admin/audit.c | 10 ++++------
external/bsd/pkg_install/dist/admin/pkg_admin.1 | 11 ++++++++---
external/bsd/pkg_install/dist/lib/license.c | 4 +++-
external/bsd/pkg_install/dist/lib/parse-config.c | 6 ++++--
external/bsd/pkg_install/dist/lib/pkg_install.conf.5.in | 8 ++++++--
external/bsd/pkg_install/dist/lib/vulnerabilities-file.c | 13 ++++++++-----
9 files changed, 51 insertions(+), 32 deletions(-)
diffs (truncated from 329 to 300 lines):
diff -r 8f2e38689d2f -r 6e8c191c8738 external/bsd/pkg_install/dist/add/main.c
--- a/external/bsd/pkg_install/dist/add/main.c Fri Jun 25 19:00:05 2010 +0000
+++ b/external/bsd/pkg_install/dist/add/main.c Sat Jun 26 00:14:26 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.1.1.8 2010/02/20 04:41:52 joerg Exp $ */
+/* $NetBSD: main.c,v 1.1.1.9 2010/06/26 00:14:26 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,7 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-__RCSID("$NetBSD: main.c,v 1.1.1.8 2010/02/20 04:41:52 joerg Exp $");
+__RCSID("$NetBSD: main.c,v 1.1.1.9 2010/06/26 00:14:26 joerg Exp $");
/*
*
@@ -39,7 +39,7 @@
#include "lib.h"
#include "add.h"
-static char Options[] = "AIK:LP:RVW:fhm:np:t:Uuvw:";
+static char Options[] = "AC:IK:LP:RVW:fhm:np:t:Uuvw:";
char *Destdir = NULL;
char *OverrideMachine = NULL;
diff -r 8f2e38689d2f -r 6e8c191c8738 external/bsd/pkg_install/dist/add/perform.c
--- a/external/bsd/pkg_install/dist/add/perform.c Fri Jun 25 19:00:05 2010 +0000
+++ b/external/bsd/pkg_install/dist/add/perform.c Sat Jun 26 00:14:26 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.1.1.16 2010/04/23 20:54:06 joerg Exp $ */
+/* $NetBSD: perform.c,v 1.1.1.17 2010/06/26 00:14:26 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.1.1.16 2010/04/23 20:54:06 joerg Exp $");
+__RCSID("$NetBSD: perform.c,v 1.1.1.17 2010/06/26 00:14:26 joerg Exp $");
/*-
* Copyright (c) 2003 Grant Beattie <grant%NetBSD.org@localhost>
@@ -339,9 +339,6 @@
char *filename;
int fd;
- if (Force)
- return 1;
-
filename = pkgdb_pkg_file(pkg->pkgname, CONTENTS_FNAME);
fd = open(filename, O_RDONLY);
free(filename);
@@ -362,6 +359,9 @@
return 1;
}
+ if (Force)
+ return 1;
+
/* We can only arrive here for explicitly requested packages. */
if (!Automatic && is_automatic_installed(pkg->pkgname)) {
if (Fake ||
@@ -1269,9 +1269,9 @@
if (strcasecmp(check_vulnerabilities, "never") == 0)
return 0;
- else if (strcasecmp(check_vulnerabilities, "always"))
+ else if (strcasecmp(check_vulnerabilities, "always") == 0)
require_check = 1;
- else if (strcasecmp(check_vulnerabilities, "interactive"))
+ else if (strcasecmp(check_vulnerabilities, "interactive") == 0)
require_check = 0;
else {
warnx("Unknown value of the configuration variable"
@@ -1286,7 +1286,7 @@
return require_check;
}
- if (!audit_package(pv, pkg->pkgname, NULL, 0, 2))
+ if (!audit_package(pv, pkg->pkgname, NULL, 2))
return 0;
if (require_check)
diff -r 8f2e38689d2f -r 6e8c191c8738 external/bsd/pkg_install/dist/add/pkg_add.1
--- a/external/bsd/pkg_install/dist/add/pkg_add.1 Fri Jun 25 19:00:05 2010 +0000
+++ b/external/bsd/pkg_install/dist/add/pkg_add.1 Sat Jun 26 00:14:26 2010 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkg_add.1,v 1.1.1.10 2010/02/20 04:41:53 joerg Exp $
+.\" $NetBSD: pkg_add.1,v 1.1.1.11 2010/06/26 00:14:27 joerg Exp $
.\"
.\" FreeBSD install - a package for the installation and maintenance
.\" of non-core utilities.
@@ -17,7 +17,7 @@
.\"
.\" @(#)pkg_add.1
.\"
-.Dd February 18, 2010
+.Dd June 16, 2010
.Dt PKG_ADD 1
.Os
.Sh NAME
@@ -26,6 +26,7 @@
.Sh SYNOPSIS
.Nm
.Op Fl AfILnRUuVv
+.Op Fl C Ar config
.Op Fl K Ar pkg_dbdir
.Op Fl m Ar machine
.Op Fl P Ar destdir
@@ -116,6 +117,10 @@
.Fl A
after it had already been automatically installed, the mark is
removed.
+.It Fl C Ar config
+Read the configuration file from
+.Ar config
+instead of the system default.
.It Fl f
Force installation to proceed even if prerequisite packages are not
installed or the install script fails.
diff -r 8f2e38689d2f -r 6e8c191c8738 external/bsd/pkg_install/dist/admin/audit.c
--- a/external/bsd/pkg_install/dist/admin/audit.c Fri Jun 25 19:00:05 2010 +0000
+++ b/external/bsd/pkg_install/dist/admin/audit.c Sat Jun 26 00:14:26 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audit.c,v 1.1.1.7 2010/04/23 20:54:06 joerg Exp $ */
+/* $NetBSD: audit.c,v 1.1.1.8 2010/06/26 00:14:27 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,7 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-__RCSID("$NetBSD: audit.c,v 1.1.1.7 2010/04/23 20:54:06 joerg Exp $");
+__RCSID("$NetBSD: audit.c,v 1.1.1.8 2010/06/26 00:14:27 joerg Exp $");
/*-
* Copyright (c) 2008 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
@@ -73,7 +73,6 @@
#include "admin.h"
#include "lib.h"
-static int check_eol = 0;
static int check_signature = 0;
static const char *limit_vul_types = NULL;
static int update_pkg_vuln = 0;
@@ -100,7 +99,7 @@
while ((ch = getopt(argc, argv, options)) != -1) {
switch (ch) {
case 'e':
- check_eol = 1;
+ check_eol = "yes";
break;
case 's':
check_signature = 1;
@@ -123,8 +122,7 @@
static int
check_exact_pkg(const char *pkg)
{
- return audit_package(pv, pkg, limit_vul_types, check_eol,
- quiet ? 0 : 1);
+ return audit_package(pv, pkg, limit_vul_types, quiet ? 0 : 1);
}
static int
diff -r 8f2e38689d2f -r 6e8c191c8738 external/bsd/pkg_install/dist/admin/pkg_admin.1
--- a/external/bsd/pkg_install/dist/admin/pkg_admin.1 Fri Jun 25 19:00:05 2010 +0000
+++ b/external/bsd/pkg_install/dist/admin/pkg_admin.1 Sat Jun 26 00:14:26 2010 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkg_admin.1,v 1.1.1.10 2010/01/30 21:33:27 joerg Exp $
+.\" $NetBSD: pkg_admin.1,v 1.1.1.11 2010/06/26 00:14:27 joerg Exp $
.\"
.\" Copyright (c) 1999-2010 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -34,7 +34,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd January 22, 2010
+.Dd June 16, 2010
.Dt PKG_ADMIN 1
.Os
.Sh NAME
@@ -118,7 +118,12 @@
If no package is given, check all installed packages.
If
.Fl e
-is given, also include end-of-life information.
+is given, override the
+.Dv CHECK_END_OF_LIFE
+option from
+.Xr pkg_install.conf 5
+with
+.Qq Li yes .
If
.Fl s
is given, check the signature of the pkg-vulnerabilities file before using it.
diff -r 8f2e38689d2f -r 6e8c191c8738 external/bsd/pkg_install/dist/lib/license.c
--- a/external/bsd/pkg_install/dist/lib/license.c Fri Jun 25 19:00:05 2010 +0000
+++ b/external/bsd/pkg_install/dist/lib/license.c Sat Jun 26 00:14:26 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: license.c,v 1.1.1.8 2010/04/23 20:54:10 joerg Exp $ */
+/* $NetBSD: license.c,v 1.1.1.9 2010/06/26 00:14:31 joerg Exp $ */
/*-
* Copyright (c) 2009 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
@@ -60,6 +60,8 @@
"mpl-1.0 mpl-1.1 "
"zpl "
"python-software-foundation "
+ "ipafont "
+ "isc "
"info-zip";
#ifdef DEBUG
diff -r 8f2e38689d2f -r 6e8c191c8738 external/bsd/pkg_install/dist/lib/parse-config.c
--- a/external/bsd/pkg_install/dist/lib/parse-config.c Fri Jun 25 19:00:05 2010 +0000
+++ b/external/bsd/pkg_install/dist/lib/parse-config.c Sat Jun 26 00:14:26 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parse-config.c,v 1.1.1.10 2010/01/30 21:33:49 joerg Exp $ */
+/* $NetBSD: parse-config.c,v 1.1.1.11 2010/06/26 00:14:31 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,7 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-__RCSID("$NetBSD: parse-config.c,v 1.1.1.10 2010/01/30 21:33:49 joerg Exp $");
+__RCSID("$NetBSD: parse-config.c,v 1.1.1.11 2010/06/26 00:14:31 joerg Exp $");
/*-
* Copyright (c) 2008, 2009 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
@@ -65,6 +65,7 @@
const char *cert_chain_file;
const char *certs_packages;
const char *certs_pkg_vulnerabilities;
+const char *check_eol = "yes";
const char *check_vulnerabilities;
static const char *config_cache_connections;
static const char *config_cache_connections_host;
@@ -98,6 +99,7 @@
{ "CERTIFICATE_ANCHOR_PKGVULN", &certs_pkg_vulnerabilities },
{ "CERTIFICATE_CHAIN", &cert_chain_file },
{ "CHECK_LICENSE", &do_license_check },
+ { "CHECK_END_OF_LIFE", &check_eol },
{ "CHECK_VULNERABILITIES", &check_vulnerabilities },
{ "DEFAULT_ACCEPTABLE_LICENSES", &default_acceptable_licenses },
{ "GPG", &gpg_cmd },
diff -r 8f2e38689d2f -r 6e8c191c8738 external/bsd/pkg_install/dist/lib/pkg_install.conf.5.in
--- a/external/bsd/pkg_install/dist/lib/pkg_install.conf.5.in Fri Jun 25 19:00:05 2010 +0000
+++ b/external/bsd/pkg_install/dist/lib/pkg_install.conf.5.in Sat Jun 26 00:14:26 2010 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkg_install.conf.5.in,v 1.1.1.10 2010/01/30 21:33:50 joerg Exp $
+.\" $NetBSD: pkg_install.conf.5.in,v 1.1.1.11 2010/06/26 00:14:31 joerg Exp $
.\"
.\" Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd January 22, 2010
+.Dd June 16, 2010
.Dt PKG_INSTALL.CONF 5
.Os
.Sh NAME
@@ -89,6 +89,10 @@
Passing the license check is required.
Missing license conditions are considered an error.
.El
+.It Dv CHECK_END_OF_FILE
+During vulnerability checks, consider packages that have reached end-of-life
+as vulnerable.
+This option is enabled by default.
.It Dv CHECK_VULNERABILITIES
Check for vulnerabilities when installing packages.
Supported values are:
diff -r 8f2e38689d2f -r 6e8c191c8738 external/bsd/pkg_install/dist/lib/vulnerabilities-file.c
--- a/external/bsd/pkg_install/dist/lib/vulnerabilities-file.c Fri Jun 25 19:00:05 2010 +0000
+++ b/external/bsd/pkg_install/dist/lib/vulnerabilities-file.c Sat Jun 26 00:14:26 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vulnerabilities-file.c,v 1.1.1.4 2010/04/23 20:54:12 joerg Exp $ */
+/* $NetBSD: vulnerabilities-file.c,v 1.1.1.5 2010/06/26 00:14:33 joerg Exp $ */
/*-
* Copyright (c) 2008, 2010 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
@@ -38,7 +38,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-__RCSID("$NetBSD: vulnerabilities-file.c,v 1.1.1.4 2010/04/23 20:54:12 joerg Exp $");
+__RCSID("$NetBSD: vulnerabilities-file.c,v 1.1.1.5 2010/06/26 00:14:33 joerg Exp $");
#if HAVE_SYS_STAT_H
#include <sys/stat.h>
@@ -607,14 +607,16 @@
Home |
Main Index |
Thread Index |
Old Index