CVS commit: src/external/bsd/pkg_install/dist/lib

2020-12-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec 12 18:19:34 UTC 2020

Modified Files:
src/external/bsd/pkg_install/dist/lib: plist.c

Log Message:
Don't try to memcpy (size_t)-1 bytes!


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/pkg_install/dist/lib/plist.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/pkg_install/dist/lib/plist.c
diff -u src/external/bsd/pkg_install/dist/lib/plist.c:1.4 src/external/bsd/pkg_install/dist/lib/plist.c:1.5
--- src/external/bsd/pkg_install/dist/lib/plist.c:1.4	Wed Dec  2 08:53:50 2020
+++ src/external/bsd/pkg_install/dist/lib/plist.c	Sat Dec 12 13:19:34 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: plist.c,v 1.4 2020/12/02 13:53:50 wiz Exp $	*/
+/*	$NetBSD: plist.c,v 1.5 2020/12/12 18:19:34 christos Exp $	*/
 
 #if HAVE_CONFIG_H
 #include "config.h"
@@ -7,7 +7,7 @@
 #if HAVE_SYS_CDEFS_H
 #include 
 #endif
-__RCSID("$NetBSD: plist.c,v 1.4 2020/12/02 13:53:50 wiz Exp $");
+__RCSID("$NetBSD: plist.c,v 1.5 2020/12/12 18:19:34 christos Exp $");
 
 /*
  * FreeBSD install - a package for the installation and maintainance
@@ -637,15 +637,16 @@ delete_package(Boolean ign_err, package_
 	fail = FAIL;
 	goto pkgdb_cleanup;
 }
-			}
-			memcpy([SymlinkHeaderLen], tmp2, cc);
-			buf[SymlinkHeaderLen + cc] = 0x0;
-			if (strcmp(buf, p->next->name) != 0) {
-printf("symlink %s is not same as recorded value, %s: %s\n",
-buf, Force ? "deleting anyway" : "not deleting", tmp);
-if (!Force) {
-	fail = FAIL;
-	goto pkgdb_cleanup;
+			} else {
+memcpy([SymlinkHeaderLen], tmp2, cc);
+buf[SymlinkHeaderLen + cc] = 0x0;
+if (strcmp(buf, p->next->name) != 0) {
+	printf("symlink %s is not same as recorded value, %s: %s\n",
+	buf, Force ? "deleting anyway" : "not deleting", tmp);
+	if (!Force) {
+		fail = FAIL;
+		goto pkgdb_cleanup;
+	}
 }
 			}
 		}



CVS commit: src/external/bsd/pkg_install/dist/lib

2020-12-05 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Dec  5 16:21:26 UTC 2020

Modified Files:
src/external/bsd/pkg_install/dist/lib: pkgdb.c version.h

Log Message:
Merge pkg_install-20201205


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/pkg_install/dist/lib/pkgdb.c
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/pkg_install/dist/lib/version.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/pkg_install/dist/lib/pkgdb.c
diff -u src/external/bsd/pkg_install/dist/lib/pkgdb.c:1.3 src/external/bsd/pkg_install/dist/lib/pkgdb.c:1.4
--- src/external/bsd/pkg_install/dist/lib/pkgdb.c:1.3	Wed Dec  2 13:53:50 2020
+++ src/external/bsd/pkg_install/dist/lib/pkgdb.c	Sat Dec  5 16:21:26 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pkgdb.c,v 1.3 2020/12/02 13:53:50 wiz Exp $	*/
+/*	$NetBSD: pkgdb.c,v 1.4 2020/12/05 16:21:26 wiz Exp $	*/
 
 #if HAVE_CONFIG_H
 #include "config.h"
@@ -7,7 +7,7 @@
 #if HAVE_SYS_CDEFS_H
 #include 
 #endif
-__RCSID("$NetBSD: pkgdb.c,v 1.3 2020/12/02 13:53:50 wiz Exp $");
+__RCSID("$NetBSD: pkgdb.c,v 1.4 2020/12/05 16:21:26 wiz Exp $");
 
 /*-
  * Copyright (c) 1999-2010 The NetBSD Foundation, Inc.
@@ -310,8 +310,9 @@ pkgdb_get_dir(void)
 	stat("/var/db/pkg", ) == 0) {
 		errx(EXIT_FAILURE,
 		 "The default PKG_DBDIR has changed, but this installation still uses the old one.\n"
-		 "Please move the database and re-run this command:\n"
-		 "\tmv /var/db/pkg " DEF_LOG_DIR);
+		 "Please move the databases and re-run this command:\n"
+		 "\tmv /var/db/pkg " DEF_LOG_DIR "\n"
+		 "\tmv /var/db/pkg.refcount " DEF_LOG_DIR ".refcount");
 	}
 
 return pkgdb_dir;

Index: src/external/bsd/pkg_install/dist/lib/version.h
diff -u src/external/bsd/pkg_install/dist/lib/version.h:1.16 src/external/bsd/pkg_install/dist/lib/version.h:1.17
--- src/external/bsd/pkg_install/dist/lib/version.h:1.16	Wed Dec  2 13:53:50 2020
+++ src/external/bsd/pkg_install/dist/lib/version.h	Sat Dec  5 16:21:26 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: version.h,v 1.16 2020/12/02 13:53:50 wiz Exp $	*/
+/*	$NetBSD: version.h,v 1.17 2020/12/05 16:21:26 wiz Exp $	*/
 
 /*
  * Copyright (c) 2001 Thomas Klausner.  All rights reserved.
@@ -27,6 +27,6 @@
 #ifndef _INST_LIB_VERSION_H_
 #define _INST_LIB_VERSION_H_
 
-#define PKGTOOLS_VERSION 20200828
+#define PKGTOOLS_VERSION 20201205
 
 #endif /* _INST_LIB_VERSION_H_ */



CVS commit: src/external/bsd/pkg_install/dist/lib

2020-09-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Sep  7 00:36:53 UTC 2020

Modified Files:
src/external/bsd/pkg_install/dist/lib: plist.c

Log Message:
Avoid strict aliasing issue by using a separate buffer..


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/pkg_install/dist/lib/plist.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/pkg_install/dist/lib/plist.c
diff -u src/external/bsd/pkg_install/dist/lib/plist.c:1.2 src/external/bsd/pkg_install/dist/lib/plist.c:1.3
--- src/external/bsd/pkg_install/dist/lib/plist.c:1.2	Thu Apr 20 09:18:23 2017
+++ src/external/bsd/pkg_install/dist/lib/plist.c	Sun Sep  6 20:36:53 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: plist.c,v 1.2 2017/04/20 13:18:23 joerg Exp $	*/
+/*	$NetBSD: plist.c,v 1.3 2020/09/07 00:36:53 christos Exp $	*/
 
 #if HAVE_CONFIG_H
 #include "config.h"
@@ -7,7 +7,7 @@
 #if HAVE_SYS_CDEFS_H
 #include 
 #endif
-__RCSID("$NetBSD: plist.c,v 1.2 2017/04/20 13:18:23 joerg Exp $");
+__RCSID("$NetBSD: plist.c,v 1.3 2020/09/07 00:36:53 christos Exp $");
 
 /*
  * FreeBSD install - a package for the installation and maintainance
@@ -627,8 +627,10 @@ delete_package(Boolean ign_err, package_
 		}
 		buf[SymlinkHeaderLen + cc] = 0x0;
 		if (strcmp(buf, p->next->name) != 0) {
-			if ((cc = readlink([SymlinkHeaderLen], [SymlinkHeaderLen],
-  sizeof(buf) - SymlinkHeaderLen)) < 0) {
+			chartmp2[MaxPathSize];
+
+			if ((cc = readlink([SymlinkHeaderLen], tmp2,
+  sizeof(tmp2))) < 0) {
 printf("symlink %s is not same as recorded value, %s: %s\n",
 buf, Force ? "deleting anyway" : "not deleting", tmp);
 if (!Force) {
@@ -636,6 +638,7 @@ delete_package(Boolean ign_err, package_
 	goto pkgdb_cleanup;
 }
 			}
+			memcpy([SymlinkHeaderLen], tmp2, cc);
 			buf[SymlinkHeaderLen + cc] = 0x0;
 			if (strcmp(buf, p->next->name) != 0) {
 printf("symlink %s is not same as recorded value, %s: %s\n",



CVS commit: src/external/bsd/pkg_install/dist/lib

2018-03-27 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Tue Mar 27 22:51:44 UTC 2018

Modified Files:
src/external/bsd/pkg_install/dist/lib: pkg_install.conf.cat.in

Log Message:
Import regenerated catalog file


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/pkg_install/dist/lib/pkg_install.conf.cat.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/pkg_install/dist/lib/pkg_install.conf.cat.in
diff -u src/external/bsd/pkg_install/dist/lib/pkg_install.conf.cat.in:1.1.1.1 src/external/bsd/pkg_install/dist/lib/pkg_install.conf.cat.in:1.2
--- src/external/bsd/pkg_install/dist/lib/pkg_install.conf.cat.in:1.1.1.1	Sun Feb  4 08:20:47 2018
+++ src/external/bsd/pkg_install/dist/lib/pkg_install.conf.cat.in	Tue Mar 27 22:51:43 2018
@@ -1,7 +1,7 @@
 PKG_INSTALL.CONF(5)   File Formats Manual  PKG_INSTALL.CONF(5)
 
 NNAAMMEE
- ppkkgg__iinnssttaallll..ccoonnff -- configuration file for package installation tools
+ ppkkgg__iinnssttaallll..ccoonnff - configuration file for package installation tools
 
 DDEESSCCRRIIPPTTIIOONN
  The file ppkkgg__iinnssttaallll..ccoonnff contains system defaults for the package



CVS commit: src/external/bsd/pkg_install/dist/lib

2018-02-04 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sun Feb  4 09:00:51 UTC 2018

Modified Files:
src/external/bsd/pkg_install/dist/lib: license.c pkcs7.c pkg_io.c
version.h

Log Message:
Merge pkg_install-20171030

Bump version to 20171030 for netpgpverify fixes.
Add zsh to default_acceptable_licenses.
Undef bootstrap hack.

Fix OpenSSL 1.1.0 build
OpenSSL 1.1.0 makes xkusage and ex_flags opaque.
Use X509_check_ca rather than a custom and nearly identical implementation.
This is available since OpenSSL 0.9.8 (even in RHEL5).
This is also done because we cannot implement it identically under
OpenSSL 1.1.0 due to missing getters.
Test EXFLAG_XKUSAGE rather than zero xkusage test no usage to avoid openssl
1.1.0 getter returning a different code on this case.
Use getter for xkusage in the non-zero test case.
Provide fallback definitions for getters.

PR pkg/52298, PR pkg/52648


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/pkg_install/dist/lib/license.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/pkg_install/dist/lib/pkcs7.c \
src/external/bsd/pkg_install/dist/lib/pkg_io.c
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/pkg_install/dist/lib/version.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/pkg_install/dist/lib/license.c
diff -u src/external/bsd/pkg_install/dist/lib/license.c:1.5 src/external/bsd/pkg_install/dist/lib/license.c:1.6
--- src/external/bsd/pkg_install/dist/lib/license.c:1.5	Thu Apr 20 13:18:23 2017
+++ src/external/bsd/pkg_install/dist/lib/license.c	Sun Feb  4 09:00:51 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: license.c,v 1.5 2017/04/20 13:18:23 joerg Exp $	*/
+/*	$NetBSD: license.c,v 1.6 2018/02/04 09:00:51 maya Exp $	*/
 
 /*-
  * Copyright (c) 2009 Joerg Sonnenberger .
@@ -92,7 +92,8 @@ const char *default_acceptable_licenses 
 "w3c "
 "x11 "
 "zlib "
-"zpl-2.0 zpl-2.1";
+"zpl-2.0 zpl-2.1 "
+"zsh";
 
 #ifdef DEBUG
 static size_t hash_collisions;

Index: src/external/bsd/pkg_install/dist/lib/pkcs7.c
diff -u src/external/bsd/pkg_install/dist/lib/pkcs7.c:1.2 src/external/bsd/pkg_install/dist/lib/pkcs7.c:1.3
--- src/external/bsd/pkg_install/dist/lib/pkcs7.c:1.2	Thu Apr 20 13:18:23 2017
+++ src/external/bsd/pkg_install/dist/lib/pkcs7.c	Sun Feb  4 09:00:51 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: pkcs7.c,v 1.2 2017/04/20 13:18:23 joerg Exp $	*/
+/*	$NetBSD: pkcs7.c,v 1.3 2018/02/04 09:00:51 maya Exp $	*/
 #if HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -7,7 +7,7 @@
 #include 
 #endif
 
-__RCSID("$NetBSD: pkcs7.c,v 1.2 2017/04/20 13:18:23 joerg Exp $");
+__RCSID("$NetBSD: pkcs7.c,v 1.3 2018/02/04 09:00:51 maya Exp $");
 
 /*-
  * Copyright (c) 2004, 2008 The NetBSD Foundation, Inc.
@@ -55,25 +55,12 @@ __RCSID("$NetBSD: pkcs7.c,v 1.2 2017/04/
 #define NS_ANY_CA		(NS_SSL_CA|NS_SMIME_CA|NS_OBJSIGN_CA)
 #endif
 
-static const unsigned int pkg_key_usage = XKU_CODE_SIGN | XKU_SMIME;
+#if !defined(OPENSSL_VERSION_NUMBER) || (OPENSSL_VERSION_NUMBER < 0x1010L)
+#define X509_get_extended_key_usage(x) x->ex_xkusage
+#define X509_get_extension_flags(x) x->ex_flags
+#endif
 
-static int
-check_ca(X509 *cert)
-{
-	if ((cert->ex_flags & EXFLAG_KUSAGE) != 0 &&
-	(cert->ex_kusage & KU_KEY_CERT_SIGN) != KU_KEY_CERT_SIGN)
-		return 0;
-	if ((cert->ex_flags & EXFLAG_BCONS) != 0)
-		return (cert->ex_flags & EXFLAG_CA) == EXFLAG_CA;
-	if ((cert->ex_flags & (EXFLAG_V1|EXFLAG_SS)) == (EXFLAG_V1|EXFLAG_SS))
-		return 1;
-	if ((cert->ex_flags & EXFLAG_KUSAGE) != 0)
-		return 1;
-	if ((cert->ex_flags & EXFLAG_NSCERT) != 0 &&
-	(cert->ex_nscert & NS_ANY_CA) != 0)
-		return 1;
-	return 0;
-}
+static const unsigned int pkg_key_usage = XKU_CODE_SIGN | XKU_SMIME;
 
 static STACK_OF(X509) *
 file_to_certs(const char *file)
@@ -180,18 +167,18 @@ easy_pkcs7_verify(const char *content, s
 		/* Compute ex_xkusage */
 		X509_check_purpose(sk_X509_value(signers, i), -1, -1);
 
-		if (check_ca(sk_X509_value(signers, i))) {
+		if (X509_check_ca(sk_X509_value(signers, i))) {
 			warnx("CA keys are not valid for signatures");
 			goto cleanup;
 		}
 		if (is_pkg) {
-			if (sk_X509_value(signers, i)->ex_xkusage != pkg_key_usage) {
+			if (X509_get_extended_key_usage(sk_X509_value(signers, i)) != pkg_key_usage) {
 warnx("Certificate must have CODE SIGNING "
 "and EMAIL PROTECTION property");
 goto cleanup;
 			}
 		} else {
-			if (sk_X509_value(signers, i)->ex_xkusage != 0) {
+			if (X509_get_extension_flags(sk_X509_value(signers, i)) & EXFLAG_XKUSAGE) {
 warnx("Certificate must not have any property");
 goto cleanup;
 			}
@@ -271,12 +258,12 @@ easy_pkcs7_sign(const char *content, siz
 	/* Compute ex_kusage */
 	X509_check_purpose(certificate, -1, 0);
 
-	if (check_ca(certificate)) {
+	if (X509_check_ca(certificate)) {
 		warnx("CA keys are not valid for signatures");
 		goto cleanup;
 	}
 
-	if 

CVS commit: src/external/bsd/pkg_install/dist/lib

2017-01-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jan 12 22:57:26 UTC 2017

Modified Files:
src/external/bsd/pkg_install/dist/lib: defs.h

Log Message:
need  before defining MIN/MAX


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/pkg_install/dist/lib/defs.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/pkg_install/dist/lib/defs.h
diff -u src/external/bsd/pkg_install/dist/lib/defs.h:1.3 src/external/bsd/pkg_install/dist/lib/defs.h:1.4
--- src/external/bsd/pkg_install/dist/lib/defs.h:1.3	Tue Feb 21 13:36:17 2012
+++ src/external/bsd/pkg_install/dist/lib/defs.h	Thu Jan 12 17:57:26 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: defs.h,v 1.3 2012/02/21 18:36:17 wiz Exp $ */
+/* $NetBSD: defs.h,v 1.4 2017/01/12 22:57:26 christos Exp $ */
 
 /*-
  * Copyright (c) 1999,2000,2009 The NetBSD Foundation, Inc.
@@ -31,6 +31,9 @@
 #ifndef DEFS_H_
 #define DEFS_H_
 
+#if HAVE_SYS_PARAM_H
+#include 
+#endif
 #if HAVE_CONFIG_H
 #include "config.h"
 #endif



CVS commit: src/external/bsd/pkg_install/dist/lib

2014-01-06 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Jan  7 02:15:27 UTC 2014

Modified Files:
src/external/bsd/pkg_install/dist/lib: lib.h

Log Message:
xasprintf uses format strings.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/pkg_install/dist/lib/lib.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/pkg_install/dist/lib/lib.h
diff -u src/external/bsd/pkg_install/dist/lib/lib.h:1.6 src/external/bsd/pkg_install/dist/lib/lib.h:1.7
--- src/external/bsd/pkg_install/dist/lib/lib.h:1.6	Sat Jun 26 00:17:13 2010
+++ src/external/bsd/pkg_install/dist/lib/lib.h	Tue Jan  7 02:15:27 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: lib.h,v 1.6 2010/06/26 00:17:13 joerg Exp $ */
+/* $NetBSD: lib.h,v 1.7 2014/01/07 02:15:27 joerg Exp $ */
 
 /* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */
 
@@ -421,7 +421,7 @@ char *xstrdup(const char *);
 void *xrealloc(void *, size_t);
 void *xcalloc(size_t, size_t);
 void *xmalloc(size_t);
-char *xasprintf(const char *, ...);
+char *xasprintf(const char *, ...) __printflike(1, 2);
 
 /* Externs */
 extern Boolean Verbose;



CVS commit: src/external/bsd/pkg_install/dist/lib

2013-09-11 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Wed Sep 11 12:59:19 UTC 2013

Modified Files:
src/external/bsd/pkg_install/dist/lib: pkg_signature.c

Log Message:
Fixed installation of signed packages. Some variables part of struct
signature_archive were not initialized properly, therefore randomly failing
in the verify_signature_read_cb() callback.

Partly closes PR pkg/48194; pkgsrc needs to be updated as well.

please commit agc@

XXX pull-up to netbsd-6


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.7 -r1.2 \
src/external/bsd/pkg_install/dist/lib/pkg_signature.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/pkg_install/dist/lib/pkg_signature.c
diff -u src/external/bsd/pkg_install/dist/lib/pkg_signature.c:1.1.1.7 src/external/bsd/pkg_install/dist/lib/pkg_signature.c:1.2
--- src/external/bsd/pkg_install/dist/lib/pkg_signature.c:1.1.1.7	Sat Feb 20 04:41:58 2010
+++ src/external/bsd/pkg_install/dist/lib/pkg_signature.c	Wed Sep 11 12:59:19 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pkg_signature.c,v 1.1.1.7 2010/02/20 04:41:58 joerg Exp $	*/
+/*	$NetBSD: pkg_signature.c,v 1.2 2013/09/11 12:59:19 khorben Exp $	*/
 
 #if HAVE_CONFIG_H
 #include config.h
@@ -7,7 +7,7 @@
 #if HAVE_SYS_CDEFS_H
 #include sys/cdefs.h
 #endif
-__RCSID($NetBSD: pkg_signature.c,v 1.1.1.7 2010/02/20 04:41:58 joerg Exp $);
+__RCSID($NetBSD: pkg_signature.c,v 1.2 2013/09/11 12:59:19 khorben Exp $);
 
 /*-
  * Copyright (c) 2008 Joerg Sonnenberger jo...@netbsd.org.
@@ -325,10 +325,7 @@ pkg_verify_signature(const char *archive
 
 	*pkgname = NULL;
 
-	state = xmalloc(sizeof(*state));
-	state-sign_blocks = NULL;
-	state-sign_buf = NULL;
-	state-archive = NULL;
+	state = xcalloc(sizeof(*state), 1);
 
 	r = read_file_from_archive(archive_name, *archive, entry, HASH_FNAME,
 	hash_file, hash_len);



CVS commit: src/external/bsd/pkg_install/dist/lib

2013-05-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu May 16 19:19:44 UTC 2013

Modified Files:
src/external/bsd/pkg_install/dist/lib: var.c

Log Message:
var_get_memory():
if no eol is found in the string we set next to NULL, assign it
to buf and then check the loop condition by dereferencing it - which
does not work well.
Change the loop condition to first check for buf == NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 src/external/bsd/pkg_install/dist/lib/var.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/pkg_install/dist/lib/var.c
diff -u src/external/bsd/pkg_install/dist/lib/var.c:1.1.1.3 src/external/bsd/pkg_install/dist/lib/var.c:1.2
--- src/external/bsd/pkg_install/dist/lib/var.c:1.1.1.3	Thu Aug  6 16:55:29 2009
+++ src/external/bsd/pkg_install/dist/lib/var.c	Thu May 16 19:19:44 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.1.1.3 2009/08/06 16:55:29 joerg Exp $	*/
+/*	$NetBSD: var.c,v 1.2 2013/05/16 19:19:44 martin Exp $	*/
 
 /*-
  * Copyright (c) 2005, 2008 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
 #if HAVE_SYS_CDEFS_H
 #include sys/cdefs.h
 #endif
-__RCSID($NetBSD: var.c,v 1.1.1.3 2009/08/06 16:55:29 joerg Exp $);
+__RCSID($NetBSD: var.c,v 1.2 2013/05/16 19:19:44 martin Exp $);
 
 #if HAVE_SYS_STAT_H
 #include sys/stat.h
@@ -156,7 +156,7 @@ var_get_memory(const char *buf, const ch
 	value = NULL;
 	valuelen = 0;
 
-	for (; *buf; buf = next) {
+	for (; buf  *buf; buf = next) {
 		if ((eol = strchr(buf, '\n')) != NULL) {
 			next = eol + 1;
 			len = eol - buf;



CVS commit: src/external/bsd/pkg_install/dist/lib

2012-02-19 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Sun Feb 19 17:49:09 UTC 2012

Modified Files:
src/external/bsd/pkg_install/dist/lib: license.c pkg_summary.5
version.h

Log Message:
Resolve conflicts from last import.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/pkg_install/dist/lib/license.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/pkg_install/dist/lib/pkg_summary.5
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/pkg_install/dist/lib/version.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/pkg_install/dist/lib/license.c
diff -u src/external/bsd/pkg_install/dist/lib/license.c:1.2 src/external/bsd/pkg_install/dist/lib/license.c:1.3
--- src/external/bsd/pkg_install/dist/lib/license.c:1.2	Fri Apr 22 08:19:25 2011
+++ src/external/bsd/pkg_install/dist/lib/license.c	Sun Feb 19 17:49:09 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: license.c,v 1.2 2011/04/22 08:19:25 adam Exp $	*/
+/*	$NetBSD: license.c,v 1.3 2012/02/19 17:49:09 tron Exp $	*/
 
 /*-
  * Copyright (c) 2009 Joerg Sonnenberger jo...@netbsd.org.
@@ -46,8 +46,9 @@
 #define	HASH_SIZE	521
 
 const char *default_acceptable_licenses =
-public-domain 
+public-domain unlicense 
 gnu-fdl-v1.1 gnu-fdl-v1.2 gnu-fdl-v1.3 
+gnu-gpl-v1 
 gnu-gpl-v2 gnu-lgpl-v2 gnu-lgpl-v2.1 
 gnu-gpl-v3 gnu-lgpl-v3 
 original-bsd modified-bsd 2-clause-bsd 
@@ -57,15 +58,20 @@ const char *default_acceptable_licenses 
 cddl-1.0 
 cpl-1.0 
 open-font-license 
-mpl-1.0 mpl-1.1 
-png-license 
+mpl-1.0 mpl-1.1 mpl-2.0 
+php png-license 
 postgresql-license 
+zlib 
 zpl 
 python-software-foundation 
 ipafont 
 isc 
 info-zip 
-boost-license;
+boost-license 
+mplusfont 
+cc-by-sa-v3.0 
+lppl-1.3c 
+epl-v1.0;
 
 #ifdef DEBUG
 static size_t hash_collisions;

Index: src/external/bsd/pkg_install/dist/lib/pkg_summary.5
diff -u src/external/bsd/pkg_install/dist/lib/pkg_summary.5:1.3 src/external/bsd/pkg_install/dist/lib/pkg_summary.5:1.4
--- src/external/bsd/pkg_install/dist/lib/pkg_summary.5:1.3	Sun May 17 21:31:59 2009
+++ src/external/bsd/pkg_install/dist/lib/pkg_summary.5	Sun Feb 19 17:49:09 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: pkg_summary.5,v 1.3 2009/05/17 21:31:59 joerg Exp $
+.\	$NetBSD: pkg_summary.5,v 1.4 2012/02/19 17:49:09 tron Exp $
 .\
 .\ Copyright (c) 2006 The NetBSD Foundation
 .\
@@ -66,6 +66,10 @@ If missing, this package has no dependen
 .It Ev DESCRIPTION
 (required) A more detailed description of the package.
 .\ DIGEST
+.It Ev FILE_CKSUM
+(optional) A checksum type supported by
+.Xr digest 1
+and checksum separated by space character.
 .It Ev FILE_NAME
 (optional) The name of the binary package file.
 If not given,
@@ -126,6 +130,7 @@ For example, the following will list thi
 .Pp
 .Dl pkg_info -X -a
 .Sh SEE ALSO
+.Xr digest 1 ,
 .Xr pkg_info 1
 .Sh HISTORY
 The

Index: src/external/bsd/pkg_install/dist/lib/version.h
diff -u src/external/bsd/pkg_install/dist/lib/version.h:1.7 src/external/bsd/pkg_install/dist/lib/version.h:1.8
--- src/external/bsd/pkg_install/dist/lib/version.h:1.7	Fri Feb 18 22:36:00 2011
+++ src/external/bsd/pkg_install/dist/lib/version.h	Sun Feb 19 17:49:09 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: version.h,v 1.7 2011/02/18 22:36:00 aymeric Exp $	*/
+/*	$NetBSD: version.h,v 1.8 2012/02/19 17:49:09 tron Exp $	*/
 
 /*
  * Copyright (c) 2001 Thomas Klausner.  All rights reserved.
@@ -27,6 +27,6 @@
 #ifndef _INST_LIB_VERSION_H_
 #define _INST_LIB_VERSION_H_
 
-#define PKGTOOLS_VERSION 20110215
+#define PKGTOOLS_VERSION 20120128
 
 #endif /* _INST_LIB_VERSION_H_ */



CVS commit: src/external/bsd/pkg_install/dist/lib

2011-04-22 Thread Adam Ciarcinski
Module Name:src
Committed By:   adam
Date:   Fri Apr 22 08:19:25 UTC 2011

Modified Files:
src/external/bsd/pkg_install/dist/lib: license.c

Log Message:
Added postgresql-license


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.10 -r1.2 src/external/bsd/pkg_install/dist/lib/license.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/pkg_install/dist/lib/license.c
diff -u src/external/bsd/pkg_install/dist/lib/license.c:1.1.1.10 src/external/bsd/pkg_install/dist/lib/license.c:1.2
--- src/external/bsd/pkg_install/dist/lib/license.c:1.1.1.10	Fri Feb 18 22:32:30 2011
+++ src/external/bsd/pkg_install/dist/lib/license.c	Fri Apr 22 08:19:25 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: license.c,v 1.1.1.10 2011/02/18 22:32:30 aymeric Exp $	*/
+/*	$NetBSD: license.c,v 1.2 2011/04/22 08:19:25 adam Exp $	*/
 
 /*-
  * Copyright (c) 2009 Joerg Sonnenberger jo...@netbsd.org.
@@ -59,6 +59,7 @@
 open-font-license 
 mpl-1.0 mpl-1.1 
 png-license 
+postgresql-license 
 zpl 
 python-software-foundation 
 ipafont 



CVS commit: src/external/bsd/pkg_install/dist/lib

2010-06-25 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Jun 26 00:17:13 UTC 2010

Modified Files:
src/external/bsd/pkg_install/dist/lib: lib.h version.h

Log Message:
Merge for pkg_install-20100616


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/pkg_install/dist/lib/lib.h \
src/external/bsd/pkg_install/dist/lib/version.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/pkg_install/dist/lib/lib.h
diff -u src/external/bsd/pkg_install/dist/lib/lib.h:1.5 src/external/bsd/pkg_install/dist/lib/lib.h:1.6
--- src/external/bsd/pkg_install/dist/lib/lib.h:1.5	Fri Apr 23 20:55:31 2010
+++ src/external/bsd/pkg_install/dist/lib/lib.h	Sat Jun 26 00:17:13 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: lib.h,v 1.5 2010/04/23 20:55:31 joerg Exp $ */
+/* $NetBSD: lib.h,v 1.6 2010/06/26 00:17:13 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;
Index: src/external/bsd/pkg_install/dist/lib/version.h
diff -u src/external/bsd/pkg_install/dist/lib/version.h:1.5 src/external/bsd/pkg_install/dist/lib/version.h:1.6
--- src/external/bsd/pkg_install/dist/lib/version.h:1.5	Fri Apr 23 20:55:31 2010
+++ src/external/bsd/pkg_install/dist/lib/version.h	Sat Jun 26 00:17:13 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: version.h,v 1.5 2010/04/23 20:55:31 joerg Exp $	*/
+/*	$NetBSD: version.h,v 1.6 2010/06/26 00:17:13 joerg Exp $	*/
 
 /*
  * Copyright (c) 2001 Thomas Klausner.  All rights reserved.
@@ -27,6 +27,6 @@
 #ifndef _INST_LIB_VERSION_H_
 #define _INST_LIB_VERSION_H_
 
-#define PKGTOOLS_VERSION 20100421
+#define PKGTOOLS_VERSION 20100616
 
 #endif /* _INST_LIB_VERSION_H_ */



CVS commit: src/external/bsd/pkg_install/dist/lib

2010-04-23 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Apr 23 20:55:31 UTC 2010

Modified Files:
src/external/bsd/pkg_install/dist/lib: lib.h version.h
Removed Files:
src/external/bsd/pkg_install/dist/lib: decompress.c

Log Message:
Merge pkg_install-20100421


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r0 src/external/bsd/pkg_install/dist/lib/decompress.c
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/pkg_install/dist/lib/lib.h \
src/external/bsd/pkg_install/dist/lib/version.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/pkg_install/dist/lib/lib.h
diff -u src/external/bsd/pkg_install/dist/lib/lib.h:1.4 src/external/bsd/pkg_install/dist/lib/lib.h:1.5
--- src/external/bsd/pkg_install/dist/lib/lib.h:1.4	Sat Feb 20 04:44:59 2010
+++ src/external/bsd/pkg_install/dist/lib/lib.h	Fri Apr 23 20:55:31 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: lib.h,v 1.4 2010/02/20 04:44:59 joerg Exp $ */
+/* $NetBSD: lib.h,v 1.5 2010/04/23 20:55:31 joerg Exp $ */
 
 /* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */
 
@@ -374,13 +374,10 @@
 lpkg_t *find_on_queue(lpkg_head_t *, const char *);
 voidfree_lpkg(lpkg_t *);
 
-/* Extract input if compressed to NUL terminated buffer (not counted) */
-int decompress_buffer(const char *, size_t, char **, size_t *);
-
-/* Parse NUL terminated inputed, argument is strlen of the input */
-struct pkg_vulnerabilities *parse_pkg_vulnerabilities(const char *, size_t, int);
 /* Read pkg_vulnerabilities from file */
-struct pkg_vulnerabilities *read_pkg_vulnerabilities(const char *, int, int);
+struct pkg_vulnerabilities *read_pkg_vulnerabilities_file(const char *, int, int);
+/* Read pkg_vulnerabilities from memory */
+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);
Index: src/external/bsd/pkg_install/dist/lib/version.h
diff -u src/external/bsd/pkg_install/dist/lib/version.h:1.4 src/external/bsd/pkg_install/dist/lib/version.h:1.5
--- src/external/bsd/pkg_install/dist/lib/version.h:1.4	Sat Feb 20 04:44:59 2010
+++ src/external/bsd/pkg_install/dist/lib/version.h	Fri Apr 23 20:55:31 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: version.h,v 1.4 2010/02/20 04:44:59 joerg Exp $	*/
+/*	$NetBSD: version.h,v 1.5 2010/04/23 20:55:31 joerg Exp $	*/
 
 /*
  * Copyright (c) 2001 Thomas Klausner.  All rights reserved.
@@ -27,6 +27,6 @@
 #ifndef _INST_LIB_VERSION_H_
 #define _INST_LIB_VERSION_H_
 
-#define PKGTOOLS_VERSION 20100220
+#define PKGTOOLS_VERSION 20100421
 
 #endif /* _INST_LIB_VERSION_H_ */



CVS commit: src/external/bsd/pkg_install/dist/lib

2010-02-19 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Feb 20 04:44:59 UTC 2010

Modified Files:
src/external/bsd/pkg_install/dist/lib: lib.h version.h

Log Message:
Merge


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/pkg_install/dist/lib/lib.h \
src/external/bsd/pkg_install/dist/lib/version.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/pkg_install/dist/lib/lib.h
diff -u src/external/bsd/pkg_install/dist/lib/lib.h:1.3 src/external/bsd/pkg_install/dist/lib/lib.h:1.4
--- src/external/bsd/pkg_install/dist/lib/lib.h:1.3	Wed Feb  3 19:31:49 2010
+++ src/external/bsd/pkg_install/dist/lib/lib.h	Sat Feb 20 04:44:59 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: lib.h,v 1.3 2010/02/03 19:31:49 joerg Exp $ */
+/* $NetBSD: lib.h,v 1.4 2010/02/20 04:44:59 joerg Exp $ */
 
 /* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */
 
@@ -322,8 +322,8 @@
 struct archive;
 struct archive_entry;
 
-struct archive *open_archive(const char *);
-struct archive *find_archive(const char *, int);
+struct archive *open_archive(const char *, char **);
+struct archive *find_archive(const char *, int, char **);
 void	process_pkg_path(void);
 struct url *find_best_package(const char *, const char *, int);
 
@@ -391,8 +391,8 @@
 void pkg_install_show_variable(const char *);
 
 /* Package signature creation and validation */
-int pkg_verify_signature(struct archive **, struct archive_entry **, char **);
-int pkg_full_signature_check(struct archive **);
+int pkg_verify_signature(const char *, struct archive **, struct archive_entry **, char **);
+int pkg_full_signature_check(const char *, struct archive **);
 #ifdef HAVE_SSL
 void pkg_sign_x509(const char *, const char *, const char *, const char *);
 #endif
Index: src/external/bsd/pkg_install/dist/lib/version.h
diff -u src/external/bsd/pkg_install/dist/lib/version.h:1.3 src/external/bsd/pkg_install/dist/lib/version.h:1.4
--- src/external/bsd/pkg_install/dist/lib/version.h:1.3	Wed Feb  3 19:31:49 2010
+++ src/external/bsd/pkg_install/dist/lib/version.h	Sat Feb 20 04:44:59 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: version.h,v 1.3 2010/02/03 19:31:49 joerg Exp $	*/
+/*	$NetBSD: version.h,v 1.4 2010/02/20 04:44:59 joerg Exp $	*/
 
 /*
  * Copyright (c) 2001 Thomas Klausner.  All rights reserved.
@@ -27,6 +27,6 @@
 #ifndef _INST_LIB_VERSION_H_
 #define _INST_LIB_VERSION_H_
 
-#define PKGTOOLS_VERSION 20100204
+#define PKGTOOLS_VERSION 20100220
 
 #endif /* _INST_LIB_VERSION_H_ */



CVS commit: src/external/bsd/pkg_install/dist/lib

2009-05-17 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun May 17 21:31:59 UTC 2009

Modified Files:
src/external/bsd/pkg_install/dist/lib: pkg_summary.5

Log Message:
Merge for pkg_install-20090513.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/pkg_install/dist/lib/pkg_summary.5

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/pkg_install/dist/lib/pkg_summary.5
diff -u src/external/bsd/pkg_install/dist/lib/pkg_summary.5:1.2 src/external/bsd/pkg_install/dist/lib/pkg_summary.5:1.3
--- src/external/bsd/pkg_install/dist/lib/pkg_summary.5:1.2	Tue Feb  3 05:16:08 2009
+++ src/external/bsd/pkg_install/dist/lib/pkg_summary.5	Sun May 17 21:31:59 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: pkg_summary.5,v 1.2 2009/02/03 05:16:08 wiz Exp $
+.\	$NetBSD: pkg_summary.5,v 1.3 2009/05/17 21:31:59 joerg Exp $
 .\
 .\ Copyright (c) 2006 The NetBSD Foundation
 .\
@@ -27,7 +27,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd August 29, 2007
+.Dd April 11, 2009
 .Dt PKG_SUMMARY 5
 .Os
 .Sh NAME
@@ -94,6 +94,12 @@
 (required) The path of the package directory within pkgsrc.
 .It Ev PKGTOOLS_VERSION
 (required) The version of the package tools used to create the package.
+.It Ev PREV_PKGPATH
+(optional) The previous path of the package directory within pkgsrc when
+a package was moved.
+(See
+.Ev SUPERSEDES
+below for a renamed package.)
 .It Ev PROVIDES
 (optional) A list of shared libraries provided by the package,
 including major version number, one per line.
@@ -104,6 +110,10 @@
 If missing, this package does not require shared libraries.
 .It Ev SIZE_PKG
 (required) The size of the package when installed, in bytes.
+.It Ev SUPERSEDES
+(optional) A list of dewey patterns of previous packages this
+package replaces, one per line.
+This is used for package renaming.
 .El
 .Pp
 The