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 merge pkg_install-20210410
details: https://anonhg.NetBSD.org/src/rev/bcd6c60111fa
branches: trunk
changeset: 954478:bcd6c60111fa
user: nia <nia%NetBSD.org@localhost>
date: Sat Apr 10 19:49:59 2021 +0000
description:
merge pkg_install-20210410
- simplified version checking for netbsd, treat 9.0 and 9.1 as compatible
- minor man page updates
diffstat:
external/bsd/pkg_install/dist/add/add.h | 2 +-
external/bsd/pkg_install/dist/add/main.c | 4 +-
external/bsd/pkg_install/dist/add/perform.c | 82 ++++-----
external/bsd/pkg_install/dist/add/pkg_add.1 | 34 ++-
external/bsd/pkg_install/dist/admin/audit-packages.8 | 2 +-
external/bsd/pkg_install/dist/admin/audit.c | 4 +-
external/bsd/pkg_install/dist/admin/check.c | 4 +-
external/bsd/pkg_install/dist/admin/download-vulnerability-list.8 | 2 +-
external/bsd/pkg_install/dist/admin/pkg_admin.1 | 2 +-
external/bsd/pkg_install/dist/create/build.c | 4 +-
external/bsd/pkg_install/dist/create/create.h | 2 +-
external/bsd/pkg_install/dist/create/main.c | 4 +-
external/bsd/pkg_install/dist/create/perform.c | 4 +-
external/bsd/pkg_install/dist/create/pkg_create.1 | 2 +-
external/bsd/pkg_install/dist/create/pl.c | 4 +-
external/bsd/pkg_install/dist/delete/pkg_delete.1 | 2 +-
external/bsd/pkg_install/dist/delete/pkg_delete.c | 2 +-
external/bsd/pkg_install/dist/info/info.h | 2 +-
external/bsd/pkg_install/dist/info/main.c | 4 +-
external/bsd/pkg_install/dist/info/perform.c | 4 +-
external/bsd/pkg_install/dist/info/pkg_info.1 | 2 +-
external/bsd/pkg_install/dist/info/show.c | 4 +-
external/bsd/pkg_install/dist/lib/automatic.c | 4 +-
external/bsd/pkg_install/dist/lib/conflicts.c | 4 +-
external/bsd/pkg_install/dist/lib/defs.h | 2 +-
external/bsd/pkg_install/dist/lib/dewey.c | 2 +-
external/bsd/pkg_install/dist/lib/dewey.h | 2 +-
external/bsd/pkg_install/dist/lib/fexec.c | 4 +-
external/bsd/pkg_install/dist/lib/file.c | 4 +-
external/bsd/pkg_install/dist/lib/global.c | 4 +-
external/bsd/pkg_install/dist/lib/gpgsig.c | 4 +-
external/bsd/pkg_install/dist/lib/iterate.c | 2 +-
external/bsd/pkg_install/dist/lib/lib.h | 2 +-
external/bsd/pkg_install/dist/lib/license.c | 3 +-
external/bsd/pkg_install/dist/lib/lpkg.c | 2 +-
external/bsd/pkg_install/dist/lib/opattern.c | 4 +-
external/bsd/pkg_install/dist/lib/parse-config.c | 4 +-
external/bsd/pkg_install/dist/lib/pkcs7.c | 4 +-
external/bsd/pkg_install/dist/lib/pkg_install.conf.5.in | 2 +-
external/bsd/pkg_install/dist/lib/pkg_io.c | 4 +-
external/bsd/pkg_install/dist/lib/pkg_signature.c | 4 +-
external/bsd/pkg_install/dist/lib/pkg_summary.5 | 2 +-
external/bsd/pkg_install/dist/lib/pkgdb.c | 4 +-
external/bsd/pkg_install/dist/lib/pkgsrc.7 | 2 +-
external/bsd/pkg_install/dist/lib/plist.c | 4 +-
external/bsd/pkg_install/dist/lib/remove.c | 4 +-
external/bsd/pkg_install/dist/lib/str.c | 4 +-
external/bsd/pkg_install/dist/lib/var.c | 4 +-
external/bsd/pkg_install/dist/lib/version.c | 4 +-
external/bsd/pkg_install/dist/lib/version.h | 4 +-
external/bsd/pkg_install/dist/lib/vulnerabilities-file.c | 4 +-
external/bsd/pkg_install/dist/lib/xwrapper.c | 4 +-
external/bsd/pkg_install/dist/x509/pkgsrc.cnf | 2 +-
external/bsd/pkg_install/dist/x509/pkgsrc.sh | 2 +-
54 files changed, 138 insertions(+), 143 deletions(-)
diffs (truncated from 929 to 300 lines):
diff -r 5105c7f41a9c -r bcd6c60111fa external/bsd/pkg_install/dist/add/add.h
--- a/external/bsd/pkg_install/dist/add/add.h Sat Apr 10 19:27:16 2021 +0000
+++ b/external/bsd/pkg_install/dist/add/add.h Sat Apr 10 19:49:59 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: add.h,v 1.2 2017/04/20 13:18:23 joerg Exp $ */
+/* $NetBSD: add.h,v 1.3 2021/04/10 19:49:59 nia Exp $ */
/* from FreeBSD Id: add.h,v 1.8 1997/02/22 16:09:15 peter Exp */
diff -r 5105c7f41a9c -r bcd6c60111fa external/bsd/pkg_install/dist/add/main.c
--- a/external/bsd/pkg_install/dist/add/main.c Sat Apr 10 19:27:16 2021 +0000
+++ b/external/bsd/pkg_install/dist/add/main.c Sat Apr 10 19:49:59 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.2 2017/04/20 13:18:23 joerg Exp $ */
+/* $NetBSD: main.c,v 1.3 2021/04/10 19:49:59 nia 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.2 2017/04/20 13:18:23 joerg Exp $");
+__RCSID("$NetBSD");
/*
*
diff -r 5105c7f41a9c -r bcd6c60111fa external/bsd/pkg_install/dist/add/perform.c
--- a/external/bsd/pkg_install/dist/add/perform.c Sat Apr 10 19:27:16 2021 +0000
+++ b/external/bsd/pkg_install/dist/add/perform.c Sat Apr 10 19:49:59 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.8 2020/12/12 11:00:57 wiz Exp $ */
+/* $NetBSD: perform.c,v 1.9 2021/04/10 19:49:59 nia 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.8 2020/12/12 11:00:57 wiz Exp $");
+__RCSID("$NetBSD: perform.c,v 1.9 2021/04/10 19:49:59 nia Exp $");
/*-
* Copyright (c) 2003 Grant Beattie <grant%NetBSD.org@localhost>
@@ -129,53 +129,45 @@
static int pkg_do(const char *, int, int);
static int
-end_of_version(const char *opsys, const char *version_end)
-{
- if (*version_end == '\0')
- return 1;
-
- if (strcmp(opsys, "NetBSD") == 0) {
- if (strncmp(version_end, "_ALPHA", 6) == 0
- || strncmp(version_end, "_BETA", 5) == 0
- || strncmp(version_end, "_RC", 3) == 0
- || strncmp(version_end, "_STABLE", 7) == 0
- || strncmp(version_end, "_PATCH", 6) == 0)
- return 1;
- }
-
- return 0;
-}
-
-static int
compatible_platform(const char *opsys, const char *host, const char *package)
{
- int i = 0;
+ const char *loc;
+ size_t majorlen = 0;
- /*
- * If the user has set the CHECK_OS_VERSION variable to "no" then skip any
- * uname version checks and assume they know what they are doing. This can
- * be useful on OS where the kernel version is not a good indicator of
- * userland compatibility, or differs but retains ABI compatibility.
- */
- if (strcasecmp(check_os_version, "no") == 0)
- return 1;
+ /*
+ * If the user has set the CHECK_OS_VERSION variable to "no" then skip any
+ * uname version checks and assume they know what they are doing. This can
+ * be useful on OS where the kernel version is not a good indicator of
+ * userland compatibility, or differs but retains ABI compatibility.
+ */
+ if (strcasecmp(check_os_version, "no") == 0)
+ return 1;
- /* returns 1 if host and package operating system match */
- if (strcmp(host, package) == 0)
- return 1;
-
- /* accept, if host version is a minor release of package version */
- if (strncmp(host, package, strlen(package)) == 0)
- return 1;
-
- /* find offset of first difference */
- for (i=0; (host[i] != '\0') && (host[i] == package[i]);)
- i++;
-
- if (end_of_version(opsys, host+i) && end_of_version(opsys, package+i))
- return 1;
-
- return 0;
+ /* returns 1 if host and package operating system match */
+ if (strcmp(opsys, "NetBSD") == 0) {
+ /*
+ * warn about -current package on a stable release and
+ * the reverse
+ */
+ if ((strstr(host, ".99.") != NULL &&
+ strstr(package, ".99.") == NULL) ||
+ (strstr(package, ".99.") != NULL &&
+ strstr(host, ".99.") == NULL)) {
+ return 0;
+ }
+ /* compare the major version only */
+ loc = strchr(host, '.');
+ if (loc != NULL) {
+ majorlen = loc - host;
+ if (majorlen != (strchr(package, '.') - package))
+ return 0;
+ if (strncmp(host, package, majorlen) == 0)
+ return 1;
+ }
+ }
+ if (strcmp(host, package) == 0)
+ return 1;
+ return 0;
}
static int
diff -r 5105c7f41a9c -r bcd6c60111fa external/bsd/pkg_install/dist/add/pkg_add.1
--- a/external/bsd/pkg_install/dist/add/pkg_add.1 Sat Apr 10 19:27:16 2021 +0000
+++ b/external/bsd/pkg_install/dist/add/pkg_add.1 Sat Apr 10 19:49:59 2021 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkg_add.1,v 1.3 2018/03/25 04:04:36 sevan Exp $
+.\" $NetBSD: pkg_add.1,v 1.4 2021/04/10 19:49:59 nia Exp $
.\"
.\" FreeBSD install - a package for the installation and maintenance
.\" of non-core utilities.
@@ -17,7 +17,7 @@
.\"
.\" @(#)pkg_add.1
.\"
-.Dd March 21, 2018
+.Dd March 8, 2021
.Dt PKG_ADD 1
.Os
.Sh NAME
@@ -189,7 +189,7 @@
Thus you may extract files directly from their anonymous ftp or WWW
locations (e.g.,
.Nm
-ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/i386/3.1_2007Q2/shells/bash-3.2.9.tgz
+http://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/x86_64/9.0/All/bash-5.0.18.tgz
or
.Nm
http://www.example.org/packages/screen-4.0.tbz).
@@ -376,7 +376,20 @@
.Nm
will try to install binary packages listed in dependencies list.
.Pp
-You can specify a compiled binary package explicitly on the command line.
+You can grab a compiled binary package from remote location by specifying
+a URL:
+.Bd -literal
+# pkg_add http://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/x86_64/9.0/All/firefox-84.0.tgz
+.Ed
+.Pp
+The base URL can also be provided by the configuration variable,
+.Dv PKG_PATH :
+.Bd -literal
+# export PKG_PATH=http://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/x86_64/9.0/All
+# pkg_add firefox
+.Ed
+.Pp
+You can also specify a compiled binary package by filesystem path:
.Bd -literal
# pkg_add /usr/pkgsrc/packages/All/tcsh-6.14.00.tgz
.Ed
@@ -387,21 +400,10 @@
With
.Fl v ,
.Nm
-emits more messages to terminal.
+emits more messages to terminal:
.Bd -literal
# pkg_add -v /usr/pkgsrc/packages/All/unzip
.Ed
-.Pp
-You can grab a compiled binary package from remote location by specifying
-a URL.
-The base URL can also be provided by the configuration variable,
-.Dv PKG_PATH .
-.Bd -literal
-# pkg_add -v ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/i386/3.1_2007Q2/All/firefox-2.0.0.4.tgz
-
-# export PKG_PATH=ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/i386/3.1_2007Q2/All
-# pkg_add -v firefox
-.Ed
.Sh SEE ALSO
.Xr pkg_admin 1 ,
.Xr pkg_create 1 ,
diff -r 5105c7f41a9c -r bcd6c60111fa external/bsd/pkg_install/dist/admin/audit-packages.8
--- a/external/bsd/pkg_install/dist/admin/audit-packages.8 Sat Apr 10 19:27:16 2021 +0000
+++ b/external/bsd/pkg_install/dist/admin/audit-packages.8 Sat Apr 10 19:49:59 2021 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: audit-packages.8,v 1.2 2017/04/20 13:18:23 joerg Exp $
+.\" $NetBSD: audit-packages.8,v 1.3 2021/04/10 19:49:59 nia Exp $
.\"
.\" Copyright (c) 2010 The NetBSD Foundation, Inc.
.\" All rights reserved.
diff -r 5105c7f41a9c -r bcd6c60111fa external/bsd/pkg_install/dist/admin/audit.c
--- a/external/bsd/pkg_install/dist/admin/audit.c Sat Apr 10 19:27:16 2021 +0000
+++ b/external/bsd/pkg_install/dist/admin/audit.c Sat Apr 10 19:49:59 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audit.c,v 1.3 2018/03/25 04:04:36 sevan Exp $ */
+/* $NetBSD: audit.c,v 1.4 2021/04/10 19:49:59 nia 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.3 2018/03/25 04:04:36 sevan Exp $");
+__RCSID("$NetBSD: audit.c,v 1.4 2021/04/10 19:49:59 nia Exp $");
/*-
* Copyright (c) 2008 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
diff -r 5105c7f41a9c -r bcd6c60111fa external/bsd/pkg_install/dist/admin/check.c
--- a/external/bsd/pkg_install/dist/admin/check.c Sat Apr 10 19:27:16 2021 +0000
+++ b/external/bsd/pkg_install/dist/admin/check.c Sat Apr 10 19:49:59 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: check.c,v 1.4 2020/12/02 13:53:50 wiz Exp $ */
+/* $NetBSD: check.c,v 1.5 2021/04/10 19:49:59 nia Exp $ */
#ifdef HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
@@ -11,7 +11,7 @@
#include <sys/cdefs.h>
#endif
#endif
-__RCSID("$NetBSD: check.c,v 1.4 2020/12/02 13:53:50 wiz Exp $");
+__RCSID("$NetBSD: check.c,v 1.5 2021/04/10 19:49:59 nia Exp $");
/*-
* Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
diff -r 5105c7f41a9c -r bcd6c60111fa external/bsd/pkg_install/dist/admin/download-vulnerability-list.8
--- a/external/bsd/pkg_install/dist/admin/download-vulnerability-list.8 Sat Apr 10 19:27:16 2021 +0000
+++ b/external/bsd/pkg_install/dist/admin/download-vulnerability-list.8 Sat Apr 10 19:49:59 2021 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: download-vulnerability-list.8,v 1.2 2017/04/20 13:18:23 joerg Exp $
+.\" $NetBSD: download-vulnerability-list.8,v 1.3 2021/04/10 19:49:59 nia Exp $
.\"
.\" Copyright (c) 2010 The NetBSD Foundation, Inc.
.\" All rights reserved.
diff -r 5105c7f41a9c -r bcd6c60111fa external/bsd/pkg_install/dist/admin/pkg_admin.1
--- a/external/bsd/pkg_install/dist/admin/pkg_admin.1 Sat Apr 10 19:27:16 2021 +0000
+++ b/external/bsd/pkg_install/dist/admin/pkg_admin.1 Sat Apr 10 19:49:59 2021 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkg_admin.1,v 1.6 2020/12/02 13:53:50 wiz Exp $
+.\" $NetBSD: pkg_admin.1,v 1.7 2021/04/10 19:49:59 nia Exp $
.\"
.\" Copyright (c) 1999-2019 The NetBSD Foundation, Inc.
.\" All rights reserved.
diff -r 5105c7f41a9c -r bcd6c60111fa external/bsd/pkg_install/dist/create/build.c
--- a/external/bsd/pkg_install/dist/create/build.c Sat Apr 10 19:27:16 2021 +0000
+++ b/external/bsd/pkg_install/dist/create/build.c Sat Apr 10 19:49:59 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: build.c,v 1.2 2017/04/20 13:18:23 joerg Exp $ */
+/* $NetBSD: build.c,v 1.3 2021/04/10 19:49:59 nia Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,7 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-__RCSID("$NetBSD: build.c,v 1.2 2017/04/20 13:18:23 joerg Exp $");
+__RCSID("$NetBSD: build.c,v 1.3 2021/04/10 19:49:59 nia Exp $");
/*-
* Copyright (c) 2007 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
diff -r 5105c7f41a9c -r bcd6c60111fa external/bsd/pkg_install/dist/create/create.h
--- a/external/bsd/pkg_install/dist/create/create.h Sat Apr 10 19:27:16 2021 +0000
+++ b/external/bsd/pkg_install/dist/create/create.h Sat Apr 10 19:49:59 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: create.h,v 1.2 2017/04/20 13:18:23 joerg Exp $ */
+/* $NetBSD: create.h,v 1.3 2021/04/10 19:49:59 nia Exp $ */
/* from FreeBSD Id: create.h,v 1.13 1997/10/08 07:46:19 charnier Exp */
diff -r 5105c7f41a9c -r bcd6c60111fa external/bsd/pkg_install/dist/create/main.c
--- a/external/bsd/pkg_install/dist/create/main.c Sat Apr 10 19:27:16 2021 +0000
+++ b/external/bsd/pkg_install/dist/create/main.c Sat Apr 10 19:49:59 2021 +0000
@@ -1,4 +1,4 @@
Home |
Main Index |
Thread Index |
Old Index