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-20170419.
details: https://anonhg.NetBSD.org/src/rev/8ccc44ac38a4
branches: trunk
changeset: 353115:8ccc44ac38a4
user: joerg <joerg%NetBSD.org@localhost>
date: Thu Apr 20 13:18:23 2017 +0000
description:
Merge pkg_install-20170419.
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 | 67 +++------
external/bsd/pkg_install/dist/add/pkg_add.1 | 2 +-
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/main.c | 4 +-
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 | 59 +-------
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 | 6 +-
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 | 8 +-
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 | 21 +-
external/bsd/pkg_install/dist/lib/license.c | 21 ++-
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 | 7 +-
external/bsd/pkg_install/dist/lib/pkg_io.c | 4 +-
external/bsd/pkg_install/dist/lib/pkg_signature.c | 45 ++---
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 | 8 +-
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 +-
55 files changed, 167 insertions(+), 225 deletions(-)
diffs (truncated from 1435 to 300 lines):
diff -r 403cd569c1a1 -r 8ccc44ac38a4 external/bsd/pkg_install/dist/add/add.h
--- a/external/bsd/pkg_install/dist/add/add.h Thu Apr 20 13:12:46 2017 +0000
+++ b/external/bsd/pkg_install/dist/add/add.h Thu Apr 20 13:18:23 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: add.h,v 1.1.1.7 2011/02/18 22:32:27 aymeric Exp $ */
+/* $NetBSD: add.h,v 1.2 2017/04/20 13:18:23 joerg Exp $ */
/* from FreeBSD Id: add.h,v 1.8 1997/02/22 16:09:15 peter Exp */
diff -r 403cd569c1a1 -r 8ccc44ac38a4 external/bsd/pkg_install/dist/add/main.c
--- a/external/bsd/pkg_install/dist/add/main.c Thu Apr 20 13:12:46 2017 +0000
+++ b/external/bsd/pkg_install/dist/add/main.c Thu Apr 20 13:18:23 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.1.1.11 2017/04/20 13:12:46 joerg Exp $ */
+/* $NetBSD: main.c,v 1.2 2017/04/20 13:18:23 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.11 2017/04/20 13:12:46 joerg Exp $");
+__RCSID("$NetBSD: main.c,v 1.2 2017/04/20 13:18:23 joerg Exp $");
/*
*
diff -r 403cd569c1a1 -r 8ccc44ac38a4 external/bsd/pkg_install/dist/add/perform.c
--- a/external/bsd/pkg_install/dist/add/perform.c Thu Apr 20 13:12:46 2017 +0000
+++ b/external/bsd/pkg_install/dist/add/perform.c Thu Apr 20 13:18:23 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.4 2013/04/20 15:29:22 wiz Exp $ */
+/* $NetBSD: perform.c,v 1.5 2017/04/20 13:18:23 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.4 2013/04/20 15:29:22 wiz Exp $");
+__RCSID("$NetBSD: perform.c,v 1.5 2017/04/20 13:18:23 joerg Exp $");
/*-
* Copyright (c) 2003 Grant Beattie <grant%NetBSD.org@localhost>
@@ -50,6 +50,7 @@
#if HAVE_FCNTL_H
#include <fcntl.h>
#endif
+#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@@ -75,7 +76,6 @@
char *meta_install;
char *meta_deinstall;
char *meta_preserve;
- char *meta_views;
char *meta_installed_info;
};
@@ -121,7 +121,6 @@
{ offsetof(struct pkg_meta, meta_size_pkg), SIZE_PKG_FNAME, 0, 0444 },
{ offsetof(struct pkg_meta, meta_size_all), SIZE_ALL_FNAME, 0, 0444 },
{ offsetof(struct pkg_meta, meta_preserve), PRESERVE_FNAME, 0, 0444 },
- { offsetof(struct pkg_meta, meta_views), VIEWS_FNAME, 0, 0444 },
{ offsetof(struct pkg_meta, meta_required_by), REQUIRED_BY_FNAME, 0, 0644 },
{ offsetof(struct pkg_meta, meta_installed_info), INSTALLED_INFO_FNAME, 0, 0644 },
{ 0, NULL, 0, 0 },
@@ -413,9 +412,6 @@
return 1;
}
- if (Force)
- return 1;
-
/* We can only arrive here for explicitly requested packages. */
if (!Automatic && is_automatic_installed(pkg->pkgname)) {
if (Fake ||
@@ -832,8 +828,7 @@
out:
if (!NoRecord)
pkgdb_close();
- archive_write_close(writer);
- archive_write_finish(writer);
+ archive_write_free(writer);
return r;
}
@@ -912,7 +907,7 @@
if (OverrideMachine != NULL)
effective_arch = OverrideMachine;
else
- effective_arch = MACHINE_ARCH;
+ effective_arch = PKGSRC_MACHINE_ARCH;
/* If either the OS or arch are different, bomb */
if (strcmp(OPSYS_NAME, pkg->buildinfo[BI_OPSYS]) ||
@@ -1182,30 +1177,6 @@
return status;
}
-/*
- * If this package uses pkg_views, register it in the default view.
- */
-static void
-pkg_register_views(struct pkg_task *pkg)
-{
- if (Fake || NoView || pkg->meta_data.meta_views == NULL)
- return;
-
- if (Verbose) {
- printf("%s/pkg_view -d %s %s%s %s%s %sadd %s\n",
- BINDIR, pkgdb_get_dir(),
- View ? "-w " : "", View ? View : "",
- Viewbase ? "-W " : "", Viewbase ? Viewbase : "",
- Verbose ? "-v " : "", pkg->pkgname);
- }
-
- fexec_skipempty(BINDIR "/pkg_view", "-d", pkgdb_get_dir(),
- View ? "-w " : "", View ? View : "",
- Viewbase ? "-W " : "", Viewbase ? Viewbase : "",
- Verbose ? "-v " : "", "add", pkg->pkgname,
- (void *)NULL);
-}
-
static int
preserve_meta_data_file(struct pkg_task *pkg, const char *name)
{
@@ -1275,6 +1246,9 @@
static int
check_signature(struct pkg_task *pkg, int invalid_sig)
{
+#ifdef BOOTSTRAP
+ return 0;
+#else
char *line;
size_t len;
@@ -1311,11 +1285,15 @@
}
warnx("Unknown value of configuration variable VERIFIED_INSTALLATION");
return 1;
+#endif
}
static int
check_vulnerable(struct pkg_task *pkg)
{
+#ifdef BOOTSTRAP
+ return 0;
+#else
static struct pkg_vulnerabilities *pv;
int require_check;
char *line;
@@ -1354,11 +1332,15 @@
return 1;
}
return 0;
+#endif
}
static int
check_license(struct pkg_task *pkg)
{
+#ifdef BOOTSTRAP
+ return 0;
+#else
if (LicenseCheck == 0)
return 0;
@@ -1382,6 +1364,7 @@
warnx("Invalid LICENSE for package `%s'", pkg->pkgname);
return 1;
}
+#endif
}
/*
@@ -1404,8 +1387,12 @@
goto clean_find_archive;
}
+#ifndef BOOTSTRAP
invalid_sig = pkg_verify_signature(archive_name, &pkg->archive, &pkg->entry,
&pkg->pkgname);
+#else
+ invalid_sig = 0;
+#endif
free(archive_name);
if (pkg->archive == NULL)
@@ -1436,12 +1423,7 @@
if (pkg->meta_data.meta_mtree != NULL)
warnx("mtree specification in pkg `%s' ignored", pkg->pkgname);
- if (pkg->meta_data.meta_views != NULL) {
- pkg->logdir = xstrdup(pkg->prefix);
- pkgdb_set_dir(dirname_of(pkg->logdir), 4);
- } else {
- pkg->logdir = xasprintf("%s/%s", config_pkg_dbdir, pkg->pkgname);
- }
+ pkg->logdir = xasprintf("%s/%s", config_pkg_dbdir, pkg->pkgname);
if (Destdir != NULL)
pkg->install_logdir = xasprintf("%s/%s", Destdir, pkg->logdir);
@@ -1542,8 +1524,6 @@
if (pkg->meta_data.meta_display != NULL)
fputs(pkg->meta_data.meta_display, stdout);
- pkg_register_views(pkg);
-
status = 0;
goto clean_memory;
@@ -1559,6 +1539,7 @@
nuke_pkgdb:
if (!Fake) {
+ (void) remove_files(pkg->install_logdir, "+*");
if (recursive_remove(pkg->install_logdir, 1))
warn("Couldn't remove %s", pkg->install_logdir);
free(pkg->install_logdir_real);
@@ -1582,7 +1563,7 @@
free_plist(&pkg->plist);
free_meta_data(pkg);
if (pkg->archive)
- archive_read_finish(pkg->archive);
+ archive_read_free(pkg->archive);
free(pkg->other_version);
free(pkg->pkgname);
clean_find_archive:
diff -r 403cd569c1a1 -r 8ccc44ac38a4 external/bsd/pkg_install/dist/add/pkg_add.1
--- a/external/bsd/pkg_install/dist/add/pkg_add.1 Thu Apr 20 13:12:46 2017 +0000
+++ b/external/bsd/pkg_install/dist/add/pkg_add.1 Thu Apr 20 13:18:23 2017 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkg_add.1,v 1.1.1.13 2017/04/20 13:12:46 joerg Exp $
+.\" $NetBSD: pkg_add.1,v 1.2 2017/04/20 13:18:23 joerg Exp $
.\"
.\" FreeBSD install - a package for the installation and maintenance
.\" of non-core utilities.
diff -r 403cd569c1a1 -r 8ccc44ac38a4 external/bsd/pkg_install/dist/admin/audit-packages.8
--- a/external/bsd/pkg_install/dist/admin/audit-packages.8 Thu Apr 20 13:12:46 2017 +0000
+++ b/external/bsd/pkg_install/dist/admin/audit-packages.8 Thu Apr 20 13:18:23 2017 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: audit-packages.8,v 1.1.1.1 2010/04/23 20:54:06 joerg Exp $
+.\" $NetBSD: audit-packages.8,v 1.2 2017/04/20 13:18:23 joerg Exp $
.\"
.\" Copyright (c) 2010 The NetBSD Foundation, Inc.
.\" All rights reserved.
diff -r 403cd569c1a1 -r 8ccc44ac38a4 external/bsd/pkg_install/dist/admin/audit.c
--- a/external/bsd/pkg_install/dist/admin/audit.c Thu Apr 20 13:12:46 2017 +0000
+++ b/external/bsd/pkg_install/dist/admin/audit.c Thu Apr 20 13:18:23 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audit.c,v 1.1.1.9 2011/02/18 22:32:28 aymeric Exp $ */
+/* $NetBSD: audit.c,v 1.2 2017/04/20 13:18:23 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.9 2011/02/18 22:32:28 aymeric Exp $");
+__RCSID("$NetBSD: audit.c,v 1.2 2017/04/20 13:18:23 joerg Exp $");
/*-
* Copyright (c) 2008 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
diff -r 403cd569c1a1 -r 8ccc44ac38a4 external/bsd/pkg_install/dist/admin/check.c
--- a/external/bsd/pkg_install/dist/admin/check.c Thu Apr 20 13:12:46 2017 +0000
+++ b/external/bsd/pkg_install/dist/admin/check.c Thu Apr 20 13:18:23 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: check.c,v 1.1.1.4 2010/01/30 21:33:23 joerg Exp $ */
+/* $NetBSD: check.c,v 1.2 2017/04/20 13:18:23 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: check.c,v 1.1.1.4 2010/01/30 21:33:23 joerg Exp $");
+__RCSID("$NetBSD: check.c,v 1.2 2017/04/20 13:18:23 joerg Exp $");
/*-
* Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
diff -r 403cd569c1a1 -r 8ccc44ac38a4 external/bsd/pkg_install/dist/admin/download-vulnerability-list.8
--- a/external/bsd/pkg_install/dist/admin/download-vulnerability-list.8 Thu Apr 20 13:12:46 2017 +0000
+++ b/external/bsd/pkg_install/dist/admin/download-vulnerability-list.8 Thu Apr 20 13:18:23 2017 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: download-vulnerability-list.8,v 1.1.1.1 2010/04/23 20:54:06 joerg Exp $
+.\" $NetBSD: download-vulnerability-list.8,v 1.2 2017/04/20 13:18:23 joerg Exp $
.\"
.\" Copyright (c) 2010 The NetBSD Foundation, Inc.
.\" All rights reserved.
diff -r 403cd569c1a1 -r 8ccc44ac38a4 external/bsd/pkg_install/dist/admin/main.c
--- a/external/bsd/pkg_install/dist/admin/main.c Thu Apr 20 13:12:46 2017 +0000
+++ b/external/bsd/pkg_install/dist/admin/main.c Thu Apr 20 13:18:23 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.1.1.16 2017/04/20 13:12:47 joerg Exp $ */
Home |
Main Index |
Thread Index |
Old Index