pkg_install-20080407: Add command to print effective value of configuration variables. Remove FETCH_CMD variable from pkg_admin, it is not used.diff -r1.2 -r1.3 pkgsrc/pkgtools/pkg_install/files/admin/admin.h
(joerg)
@@ -27,28 +27,28 @@ | @@ -27,28 +27,28 @@ | |||
27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
31 | * POSSIBILITY OF SUCH DAMAGE. | 31 | * POSSIBILITY OF SUCH DAMAGE. | |
32 | */ | 32 | */ | |
33 | 33 | |||
34 | extern int quiet; | 34 | extern int quiet; | |
35 | extern int verbose; | 35 | extern int verbose; | |
36 | 36 | |||
37 | extern const char *pkg_vulnerabilities_dir; | 37 | extern const char *pkg_vulnerabilities_dir; | |
38 | extern const char *pkg_vulnerabilities_file; | 38 | extern const char *pkg_vulnerabilities_file; | |
39 | extern const char *pkg_vulnerabilities_url; | 39 | extern const char *pkg_vulnerabilities_url; | |
40 | extern const char *fetch_cmd; | |||
41 | extern const char *ignore_advisories; | 40 | extern const char *ignore_advisories; | |
42 | extern const char tnf_vulnerability_base[]; | 41 | extern const char tnf_vulnerability_base[]; | |
43 | 42 | |||
44 | void check(char **); | 43 | void check(char **); | |
45 | 44 | |||
46 | void audit_pkgdb(int, char **); | 45 | void audit_pkgdb(int, char **); | |
47 | void audit_pkg(int, char **); | 46 | void audit_pkg(int, char **); | |
48 | void audit_batch(int, char **); | 47 | void audit_batch(int, char **); | |
49 | void check_pkg_vulnerabilities(int, char **); | 48 | void check_pkg_vulnerabilities(int, char **); | |
50 | void fetch_pkg_vulnerabilities(int, char **); | 49 | void fetch_pkg_vulnerabilities(int, char **); | |
51 | 50 | |||
52 | void pkg_install_config(const char *); | 51 | void pkg_install_config(const char *); | |
52 | void pkg_install_show_variable(const char *); | |||
53 | 53 | |||
54 | void usage(void); | 54 | void usage(void); |
@@ -1,24 +1,24 @@ | @@ -1,24 +1,24 @@ | |||
1 | /* $NetBSD: config.c,v 1.3 2008/03/21 14:47:53 joerg Exp $ */ | 1 | /* $NetBSD: config.c,v 1.4 2008/04/07 13:07:14 joerg Exp $ */ | |
2 | 2 | |||
3 | #if HAVE_CONFIG_H | 3 | #if HAVE_CONFIG_H | |
4 | #include "config.h" | 4 | #include "config.h" | |
5 | #endif | 5 | #endif | |
6 | #include <nbcompat.h> | 6 | #include <nbcompat.h> | |
7 | #if HAVE_SYS_CDEFS_H | 7 | #if HAVE_SYS_CDEFS_H | |
8 | #include <sys/cdefs.h> | 8 | #include <sys/cdefs.h> | |
9 | #endif | 9 | #endif | |
10 | #ifndef lint | 10 | #ifndef lint | |
11 | __RCSID("$NetBSD: config.c,v 1.3 2008/03/21 14:47:53 joerg Exp $"); | 11 | __RCSID("$NetBSD: config.c,v 1.4 2008/04/07 13:07:14 joerg Exp $"); | |
12 | #endif | 12 | #endif | |
13 | 13 | |||
14 | /*- | 14 | /*- | |
15 | * Copyright (c) 2008 Joerg Sonnenberger <joerg@NetBSD.org>. | 15 | * Copyright (c) 2008 Joerg Sonnenberger <joerg@NetBSD.org>. | |
16 | * All rights reserved. | 16 | * All rights reserved. | |
17 | * | 17 | * | |
18 | * Redistribution and use in source and binary forms, with or without | 18 | * Redistribution and use in source and binary forms, with or without | |
19 | * modification, are permitted provided that the following conditions | 19 | * modification, are permitted provided that the following conditions | |
20 | * are met: | 20 | * are met: | |
21 | * | 21 | * | |
22 | * 1. Redistributions of source code must retain the above copyright | 22 | * 1. Redistributions of source code must retain the above copyright | |
23 | * notice, this list of conditions and the following disclaimer. | 23 | * notice, this list of conditions and the following disclaimer. | |
24 | * 2. Redistributions in binary form must reproduce the above copyright | 24 | * 2. Redistributions in binary form must reproduce the above copyright | |
@@ -43,39 +43,37 @@ __RCSID("$NetBSD: config.c,v 1.3 2008/03 | @@ -43,39 +43,37 @@ __RCSID("$NetBSD: config.c,v 1.3 2008/03 | |||
43 | #if HAVE_ERR_H | 43 | #if HAVE_ERR_H | |
44 | #include <err.h> | 44 | #include <err.h> | |
45 | #endif | 45 | #endif | |
46 | #if HAVE_STRING_H | 46 | #if HAVE_STRING_H | |
47 | #include <string.h> | 47 | #include <string.h> | |
48 | #endif | 48 | #endif | |
49 | 49 | |||
50 | #include "admin.h" | 50 | #include "admin.h" | |
51 | #include "lib.h" | 51 | #include "lib.h" | |
52 | 52 | |||
53 | const char *pkg_vulnerabilities_dir; | 53 | const char *pkg_vulnerabilities_dir; | |
54 | const char *pkg_vulnerabilities_file; | 54 | const char *pkg_vulnerabilities_file; | |
55 | const char *pkg_vulnerabilities_url; | 55 | const char *pkg_vulnerabilities_url; | |
56 | const char *fetch_cmd = FTP_CMD; | |||
57 | const char *ignore_advisories = NULL; | 56 | const char *ignore_advisories = NULL; | |
58 | const char tnf_vulnerability_base[] = "ftp://ftp.NetBSD.org/pub/NetBSD/packages/vulns"; | 57 | const char tnf_vulnerability_base[] = "ftp://ftp.NetBSD.org/pub/NetBSD/packages/vulns"; | |
59 | 58 | |||
60 | static struct config_variable { | 59 | static struct config_variable { | |
61 | const char *name; | 60 | const char *name; | |
62 | const char **var; | 61 | const char **var; | |
63 | } config_variables[] = { | 62 | } config_variables[] = { | |
64 | { "GPG", &gpg_cmd }, | 63 | { "GPG", &gpg_cmd }, | |
65 | { "PKGVULNDIR", &pkg_vulnerabilities_dir }, | 64 | { "PKGVULNDIR", &pkg_vulnerabilities_dir }, | |
66 | { "PKGVULNURL", &pkg_vulnerabilities_url }, | 65 | { "PKGVULNURL", &pkg_vulnerabilities_url }, | |
67 | { "IGNORE_URL", &ignore_advisories }, | 66 | { "IGNORE_URL", &ignore_advisories }, | |
68 | { "FETCH_CMD", &fetch_cmd }, | |||
69 | { NULL, NULL } | 67 | { NULL, NULL } | |
70 | }; | 68 | }; | |
71 | 69 | |||
72 | void | 70 | void | |
73 | pkg_install_config(const char *config_file) | 71 | pkg_install_config(const char *config_file) | |
74 | { | 72 | { | |
75 | char *value; | 73 | char *value; | |
76 | int ret; | 74 | int ret; | |
77 | struct config_variable *var; | 75 | struct config_variable *var; | |
78 | 76 | |||
79 | for (var = config_variables; var->name != NULL; ++var) { | 77 | for (var = config_variables; var->name != NULL; ++var) { | |
80 | value = var_get(config_file, var->name); | 78 | value = var_get(config_file, var->name); | |
81 | if (value != NULL) | 79 | if (value != NULL) | |
@@ -87,13 +85,26 @@ pkg_install_config(const char *config_fi | @@ -87,13 +85,26 @@ pkg_install_config(const char *config_fi | |||
87 | else | 85 | else | |
88 | ret = asprintf(&value, "%s/pkg-vulnerabilities", _pkgdb_getPKGDB_DIR()); | 86 | ret = asprintf(&value, "%s/pkg-vulnerabilities", _pkgdb_getPKGDB_DIR()); | |
89 | pkg_vulnerabilities_file = value; | 87 | pkg_vulnerabilities_file = value; | |
90 | if (ret == -1) | 88 | if (ret == -1) | |
91 | err(EXIT_FAILURE, "asprintf failed"); | 89 | err(EXIT_FAILURE, "asprintf failed"); | |
92 | if (pkg_vulnerabilities_url == NULL) { | 90 | if (pkg_vulnerabilities_url == NULL) { | |
93 | ret = asprintf(&value, "%s/pkg-vulnerabilities.gz", | 91 | ret = asprintf(&value, "%s/pkg-vulnerabilities.gz", | |
94 | tnf_vulnerability_base); | 92 | tnf_vulnerability_base); | |
95 | pkg_vulnerabilities_url = value; | 93 | pkg_vulnerabilities_url = value; | |
96 | if (ret == -1) | 94 | if (ret == -1) | |
97 | err(EXIT_FAILURE, "asprintf failed"); | 95 | err(EXIT_FAILURE, "asprintf failed"); | |
98 | } | 96 | } | |
99 | } | 97 | } | |
98 | ||||
99 | void | |||
100 | pkg_install_show_variable(const char *var_name) | |||
101 | { | |||
102 | struct config_variable *var; | |||
103 | ||||
104 | for (var = config_variables; var->name != NULL; ++var) { | |||
105 | if (strcmp(var->name, var_name) != 0) | |||
106 | continue; | |||
107 | if (*var->var != NULL) | |||
108 | puts(*var->var); | |||
109 | } | |||
110 | } |
@@ -1,24 +1,24 @@ | @@ -1,24 +1,24 @@ | |||
1 | /* $NetBSD: main.c,v 1.40 2008/03/23 01:04:47 dsainty Exp $ */ | 1 | /* $NetBSD: main.c,v 1.41 2008/04/07 13:07:14 joerg Exp $ */ | |
2 | 2 | |||
3 | #if HAVE_CONFIG_H | 3 | #if HAVE_CONFIG_H | |
4 | #include "config.h" | 4 | #include "config.h" | |
5 | #endif | 5 | #endif | |
6 | #include <nbcompat.h> | 6 | #include <nbcompat.h> | |
7 | #if HAVE_SYS_CDEFS_H | 7 | #if HAVE_SYS_CDEFS_H | |
8 | #include <sys/cdefs.h> | 8 | #include <sys/cdefs.h> | |
9 | #endif | 9 | #endif | |
10 | #ifndef lint | 10 | #ifndef lint | |
11 | __RCSID("$NetBSD: main.c,v 1.40 2008/03/23 01:04:47 dsainty Exp $"); | 11 | __RCSID("$NetBSD: main.c,v 1.41 2008/04/07 13:07:14 joerg Exp $"); | |
12 | #endif | 12 | #endif | |
13 | 13 | |||
14 | /*- | 14 | /*- | |
15 | * Copyright (c) 1999-2008 The NetBSD Foundation, Inc. | 15 | * Copyright (c) 1999-2008 The NetBSD Foundation, Inc. | |
16 | * All rights reserved. | 16 | * All rights reserved. | |
17 | * | 17 | * | |
18 | * This code is derived from software contributed to The NetBSD Foundation | 18 | * This code is derived from software contributed to The NetBSD Foundation | |
19 | * by Hubert Feyrer <hubert@feyrer.de> and | 19 | * by Hubert Feyrer <hubert@feyrer.de> and | |
20 | * by Joerg Sonnenberger <joerg@NetBSD.org>. | 20 | * by Joerg Sonnenberger <joerg@NetBSD.org>. | |
21 | * | 21 | * | |
22 | * Redistribution and use in source and binary forms, with or without | 22 | * Redistribution and use in source and binary forms, with or without | |
23 | * modification, are permitted provided that the following conditions | 23 | * modification, are permitted provided that the following conditions | |
24 | * are met: | 24 | * are met: | |
@@ -103,29 +103,30 @@ usage(void) | @@ -103,29 +103,30 @@ usage(void) | |||
103 | " delete pkg ... - delete file entries for pkg in database\n" | 103 | " delete pkg ... - delete file entries for pkg in database\n" | |
104 | " set variable=value pkg ... - set installation variable for package\n" | 104 | " set variable=value pkg ... - set installation variable for package\n" | |
105 | " unset variable pkg ... - unset installation variable for package\n" | 105 | " unset variable pkg ... - unset installation variable for package\n" | |
106 | #ifdef PKGDB_DEBUG | 106 | #ifdef PKGDB_DEBUG | |
107 | " addkey key value - add key and value\n" | 107 | " addkey key value - add key and value\n" | |
108 | " delkey key - delete reference to key\n" | 108 | " delkey key - delete reference to key\n" | |
109 | #endif | 109 | #endif | |
110 | " lsall /path/to/pkgpattern - list all pkgs matching the pattern\n" | 110 | " lsall /path/to/pkgpattern - list all pkgs matching the pattern\n" | |
111 | " lsbest /path/to/pkgpattern - list pkgs matching the pattern best\n" | 111 | " lsbest /path/to/pkgpattern - list pkgs matching the pattern best\n" | |
112 | " dump - dump database\n" | 112 | " dump - dump database\n" | |
113 | " pmatch pattern pkg - returns true if pkg matches pattern, otherwise false\n" | 113 | " pmatch pattern pkg - returns true if pkg matches pattern, otherwise false\n" | |
114 | " fetch-pkg-vulnerabilities [-s] - fetch new vulnerability file\n" | 114 | " fetch-pkg-vulnerabilities [-s] - fetch new vulnerability file\n" | |
115 | " check-pkg-vulnerabilities [-s] <file> - check syntax and checksums of the vulnerability file\n" | 115 | " check-pkg-vulnerabilities [-s] <file> - check syntax and checksums of the vulnerability file\n" | |
116 | " audit [-es] [-t type] ...\n" | 116 | " audit [-es] [-t type] ... - check installed packages for vulnerabilities\n" | |
117 | " audit-pkg [-es] [-t type] ...\n" | 117 | " audit-pkg [-es] [-t type] ... - check listed packages for vulnerabilities\n" | |
118 | " audit-batch [-es] [-t type] ...\n", | 118 | " audit-batch [-es] [-t type] ... - check packages in listed files for vulnerabilities\n" | |
119 | " config-var name - print current value of the configuration variable\n", | |||
119 | getprogname()); | 120 | getprogname()); | |
120 | exit(EXIT_FAILURE); | 121 | exit(EXIT_FAILURE); | |
121 | } | 122 | } | |
122 | 123 | |||
123 | /* | 124 | /* | |
124 | * add1pkg(<pkg>) | 125 | * add1pkg(<pkg>) | |
125 | * adds the files listed in the +CONTENTS of <pkg> into the | 126 | * adds the files listed in the +CONTENTS of <pkg> into the | |
126 | * pkgdb.byfile.db database file in the current package dbdir. It | 127 | * pkgdb.byfile.db database file in the current package dbdir. It | |
127 | * returns the number of files added to the database file. | 128 | * returns the number of files added to the database file. | |
128 | */ | 129 | */ | |
129 | static int | 130 | static int | |
130 | add_pkg(const char *pkgdir, void *vp) | 131 | add_pkg(const char *pkgdir, void *vp) | |
131 | { | 132 | { | |
@@ -511,26 +512,31 @@ main(int argc, char *argv[]) | @@ -511,26 +512,31 @@ main(int argc, char *argv[]) | |||
511 | add_pkg(*argv, NULL); | 512 | add_pkg(*argv, NULL); | |
512 | } else if (strcasecmp(argv[0], "delete") == 0) { | 513 | } else if (strcasecmp(argv[0], "delete") == 0) { | |
513 | argv++; /* "delete" */ | 514 | argv++; /* "delete" */ | |
514 | while (*argv != NULL) { | 515 | while (*argv != NULL) { | |
515 | delete1pkg(*argv); | 516 | delete1pkg(*argv); | |
516 | argv++; | 517 | argv++; | |
517 | } | 518 | } | |
518 | } else if (strcasecmp(argv[0], "set") == 0) { | 519 | } else if (strcasecmp(argv[0], "set") == 0) { | |
519 | argv++; /* "set" */ | 520 | argv++; /* "set" */ | |
520 | set_unset_variable(argv, FALSE); | 521 | set_unset_variable(argv, FALSE); | |
521 | } else if (strcasecmp(argv[0], "unset") == 0) { | 522 | } else if (strcasecmp(argv[0], "unset") == 0) { | |
522 | argv++; /* "unset" */ | 523 | argv++; /* "unset" */ | |
523 | set_unset_variable(argv, TRUE); | 524 | set_unset_variable(argv, TRUE); | |
525 | } else if (strcasecmp(argv[0], "config-var") == 0) { | |||
526 | argv++; | |||
527 | if (argv == NULL || argv[1] != NULL) | |||
528 | errx(EXIT_FAILURE, "config-var takes exactly one argument"); | |||
529 | pkg_install_show_variable(argv[0]); | |||
524 | } | 530 | } | |
525 | #ifndef BOOTSTRAP | 531 | #ifndef BOOTSTRAP | |
526 | else if (strcasecmp(argv[0], "fetch-pkg-vulnerabilities") == 0) { | 532 | else if (strcasecmp(argv[0], "fetch-pkg-vulnerabilities") == 0) { | |
527 | fetch_pkg_vulnerabilities(--argc, ++argv); | 533 | fetch_pkg_vulnerabilities(--argc, ++argv); | |
528 | } else if (strcasecmp(argv[0], "check-pkg-vulnerabilities") == 0) { | 534 | } else if (strcasecmp(argv[0], "check-pkg-vulnerabilities") == 0) { | |
529 | check_pkg_vulnerabilities(--argc, ++argv); | 535 | check_pkg_vulnerabilities(--argc, ++argv); | |
530 | } else if (strcasecmp(argv[0], "audit") == 0) { | 536 | } else if (strcasecmp(argv[0], "audit") == 0) { | |
531 | audit_pkgdb(--argc, ++argv); | 537 | audit_pkgdb(--argc, ++argv); | |
532 | } else if (strcasecmp(argv[0], "audit-pkg") == 0) { | 538 | } else if (strcasecmp(argv[0], "audit-pkg") == 0) { | |
533 | audit_pkg(--argc, ++argv); | 539 | audit_pkg(--argc, ++argv); | |
534 | } else if (strcasecmp(argv[0], "audit-batch") == 0) { | 540 | } else if (strcasecmp(argv[0], "audit-batch") == 0) { | |
535 | audit_batch(--argc, ++argv); | 541 | audit_batch(--argc, ++argv); | |
536 | } | 542 | } |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | .\" $NetBSD: pkg_admin.1,v 1.16 2008/03/13 16:35:30 joerg Exp $ | 1 | .\" $NetBSD: pkg_admin.1,v 1.17 2008/04/07 13:07:14 joerg Exp $ | |
2 | .\" | 2 | .\" | |
3 | .\" Copyright (c) 1999-2008 The NetBSD Foundation, Inc. | 3 | .\" Copyright (c) 1999-2008 The NetBSD Foundation, Inc. | |
4 | .\" All rights reserved. | 4 | .\" All rights reserved. | |
5 | .\" | 5 | .\" | |
6 | .\" This code is derived from software contributed to The NetBSD Foundation | 6 | .\" This code is derived from software contributed to The NetBSD Foundation | |
7 | .\" by Hubert Feyrer <hubert@feyrer.de>. | 7 | .\" by Hubert Feyrer <hubert@feyrer.de>. | |
8 | .\" | 8 | .\" | |
9 | .\" Redistribution and use in source and binary forms, with or without | 9 | .\" Redistribution and use in source and binary forms, with or without | |
10 | .\" modification, are permitted provided that the following conditions | 10 | .\" modification, are permitted provided that the following conditions | |
11 | .\" are met: | 11 | .\" are met: | |
12 | .\" 1. Redistributions of source code must retain the above copyright | 12 | .\" 1. Redistributions of source code must retain the above copyright | |
13 | .\" notice, this list of conditions and the following disclaimer. | 13 | .\" notice, this list of conditions and the following disclaimer. | |
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | 14 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
@@ -154,26 +154,30 @@ The packages' | @@ -154,26 +154,30 @@ The packages' | |||
154 | .Pa +CONTENTS | 154 | .Pa +CONTENTS | |
155 | files will be parsed and the | 155 | files will be parsed and the | |
156 | checksum will be checked for every file found. | 156 | checksum will be checked for every file found. | |
157 | A warning message is printed if the expected checksum differs from the | 157 | A warning message is printed if the expected checksum differs from the | |
158 | checksum of the file on disk. | 158 | checksum of the file on disk. | |
159 | Symbolic links are also checked, ensuring that the targets on disk are | 159 | Symbolic links are also checked, ensuring that the targets on disk are | |
160 | the same as the contents recorded at package installation time. | 160 | the same as the contents recorded at package installation time. | |
161 | .It Cm check-pkg-vulnerabilities Oo Fl s Oc Ar file | 161 | .It Cm check-pkg-vulnerabilities Oo Fl s Oc Ar file | |
162 | Check format and hashes in the pkg-vulnerabilties file | 162 | Check format and hashes in the pkg-vulnerabilties file | |
163 | .Ar file . | 163 | .Ar file . | |
164 | If | 164 | If | |
165 | .Fl s | 165 | .Fl s | |
166 | is given, also check the embedded signature. | 166 | is given, also check the embedded signature. | |
167 | .It Cm config-var Ar variable | |||
168 | Print the current value of | |||
169 | .Ar variable | |||
170 | as used after parsing the configuration file. | |||
167 | .It Cm delete Ar pkg ... | 171 | .It Cm delete Ar pkg ... | |
168 | For each listed package, remove all file entries in the package database that | 172 | For each listed package, remove all file entries in the package database that | |
169 | belong to the package. | 173 | belong to the package. | |
170 | This should be used only by | 174 | This should be used only by | |
171 | .Xr pkg_view 1 . | 175 | .Xr pkg_view 1 . | |
172 | .It Cm dump | 176 | .It Cm dump | |
173 | Dump the contents of the package database, similar to | 177 | Dump the contents of the package database, similar to | |
174 | .Cm pkg_info -F . | 178 | .Cm pkg_info -F . | |
175 | Columns are printed for the keyfield used in the pkgdb - the filename -, | 179 | Columns are printed for the keyfield used in the pkgdb - the filename -, | |
176 | and the data field - the package the file belongs to. | 180 | and the data field - the package the file belongs to. | |
177 | .It Cm fetch-pkg-vulnerabilities Op Fl s | 181 | .It Cm fetch-pkg-vulnerabilities Op Fl s | |
178 | Fetch a new pkg-vulnerabilities file, check the format and if | 182 | Fetch a new pkg-vulnerabilities file, check the format and if | |
179 | .Fl s | 183 | .Fl s |
@@ -80,26 +80,30 @@ OOPPTTIIOONNSS | @@ -80,26 +80,30 @@ OOPPTTIIOONNSS | |||
80 | can be used here, see pkg_info(1)). | 80 | can be used here, see pkg_info(1)). | |
81 | 81 | |||
82 | The packages' _+_C_O_N_T_E_N_T_S files will be parsed and the checksum | 82 | The packages' _+_C_O_N_T_E_N_T_S files will be parsed and the checksum | |
83 | will be checked for every file found. A warning message is | 83 | will be checked for every file found. A warning message is | |
84 | printed if the expected checksum differs from the checksum of the | 84 | printed if the expected checksum differs from the checksum of the | |
85 | file on disk. Symbolic links are also checked, ensuring that the | 85 | file on disk. Symbolic links are also checked, ensuring that the | |
86 | targets on disk are the same as the contents recorded at package | 86 | targets on disk are the same as the contents recorded at package | |
87 | installation time. | 87 | installation time. | |
88 | 88 | |||
89 | cchheecckk--ppkkgg--vvuullnneerraabbiilliittiieess [--ss] _f_i_l_e | 89 | cchheecckk--ppkkgg--vvuullnneerraabbiilliittiieess [--ss] _f_i_l_e | |
90 | Check format and hashes in the pkg-vulnerabilties file _f_i_l_e. If | 90 | Check format and hashes in the pkg-vulnerabilties file _f_i_l_e. If | |
91 | --ss is given, also check the embedded signature. | 91 | --ss is given, also check the embedded signature. | |
92 | 92 | |||
93 | ccoonnffiigg--vvaarr _v_a_r_i_a_b_l_e | |||
94 | Print the current value of _v_a_r_i_a_b_l_e as used after parsing the | |||
95 | configuration file. | |||
96 | ||||
93 | ddeelleettee _p_k_g _._._. | 97 | ddeelleettee _p_k_g _._._. | |
94 | For each listed package, remove all file entries in the package | 98 | For each listed package, remove all file entries in the package | |
95 | database that belong to the package. This should be used only by | 99 | database that belong to the package. This should be used only by | |
96 | pkg_view(1). | 100 | pkg_view(1). | |
97 | 101 | |||
98 | dduummpp Dump the contents of the package database, similar to ppkkgg__iinnffoo | 102 | dduummpp Dump the contents of the package database, similar to ppkkgg__iinnffoo | |
99 | --FF. Columns are printed for the keyfield used in the pkgdb - the | 103 | --FF. Columns are printed for the keyfield used in the pkgdb - the | |
100 | filename -, and the data field - the package the file belongs to. | 104 | filename -, and the data field - the package the file belongs to. | |
101 | 105 | |||
102 | ffeettcchh--ppkkgg--vvuullnneerraabbiilliittiieess [--ss] | 106 | ffeettcchh--ppkkgg--vvuullnneerraabbiilliittiieess [--ss] | |
103 | Fetch a new pkg-vulnerabilities file, check the format and if --ss | 107 | Fetch a new pkg-vulnerabilities file, check the format and if --ss | |
104 | is given the signature. If all checks are passed, write it to | 108 | is given the signature. If all checks are passed, write it to | |
105 | pkgdb. | 109 | pkgdb. |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: version.h,v 1.98 2008/04/04 15:21:32 joerg Exp $ */ | 1 | /* $NetBSD: version.h,v 1.99 2008/04/07 13:07:14 joerg Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2001 Thomas Klausner. All rights reserved. | 4 | * Copyright (c) 2001 Thomas Klausner. All rights reserved. | |
5 | * | 5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions | 7 | * modification, are permitted provided that the following conditions | |
8 | * are met: | 8 | * are met: | |
9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. | |
11 | * 2. Redistributions in binary form must reproduce the above copyright | 11 | * 2. Redistributions in binary form must reproduce the above copyright | |
12 | * notice, this list of conditions and the following disclaimer in the | 12 | * notice, this list of conditions and the following disclaimer in the | |
13 | * documentation and/or other materials provided with the distribution. | 13 | * documentation and/or other materials provided with the distribution. | |
14 | * 3. All advertising materials mentioning features or use of this software | 14 | * 3. All advertising materials mentioning features or use of this software | |
@@ -23,16 +23,16 @@ | @@ -23,16 +23,16 @@ | |||
23 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | 23 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
24 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | 24 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | |
25 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | 25 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | |
26 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 26 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
30 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 30 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
31 | */ | 31 | */ | |
32 | 32 | |||
33 | #ifndef _INST_LIB_VERSION_H_ | 33 | #ifndef _INST_LIB_VERSION_H_ | |
34 | #define _INST_LIB_VERSION_H_ | 34 | #define _INST_LIB_VERSION_H_ | |
35 | 35 | |||
36 | #define PKGTOOLS_VERSION "20080402" | 36 | #define PKGTOOLS_VERSION "20080407" | |
37 | 37 | |||
38 | #endif /* _INST_LIB_VERSION_H_ */ | 38 | #endif /* _INST_LIB_VERSION_H_ */ |