CVS commit: src/sys/arch

2020-12-02 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Dec  3 07:45:53 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: db_machdep.c
src/sys/arch/arm/acpi: cpu_acpi.c
src/sys/arch/arm/arm: cpu_subr.c
src/sys/arch/arm/arm32: db_interface.c
src/sys/arch/arm/cortex: gic.c
src/sys/arch/arm/fdt: cpu_fdt.c
src/sys/arch/arm/include: cpufunc.h
src/sys/arch/evbarm/bcm53xx: bcm53xx_machdep.c
src/sys/arch/evbarm/beagle: beagle_machdep.c
src/sys/arch/evbarm/gumstix: gumstix_machdep.c
src/sys/arch/evbarm/zynq: zynq_machdep.c

Log Message:
Provide and use a sev() macro for the sev instruction.

While here use the correct barrier to ensure completion of memory accesses
before a couple of the sev() calls.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/aarch64/aarch64/db_machdep.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/acpi/cpu_acpi.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/arm/cpu_subr.c
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/arm/arm32/db_interface.c
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/arm/cortex/gic.c
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/arm/fdt/cpu_fdt.c
cvs rdiff -u -r1.85 -r1.86 src/sys/arch/arm/include/cpufunc.h
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c
cvs rdiff -u -r1.85 -r1.86 src/sys/arch/evbarm/beagle/beagle_machdep.c
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/evbarm/gumstix/gumstix_machdep.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbarm/zynq/zynq_machdep.c

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

Modified files:

Index: src/sys/arch/aarch64/aarch64/db_machdep.c
diff -u src/sys/arch/aarch64/aarch64/db_machdep.c:1.28 src/sys/arch/aarch64/aarch64/db_machdep.c:1.29
--- src/sys/arch/aarch64/aarch64/db_machdep.c:1.28	Thu Oct 22 07:31:15 2020
+++ src/sys/arch/aarch64/aarch64/db_machdep.c	Thu Dec  3 07:45:51 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.c,v 1.28 2020/10/22 07:31:15 skrll Exp $ */
+/* $NetBSD: db_machdep.c,v 1.29 2020/12/03 07:45:51 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.28 2020/10/22 07:31:15 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.29 2020/12/03 07:45:51 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd32.h"
@@ -1050,8 +1050,8 @@ kdb_trap(int type, struct trapframe *tf)
 		if ((ncpu > 1) && (db_newcpu != NULL)) {
 			db_onproc = db_newcpu;
 			db_newcpu = NULL;
-			membar_producer();
-			__asm __volatile ("sev; sev; sev");
+			dsb(ishst);
+			sev();
 			continue;	/* redo DDB on new cpu */
 		}
 #endif /* MULTIPROCESSOR */
@@ -1062,8 +1062,8 @@ kdb_trap(int type, struct trapframe *tf)
 #ifdef MULTIPROCESSOR
 	if (ncpu > 1) {
 		db_onproc = NULL;
-		membar_producer();
-		__asm __volatile ("sev; sev; sev");
+		dsb(ishst);
+		sev();
 	}
 	db_trigger = NULL;
 	db_readytoswitch[ci->ci_index] = NULL;

Index: src/sys/arch/arm/acpi/cpu_acpi.c
diff -u src/sys/arch/arm/acpi/cpu_acpi.c:1.8 src/sys/arch/arm/acpi/cpu_acpi.c:1.9
--- src/sys/arch/arm/acpi/cpu_acpi.c:1.8	Sat Feb 15 08:16:10 2020
+++ src/sys/arch/arm/acpi/cpu_acpi.c	Thu Dec  3 07:45:51 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_acpi.c,v 1.8 2020/02/15 08:16:10 skrll Exp $ */
+/* $NetBSD: cpu_acpi.c,v 1.9 2020/12/03 07:45:51 skrll Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #include "opt_multiprocessor.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu_acpi.c,v 1.8 2020/02/15 08:16:10 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_acpi.c,v 1.9 2020/12/03 07:45:51 skrll Exp $");
 
 #include 
 #include 
@@ -113,7 +113,7 @@ cpu_acpi_attach(device_t parent, device_
 			return;
 		}
 
-		__asm __volatile("sev" ::: "memory");
+		sev();
 
 		for (u_int i = 0x1000; i > 0; i--) {
 			if (cpu_hatched_p(cpuindex))

Index: src/sys/arch/arm/arm/cpu_subr.c
diff -u src/sys/arch/arm/arm/cpu_subr.c:1.2 src/sys/arch/arm/arm/cpu_subr.c:1.3
--- src/sys/arch/arm/arm/cpu_subr.c:1.2	Mon Nov 30 21:06:56 2020
+++ src/sys/arch/arm/arm/cpu_subr.c	Thu Dec  3 07:45:52 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_subr.c,v 1.2 2020/11/30 21:06:56 skrll Exp $	*/
+/*	$NetBSD: cpu_subr.c,v 1.3 2020/12/03 07:45:52 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #include "opt_multiprocessor.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.2 2020/11/30 21:06:56 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.3 2020/12/03 07:45:52 skrll Exp $");
 
 #include 
 #include 
@@ -89,7 +89,7 @@ cpu_boot_secondary_processors(void)
 		atomic_or_ulong(&arm_cpu_mbox[n], arm_cpu_hatched[n]);
 
 	dsb(ishst);
-	__asm __volatile ("sev");
+	sev();
 
 	/* wait all cpus have done cpu_hatch() */
 	for (cpuno = 1; cpuno < ncpu; cpuno++) {
@@ -140,7 +140,7 @@ cpu_clr_mbox(int cpuindex)
 	atomic_and_ulong(&arm_cpu_mbox[off], ~

CVS commit: src

2020-12-02 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Dec  2 14:20:20 UTC 2020

Modified Files:
src/doc: HACKS
src/lib/libc_vfp: vfpdf.S vfpsf.S
src/sys/arch/arm/cortex: a9tmr.c
src/sys/arch/mac68k/mac68k: pram.c
src/sys/net: if_sppp.h
src/usr.sbin/etcupdate: etcupdate
src/usr.sbin/sysinst: label.c partitions.h

Log Message:
comparision -> comparison


To generate a diff of this commit:
cvs rdiff -u -r1.214 -r1.215 src/doc/HACKS
cvs rdiff -u -r1.4 -r1.5 src/lib/libc_vfp/vfpdf.S src/lib/libc_vfp/vfpsf.S
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/cortex/a9tmr.c
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/mac68k/mac68k/pram.c
cvs rdiff -u -r1.29 -r1.30 src/sys/net/if_sppp.h
cvs rdiff -u -r1.60 -r1.61 src/usr.sbin/etcupdate/etcupdate
cvs rdiff -u -r1.30 -r1.31 src/usr.sbin/sysinst/label.c
cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/sysinst/partitions.h

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

Modified files:

Index: src/doc/HACKS
diff -u src/doc/HACKS:1.214 src/doc/HACKS:1.215
--- src/doc/HACKS:1.214	Thu Oct  8 08:31:37 2020
+++ src/doc/HACKS	Wed Dec  2 14:20:19 2020
@@ -1,4 +1,4 @@
-# $NetBSD: HACKS,v 1.214 2020/10/08 08:31:37 rin Exp $
+# $NetBSD: HACKS,v 1.215 2020/12/02 14:20:19 wiz Exp $
 #
 # This file is intended to document workarounds for currently unsolved
 # (mostly) compiler bugs.
@@ -300,7 +300,7 @@ file	usr.sbin/rbootd/Makefile	: 1.10
 file	usr.sbin/rpc.pcnfsd/Makefile	: 1.17
 file	usr.sbin/tcpdump/Makefile	: 1.42
 descr
-	GCC 4.1 warns on pointer sign comparision/assignments and lots of
+	GCC 4.1 warns on pointer sign comparison/assignments and lots of
 	code does not conform.  For now we use -Wno-pointer-sign and
 	-fno-strict-aliasing.
 kcah

Index: src/lib/libc_vfp/vfpdf.S
diff -u src/lib/libc_vfp/vfpdf.S:1.4 src/lib/libc_vfp/vfpdf.S:1.5
--- src/lib/libc_vfp/vfpdf.S:1.4	Thu Jul 19 19:35:02 2018
+++ src/lib/libc_vfp/vfpdf.S	Wed Dec  2 14:20:20 2020
@@ -29,7 +29,7 @@
 
 #include 
 
-RCSID("$NetBSD: vfpdf.S,v 1.4 2018/07/19 19:35:02 joerg Exp $")
+RCSID("$NetBSD: vfpdf.S,v 1.5 2020/12/02 14:20:20 wiz Exp $")
 
 /*
  * This file provides softfloat compatible routines which use VFP instructions
@@ -145,7 +145,7 @@ ENTRY(__floatunsidf)
 END(__floatunsidf)
 
 /*
- * Effect of a floating point comparision on the condition flags.
+ * Effect of a floating point comparison on the condition flags.
  *  N Z C V
  * EQ = 0 1 1 0
  * LT = 1 0 0 0
Index: src/lib/libc_vfp/vfpsf.S
diff -u src/lib/libc_vfp/vfpsf.S:1.4 src/lib/libc_vfp/vfpsf.S:1.5
--- src/lib/libc_vfp/vfpsf.S:1.4	Thu Jul 19 19:35:02 2018
+++ src/lib/libc_vfp/vfpsf.S	Wed Dec  2 14:20:20 2020
@@ -30,7 +30,7 @@
 #include 
 #include 
 
-RCSID("$NetBSD: vfpsf.S,v 1.4 2018/07/19 19:35:02 joerg Exp $")
+RCSID("$NetBSD: vfpsf.S,v 1.5 2020/12/02 14:20:20 wiz Exp $")
 
 /*
  * This file provides softfloat compatible routines which use VFP instructions
@@ -139,7 +139,7 @@ ENTRY(__floatunsisf)
 END(__floatunsisf)
 
 /*
- * Effect of a floating point comparision on the condition flags.
+ * Effect of a floating point comparison on the condition flags.
  *  N Z C V
  * EQ = 0 1 1 0
  * LT = 1 0 0 0

Index: src/sys/arch/arm/cortex/a9tmr.c
diff -u src/sys/arch/arm/cortex/a9tmr.c:1.20 src/sys/arch/arm/cortex/a9tmr.c:1.21
--- src/sys/arch/arm/cortex/a9tmr.c:1.20	Tue Jun 11 12:48:30 2019
+++ src/sys/arch/arm/cortex/a9tmr.c	Wed Dec  2 14:20:20 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: a9tmr.c,v 1.20 2019/06/11 12:48:30 skrll Exp $	*/
+/*	$NetBSD: a9tmr.c,v 1.21 2020/12/02 14:20:20 wiz Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: a9tmr.c,v 1.20 2019/06/11 12:48:30 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: a9tmr.c,v 1.21 2020/12/02 14:20:20 wiz Exp $");
 
 #include 
 #include 
@@ -189,7 +189,7 @@ a9tmr_init_cpu_clock(struct cpu_info *ci
 	a9tmr_global_write(sc, TMR_GBL_AUTOINC, sc->sc_autoinc);
 
 	/*
-	 * To update the compare register we have to disable comparisions first.
+	 * To update the compare register we have to disable comparisons first.
 	 */
 	uint32_t ctl = a9tmr_global_read(sc, TMR_GBL_CTL);
 	if (ctl & TMR_GBL_CTL_CMP_ENABLE) {

Index: src/sys/arch/mac68k/mac68k/pram.c
diff -u src/sys/arch/mac68k/mac68k/pram.c:1.24 src/sys/arch/mac68k/mac68k/pram.c:1.25
--- src/sys/arch/mac68k/mac68k/pram.c:1.24	Fri Jun 19 16:30:31 2020
+++ src/sys/arch/mac68k/mac68k/pram.c	Wed Dec  2 14:20:20 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pram.c,v 1.24 2020/06/19 16:30:31 tsutsui Exp $	*/
+/*	$NetBSD: pram.c,v 1.25 2020/12/02 14:20:20 wiz Exp $	*/
 
 /*-
  * Copyright (C) 1993	Allen K. Briggs, Chris P. Caputo,
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pram.c,v 1.24 2020/06/19 16:30:31 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pram.c,v 1.25 2020/12/02 14:20:20 wiz Exp $");
 
 #include "opt_adb.h"
 
@@ -129,7 +129,7 @@ pram_readtime(void)
 
 #if

CVS commit: src

2020-12-02 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Dec  2 14:18:13 UTC 2020

Modified Files:
src/etc: security
src/share/man/man5: daily.5 security.conf.5

Log Message:
Update default pkgsrc database location from /var/db/pkg to /usr/pkg/pkgdb.


To generate a diff of this commit:
cvs rdiff -u -r1.126 -r1.127 src/etc/security
cvs rdiff -u -r1.6 -r1.7 src/share/man/man5/daily.5
cvs rdiff -u -r1.41 -r1.42 src/share/man/man5/security.conf.5

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

Modified files:

Index: src/etc/security
diff -u src/etc/security:1.126 src/etc/security:1.127
--- src/etc/security:1.126	Fri Dec  6 14:43:30 2019
+++ src/etc/security	Wed Dec  2 14:18:13 2020
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#	$NetBSD: security,v 1.126 2019/12/06 14:43:30 riastradh Exp $
+#	$NetBSD: security,v 1.127 2020/12/02 14:18:13 wiz Exp $
 #	from: @(#)security	8.1 (Berkeley) 6/9/93
 #
 
@@ -991,7 +991,7 @@ if checkyesno check_pkgs && have_pkgs; t
 	pkgs=$work_dir/pkgs
 	migrate_file "$backup_dir/pkgs" "$pkgs"
 	pkg_dbdir=$(${pkg_admin} config-var PKG_DBDIR)
-	: ${pkg_dbdir:=/var/db/pkg}
+	: ${pkg_dbdir:=/usr/pkg/pkgdb}
 	(	cd $pkg_dbdir
 		$pkg_info | sort
 		echo ""

Index: src/share/man/man5/daily.5
diff -u src/share/man/man5/daily.5:1.6 src/share/man/man5/daily.5:1.7
--- src/share/man/man5/daily.5:1.6	Mon Jul 30 17:29:00 2012
+++ src/share/man/man5/daily.5	Wed Dec  2 14:18:13 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: daily.5,v 1.6 2012/07/30 17:29:00 wiz Exp $
+.\"	$NetBSD: daily.5,v 1.7 2020/12/02 14:18:13 wiz Exp $
 .\"
 .\" Copyright (c) 1996 Matthew R. Green
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd July 30, 2012
+.Dd December 2, 2020
 .Dt DAILY 5
 .Os
 .Sh NAME
@@ -199,7 +199,7 @@ instead.
 .Pp
 If defined, points to the location of the packages database.
 Defaults to
-.Pa /var/db/pkg .
+.Pa /usr/pkg/pkgdb .
 .El
 .Sh FILES
 .Bl -tag -width /etc/defaults/daily.conf -compact

Index: src/share/man/man5/security.conf.5
diff -u src/share/man/man5/security.conf.5:1.41 src/share/man/man5/security.conf.5:1.42
--- src/share/man/man5/security.conf.5:1.41	Fri Dec  6 14:43:30 2019
+++ src/share/man/man5/security.conf.5	Wed Dec  2 14:18:13 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: security.conf.5,v 1.41 2019/12/06 14:43:30 riastradh Exp $
+.\"	$NetBSD: security.conf.5,v 1.42 2020/12/02 14:18:13 wiz Exp $
 .\"
 .\" Copyright (c) 1996 Matthew R. Green
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd April 5, 2012
+.Dd December 2, 2020
 .Dt SECURITY.CONF 5
 .Os
 .Sh NAME
@@ -271,7 +271,7 @@ instead.
 .Pp
 If defined, points to the location of the packages database.
 Defaults to
-.Pa /var/db/pkg .
+.Pa /usr/pkg/pkgdb .
 .It Sy backup_uses_rcs
 Use
 .Xr rcs 1



CVS commit: src/doc

2020-12-02 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Dec  2 14:09:18 UTC 2020

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Mention pkg_install update.


To generate a diff of this commit:
cvs rdiff -u -r1.1763 -r1.1764 src/doc/3RDPARTY
cvs rdiff -u -r1.2759 -r1.2760 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1763 src/doc/3RDPARTY:1.1764
--- src/doc/3RDPARTY:1.1763	Sat Nov 28 14:29:25 2020
+++ src/doc/3RDPARTY	Wed Dec  2 14:09:18 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1763 2020/11/28 14:29:25 roy Exp $
+#	$NetBSD: 3RDPARTY,v 1.1764 2020/12/02 14:09:18 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1193,10 +1193,10 @@ reachover Makefiles are in src/usr.sbin/
 
 Package:	pkg_install
 Version:	20190405
-Current Vers:	20190405
+Current Vers:	20201202
 Maintainer:	The pkgsrc developers
 Home Page:	http://www.pkgsrc.org/
-Date:		2019-01-09
+Date:		2020-12-02
 Mailing List:	tech-...@netbsd.org
 Responsible:	joerg
 License:	BSD

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2759 src/doc/CHANGES:1.2760
--- src/doc/CHANGES:1.2759	Tue Dec  1 22:09:43 2020
+++ src/doc/CHANGES	Wed Dec  2 14:09:18 2020
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2759 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2760 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -308,3 +308,5 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 		except for vchiq(4) and vcaudio(4) are supported. Pi 3 is
 		capable to run both in aarch64eb and earmv7{,hf}eb modes.
 		[rin 20201201]
+	pkg_install(8): Updated to 20201202. This changes the default database
+		location from /var/db/pkg to /usr/pkg/pkgdb. [wiz 20201202]



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

2020-12-02 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Dec  2 13:54:25 UTC 2020

Modified Files:
src/external/bsd/pkg_install/lib: Makefile

Log Message:
Define PREFIX for pkg_install build.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/pkg_install/lib/Makefile

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/lib/Makefile
diff -u src/external/bsd/pkg_install/lib/Makefile:1.10 src/external/bsd/pkg_install/lib/Makefile:1.11
--- src/external/bsd/pkg_install/lib/Makefile:1.10	Fri Oct  4 09:47:28 2019
+++ src/external/bsd/pkg_install/lib/Makefile	Wed Dec  2 13:54:25 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2019/10/04 09:47:28 mrg Exp $
+# $NetBSD: Makefile,v 1.11 2020/12/02 13:54:25 wiz Exp $
 # Original from FreeBSD, no rcs id.
 
 LIBISPRIVATE=	yes
@@ -24,6 +24,7 @@ pkg_install.conf.5: ${DIST}/lib/pkg_inst
 CLEANFILES+=	pkg_install.conf.5
 
 CPPFLAGS+=	-DNETBSD
+CPPFLAGS+=	-DPREFIX=\"/usr/pkg\"
 
 COPTS.plist.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=restrict :}
 



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

2020-12-02 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Dec  2 13:53:50 UTC 2020

Modified Files:
src/external/bsd/pkg_install/dist/add: perform.c
src/external/bsd/pkg_install/dist/admin: check.c main.c pkg_admin.1
src/external/bsd/pkg_install/dist/create: perform.c pl.c
src/external/bsd/pkg_install/dist/info: perform.c
src/external/bsd/pkg_install/dist/lib: iterate.c lib.h license.c
pkgdb.c plist.c version.h vulnerabilities-file.c

Log Message:
merge pkg_install after import of 20201202 version


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/pkg_install/dist/add/perform.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/pkg_install/dist/admin/check.c
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/pkg_install/dist/admin/main.c \
src/external/bsd/pkg_install/dist/admin/pkg_admin.1
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/pkg_install/dist/create/perform.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/pkg_install/dist/create/pl.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/pkg_install/dist/info/perform.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/pkg_install/dist/lib/iterate.c \
src/external/bsd/pkg_install/dist/lib/pkgdb.c
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/pkg_install/dist/lib/lib.h \
src/external/bsd/pkg_install/dist/lib/license.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/pkg_install/dist/lib/plist.c \
src/external/bsd/pkg_install/dist/lib/vulnerabilities-file.c
cvs rdiff -u -r1.15 -r1.16 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/add/perform.c
diff -u src/external/bsd/pkg_install/dist/add/perform.c:1.6 src/external/bsd/pkg_install/dist/add/perform.c:1.7
--- src/external/bsd/pkg_install/dist/add/perform.c:1.6	Sun Mar 25 04:04:36 2018
+++ src/external/bsd/pkg_install/dist/add/perform.c	Wed Dec  2 13:53:50 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: perform.c,v 1.6 2018/03/25 04:04:36 sevan Exp $	*/
+/*	$NetBSD: perform.c,v 1.7 2020/12/02 13:53:50 wiz Exp $	*/
 #if HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -6,7 +6,7 @@
 #if HAVE_SYS_CDEFS_H
 #include 
 #endif
-__RCSID("$NetBSD: perform.c,v 1.6 2018/03/25 04:04:36 sevan Exp $");
+__RCSID("$NetBSD: perform.c,v 1.7 2020/12/02 13:53:50 wiz Exp $");
 
 /*-
  * Copyright (c) 2003 Grant Beattie 
@@ -450,7 +450,7 @@ check_other_installed(struct pkg_task *p
 		return -1;
 	}
 	*iter = '\0';
-	pkg->other_version = find_best_matching_installed_pkg(pkgbase);
+	pkg->other_version = find_best_matching_installed_pkg(pkgbase, 0);
 	free(pkgbase);
 	if (pkg->other_version == NULL)
 		return 0;
@@ -505,10 +505,12 @@ check_other_installed(struct pkg_task *p
 continue;
 			if (pkg_match(p->name, pkg->pkgname) == 1)
 continue; /* Both match, ok. */
-			warnx("Dependency of %s fulfilled by %s, but not by %s",
-			iter, pkg->other_version, pkg->pkgname);
-			if (!ForceDepending)
+			if (!ForceDepending) {
+warnx("Dependency of %s fulfilled by %s, "
+"but not by %s", iter, pkg->other_version,
+pkg->pkgname);
 status = -1;
+			}
 			break;
 		}
 		free_plist(&plist);		
@@ -979,7 +981,8 @@ run_install_script(struct pkg_task *pkg,
 	setenv(PKG_REFCOUNT_DBDIR_VNAME, config_pkg_refcount_dbdir, 1);
 
 	if (Verbose)
-		printf("Running install with PRE-INSTALL for %s.\n", pkg->pkgname);
+		printf("Running install with %s for %s.\n", argument,
+		pkg->pkgname);
 	if (Fake)
 		return 0;
 
@@ -1102,6 +1105,40 @@ check_implicit_conflict(struct pkg_task 
 	return status;
 }
 
+/*
+ * Install a required dependency and verify its installation.
+ */
+static int
+install_depend_pkg(const char *dep)
+{
+	/* XXX check cyclic dependencies? */
+	if (Fake || NoRecord) {
+		if (!Force) {
+			warnx("Missing dependency %s\n", dep);
+			return 1;
+		}
+		warnx("Missing dependency %s, continuing", dep);
+	}
+
+	if (pkg_do(dep, 1, 0)) {
+		if (!ForceDepends) {
+			warnx("Can't install dependency %s", dep);
+			return 1;
+		}
+		warnx("Can't install dependency %s, continuing", dep);
+	}
+
+	if (find_best_matching_installed_pkg(dep, 0) == NULL) {
+		if (!ForceDepends) {
+			warnx("Just installed dependency %s disappeared", dep);
+			return 1;
+		}
+		warnx("Missing dependency %s ignored", dep);
+	}
+
+	return 0;
+}
+
 static int
 check_dependencies(struct pkg_task *pkg)
 {
@@ -1112,6 +1149,9 @@ check_dependencies(struct pkg_task *pkg)
 
 	status = 0;
 
+	/*
+	 * Recursively handle dependencies, installing as required.
+	 */
 	for (p = pkg->plist.head; p != NULL; p = p->next) {
 		if (p->type == PLIST_IGNORE) {
 			p = p->next;
@@ -1119,43 +1159,27 @@ check_dependencies(struct pkg_task *pkg)
 		} else

CVS import: src/external/bsd/pkg_install/dist

2020-12-02 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Dec  2 13:49:26 UTC 2020

Update of /cvsroot/src/external/bsd/pkg_install/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv5229

Log Message:
Import pkg_install from pkgsrc as of 20201202.

This changes the default database path from /var/db/pkg to /usr/pkg/pkgdb

Status:

Vendor Tag: PKGSRC
Release Tags:   pkg_install-20201202

U src/external/bsd/pkg_install/dist/add/add.h
U src/external/bsd/pkg_install/dist/add/main.c
C src/external/bsd/pkg_install/dist/add/perform.c
U src/external/bsd/pkg_install/dist/add/pkg_add.1
U src/external/bsd/pkg_install/dist/admin/audit-packages.8
U src/external/bsd/pkg_install/dist/admin/admin.h
U src/external/bsd/pkg_install/dist/admin/audit-packages.sh.in
U src/external/bsd/pkg_install/dist/admin/audit.c
C src/external/bsd/pkg_install/dist/admin/check.c
U src/external/bsd/pkg_install/dist/admin/download-vulnerability-list.sh.in
U src/external/bsd/pkg_install/dist/admin/download-vulnerability-list.8
C src/external/bsd/pkg_install/dist/admin/main.c
C src/external/bsd/pkg_install/dist/admin/pkg_admin.1
U src/external/bsd/pkg_install/dist/lib/parse-config.c
U src/external/bsd/pkg_install/dist/lib/automatic.c
U src/external/bsd/pkg_install/dist/lib/config.h.in
U src/external/bsd/pkg_install/dist/lib/conflicts.c
U src/external/bsd/pkg_install/dist/lib/defs.h
U src/external/bsd/pkg_install/dist/lib/dewey.c
U src/external/bsd/pkg_install/dist/lib/dewey.h
U src/external/bsd/pkg_install/dist/lib/fexec.c
U src/external/bsd/pkg_install/dist/lib/file.c
U src/external/bsd/pkg_install/dist/lib/global.c
U src/external/bsd/pkg_install/dist/lib/gpgsig.c
C src/external/bsd/pkg_install/dist/lib/iterate.c
C src/external/bsd/pkg_install/dist/lib/lib.h
C src/external/bsd/pkg_install/dist/lib/license.c
U src/external/bsd/pkg_install/dist/lib/lpkg.c
U src/external/bsd/pkg_install/dist/lib/opattern.c
U src/external/bsd/pkg_install/dist/lib/pkcs7.c
U src/external/bsd/pkg_install/dist/lib/pkg_io.c
C src/external/bsd/pkg_install/dist/lib/vulnerabilities-file.c
U src/external/bsd/pkg_install/dist/lib/pkg_install.conf.5.in
U src/external/bsd/pkg_install/dist/lib/pkg_signature.c
U src/external/bsd/pkg_install/dist/lib/pkg_summary.5
C src/external/bsd/pkg_install/dist/lib/pkgdb.c
U src/external/bsd/pkg_install/dist/lib/pkgsrc.7
C src/external/bsd/pkg_install/dist/lib/plist.c
U src/external/bsd/pkg_install/dist/lib/remove.c
U src/external/bsd/pkg_install/dist/lib/str.c
U src/external/bsd/pkg_install/dist/lib/var.c
U src/external/bsd/pkg_install/dist/lib/version.c
C src/external/bsd/pkg_install/dist/lib/version.h
U src/external/bsd/pkg_install/dist/lib/xwrapper.c
U src/external/bsd/pkg_install/dist/create/build.c
U src/external/bsd/pkg_install/dist/create/create.h
U src/external/bsd/pkg_install/dist/create/main.c
C src/external/bsd/pkg_install/dist/create/perform.c
U src/external/bsd/pkg_install/dist/create/pkg_create.1
U src/external/bsd/pkg_install/dist/create/util.c
C src/external/bsd/pkg_install/dist/create/pl.c
U src/external/bsd/pkg_install/dist/delete/pkg_delete.1
U src/external/bsd/pkg_install/dist/delete/pkg_delete.c
U src/external/bsd/pkg_install/dist/info/info.h
U src/external/bsd/pkg_install/dist/info/main.c
C src/external/bsd/pkg_install/dist/info/perform.c
U src/external/bsd/pkg_install/dist/info/pkg_info.1
U src/external/bsd/pkg_install/dist/info/show.c
U src/external/bsd/pkg_install/dist/x509/pkgsrc.cnf
U src/external/bsd/pkg_install/dist/x509/pkgsrc.sh
U src/external/bsd/pkg_install/dist/x509/signing.txt

14 conflicts created by this import.
Use the following command to help the merge:

cvs checkout -jPKGSRC:yesterday -jPKGSRC 
src/external/bsd/pkg_install/dist