pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_install/files pkg_install-20100616:
details: https://anonhg.NetBSD.org/pkgsrc/rev/cfdda8a091a8
branches: trunk
changeset: 576745:cfdda8a091a8
user: joerg <joerg%pkgsrc.org@localhost>
date: Wed Jun 16 23:02:48 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:
pkgtools/pkg_install/files/add/main.c | 6 +++---
pkgtools/pkg_install/files/add/perform.c | 16 ++++++++--------
pkgtools/pkg_install/files/add/pkg_add.1 | 9 +++++++--
pkgtools/pkg_install/files/add/pkg_add.cat | 10 +++++++---
pkgtools/pkg_install/files/admin/audit.c | 10 ++++------
pkgtools/pkg_install/files/admin/pkg_admin.1 | 11 ++++++++---
pkgtools/pkg_install/files/admin/pkg_admin.cat | 7 ++++---
pkgtools/pkg_install/files/lib/lib.h | 5 +++--
pkgtools/pkg_install/files/lib/parse-config.c | 6 ++++--
pkgtools/pkg_install/files/lib/pkg_install.conf.5.in | 8 ++++++--
pkgtools/pkg_install/files/lib/pkg_install.conf.cat.in | 6 +++++-
pkgtools/pkg_install/files/lib/version.h | 4 ++--
pkgtools/pkg_install/files/lib/vulnerabilities-file.c | 13 ++++++++-----
13 files changed, 69 insertions(+), 42 deletions(-)
diffs (truncated from 422 to 300 lines):
diff -r 9868d7c18d9c -r cfdda8a091a8 pkgtools/pkg_install/files/add/main.c
--- a/pkgtools/pkg_install/files/add/main.c Wed Jun 16 22:29:05 2010 +0000
+++ b/pkgtools/pkg_install/files/add/main.c Wed Jun 16 23:02:48 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.25 2010/02/18 13:43:11 joerg Exp $ */
+/* $NetBSD: main.c,v 1.26 2010/06/16 23:02:48 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.25 2010/02/18 13:43:11 joerg Exp $");
+__RCSID("$NetBSD: main.c,v 1.26 2010/06/16 23:02:48 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 9868d7c18d9c -r cfdda8a091a8 pkgtools/pkg_install/files/add/perform.c
--- a/pkgtools/pkg_install/files/add/perform.c Wed Jun 16 22:29:05 2010 +0000
+++ b/pkgtools/pkg_install/files/add/perform.c Wed Jun 16 23:02:48 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.96 2010/04/14 18:24:58 joerg Exp $ */
+/* $NetBSD: perform.c,v 1.97 2010/06/16 23:02:48 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.96 2010/04/14 18:24:58 joerg Exp $");
+__RCSID("$NetBSD: perform.c,v 1.97 2010/06/16 23:02:48 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 9868d7c18d9c -r cfdda8a091a8 pkgtools/pkg_install/files/add/pkg_add.1
--- a/pkgtools/pkg_install/files/add/pkg_add.1 Wed Jun 16 22:29:05 2010 +0000
+++ b/pkgtools/pkg_install/files/add/pkg_add.1 Wed Jun 16 23:02:48 2010 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkg_add.1,v 1.43 2010/02/18 13:43:11 joerg Exp $
+.\" $NetBSD: pkg_add.1,v 1.44 2010/06/16 23:02:48 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 9868d7c18d9c -r cfdda8a091a8 pkgtools/pkg_install/files/add/pkg_add.cat
--- a/pkgtools/pkg_install/files/add/pkg_add.cat Wed Jun 16 22:29:05 2010 +0000
+++ b/pkgtools/pkg_install/files/add/pkg_add.cat Wed Jun 16 23:02:48 2010 +0000
@@ -5,8 +5,8 @@
tributions
SSYYNNOOPPSSIISS
- ppkkgg__aadddd [--AAffIILLnnRRUUuuVVvv] [--KK _p_k_g___d_b_d_i_r] [--mm _m_a_c_h_i_n_e] [--PP _d_e_s_t_d_i_r]
- [--pp _p_r_e_f_i_x] [--WW _v_i_e_w_b_a_s_e] [--ww _v_i_e_w] _f_i_l_e _._._.
+ ppkkgg__aadddd [--AAffIILLnnRRUUuuVVvv] [--CC _c_o_n_f_i_g] [--KK _p_k_g___d_b_d_i_r] [--mm _m_a_c_h_i_n_e]
+ [--PP _d_e_s_t_d_i_r] [--pp _p_r_e_f_i_x] [--WW _v_i_e_w_b_a_s_e] [--ww _v_i_e_w] _f_i_l_e _._._.
[[ftp|http]://[_u_s_e_r][:_p_a_s_s_w_o_r_d]@]_h_o_s_t[:_p_o_r_t][/_p_a_t_h_/]_p_k_g_-_n_a_m_e _._._.
DDEESSCCRRIIPPTTIIOONN
@@ -53,6 +53,10 @@
--AA after it had already been automatically installed, the mark is
removed.
+ --CC _c_o_n_f_i_g
+ Read the configuration file from _c_o_n_f_i_g instead of the system
+ default.
+
--ff Force installation to proceed even if prerequisite packages are
not installed or the install script fails. Although ppkkgg__aadddd will
still try to find and auto-install missing prerequisite packages,
@@ -262,4 +266,4 @@
Sure to be others.
-NetBSD 5.0 February 18, 2010 NetBSD 5.0
+NetBSD 5.0 June 16, 2010 NetBSD 5.0
diff -r 9868d7c18d9c -r cfdda8a091a8 pkgtools/pkg_install/files/admin/audit.c
--- a/pkgtools/pkg_install/files/admin/audit.c Wed Jun 16 22:29:05 2010 +0000
+++ b/pkgtools/pkg_install/files/admin/audit.c Wed Jun 16 23:02:48 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audit.c,v 1.15 2010/04/14 18:24:58 joerg Exp $ */
+/* $NetBSD: audit.c,v 1.16 2010/06/16 23:02:48 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.15 2010/04/14 18:24:58 joerg Exp $");
+__RCSID("$NetBSD: audit.c,v 1.16 2010/06/16 23:02:48 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 9868d7c18d9c -r cfdda8a091a8 pkgtools/pkg_install/files/admin/pkg_admin.1
--- a/pkgtools/pkg_install/files/admin/pkg_admin.1 Wed Jun 16 22:29:05 2010 +0000
+++ b/pkgtools/pkg_install/files/admin/pkg_admin.1 Wed Jun 16 23:02:48 2010 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkg_admin.1,v 1.31 2010/01/22 13:30:41 joerg Exp $
+.\" $NetBSD: pkg_admin.1,v 1.32 2010/06/16 23:02:48 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 9868d7c18d9c -r cfdda8a091a8 pkgtools/pkg_install/files/admin/pkg_admin.cat
--- a/pkgtools/pkg_install/files/admin/pkg_admin.cat Wed Jun 16 22:29:05 2010 +0000
+++ b/pkgtools/pkg_install/files/admin/pkg_admin.cat Wed Jun 16 23:02:48 2010 +0000
@@ -56,9 +56,10 @@
aauuddiitt [--eess] [--tt _t_y_p_e] [_p_k_g] ...
Check the listed installed packages for vulnerabilities. If no
package is given, check all installed packages. If --ee is given,
- also include end-of-life information. If --ss is given, check the
- signature of the pkg-vulnerabilities file before using it. --tt
- restricts the reported vulnerabilities to type _t_y_p_e.
+ override the CHECK_END_OF_LIFE option from pkg_install.conf(5)
+ with "yes". If --ss is given, check the signature of the pkg-vul-
+ nerabilities file before using it. --tt restricts the reported
+ vulnerabilities to type _t_y_p_e.
aauuddiitt--ppkkgg [--eess] [--tt _t_y_p_e] [_p_k_g] ...
Like aauuddiitt, but check only the given package names or patterns.
diff -r 9868d7c18d9c -r cfdda8a091a8 pkgtools/pkg_install/files/lib/lib.h
--- a/pkgtools/pkg_install/files/lib/lib.h Wed Jun 16 22:29:05 2010 +0000
+++ b/pkgtools/pkg_install/files/lib/lib.h Wed Jun 16 23:02:48 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lib.h,v 1.63 2010/04/14 18:24:58 joerg Exp $ */
+/* $NetBSD: lib.h,v 1.64 2010/06/16 23:02:49 joerg Exp $ */
/* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */
@@ -380,7 +380,7 @@
struct pkg_vulnerabilities *read_pkg_vulnerabilities_memory(void *, size_t, int);
void free_pkg_vulnerabilities(struct pkg_vulnerabilities *);
int audit_package(struct pkg_vulnerabilities *, const char *, const char *,
- int, int);
+ int);
/* Parse configuration file */
void pkg_install_config(void);
@@ -430,6 +430,7 @@
extern const char *cert_chain_file;
extern const char *certs_packages;
extern const char *certs_pkg_vulnerabilities;
+extern const char *check_eol;
extern const char *check_vulnerabilities;
extern const char *config_file;
extern const char *config_pkg_dbdir;
diff -r 9868d7c18d9c -r cfdda8a091a8 pkgtools/pkg_install/files/lib/parse-config.c
--- a/pkgtools/pkg_install/files/lib/parse-config.c Wed Jun 16 22:29:05 2010 +0000
+++ b/pkgtools/pkg_install/files/lib/parse-config.c Wed Jun 16 23:02:48 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parse-config.c,v 1.14 2010/01/22 13:30:42 joerg Exp $ */
+/* $NetBSD: parse-config.c,v 1.15 2010/06/16 23:02:49 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.14 2010/01/22 13:30:42 joerg Exp $");
+__RCSID("$NetBSD: parse-config.c,v 1.15 2010/06/16 23:02:49 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;
Home |
Main Index |
Thread Index |
Old Index