Import of pkgsrc-2016Q3

This commit is contained in:
2016-11-18 22:39:22 +01:00
committed by sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949747 additions and 377081 deletions
+9 -2
View File
@@ -1,4 +1,4 @@
# $NetBSD: Makefile.in,v 1.31 2015/09/07 09:06:04 jperkin Exp $
# $NetBSD: Makefile.in,v 1.33 2015/12/27 12:36:42 joerg Exp $
srcdir= @srcdir@
@@ -14,17 +14,24 @@ cat1dir= $(mandir)/cat1
CC= @CC@
CCLD= $(CC)
CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir) -I../lib
DEFS= @DEFS@ -DOPSYS_NAME=\"$(OPSYS)\" -DMACHINE_ARCH=\"$(MACHINE_ARCH)\" -DBINDIR=\"$(sbindir)\"
DEFS= @DEFS@ -DOPSYS_NAME=\"$(OPSYS)\" -DPKGSRC_MACHINE_ARCH=\"$(PKGSRC_MACHINE_ARCH)\" -DBINDIR=\"$(sbindir)\"
CFLAGS= @CFLAGS@
LDFLAGS= @LDFLAGS@ -L../lib
BOOTSTRAP= @bootstrap@
SSL_SUPPORT= @ssl_support@
.if empty(BOOTSTRAP)
LIBS= -linstall -lnetpgpverify -larchive -lbz2 -lz -lfetch
.if !empty(SSL_SUPPORT)
LIBS+= -lssl -lcrypto
CPPFLAGS+= -DHAVE_SSL
.endif
LIBS+= @LIBS@
.else
LIBS= -linstall ${STATIC_LIBARCHIVE} @LIBS@
CPPFLAGS+= -DBOOTSTRAP
.endif
INSTALL= @INSTALL@
+7 -5
View File
@@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.30 2015/07/20 13:59:44 khorben Exp $ */
/* $NetBSD: main.c,v 1.32 2015/12/27 12:36:42 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.30 2015/07/20 13:59:44 khorben Exp $");
__RCSID("$NetBSD: main.c,v 1.32 2015/12/27 12:36:42 joerg Exp $");
/*
*
@@ -33,9 +33,6 @@ __RCSID("$NetBSD: main.c,v 1.30 2015/07/20 13:59:44 khorben Exp $");
#if HAVE_ERR_H
#include <err.h>
#endif
#if HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#include "lib.h"
#include "add.h"
@@ -162,7 +159,10 @@ main(int argc, char **argv)
free(pkgdbdir);
}
#ifndef BOOTSTRAP
process_pkg_path();
#endif
TAILQ_INIT(&pkgs);
if (argc == 0) {
@@ -171,6 +171,7 @@ main(int argc, char **argv)
usage();
}
#ifndef BOOTSTRAP
if (strcasecmp(do_license_check, "no") == 0)
LicenseCheck = 0;
else if (strcasecmp(do_license_check, "yes") == 0)
@@ -183,6 +184,7 @@ main(int argc, char **argv)
if (LicenseCheck)
load_license_lists();
#endif
/* Get all the remaining package names, if any */
for (; argc > 0; --argc, ++argv) {
+28 -3
View File
@@ -1,4 +1,4 @@
/* $NetBSD: perform.c,v 1.106 2014/12/30 15:13:20 wiz Exp $ */
/* $NetBSD: perform.c,v 1.108 2015/12/27 12:36:42 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.106 2014/12/30 15:13:20 wiz Exp $");
__RCSID("$NetBSD: perform.c,v 1.108 2015/12/27 12:36:42 joerg Exp $");
/*-
* Copyright (c) 2003 Grant Beattie <grant@NetBSD.org>
@@ -907,7 +907,7 @@ check_platform(struct pkg_task *pkg)
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]) ||
@@ -1246,6 +1246,9 @@ static int check_input(const char *line, size_t len)
static int
check_signature(struct pkg_task *pkg, int invalid_sig)
{
#ifdef BOOTSTRAP
return 0;
#else
char *line;
size_t len;
@@ -1282,11 +1285,15 @@ check_signature(struct pkg_task *pkg, int invalid_sig)
}
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;
@@ -1325,11 +1332,15 @@ check_vulnerable(struct pkg_task *pkg)
return 1;
}
return 0;
#endif
}
static int
check_license(struct pkg_task *pkg)
{
#ifdef BOOTSTRAP
return 0;
#else
if (LicenseCheck == 0)
return 0;
@@ -1353,6 +1364,7 @@ check_license(struct pkg_task *pkg)
warnx("Invalid LICENSE for package `%s'", pkg->pkgname);
return 1;
}
#endif
}
/*
@@ -1361,7 +1373,9 @@ check_license(struct pkg_task *pkg)
static int
pkg_do(const char *pkgpath, int mark_automatic, int top_level)
{
#ifndef BOOTSTRAP
char *archive_name;
#endif
int status, invalid_sig;
struct pkg_task *pkg;
@@ -1369,6 +1383,16 @@ pkg_do(const char *pkgpath, int mark_automatic, int top_level)
status = -1;
#ifdef BOOTSTRAP
pkg->archive = archive_read_new();
archive_read_support_compression_all(pkg->archive);
archive_read_support_format_all(pkg->archive);
if (archive_read_open_filename(pkg->archive, pkgpath, 1024)) {
warnx("no pkg found for '%s', sorry.", pkgpath);
archive_read_free(pkg->archive);
goto clean_find_archive;
}
#else
pkg->archive = find_archive(pkgpath, top_level, &archive_name);
if (pkg->archive == NULL) {
warnx("no pkg found for '%s', sorry.", pkgpath);
@@ -1378,6 +1402,7 @@ pkg_do(const char *pkgpath, int mark_automatic, int top_level)
invalid_sig = pkg_verify_signature(archive_name, &pkg->archive, &pkg->entry,
&pkg->pkgname);
free(archive_name);
#endif
if (pkg->archive == NULL)
goto clean_memory;