CVS commit: src/tests/lib/libc/gen

2014-06-14 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Jun 14 08:19:02 UTC 2014

Modified Files:
src/tests/lib/libc/gen: t_fmtcheck.c

Log Message:
Update fmtcheck(3) test now that pointers and longs are differentiated.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/gen/t_fmtcheck.c

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

Modified files:

Index: src/tests/lib/libc/gen/t_fmtcheck.c
diff -u src/tests/lib/libc/gen/t_fmtcheck.c:1.2 src/tests/lib/libc/gen/t_fmtcheck.c:1.3
--- src/tests/lib/libc/gen/t_fmtcheck.c:1.2	Thu Jul  7 09:49:59 2011
+++ src/tests/lib/libc/gen/t_fmtcheck.c	Sat Jun 14 08:19:02 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_fmtcheck.c,v 1.2 2011/07/07 09:49:59 jruoho Exp $	*/
+/*	$NetBSD: t_fmtcheck.c,v 1.3 2014/06/14 08:19:02 apb Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -72,7 +72,9 @@ struct test_fmt {
 	{ %#o %u %#-d, %x %#x %X, 1 },
 	{ %qd, %llx, 1 },
 	{ %%, %llx, 1 },
-	{ %p %30s %#llx %-10.*e, This number %lu%% and string %s has %qd numbers and %.*g floats, 1 },
+	{ %ld %30s %#llx %-10.*e, This number %lu%% and string %s has %qd numbers and %.*g floats, 1 },
+	{ %o, %lx, 2 },
+	{ %p, %lu, 2 },
 };
 
 ATF_TC(fmtcheck_basic);



CVS commit: src/lib/libc/gen

2014-06-14 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Jun 14 08:18:24 UTC 2014

Modified Files:
src/lib/libc/gen: fmtcheck.3 fmtcheck.c

Log Message:
Teach fmtcheck(3) that a pointer and a long are not the same.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libc/gen/fmtcheck.3
cvs rdiff -u -r1.8 -r1.9 src/lib/libc/gen/fmtcheck.c

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

Modified files:

Index: src/lib/libc/gen/fmtcheck.3
diff -u src/lib/libc/gen/fmtcheck.3:1.7 src/lib/libc/gen/fmtcheck.3:1.8
--- src/lib/libc/gen/fmtcheck.3:1.7	Mon Mar  9 19:24:26 2009
+++ src/lib/libc/gen/fmtcheck.3	Sat Jun 14 08:18:24 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: fmtcheck.3,v 1.7 2009/03/09 19:24:26 joerg Exp $
+.\	$NetBSD: fmtcheck.3,v 1.8 2014/06/14 08:18:24 apb Exp $
 .\
 .\ Copyright (c) 2000 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -26,7 +26,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd October 17, 2000
+.Dd June 14, 2014
 .Dt FMTCHECK 3
 .Os
 .Sh NAME
@@ -77,11 +77,13 @@ Also, any text other than the format spe
 .Pp
 Note that the formats may be quite different as long as they accept the
 same parameters.
-For example, %p %o %30s %#llx %-10.*e %n is
+For example, %ld %o %30s %#llx %-10.*e %n is
 compatible with This number %lu %d%% and string %s has %qd numbers
 and %.*g floats (%n).
 However, %o is not equivalent to %lx because
-the first requires an integer and the second requires a long.
+the first requires an integer and the second requires a long,
+and %p is not equivalent to %lu because
+the first requires a pointer and the second requires a long.
 .Sh RETURN VALUES
 If
 .Fa fmt_suspect

Index: src/lib/libc/gen/fmtcheck.c
diff -u src/lib/libc/gen/fmtcheck.c:1.8 src/lib/libc/gen/fmtcheck.c:1.9
--- src/lib/libc/gen/fmtcheck.c:1.8	Mon Apr 28 20:22:59 2008
+++ src/lib/libc/gen/fmtcheck.c	Sat Jun 14 08:18:24 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: fmtcheck.c,v 1.8 2008/04/28 20:22:59 martin Exp $	*/
+/*	$NetBSD: fmtcheck.c,v 1.9 2014/06/14 08:18:24 apb Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: fmtcheck.c,v 1.8 2008/04/28 20:22:59 martin Exp $);
+__RCSID($NetBSD: fmtcheck.c,v 1.9 2014/06/14 08:18:24 apb Exp $);
 #endif
 
 #include namespace.h
@@ -49,6 +49,7 @@ enum __e_fmtcheck_types {
 	FMTCHECK_INT,
 	FMTCHECK_LONG,
 	FMTCHECK_QUAD,
+	FMTCHECK_POINTER,
 	FMTCHECK_SHORTPOINTER,
 	FMTCHECK_INTPOINTER,
 	FMTCHECK_LONGPOINTER,
@@ -149,7 +150,7 @@ get_next_format_from_precision(const cha
 	if (*f == 'p') {
 		if (sh + lg + quad + longdouble)
 			RETURN(pf,f,FMTCHECK_UNKNOWN);
-		RETURN(pf,f,FMTCHECK_LONG);
+		RETURN(pf,f,FMTCHECK_POINTER);
 	}
 	RETURN(pf,f,FMTCHECK_UNKNOWN);
 	/*NOTREACHED*/



CVS commit: src/doc

2014-06-14 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Jun 14 12:20:17 UTC 2014

Modified Files:
src/doc: BUILDING.mdoc

Log Message:
Improve documentation for BUILDID.


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/doc/BUILDING.mdoc

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

Modified files:

Index: src/doc/BUILDING.mdoc
diff -u src/doc/BUILDING.mdoc:1.99 src/doc/BUILDING.mdoc:1.100
--- src/doc/BUILDING.mdoc:1.99	Wed May 21 13:11:25 2014
+++ src/doc/BUILDING.mdoc	Sat Jun 14 12:20:17 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: BUILDING.mdoc,v 1.99 2014/05/21 13:11:25 wiz Exp $
+.\	$NetBSD: BUILDING.mdoc,v 1.100 2014/06/14 12:20:17 apb Exp $
 .\
 .\ Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -33,7 +33,7 @@
 .\ Toolchain prefix for commands
 .ds toolprefix nb
 .
-.Dd November 8, 2012
+.Dd June 14, 2014
 .Dt BUILDING 8
 .Os NetBSD
 .
@@ -339,11 +339,17 @@ configuration file specified by
 .
 .It Sy BUILDID
 Identifier for the build.
+If set, this should be a short string that is suitable for use as
+part of a file or directory name.
 The identifier will be appended to
 object directory names, and can be consulted in the
 .Xr make 1
 configuration file in order to set additional build parameters,
 such as compiler flags.
+It will also be used as part of the kernel version string,
+which can be printed by
+.Dq Li uname \-v .
+.DFLTu
 .
 .It Sy BUILDSEED
 GCC uses random numbers when compiling C++ code.



CVS commit: src

2014-06-14 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Jun 14 12:21:41 UTC 2014

Modified Files:
src: BUILDING

Log Message:
Regen from doc/BUILDING.mdoc;1.100:
Improve documentation for BUILDID.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/BUILDING

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

Modified files:

Index: src/BUILDING
diff -u src/BUILDING:1.106 src/BUILDING:1.107
--- src/BUILDING:1.106	Wed May 21 13:12:19 2014
+++ src/BUILDING	Sat Jun 14 12:21:41 2014
@@ -151,10 +151,16 @@ CONFIGURATION
  otherwise specified, these variables may be set in either the process
  environment or the make(1) configuration file specified by MAKECONF.
 
- BUILDID Identifier for the build.  The identifier will be appended to
- object directory names, and can be consulted in the make(1)
+ BUILDID Identifier for the build.  If set, this should be a short
+ string that is suitable for use as part of a file or
+ directory name.  The identifier will be appended to object
+ directory names, and can be consulted in the make(1)
  configuration file in order to set additional build
- parameters, such as compiler flags.
+ parameters, such as compiler flags.  It will also be used as
+ part of the kernel version string, which can be printed by
+ ``uname -v''.
+
+ Default: Unset.
 
  BUILDSEED   GCC uses random numbers when compiling C++ code.  This
  variable seeds the gcc random number generator using the
@@ -1047,4 +1053,4 @@ HISTORY
  The build.sh based build scheme was introduced for NetBSD 1.6 as
  USE_NEW_TOOLCHAIN, and re-worked to TOOLCHAIN_MISSING after that.
 
-NetBSD November 8, 2012 NetBSD
+NetBSD   June 14, 2014  NetBSD



CVS commit: src

2014-06-14 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Jun 14 12:25:00 UTC 2014

Modified Files:
src: build.sh

Log Message:
Print BUILDID near the beginning of build.sh.


To generate a diff of this commit:
cvs rdiff -u -r1.281 -r1.282 src/build.sh

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

Modified files:

Index: src/build.sh
diff -u src/build.sh:1.281 src/build.sh:1.282
--- src/build.sh:1.281	Mon May  5 19:12:19 2014
+++ src/build.sh	Sat Jun 14 12:25:00 2014
@@ -1,5 +1,5 @@
 #! /usr/bin/env sh
-#	$NetBSD: build.sh,v 1.281 2014/05/05 19:12:19 martin Exp $
+#	$NetBSD: build.sh,v 1.282 2014/06/14 12:25:00 apb Exp $
 #
 # Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1748,7 +1748,7 @@ createmakewrapper()
 	eval cat EOF ${makewrapout}
 #! ${HOST_SH}
 # Set proper variables to allow easy make building of a NetBSD subtree.
-# Generated from:  \$NetBSD: build.sh,v 1.281 2014/05/05 19:12:19 martin Exp $
+# Generated from:  \$NetBSD: build.sh,v 1.282 2014/06/14 12:25:00 apb Exp $
 # with these arguments: ${_args}
 #
 
@@ -2048,6 +2048,9 @@ main()
 	statusmsg2 MACHINE_ARCH: ${MACHINE_ARCH}
 	statusmsg2 Build platform:   ${uname_s} ${uname_r} ${uname_m}
 	statusmsg2 HOST_SH:  ${HOST_SH}
+	if [ -n ${BUILDID} ]; then
+		statusmsg2 BUILDID:  ${BUILDID}
+	fi
 
 	rebuildmake
 	validatemakeparams



CVS commit: src/etc

2014-06-14 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Jun 14 12:26:26 UTC 2014

Modified Files:
src/etc: Makefile

Log Message:
Print BUILDID near the top of /etc/release.


To generate a diff of this commit:
cvs rdiff -u -r1.413 -r1.414 src/etc/Makefile

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

Modified files:

Index: src/etc/Makefile
diff -u src/etc/Makefile:1.413 src/etc/Makefile:1.414
--- src/etc/Makefile:1.413	Mon May  5 19:10:00 2014
+++ src/etc/Makefile	Sat Jun 14 12:26:26 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.413 2014/05/05 19:10:00 martin Exp $
+#	$NetBSD: Makefile,v 1.414 2014/06/14 12:26:26 apb Exp $
 #	from: @(#)Makefile	8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -196,6 +196,9 @@ etc-release: .EXEC .MAKE
 		echo Build settings:; \
 		printf %20s   %s\n Build date $$(date -u); \
 		printf %20s   %s\n  Built by $${USER-root}@$$(hostname); \
+		if [ -n ${BUILDID} ]; then \
+		printf %20s   %s\n  Build ID: ${BUILDID} ; \
+		fi ; \
 		echo ; \
 		${PRINT_PARAMS} ; \
 	) ${.OBJDIR}/${.TARGET}



CVS commit: src/sys/conf

2014-06-14 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Jun 14 12:35:18 UTC 2014

Modified Files:
src/sys/conf: newvers.sh

Log Message:
Append .${BUILDID} to the default value of id,
provided the -i id command line option was not used.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/conf/newvers.sh

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

Modified files:

Index: src/sys/conf/newvers.sh
diff -u src/sys/conf/newvers.sh:1.57 src/sys/conf/newvers.sh:1.58
--- src/sys/conf/newvers.sh:1.57	Sun Jan 10 23:55:03 2010
+++ src/sys/conf/newvers.sh	Sat Jun 14 12:35:18 2014
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#	$NetBSD: newvers.sh,v 1.57 2010/01/10 23:55:03 snj Exp $
+#	$NetBSD: newvers.sh,v 1.58 2014/06/14 12:35:18 apb Exp $
 #
 # Copyright (c) 1984, 1986, 1990, 1993
 #	The Regents of the University of California.  All rights reserved.
@@ -65,6 +65,13 @@ if [ -z ${id} ]; then
 	else
 		id=$(basename ${d})
 	fi
+	# Append .${BUILDID} to the default value of id.
+	# If the -i id command line option was used then this
+	# branch is not taken, so the command-line value of id
+	# is used without change.
+	if [ -n ${BUILDID} ]; then
+		id=${id}.${BUILDID}
+	fi
 fi
 
 osrelcmd=${cwd}/osrelease.sh



CVS commit: src/sys/conf

2014-06-14 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Jun 14 12:42:41 UTC 2014

Modified Files:
src/sys/conf: newvers.sh

Log Message:
Document command line options and other inputs and outputs.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/conf/newvers.sh

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

Modified files:

Index: src/sys/conf/newvers.sh
diff -u src/sys/conf/newvers.sh:1.58 src/sys/conf/newvers.sh:1.59
--- src/sys/conf/newvers.sh:1.58	Sat Jun 14 12:35:18 2014
+++ src/sys/conf/newvers.sh	Sat Jun 14 12:42:41 2014
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#	$NetBSD: newvers.sh,v 1.58 2014/06/14 12:35:18 apb Exp $
+#	$NetBSD: newvers.sh,v 1.59 2014/06/14 12:42:41 apb Exp $
 #
 # Copyright (c) 1984, 1986, 1990, 1993
 #	The Regents of the University of California.  All rights reserved.
@@ -31,6 +31,71 @@
 #
 #	@(#)newvers.sh	8.1 (Berkeley) 4/20/94
 
+# newvers.sh -- Create a vers.c file containing version information.
+#
+# The vers.c file in the current directory is the primary output.  It
+# contains C source code with several variables containing information
+# about the build.  This file is expected to be incorporated into a
+# kernel, and when that kernel is booted then the information can be
+# queried by the uname(8) command.
+#
+# Command line options:
+#
+# -rReproducible build: Do not embed directory
+#   names, user names, time stamps, or other dynamic
+#   information into the output file.  This intended
+#   to allow two builds done at different times and
+#   even by different people on different hosts to
+#   produce identical output.
+#
+# -i id   Use the specified string as the value of the
+#   kernel_ident variable
+#
+# -nDo not include an ELF note section in the output
+#   file.
+# Environment variables:
+#
+# BUILDID		If defined, ${BUILDID} is appended to the
+#			default value of the kernel_ident string.
+#			(If the -i command line option is used, then
+#			BUILDID is not appended.)
+#
+# Output files:
+#
+# vers.cThe vers.c file in the current directory is
+#   the primary output.
+#
+# version   The version file in the current directory
+#   is both an input and an output.  See the
+#   description under Input files.
+#
+# Input files:
+#
+# version   The version file in the current directory
+#   contains an integer counter, representing the
+#   number of times this script has been executed in
+#   this directory, starting with 0 if the file
+#   does not exist.  The serial number in the file
+#   is incremented after the file is read. so that
+#   the incremented serial number is an output from
+#   the present build and an input to the next build
+#   that is performed in the same directory.
+#
+# copyright The copyright file (in the same directory as
+#   this script itself) contains a copyright notice,
+#   which is embedded in the copyright variable in
+#   the output file.
+#
+# ident The ident file in the current directory is optional.
+#			If this file exists, then its contents override the
+#			default value of the kernel_ident string.
+#
+# Input from external commands:
+#
+# osrelease.sh  This script is expected to print the OS revision.
+#   The result is stored in the osrelease variable.
+#
+
 if [ ! -e version ]; then
 	echo 0  version
 fi
@@ -46,13 +111,18 @@ copyright=$(awk '{ printf(\%s\\n\, $
 while [ $# -gt 0 ]; do
 	case $1 in
 	-r)
+		# -r: Reproducible build
 		rflag=true
 		;;
 	-i)
+		# -i id: Use the secified string as the
+		# value of the kernel_ident variable
 		id=$2
 		shift
 		;;
 	-n)
+		# -n: Do not include a ELF note section
+		# in the output file.
 		nflag=true
 		;;
 	esac



CVS commit: src/lib/libc/gen

2014-06-14 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Jun 14 13:09:37 UTC 2014

Modified Files:
src/lib/libc/gen: uname.c

Log Message:
If sysctl kern.version returns a string that's too long
to fit in {struct utsname}.version then just use the
truncated value.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libc/gen/uname.c

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

Modified files:

Index: src/lib/libc/gen/uname.c
diff -u src/lib/libc/gen/uname.c:1.11 src/lib/libc/gen/uname.c:1.12
--- src/lib/libc/gen/uname.c:1.11	Tue Mar 20 16:36:05 2012
+++ src/lib/libc/gen/uname.c	Sat Jun 14 13:09:37 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: uname.c,v 1.11 2012/03/20 16:36:05 matt Exp $	*/
+/*	$NetBSD: uname.c,v 1.12 2014/06/14 13:09:37 apb Exp $	*/
 
 /*-
  * Copyright (c) 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)uname.c	8.1 (Berkeley) 1/4/94;
 #else
-__RCSID($NetBSD: uname.c,v 1.11 2012/03/20 16:36:05 matt Exp $);
+__RCSID($NetBSD: uname.c,v 1.12 2014/06/14 13:09:37 apb Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -80,8 +80,17 @@ uname(struct utsname *name)
 	mib[0] = CTL_KERN;
 	mib[1] = KERN_VERSION;
 	len = sizeof(name-version);
-	if (sysctl(mib, 2, name-version, len, NULL, 0) == -1)
-		goto error;
+	if (sysctl(mib, 2, name-version, len, NULL, 0) == -1) {
+		if (errno == ENOMEM) {
+			/*
+			 * string is too long for {struct utsname}.version.
+			 * Just use the truncated string.
+			 * XXX: We could mark the truncation with ...
+			 */
+			name-version[sizeof(name-version) - 1] = '\0';
+		}
+		else goto error;
+	}
 
 	/* The version may have newlines in it, turn them into spaces. */
 	for (p = name-version; len--; ++p) {



CVS commit: src/lib/libc/gen

2014-06-14 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Jun 14 14:32:44 UTC 2014

Modified Files:
src/lib/libc/gen: uname.3

Log Message:
Document the relationship between uname(3) and sysctl(7) variables.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/lib/libc/gen/uname.3

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

Modified files:

Index: src/lib/libc/gen/uname.3
diff -u src/lib/libc/gen/uname.3:1.12 src/lib/libc/gen/uname.3:1.13
--- src/lib/libc/gen/uname.3:1.12	Wed Mar 30 16:41:00 2011
+++ src/lib/libc/gen/uname.3	Sat Jun 14 14:32:43 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: uname.3,v 1.12 2011/03/30 16:41:00 jruoho Exp $
+.\	$NetBSD: uname.3,v 1.13 2014/06/14 14:32:43 apb Exp $
 .\
 .\ Copyright (c) 1994
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\	@(#)uname.3	8.1 (Berkeley) 1/4/94
 .\
-.Dd March 30, 2011
+.Dd June 14, 2014
 .Dt UNAME 3
 .Os
 .Sh NAME
@@ -56,14 +56,35 @@ header file, and contains the following 
 .Bl -tag -width nodename -offset indent
 .It Va sysname
 Name of the operating system implementation.
+Equivalent to the
+.Xr sysctl 7
+.Va kern.ostype
+variable.
 .It Va nodename
 Network name of this machine.
+Equivalent to the
+.Xr sysctl 7
+.Va kern.hostname
+variable.
 .It Va release
 Release level of the operating system.
+Equivalent to the
+.Xr sysctl 7
+.Va kern.osrelease
+variable.
 .It Va version
 Version level of the operating system.
+Equivalent to the
+.Xr sysctl 7
+.Va kern.version
+variable, except that very long values are truncated,
+and newlines are converted to spaces.
 .It Va machine
 Machine hardware platform.
+Equivalent to the
+.Xr sysctl 7
+.Va hw.machine
+variable.
 .El
 .Sh RETURN VALUES
 If



CVS import: src/share/zoneinfo

2014-06-13 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Jun 13 19:48:57 UTC 2014

Update of /cvsroot/src/share/zoneinfo
In directory ivanova.netbsd.org:/tmp/cvs-serv19905

Log Message:
Import tzdata2014e from ftp://ftp.iana.org/tz/releases/tzdata2014e.tar.gz

Summary of changes in tzdata2014e (2014-06-12 21:53:52 -0700):
  * Egypt's 2014 Ramadan-based transitions are June 26 and July 31 at 24:00.
(Thanks to Imed Chihi.)  Guess that from 2015 on Egypt will temporarily
switch to standard time at 24:00 the last Thursday before Ramadan, and
back to DST at 00:00 the first Friday after Ramadan.
  * Similarly, Morocco's are June 28 at 03:00 and August 2 at 02:00.  (Thanks
to Milamber Space Network.)  Guess that from 2015 on Morocco will
temporarily switch to standard time at 03:00 the last Saturday before
Ramadan, and back to DST at 02:00 the first Saturday after Ramadan.
  * The abbreviation MSM (Moscow Midsummer Time) is now used instead of
MSD for Moscow's double daylight time in summer 1921.  Also, a typo
VLASST has been repaired to be VLAST for Vladivostok summer time
in 1991.  (Thanks to Hank W. for reporting the problems.)
  * Changes affecting commentary.

Summary of changes in tzdata2014d (2014-05-27 21:34:40 -0700):
  * Changes affecting documentation.

Status:

Vendor Tag: TZDATA
Release Tags:   TZDATA2014E

U src/share/zoneinfo/antarctica
C src/share/zoneinfo/Makefile
U src/share/zoneinfo/README
U src/share/zoneinfo/africa
C src/share/zoneinfo/australasia
U src/share/zoneinfo/asia
U src/share/zoneinfo/northamerica
U src/share/zoneinfo/europe
U src/share/zoneinfo/leapseconds.awk
U src/share/zoneinfo/southamerica
U src/share/zoneinfo/pacificnew
U src/share/zoneinfo/etcetera
U src/share/zoneinfo/backward
U src/share/zoneinfo/systemv
U src/share/zoneinfo/factory
U src/share/zoneinfo/iso3166.tab
U src/share/zoneinfo/zone.tab
U src/share/zoneinfo/leapseconds
U src/share/zoneinfo/leap-seconds.list
U src/share/zoneinfo/yearistype.sh

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

cvs checkout -jTZDATA:yesterday -jTZDATA src/share/zoneinfo



CVS commit: src/share/zoneinfo

2014-06-13 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Jun 13 19:54:04 UTC 2014

Modified Files:
src/share/zoneinfo: australasia

Log Message:
Merge tzdata2014e


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/share/zoneinfo/australasia

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

Modified files:

Index: src/share/zoneinfo/australasia
diff -u src/share/zoneinfo/australasia:1.35 src/share/zoneinfo/australasia:1.36
--- src/share/zoneinfo/australasia:1.35	Thu May 15 16:01:18 2014
+++ src/share/zoneinfo/australasia	Fri Jun 13 19:54:04 2014
@@ -250,24 +250,14 @@ Zone Antarctica/Macquarie 0	-	zzz	1899 N
 Zone Indian/Christmas	7:02:52 -	LMT	1895 Feb
 			7:00	-	CXT	# Christmas Island Time
 
-# Cook Is
-# From Shanks  Pottenger:
-# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	Cook	1978	only	-	Nov	12	0:00	0:30	HS
-Rule	Cook	1979	1991	-	Mar	Sun=1	0:00	0	-
-Rule	Cook	1979	1990	-	Oct	lastSun	0:00	0:30	HS
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Pacific/Rarotonga	-10:39:04 -	LMT	1901		# Avarua
-			-10:30	-	CKT	1978 Nov 12	# Cook Is Time
-			-10:00	Cook	CK%sT
-
-# Cocos
+# Cocos (Keeling) Is
 # These islands were ruled by the Ross family from about 1830 to 1978.
 # We don't know when standard time was introduced; for now, we guess 1900.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Indian/Cocos	6:27:40	-	LMT	1900
 			6:30	-	CCT	# Cocos Islands Time
 
+
 # Fiji
 
 # Milne gives 11:55:44 for Suva.
@@ -473,7 +463,8 @@ Rule	NZ	1934	1940	-	Apr	lastSun	2:00	0	M
 Rule	NZ	1934	1940	-	Sep	lastSun	2:00	0:30	S
 Rule	NZ	1946	only	-	Jan	 1	0:00	0	S
 # Since 1957 Chatham has been 45 minutes ahead of NZ, but there's no
-# convenient notation for this so we must duplicate the Rule lines.
+# convenient single notation for the date and time of this transition
+# so we must duplicate the Rule lines.
 Rule	NZ	1974	only	-	Nov	Sun=1	2:00s	1:00	D
 Rule	Chatham	1974	only	-	Nov	Sun=1	2:45s	1:00	D
 Rule	NZ	1975	only	-	Feb	lastSun	2:00s	0	S
@@ -511,6 +502,17 @@ Link Pacific/Auckland Antarctica/McMurdo
 # previously whalers, sealers, pastoralists, and scientific personnel wintered
 # was probably like Pacific/Auckland
 
+# Cook Is
+# From Shanks  Pottenger:
+# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
+Rule	Cook	1978	only	-	Nov	12	0:00	0:30	HS
+Rule	Cook	1979	1991	-	Mar	Sun=1	0:00	0	-
+Rule	Cook	1979	1990	-	Oct	lastSun	0:00	0:30	HS
+# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+Zone Pacific/Rarotonga	-10:39:04 -	LMT	1901		# Avarua
+			-10:30	-	CKT	1978 Nov 12	# Cook Is Time
+			-10:00	Cook	CK%sT
+
 ###
 
 



CVS commit: src/share/zoneinfo

2014-06-13 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Jun 13 19:56:19 UTC 2014

Modified Files:
src/share/zoneinfo: tzdata2netbsd

Log Message:
Update tzdata2netbsd for 2014e release.
* Rename work directory so there's a subdir per release.
* Slightly better detection of work that's already been done.
? update-work
cvs diff: Diffing .
Index: tzdata2netbsd
===
RCS file: /cvsroot/src/share/zoneinfo/tzdata2netbsd,v
retrieving revision 1.2
diff -d -p -u -r1.2 tzdata2netbsd
--- tzdata2netbsd   18 May 2014 16:53:56 -  1.2
+++ tzdata2netbsd   13 Jun 2014 19:54:55 -
@@ -1,10 +1,19 @@
 # $NetBSD: tzdata2netbsd,v 1.2 2014/05/18 16:53:56 apb Exp $
-#
+
 # For use by NetBSD developers when updating to new versions of tzdata.
 #
+# 0. Be in an up-to-date checkout of src/share/zoneinfo from NetBSD-current.
+# 1. Edit OLDVER and NEWVER below.
+# 3. Run this script.  You will be prompted for confirmation before
+#anything major (such as a cvs operation).
+# 4. If something fails, abort the script and fix it.
+# 5. Re-run this script until you are happy.  It's designed to
+#be re-run over and over, and later runs will try not to
+#redo non-trivial work done by earlier runs.
+#

-OLDVER=2013i
-NEWVER=2014c
+OLDVER=2014c
+NEWVER=2014e

 # Uppercase variants of OLDVER and NEWVER
 OLDVER_UC=$( echo ${OLDVER} | tr '[a-z]' '[A-Z]' )
@@ -23,8 +32,8 @@ NEWSURL=https://github.com/eggert/tz/ra

 # Directories
 REPODIR=src/share/zoneinfo   # relative to the NetSBD CVS repository
-WORKDIR=$(pwd)/update-work
-EXTRACTDIR=${WORKDIR}/extract/${NEWVER}
+WORKDIR=$(pwd)/update-work/${NEWVER}
+EXTRACTDIR=${WORKDIR}/extract

 # Files in the work directory
 DISTFILE=${WORKDIR}/${DISTURL##*/}
@@ -54,7 +63,7 @@ DOIT()
echo REALLY DOING IT NOW...
$@
else
-   echo NOT REALLY DOING: $@
+   echo NOT REALLY DOING THE ABOVE COMMAND
fi
 }

@@ -134,6 +143,7 @@ EOF

 extract()
 {
+   [ -f ${EXTRACTDIR}/zone.tab ]  return
mkdir -p ${EXTRACTDIR}
tar -z -xf ${DISTFILE} -C ${EXTRACTDIR}
 }
@@ -143,6 +153,7 @@ extract()
 #
 trimnews()
 {
+   [ -s ${NEWSTRIMFILE} ]  return
awk -v oldver=${OLDVER} -v newver=${NEWVER} \
'
BEGIN {inrange = 0}
cvs diff: Diffing datfiles


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/zoneinfo/tzdata2netbsd

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

Modified files:

Index: src/share/zoneinfo/tzdata2netbsd
diff -u src/share/zoneinfo/tzdata2netbsd:1.2 src/share/zoneinfo/tzdata2netbsd:1.3
--- src/share/zoneinfo/tzdata2netbsd:1.2	Sun May 18 16:53:56 2014
+++ src/share/zoneinfo/tzdata2netbsd	Fri Jun 13 19:56:19 2014
@@ -1,10 +1,19 @@
-# $NetBSD: tzdata2netbsd,v 1.2 2014/05/18 16:53:56 apb Exp $
-#
+# $NetBSD: tzdata2netbsd,v 1.3 2014/06/13 19:56:19 apb Exp $
+
 # For use by NetBSD developers when updating to new versions of tzdata.
 #
+# 0. Be in an up-to-date checkout of src/share/zoneinfo from NetBSD-current.
+# 1. Edit OLDVER and NEWVER below.
+# 3. Run this script.  You will be prompted for confirmation before
+#anything major (such as a cvs operation).
+# 4. If something fails, abort the script and fix it.
+# 5. Re-run this script until you are happy.  It's designed to
+#be re-run over and over, and later runs will try not to
+#redo non-trivial work done by earlier runs.
+#
 
-OLDVER=2013i
-NEWVER=2014c
+OLDVER=2014c
+NEWVER=2014e
 
 # Uppercase variants of OLDVER and NEWVER
 OLDVER_UC=$( echo ${OLDVER} | tr '[a-z]' '[A-Z]' )
@@ -23,8 +32,8 @@ NEWSURL=https://github.com/eggert/tz/ra
 
 # Directories
 REPODIR=src/share/zoneinfo	# relative to the NetSBD CVS repository
-WORKDIR=$(pwd)/update-work
-EXTRACTDIR=${WORKDIR}/extract/${NEWVER}
+WORKDIR=$(pwd)/update-work/${NEWVER}
+EXTRACTDIR=${WORKDIR}/extract
 
 # Files in the work directory
 DISTFILE=${WORKDIR}/${DISTURL##*/}
@@ -54,7 +63,7 @@ DOIT()
 		echo REALLY DOING IT NOW...
 		$@
 	else
-		echo NOT REALLY DOING: $@
+		echo NOT REALLY DOING THE ABOVE COMMAND
 	fi
 }
 
@@ -134,6 +143,7 @@ EOF
 
 extract()
 {
+	[ -f ${EXTRACTDIR}/zone.tab ]  return
 	mkdir -p ${EXTRACTDIR}
 	tar -z -xf ${DISTFILE} -C ${EXTRACTDIR}
 }
@@ -143,6 +153,7 @@ extract()
 #
 trimnews()
 {
+	[ -s ${NEWSTRIMFILE} ]  return
 	awk -v oldver=${OLDVER} -v newver=${NEWVER} \
 	'
 		BEGIN {inrange = 0}



CVS commit: src/doc

2014-06-13 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Jun 13 19:57:45 UTC 2014

Modified Files:
src/doc: 3RDPARTY

Log Message:
tzcode2014e/tzdata2014e have been released.  We have tzdata2014e.


To generate a diff of this commit:
cvs rdiff -u -r1.1119 -r1.1120 src/doc/3RDPARTY

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.1119 src/doc/3RDPARTY:1.1120
--- src/doc/3RDPARTY:1.1119	Fri Jun 13 02:09:20 2014
+++ src/doc/3RDPARTY	Fri Jun 13 19:57:45 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1119 2014/06/13 02:09:20 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1120 2014/06/13 19:57:45 apb Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1271,8 +1271,8 @@ Notes:
 Added changes from a5 - a12 manually.
 
 Package:	tz
-Version:	tzcode2014d / tzdata2014c
-Current Vers:	tzcode2014d / tzdata2014d
+Version:	tzcode2014d / tzdata2014e
+Current Vers:	tzcode2014e / tzdata2014e
 Maintainer:	Paul Eggert egg...@cs.ucla.edu
 Archive Site:	ftp://ftp.iana.org/tz/releases/
 Archive Site:	ftp://munnari.oz.au/pub/oldtz/



CVS commit: src/doc

2014-06-13 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Jun 13 19:58:22 UTC 2014

Modified Files:
src/doc: CHANGES

Log Message:
zoneinfo: Import tzdata2014e. [apb 20140613]


To generate a diff of this commit:
cvs rdiff -u -r1.1934 -r1.1935 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/CHANGES
diff -u src/doc/CHANGES:1.1934 src/doc/CHANGES:1.1935
--- src/doc/CHANGES:1.1934	Fri Jun 13 02:09:20 2014
+++ src/doc/CHANGES	Fri Jun 13 19:58:22 2014
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1934 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1935 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -429,3 +429,4 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	vmx(4): Add VMware VMXNET3 driver, from OpenBSD [hikaru 20140610]
 	etcupdate(8): Add destdir support.  [apb 20140612]
 	file(1): upgraded to 5.19 [christos 20140612]
+	zoneinfo: Import tzdata2014e. [apb 20140613]



CVS commit: src/usr.sbin/etcupdate

2014-06-12 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu Jun 12 13:33:43 UTC 2014

Modified Files:
src/usr.sbin/etcupdate: etcupdate

Log Message:
There is a file named ._etcupdate_${TEMPROOT}${1} was
never created, so don't try to delete it.  Delete $B instead.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/usr.sbin/etcupdate/etcupdate

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

Modified files:

Index: src/usr.sbin/etcupdate/etcupdate
diff -u src/usr.sbin/etcupdate/etcupdate:1.52 src/usr.sbin/etcupdate/etcupdate:1.53
--- src/usr.sbin/etcupdate/etcupdate:1.52	Thu Jun 12 13:31:47 2014
+++ src/usr.sbin/etcupdate/etcupdate	Thu Jun 12 13:33:43 2014
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: etcupdate,v 1.52 2014/06/12 13:31:47 apb Exp $
+# $NetBSD: etcupdate,v 1.53 2014/06/12 13:33:43 apb Exp $
 #
 # Copyright (c) 2001-2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -378,7 +378,7 @@ EOF
 			;;
 		esac
 	done
-	rm -f ._etcupdate_${TEMPROOT}${1}
+	rm -f $B
 }
 
 # Set the environment for make.



CVS commit: src/usr.sbin/etcupdate

2014-06-12 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu Jun 12 13:31:48 UTC 2014

Modified Files:
src/usr.sbin/etcupdate: etcupdate

Log Message:
When processing the -s option, the variable used is ${arg},
not ${ARG}.  Also adjust an error message to say
Nonexistent or invalid file or directory, not just
Nonexistent file or directory.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/usr.sbin/etcupdate/etcupdate

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

Modified files:

Index: src/usr.sbin/etcupdate/etcupdate
diff -u src/usr.sbin/etcupdate/etcupdate:1.51 src/usr.sbin/etcupdate/etcupdate:1.52
--- src/usr.sbin/etcupdate/etcupdate:1.51	Wed Aug 15 16:26:41 2012
+++ src/usr.sbin/etcupdate/etcupdate	Thu Jun 12 13:31:47 2014
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: etcupdate,v 1.51 2012/08/15 16:26:41 apb Exp $
+# $NetBSD: etcupdate,v 1.52 2014/06/12 13:31:47 apb Exp $
 #
 # Copyright (c) 2001-2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -447,7 +447,7 @@ do
 			# arg refers to a source directory
 			SOURCEMODE=true
 			SRCDIR=${arg}
-		elif [ -d ${arg} ]  [ -d ${ARG}/etc ] \
+		elif [ -d ${arg} ]  [ -d ${arg}/etc ] \
 			 ! [ -f ${arg}/etc/Makefile ]
 		then
 			# arg refers to a directory where the
@@ -456,7 +456,8 @@ do
 			BINARYDIRMODE=true
 			BINARYDIR=${arg}
 		else
-			echo *** Nonexistent file or directory for -s ${arg}
+			echo *** Nonexistent or invalid file or directory \
+			 for -s ${arg}
 			usage
 		fi
 		;;



CVS commit: src/usr.sbin/etcupdate

2014-06-12 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu Jun 12 13:40:43 UTC 2014

Modified Files:
src/usr.sbin/etcupdate: etcupdate

Log Message:
When populating ${TEMPROOT} from ${SRCDIR} by copying, use the mtree set
files from ${BINARYDIR}/etc/mtree/set.{etc,xetc} as a list of files to
copy (and copy using pax instead of cp).

This prevents unnecessary copying of extraneous files, such as in the
case that BINARYDIR refers to a directory where everything has been
unpacked, instead of a directory where only the etc and xetc sets have
been unpacked.

Also convert a relative TEMOROOT to an absolute path.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/usr.sbin/etcupdate/etcupdate

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

Modified files:

Index: src/usr.sbin/etcupdate/etcupdate
diff -u src/usr.sbin/etcupdate/etcupdate:1.53 src/usr.sbin/etcupdate/etcupdate:1.54
--- src/usr.sbin/etcupdate/etcupdate:1.53	Thu Jun 12 13:33:43 2014
+++ src/usr.sbin/etcupdate/etcupdate	Thu Jun 12 13:40:43 2014
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: etcupdate,v 1.53 2014/06/12 13:33:43 apb Exp $
+# $NetBSD: etcupdate,v 1.54 2014/06/12 13:40:43 apb Exp $
 #
 # Copyright (c) 2001-2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -487,6 +487,13 @@ if [ ${N_SRC_ARGS} -gt 1 ]  ( ${SOUR
 	echo *** ERROR: Multiple -s args are allowed only with tgz files
 	usage
 fi
+case ${TEMPROOT} in
+/*) : OK ;;
+*)  new=${PWD:-$(pwd)}/${TEMPROOT}
+echo *** NOTE: Using TEMPROOT \${new}\ instead of \${TEMPROOT}\
+TEMPROOT=${new}
+;;
+esac
 if ${BINARYDIRMODE}; then
 	SRCDIR=${TEMPROOT}
 fi
@@ -541,10 +548,24 @@ if ! ${CONTINUE}; then
 			[ $? -ne 0 ]  exit 1
 		done
 	elif ${BINARYDIRMODE}; then
-		# Populate ${TEMPROOT} from ${SRCDIR} by copying
+		# Populate ${TEMPROOT} from ${SRCDIR} by copying.
+		# Copy only the files that belong to the etc and xetc sets.
 		echo *** Populating ${TEMPROOT} from ${BINARYDIR} (copying)
-		cp -RPp ${BINARYDIR}/* ${TEMPROOT}/
-		[ $? -ne 0 ]  exit 1
+		for setname in etc xetc; do
+			mtreefile=${BINARYDIR}/etc/mtree/set.${setname}
+			if ${VERBOSE}; then vflag=-v; else vflag=; fi
+			if [ -f ${mtreefile} ]; then
+echo *** Copying files belonging to \
+ ${setname} set
+(cd ${BINARYDIR} \
+  pax -rwdM ${vflag} ${TEMPROOT%/}/.
+) ${mtreefile}
+[ $? -ne 0 ]  exit 1
+			else
+echo *** Not copying files belonging to \
+ ${setname} set: ${mtreefile} not found
+			fi
+		done
 	elif ${SOURCEMODE}; then
 		# Populate ${TEMPROOT} from ${SRCDIR} by running make
 		if [ ! -f ${SRCDIR}/etc/Makefile ]; then



CVS commit: src/usr.sbin/etcupdate

2014-06-12 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu Jun 12 13:42:05 UTC 2014

Modified Files:
src/usr.sbin/etcupdate: etcupdate

Log Message:
Keep track of whether anything was changed (or needs to be changed),
and print a message at the end if nothing needs to be done.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/usr.sbin/etcupdate/etcupdate

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

Modified files:

Index: src/usr.sbin/etcupdate/etcupdate
diff -u src/usr.sbin/etcupdate/etcupdate:1.54 src/usr.sbin/etcupdate/etcupdate:1.55
--- src/usr.sbin/etcupdate/etcupdate:1.54	Thu Jun 12 13:40:43 2014
+++ src/usr.sbin/etcupdate/etcupdate	Thu Jun 12 13:42:05 2014
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: etcupdate,v 1.54 2014/06/12 13:40:43 apb Exp $
+# $NetBSD: etcupdate,v 1.55 2014/06/12 13:42:05 apb Exp $
 #
 # Copyright (c) 2001-2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -70,6 +70,7 @@ MACHINE_ARCH=${MACHINE_ARCH:=$(uname -
 export MACHINE_ARCH
 
 # Settings for post-installation procedures
+NEED_ANYTHING=false
 NEED_MAKEDEV=false
 NEED_MTREE=false
 NEED_NEWALIASES=false
@@ -153,6 +154,7 @@ shell_quote()
 install_dir() {
 	# $1 = target directory
 
+	NEED_ANYTHING=true
 	if yesno Create ${1}; then
 		verbose Creating ${1}
 		mkdir -p ${1} || exit 1
@@ -163,6 +165,7 @@ install_dir() {
 install_file() {
 	# $1 = target file
 
+	NEED_ANYTHING=true
 	# Install the new file
 	verbose Installing ${1}
 	cp -p ${TEMPROOT}${1} ${1}  rm -f ${TEMPROOT}${1}
@@ -192,6 +195,7 @@ install_checksum() {
 
 	${AUTOMATIC} || return
 
+	NEED_ANYTHING=true
 	D=$(dirname ${1})
 	mkdir -p /var/etcupdate/${D}
 	verbose Saving MD5 checksum for ${1} to /var/etcupdate/${1}
@@ -637,6 +641,10 @@ if [ ! -z ${REMAINING} ]; then
 	echo 
 	echo ${REMAINING} | sed -e 's/^/  /'
 	echo 
+elif ! ${NEED_ANYTHING}; then
+	echo 
+	echo *** No changes were needed
+	echo 
 fi
 if yesno Remove ${TEMPROOT}; then
 	echo *** Removing ${TEMPROOT}



CVS commit: src/usr.sbin/etcupdate

2014-06-12 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu Jun 12 13:56:32 UTC 2014

Modified Files:
src/usr.sbin/etcupdate: etcupdate etcupdate.8

Log Message:
Add -d destdir option to etcupdate.
This has been only lightly tested.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/usr.sbin/etcupdate/etcupdate
cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/etcupdate/etcupdate.8

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

Modified files:

Index: src/usr.sbin/etcupdate/etcupdate
diff -u src/usr.sbin/etcupdate/etcupdate:1.55 src/usr.sbin/etcupdate/etcupdate:1.56
--- src/usr.sbin/etcupdate/etcupdate:1.55	Thu Jun 12 13:42:05 2014
+++ src/usr.sbin/etcupdate/etcupdate	Thu Jun 12 13:56:32 2014
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: etcupdate,v 1.55 2014/06/12 13:42:05 apb Exp $
+# $NetBSD: etcupdate,v 1.56 2014/06/12 13:56:32 apb Exp $
 #
 # Copyright (c) 2001-2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -46,6 +46,8 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin:${PA
 
 # Default settings
 PROG=${0##*/}
+DESTDIR=		# must not have a trailing slash
+DESTDIR_BRE=		# basic regex to match ${DESTDIR}
 TEMPROOT=${TEMPROOT:=/tmp/temproot}
 PAGER=${PAGER:=/usr/bin/more}
 SWIDTH=$(stty size | awk '{w=$2}END{if(w==0){w=80}print w}')
@@ -60,7 +62,7 @@ BINARYDIRMODE=false	# true for -s extra
 BINARYDIR=		# directory name for BINARYDIRMODE
 BINARYTGZMODE=false	# true for -s etc.tgz
 TGZLIST=		# quoted list list of files for BINARYTGZMODE
-SRC_ARGLIST=		# quoted list of one or more -s args
+SRC_ARGLIST=		# quoted list of -s args
 N_SRC_ARGS=0		# number of -s args
 AUTOMATIC=false
 LOCALSKIP=false
@@ -95,6 +97,7 @@ Options:
* A temporary directory in which one or both of etc.tgz
  and xetc.tgz have been extracted.
   -t temproot  Where to store temporary files  (default: /tmp/temproot)
+  -d destdir   Destination directory to check. (default: /)
   -w width Screen width(default: 80)
   -a   Automatically update unmodified files
   -l   Automatically skip files with strictly local changes
@@ -151,24 +154,38 @@ shell_quote()
 	printf %s\n $result
 }
 
+# Convert arg $1 to a basic regular expression (as in sed)
+# that will match the arg.  This works by inserting backslashes
+# before characters that are special in basic regular expressions.
+# It also inserts backslashes before the extra characters specified
+# in $2 (which defaults to /,).
+# XXX: Does not handle embedded newlines.
+# Usage: regex=$(bre_quote ${string})
+bre_quote()
+{
+	local arg=$1
+	local extra=$2:/,
+	printf %s\n ${arg} | sed -e 's/[][^$.*\\'${extra}']/\\/g'
+}
+
 install_dir() {
-	# $1 = target directory
+	# $1 = target directory (relative to ${DESTDIR})
 
 	NEED_ANYTHING=true
-	if yesno Create ${1}; then
-		verbose Creating ${1}
-		mkdir -p ${1} || exit 1
+	if yesno Create ${DESTDIR}${1}; then
+		verbose Creating ${DESTDIR}${1}
+		mkdir -p ${DESTDIR}${1} || exit 1
 		NEED_MTREE=true
 	fi
 }
 
 install_file() {
-	# $1 = target file
+	# $1 = target file (relative to ${DESTDIR})
 
 	NEED_ANYTHING=true
 	# Install the new file
-	verbose Installing ${1}
-	cp -p ${TEMPROOT}${1} ${1}  rm -f ${TEMPROOT}${1}
+	verbose Installing ${DESTDIR}${1}
+	cp -p ${TEMPROOT}${1} ${DESTDIR}${1}  rm -f ${TEMPROOT}${1}
 
 	# Check if this was a special file
 	case ${1} in
@@ -191,15 +208,20 @@ install_file() {
 }
 
 install_checksum() {
-	# $1 = target file
+	# $1 = target file (relative to ${DESTDIR})
 
 	${AUTOMATIC} || return
 
 	NEED_ANYTHING=true
 	D=$(dirname ${1})
-	mkdir -p /var/etcupdate/${D}
-	verbose Saving MD5 checksum for ${1} to /var/etcupdate/${1}
-	md5 ${1}  /var/etcupdate/${1}
+	mkdir -p ${DESTDIR}/var/etcupdate/${D}
+	verbose Saving MD5 checksum for ${DESTDIR}${1} to \
+	${DESTDIR}/var/etcupdate/${1}
+	# The sed part of the following pipeline changes things like
+	# MD5 (/path/to/dest/dir/etc/filename) = abc123 to
+	# MD5 (/etc/filename) = abc123.
+	md5 ${DESTDIR}${1} | sed -e s,(${DESTDIR_BRE},(, \
+	 ${DESTDIR}/var/etcupdate/${1}
 }
 
 # Initialise the DIFF_EXTRA_OPTIONS variable.
@@ -230,18 +252,18 @@ init_diff_extra_options() {
 }
 
 diff_and_merge_file() {
-	# $1 = target file
+	# $1 = target file (relative to ${DESTDIR})
 
-	if cmp -s ${TEMPROOT}${1} ${1}; then
+	if cmp -s ${TEMPROOT}${1} ${DESTDIR}${1}; then
 		verbose === ${1} (ok)
 		rm -f ${TEMPROOT}${1}
-		install_checksum ${1}
+		install_checksum ${DESTDIR}${1}
 		return
 	fi
 
-	if ${AUTOMATIC}  [ -f /var/etcupdate/${1} ]; then
+	if ${AUTOMATIC}  [ -f ${DESTDIR}/var/etcupdate/${1} ]; then
 		SUM1=$(md5 ${1})
-		SUM2=$(cat /var/etcupdate/${1})
+		SUM2=$(cat ${DESTDIR}/var/etcupdate/${1})
 		if [ ${SUM1} = ${SUM2} ]; then
 			install_file ${1}
 			install_checksum ${1}
@@ -252,7 +274,7 @@ diff_and_merge_file() {
 	if ${LOCALSKIP}; then
 		ID1=$(ident -q ${TEMPROOT}${1} | sed -n 2p)
 		ID1=${ID1:-0}
-		ID2=$(ident -q ${1} | sed 

CVS commit: src/usr.sbin/etcupdate

2014-06-12 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu Jun 12 14:07:13 UTC 2014

Modified Files:
src/usr.sbin/etcupdate: etcupdate.8

Log Message:
Update date for previous, and fix some small errors.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/etcupdate/etcupdate.8

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

Modified files:

Index: src/usr.sbin/etcupdate/etcupdate.8
diff -u src/usr.sbin/etcupdate/etcupdate.8:1.21 src/usr.sbin/etcupdate/etcupdate.8:1.22
--- src/usr.sbin/etcupdate/etcupdate.8:1.21	Thu Jun 12 13:56:32 2014
+++ src/usr.sbin/etcupdate/etcupdate.8	Thu Jun 12 14:07:13 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: etcupdate.8,v 1.21 2014/06/12 13:56:32 apb Exp $
+.\	$NetBSD: etcupdate.8,v 1.22 2014/06/12 14:07:13 apb Exp $
 .\
 .\ Copyright (c) 2001-2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd August 15, 2012
+.Dd June 12, 2014
 .Dt ETCUPDATE 8
 .Os
 .Sh NAME
@@ -147,7 +147,6 @@ For example,
 .Ar destdir Ns Pa /etc
 will be used instead of
 .Pa /etc .
-.Pa \/ .
 .It Fl h
 Prints a help text.
 .It Fl l
@@ -401,7 +400,7 @@ the ability to specify multiple colon-se
 .Fl s
 option was removed (multiple
 .Fl s
-options must be used instead,
+options must be used instead),
 and the
 .Fl d Ar destdir
 option was added.



CVS commit: src/doc

2014-06-12 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu Jun 12 15:13:44 UTC 2014

Modified Files:
src/doc: CHANGES

Log Message:
etcupdate(8): Add destdir support.  [apb 20140612]


To generate a diff of this commit:
cvs rdiff -u -r1.1932 -r1.1933 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/CHANGES
diff -u src/doc/CHANGES:1.1932 src/doc/CHANGES:1.1933
--- src/doc/CHANGES:1.1932	Tue Jun 10 03:47:57 2014
+++ src/doc/CHANGES	Thu Jun 12 15:13:44 2014
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1932 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1933 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -427,3 +427,4 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	OpenSSL: Imported 1.0.1h [christos 20140605]
 	vax: Switch to GCC 4.8 [matt 20140605]
 	vmx(4): Add VMware VMXNET3 driver, from OpenBSD [hikaru 20140610]
+	etcupdate(8): Add destdir support.  [apb 20140612]



CVS commit: src/lib/libc/gen

2014-06-12 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu Jun 12 19:05:37 UTC 2014

Modified Files:
src/lib/libc/gen: arc4random.c

Log Message:
Wrap complex macros in do { ... } while (0).  Also replace the magic
number 160 with a macro.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/lib/libc/gen/arc4random.c

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

Modified files:

Index: src/lib/libc/gen/arc4random.c
diff -u src/lib/libc/gen/arc4random.c:1.22 src/lib/libc/gen/arc4random.c:1.23
--- src/lib/libc/gen/arc4random.c:1.22	Sat Jun  7 20:55:47 2014
+++ src/lib/libc/gen/arc4random.c	Thu Jun 12 19:05:37 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: arc4random.c,v 1.22 2014/06/07 20:55:47 roy Exp $	*/
+/*	$NetBSD: arc4random.c,v 1.23 2014/06/12 19:05:37 apb Exp $	*/
 /*	$OpenBSD: arc4random.c,v 1.6 2001/06/05 05:05:38 pvalchev Exp $	*/
 
 /*
@@ -27,7 +27,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: arc4random.c,v 1.22 2014/06/07 20:55:47 roy Exp $);
+__RCSID($NetBSD: arc4random.c,v 1.23 2014/06/12 19:05:37 apb Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include namespace.h
@@ -50,6 +50,8 @@ __weak_alias(arc4random_stir,_arc4random
 __weak_alias(arc4random_uniform,_arc4random_uniform)
 #endif
 
+#define REKEY_BYTES	160
+
 struct arc4_stream {
 	bool inited;
 	uint8_t i;
@@ -60,8 +62,12 @@ struct arc4_stream {
 };
 
 #ifdef _REENTRANT
-#define LOCK(rs)	if (__isthreaded) mutex_lock((rs)-mtx);
-#define UNLOCK(rs)	if (__isthreaded) mutex_unlock((rs)-mtx);
+#define LOCK(rs)	do { \
+if (__isthreaded) mutex_lock((rs)-mtx);
+			} while (/*CONSTCOND*/ 0)
+#define UNLOCK(rs)	do { \
+if (__isthreaded) mutex_unlock((rs)-mtx); \
+			} while (/*CONSTCOND*/ 0)
 #else
 #define LOCK(rs)
 #define UNLOCK(rs)
@@ -177,8 +183,8 @@ arc4_stir(struct arc4_stream *as)
 	for (j = 0; j  __arraycount(as-s) * sizeof(uint32_t); j++)
 		arc4_getbyte(as);
 
-	/* Stir again after swallowing 160 bytes or if the pid changes */
-	as-count = 160;
+	/* Stir again after REKEY_BYTES bytes, or if the pid changes */
+	as-count = REKEY_BYTES;
 }
 
 static inline void



CVS commit: src/lib/libc/gen

2014-06-12 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu Jun 12 19:12:20 UTC 2014

Modified Files:
src/lib/libc/gen: arc4random.c

Log Message:
fix missing backslash in previous


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/lib/libc/gen/arc4random.c

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

Modified files:

Index: src/lib/libc/gen/arc4random.c
diff -u src/lib/libc/gen/arc4random.c:1.23 src/lib/libc/gen/arc4random.c:1.24
--- src/lib/libc/gen/arc4random.c:1.23	Thu Jun 12 19:05:37 2014
+++ src/lib/libc/gen/arc4random.c	Thu Jun 12 19:12:19 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: arc4random.c,v 1.23 2014/06/12 19:05:37 apb Exp $	*/
+/*	$NetBSD: arc4random.c,v 1.24 2014/06/12 19:12:19 apb Exp $	*/
 /*	$OpenBSD: arc4random.c,v 1.6 2001/06/05 05:05:38 pvalchev Exp $	*/
 
 /*
@@ -27,7 +27,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: arc4random.c,v 1.23 2014/06/12 19:05:37 apb Exp $);
+__RCSID($NetBSD: arc4random.c,v 1.24 2014/06/12 19:12:19 apb Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include namespace.h
@@ -63,7 +63,7 @@ struct arc4_stream {
 
 #ifdef _REENTRANT
 #define LOCK(rs)	do { \
-if (__isthreaded) mutex_lock((rs)-mtx);
+if (__isthreaded) mutex_lock((rs)-mtx); \
 			} while (/*CONSTCOND*/ 0)
 #define UNLOCK(rs)	do { \
 if (__isthreaded) mutex_unlock((rs)-mtx); \



CVS commit: src/doc

2014-05-28 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Wed May 28 16:05:04 UTC 2014

Modified Files:
src/doc: 3RDPARTY

Log Message:
tzcode2014d/tzdata2014d has been released.

There's no need to updata tzdata this time, because it's identical
to the previous version.


To generate a diff of this commit:
cvs rdiff -u -r1.1115 -r1.1116 src/doc/3RDPARTY

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.1115 src/doc/3RDPARTY:1.1116
--- src/doc/3RDPARTY:1.1115	Wed May 28 11:35:50 2014
+++ src/doc/3RDPARTY	Wed May 28 16:05:04 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1115 2014/05/28 11:35:50 tron Exp $
+#	$NetBSD: 3RDPARTY,v 1.1116 2014/05/28 16:05:04 apb Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1272,7 +1272,7 @@ Added changes from a5 - a12 manually.
 
 Package:	tz
 Version:	tzcode2014c / tzdata2014c
-Current Vers:	tzcode2014c / tzdata2014c
+Current Vers:	tzcode2014d / tzdata2014d
 Maintainer:	Paul Eggert egg...@cs.ucla.edu
 Archive Site:	ftp://ftp.iana.org/tz/releases/
 Archive Site:	ftp://munnari.oz.au/pub/oldtz/



CVS commit: src/share/zoneinfo

2014-05-18 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sun May 18 16:53:56 UTC 2014

Modified Files:
src/share/zoneinfo: tzdata2netbsd

Log Message:
Many changes to tzdata2netbsd.
This has been tested in a private repository.

* Use set -e
* Pass -d ${CVSROOT} to all cvs invocations.  cvs import needs it.
* cvs import needs to be done in the directory where the tarball
  was extracted.
* cvs import does not take a -F messagefile option (as cvs commit does);
  it needs -m messagestring.
* The DOIT function now prompts for a yes/no/quit response, and quotes
  complex arguments when printing the command.
* When checking the PGP signature, require the correct key to have been used.
* Usability improvements when editing the cvs log message.
* More error checking.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/zoneinfo/tzdata2netbsd

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

Modified files:

Index: src/share/zoneinfo/tzdata2netbsd
diff -u src/share/zoneinfo/tzdata2netbsd:1.1 src/share/zoneinfo/tzdata2netbsd:1.2
--- src/share/zoneinfo/tzdata2netbsd:1.1	Sat May 17 19:53:22 2014
+++ src/share/zoneinfo/tzdata2netbsd	Sun May 18 16:53:56 2014
@@ -1,4 +1,4 @@
-# $NetBSD: tzdata2netbsd,v 1.1 2014/05/17 19:53:22 apb Exp $
+# $NetBSD: tzdata2netbsd,v 1.2 2014/05/18 16:53:56 apb Exp $
 #
 # For use by NetBSD developers when updating to new versions of tzdata.
 #
@@ -33,18 +33,72 @@ NEWSFILE=${WORKDIR}/NEWS
 NEWSTRIMFILE=${WORKDIR}/NEWS.trimmed
 IMPORTMSGFILE=${WORKDIR}/import.msg
 MERGSMSGFILE=${WORKDIR}/merge.msg
+PGPVERIFYLOG=${WORKDIR}/pgpverify.log
 
 DOIT()
 {
-	really_do_it=false
+	local really_do_it=false
+	local reply
 
+	echo ABOUT TO DO: $(shell_quote $@)
+	read -p Really do it? [yes/no/quit]  reply
+	case ${reply} in
+	[yY]*)	really_do_it=true ;;
+	[nN]*)	really_do_it=false ;;
+	[qQ]*)
+		echo Aborting
+		return 1
+		;;
+	esac
 	if $really_do_it; then
+		echo REALLY DOING IT NOW...
 		$@
 	else
 		echo NOT REALLY DOING: $@
 	fi
 }
 
+# Quote args to make them safe in the shell.
+# Usage: quotedlist=$(shell_quote args...)
+#
+# After building up a quoted list, use it by evaling it inside
+# double quotes, like this:
+#eval set -- $quotedlist
+# or like this:
+#eval \$command $quotedlist \$filename
+shell_quote()
+{
+	local result=''
+	local arg qarg
+	for arg in $@ ; do
+		case ${arg} in
+		''|*[!-./a-zA-Z0-9]*)
+			# Convert each embedded ' to '\'',
+			# then insert ' at the beginning of the first line,
+			# and append ' at the end of the last line.
+			qarg=$(printf %s\n $arg | \
+			sed -e s/'/'''/g -e 1s/^/'/ -e \$s/\$/'/)
+			;;
+		*)
+			# Arg is not the empty string, and does not contain
+			# any unsafe characters.
+			qarg=${arg}
+			;;
+		esac
+		result=${result}${result:+ }${qarg}
+	done
+	printf %s\n $result
+}
+
+findcvsroot()
+{
+	[ -n ${CVSROOT} ]  return 0
+	CVSROOT=$( cat ./CVS/Root )
+	[ -n ${CVSROOT} ]  return 0
+	echo 2 Failed to set CVSROOT value
+	return 1
+}
+
 mkworkdir()
 {
 	mkdir -p ${WORKDIR}
@@ -59,7 +113,23 @@ fetch()
 
 checksig()
 {
-	gpg --verify ${SIGFILE} ${DISTFILE}
+	{ gpg --verify ${SIGFILE} ${DISTFILE}
+	  echo gpg exit status $?
+	} 21 | tee ${PGPVERIFYLOG}
+
+	# The output should contain lines that match all the following regexps
+	#
+	while read line; do
+		if ! grep -q -e ^${line}\$ ${PGPVERIFYLOG}; then
+			echo 2 Failed to verify signature: ${line}
+			return 1
+		fi
+	done 'EOF'
+gpg: Signature made .* using RSA key ID 62AA7E34
+gpg: Good signature from Paul Eggert egg...@cs.ucla.edu
+Primary key fingerprint: 7E37 92A9 D8AC F7D6 33BC  1588 ED97 E90E 62AA 7E34
+gpg exit status 0
+EOF
 }
 
 extract()
@@ -68,10 +138,8 @@ extract()
 	tar -z -xf ${DISTFILE} -C ${EXTRACTDIR}
 }
 
-# Each release has a heading in the NEWS file, like
-# Release version - date.
-# Find the relevant part of the NEWS file for all release between
-# OLDVAR and NEWVER, and save them to NEWSTRIMFILE.
+# Find the relevant part of the NEWS file for all releases between
+# OLDVER and NEWVER, and save them to NEWSTRIMFILE.
 #
 trimnews()
 {
@@ -79,6 +147,7 @@ trimnews()
 	'
 		BEGIN {inrange = 0}
 		/^Release [0-9]+[a-z]+ - .*/ {
+			# Release version - date
 			inrange = ($2  oldver  $2 = newver)
 		}
 		// { if (inrange) print; }
@@ -88,12 +157,21 @@ trimnews()
 
 # Create IMPORTMSGFILE from NEWSTRIMFILE, by ignoring some sections,
 # keeping only the first sentence from paragraphs in other sections,
-# and changing the format.  The result should be edited by hand before
-# performing a cvs commit.
+# and changing the format.
+#
+# The result should be edited by hand before performing a cvs commit.
+# A message to that effect is inserted at the beginning of the file.
 #
 mkimportmsg()
 {
 	[ -s ${IMPORTMSGFILE} ]  return
+	{ cat EOF
+EDIT ME: Edit this file and then delete the lines marked EDIT ME.
+EDIT ME: This file will be used as a log message for the cvs commit that

CVS commit: src/usr.bin/find

2014-05-17 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat May 17 11:31:40 UTC 2014

Modified Files:
src/usr.bin/find: find.1

Log Message:
Add an example with find ... -exec sh -c 


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/usr.bin/find/find.1

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

Modified files:

Index: src/usr.bin/find/find.1
diff -u src/usr.bin/find/find.1:1.80 src/usr.bin/find/find.1:1.81
--- src/usr.bin/find/find.1:1.80	Fri Feb  8 12:50:51 2013
+++ src/usr.bin/find/find.1	Sat May 17 11:31:40 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: find.1,v 1.80 2013/02/08 12:50:51 wiz Exp $
+.\	$NetBSD: find.1,v 1.81 2014/05/17 11:31:40 apb Exp $
 .\
 .\ Copyright (c) 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\
 .\	from: @(#)find.1	8.7 (Berkeley) 5/9/95
 .\
-.Dd August 26, 2012
+.Dd May 17, 2014
 .Dt FIND 1
 .Os
 .Sh NAME
@@ -783,6 +783,8 @@ but do not print them.
 .It Li find / \e( \-newer ttt \-or \-user wnj \e) \-ls \-exit 1
 Same as above, but list the first file matching the criteria before exiting
 with a value of 1.
+.It Li find . \-type f \-exec sh \-c 'file=\*[q]$1\*[q]; ...;' - {} \;
+Perform an arbitrarily complex shell command for every file.
 .El
 .Sh SEE ALSO
 .Xr chflags 1 ,



CVS commit: src/share/zoneinfo

2014-05-17 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat May 17 19:53:22 UTC 2014

Added Files:
src/share/zoneinfo: tzdata2netbsd

Log Message:
Add tzdata2netbsd, a script to help import new versions of tzdata.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/share/zoneinfo/tzdata2netbsd

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

Added files:

Index: src/share/zoneinfo/tzdata2netbsd
diff -u /dev/null src/share/zoneinfo/tzdata2netbsd:1.1
--- /dev/null	Sat May 17 19:53:22 2014
+++ src/share/zoneinfo/tzdata2netbsd	Sat May 17 19:53:22 2014
@@ -0,0 +1,204 @@
+# $NetBSD: tzdata2netbsd,v 1.1 2014/05/17 19:53:22 apb Exp $
+#
+# For use by NetBSD developers when updating to new versions of tzdata.
+#
+
+OLDVER=2013i
+NEWVER=2014c
+
+# Uppercase variants of OLDVER and NEWVER
+OLDVER_UC=$( echo ${OLDVER} | tr '[a-z]' '[A-Z]' )
+NEWVER_UC=$( echo ${NEWVER} | tr '[a-z]' '[A-Z]' )
+
+# Tags for use with version control systems
+CVSOLDTAG=TZDATA${OLDVER_UC}
+CVSNEWTAG=TZDATA${NEWVER_UC}
+CVSBRANCHTAG=TZDATA
+GITHUBTAG=${NEWVER}
+
+# URLs for fetching distribution files, etc.
+DISTURL=ftp://ftp.iana.org/tz/releases/tzdata${NEWVER}.tar.gz;
+SIGURL=${DISTURL}.asc
+NEWSURL=https://github.com/eggert/tz/raw/${GITHUBTAG}/NEWS;
+
+# Directories
+REPODIR=src/share/zoneinfo	# relative to the NetSBD CVS repository
+WORKDIR=$(pwd)/update-work
+EXTRACTDIR=${WORKDIR}/extract/${NEWVER}
+
+# Files in the work directory
+DISTFILE=${WORKDIR}/${DISTURL##*/}
+SIGFILE=${DISTFILE}.sig
+NEWSFILE=${WORKDIR}/NEWS
+NEWSTRIMFILE=${WORKDIR}/NEWS.trimmed
+IMPORTMSGFILE=${WORKDIR}/import.msg
+MERGSMSGFILE=${WORKDIR}/merge.msg
+
+DOIT()
+{
+	really_do_it=false
+
+	if $really_do_it; then
+		$@
+	else
+		echo NOT REALLY DOING: $@
+	fi
+}
+
+mkworkdir()
+{
+	mkdir -p ${WORKDIR}
+}
+
+fetch()
+{
+	[ -f ${DISTFILE} ] || ftp -o ${DISTFILE} ${DISTURL}
+	[ -f ${SIGFILE} ] || ftp -o ${SIGFILE} ${SIGURL}
+	[ -f ${NEWSFILE} ] || ftp -o ${NEWSFILE} ${NEWSURL}
+}
+
+checksig()
+{
+	gpg --verify ${SIGFILE} ${DISTFILE}
+}
+
+extract()
+{
+	mkdir -p ${EXTRACTDIR}
+	tar -z -xf ${DISTFILE} -C ${EXTRACTDIR}
+}
+
+# Each release has a heading in the NEWS file, like
+# Release version - date.
+# Find the relevant part of the NEWS file for all release between
+# OLDVAR and NEWVER, and save them to NEWSTRIMFILE.
+#
+trimnews()
+{
+	awk -v oldver=${OLDVER} -v newver=${NEWVER} \
+	'
+		BEGIN {inrange = 0}
+		/^Release [0-9]+[a-z]+ - .*/ {
+			inrange = ($2  oldver  $2 = newver)
+		}
+		// { if (inrange) print; }
+		' \
+		${NEWSFILE} ${NEWSTRIMFILE}
+}
+
+# Create IMPORTMSGFILE from NEWSTRIMFILE, by ignoring some sections,
+# keeping only the first sentence from paragraphs in other sections,
+# and changing the format.  The result should be edited by hand before
+# performing a cvs commit.
+#
+mkimportmsg()
+{
+	[ -s ${IMPORTMSGFILE} ]  return
+	awk -v oldver=${OLDVER} -v newver=${NEWVER} \
+	-v disturl=${DISTURL} \
+	'
+		BEGIN {
+			bullet =   * ;
+			indent = ;
+			blankline = 0;
+			goodsection = 0;
+			havesentence = 0;
+			print Import tzdatanewver from disturl;
+		}
+		/^Release/ {
+			ver = $2;
+			date = gensub(.* - , , 1, $0);
+			print ;
+			print Summary of changes in tzdataver \
+ (date):;
+		}
+		/^$/ { blankline = 1; havesentence = 0; }
+		/^  Changes affecting/ { goodsection = 0; }
+		/^  Changes affecting.*time/ { goodsection = 1; }
+		/^  Changes affecting.*documentation/ || \
+		/^  Changes affecting.*commentary/ {
+			t = gensub(^ *, , 1, $0);
+			t = gensub(\\.*$, ., 1, t);
+			print bullet t;
+			goodsection = 0;
+		}
+		/^.*/  goodsection {
+			# In a paragraph in a good section.
+			# Ignore leading spaces, and ignore anything
+			# after the first sentence.
+			# First line of paragraph gets a bullet.
+			t = gensub(^ *, , 1, $0);
+			t = gensub(\\. .*, ., 1, t);
+			if (blankline) print bullet t;
+			else if (! havesentence) print indent t;
+			havesentence = (havesentence || (t ~ \\.$));
+		}
+		/./ { blankline = 0; }
+		' \
+		${NEWSTRIMFILE} ${IMPORTMSGFILE}
+}
+
+editimportmsg()
+{
+	cat EOF
+Edit ${IMPORTMSGFILE##%/}, which will be used as a log message
+for cvs import.  A template has been prepared from the NEWS file.
+EOF
+	vi ${IMPORTMSGFILE} ${NEWSFILE}
+}
+
+cvsimport()
+{
+	DOIT cvs import -F ${IMPORTMSGFILE} \
+		${REPODIR} ${CVSBRANCHTAG} ${CVSNEWTAG}
+}
+
+cvsmerge()
+{
+	DOIT cvs update -j${CVSOLDTAG} -j${CVSNEWTAG}
+}
+
+resolveconflicts()
+{
+	cat EOF
+Resolve conflicts resulting from the cvs merge.
+exit 0 when done.  exit 1 to abort.
+EOF
+	nl='
+'
+	PS1=[inside ${0##*/}]${nl}${PS1} sh -i
+}
+
+cvscommitmerge()
+{
+	DOIT cvs commit -m Merge tzdata${NEWVER}
+}
+
+extra()
+{
+	cat EOF
+Also do the following:
+ * Edit src/doc/3RDPARTY
+ * Edit src/doc/CHANGES
+ * Submit pullup requests for all active release branches.
+ * rm -rf ${WORKDIR}
+EOF
+}
+
+main()
+{
+	mkworkdir || exit $?
+	fetch || exit $?
+	checksig || 

CVS commit: src/doc

2014-05-16 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri May 16 06:23:58 UTC 2014

Modified Files:
src/doc: 3RDPARTY

Log Message:
tzdata has been updated to 2014c


To generate a diff of this commit:
cvs rdiff -u -r1.1110 -r1. src/doc/3RDPARTY

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.1110 src/doc/3RDPARTY:1.
--- src/doc/3RDPARTY:1.1110	Tue May 13 16:34:36 2014
+++ src/doc/3RDPARTY	Fri May 16 06:23:58 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1110 2014/05/13 16:34:36 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1. 2014/05/16 06:23:58 apb Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1271,7 +1271,7 @@ Notes:
 Added changes from a5 - a12 manually.
 
 Package:	tz
-Version:	tzcode2014c / tzdata2013i
+Version:	tzcode2014c / tzdata2014c
 Current Vers:	tzcode2014c / tzdata2014c
 Maintainer:	Paul Eggert egg...@cs.ucla.edu
 Archive Site:	ftp://ftp.iana.org/tz/releases/



CVS commit: src/doc

2014-05-16 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri May 16 06:25:22 UTC 2014

Modified Files:
src/doc: CHANGES

Log Message:
zoneinfo: Import tzdata2014c. [apb 20140515]


To generate a diff of this commit:
cvs rdiff -u -r1.1924 -r1.1925 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/CHANGES
diff -u src/doc/CHANGES:1.1924 src/doc/CHANGES:1.1925
--- src/doc/CHANGES:1.1924	Tue May 13 16:35:02 2014
+++ src/doc/CHANGES	Fri May 16 06:25:22 2014
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1924 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1925 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -416,3 +416,4 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	kerberos(8): Update to latest Heimdal-1-5-branch.
 		[pettai 20140424]
 	libc: Update to tzcode2014c. [christos 20140513]
+	zoneinfo: Import tzdata2014c. [apb 20140515]



CVS import: src/share/zoneinfo

2014-05-15 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu May 15 15:42:14 UTC 2014

Update of /cvsroot/src/share/zoneinfo
In directory ivanova.netbsd.org:/tmp/cvs-serv23892

Log Message:
Import tzdata2014c from ftp://ftp.iana.org/tz/releases/tzcode2014c.tar.gz

Changes from tzdata2013i to tzdata2014a:

 Turkey begins DST on 2014-03-31, not 03-30.

 Fiji ended DST on 2014-01-19 at 02:00, not 03:00.

 Ukraine switched from Moscow to Eastern European time on 1990-07-01
 (not 1992-01-01), and observed DST during the entire next winter.

 In 1988 Israel observed DST from 04-10 to 09-04, not 04-09 to
 09-03.

 Also some changes affecting commentary and documentation

Changes from tzdata2014a to tzdata2014b:

 Crimea switches to Moscow time on 2014-03-30 at 02:00 local time.

 New entry for Troll station, Antarctica.

 Also some changes affecting commentary and documentation

Changes from tzdata2014b to tzdata2014c:

 Egypt observes DST starting 2014-05-15 at 24:00.
 Guess that DST will stop during the same Ramadan dates as Morocco,
 and make some other guesses.

 Also some changes affecting commentary and documentation

Status:

Vendor Tag: TZDATA
Release Tags:   TZDATA2014C

U src/share/zoneinfo/antarctica
C src/share/zoneinfo/Makefile
U src/share/zoneinfo/README
U src/share/zoneinfo/africa
C src/share/zoneinfo/australasia
U src/share/zoneinfo/asia
U src/share/zoneinfo/northamerica
U src/share/zoneinfo/europe
U src/share/zoneinfo/leapseconds.awk
U src/share/zoneinfo/southamerica
U src/share/zoneinfo/pacificnew
U src/share/zoneinfo/etcetera
U src/share/zoneinfo/backward
U src/share/zoneinfo/systemv
U src/share/zoneinfo/factory
U src/share/zoneinfo/iso3166.tab
U src/share/zoneinfo/zone.tab
U src/share/zoneinfo/leapseconds
U src/share/zoneinfo/leap-seconds.list
U src/share/zoneinfo/yearistype.sh

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

cvs checkout -jTZDATA:yesterday -jTZDATA src/share/zoneinfo



CVS commit: src/share/zoneinfo

2014-05-15 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu May 15 16:01:18 UTC 2014

Modified Files:
src/share/zoneinfo: australasia

Log Message:
Merge tzdata2014c.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/share/zoneinfo/australasia

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

Modified files:

Index: src/share/zoneinfo/australasia
diff -u src/share/zoneinfo/australasia:1.34 src/share/zoneinfo/australasia:1.35
--- src/share/zoneinfo/australasia:1.34	Thu Dec 26 17:09:39 2013
+++ src/share/zoneinfo/australasia	Thu May 15 16:01:18 2014
@@ -354,16 +354,18 @@ Zone	Indian/Cocos	6:27:40	-	LMT	1900
 # http://www.fiji.gov.fj/index.php?option=com_contentview=articleid=6702catid=71Itemid=155
 
 # From the Fijian Government Media Center (2013-08-30) via David Wheeler:
-# Fiji will start daylight savings on Sunday 27th October, 2013 and end at 3am
-# on Sunday 19th January, 2014  move clocks forward by one hour from 2am
+# Fiji will start daylight savings on Sunday 27th October, 2013 ...
+# move clocks forward by one hour from 2am
 # http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVING-STARTS-ON-SUNDAY,-27th-OCTOBER-201.aspx
-#
-# From Paul Eggert (2013-09-09):
+
+# From Steffen Thorsen (2013-01-10):
+# Fiji will end DST on 2014-01-19 02:00:
+# http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVINGS-TO-END-THIS-MONTH-%281%29.aspx
+
+# From Paul Eggert (2014-01-10):
 # For now, guess that Fiji springs forward the Sunday before the fourth
-# Monday in October.  This matches both recent practice and
-# timeanddate.com's current spring-forward prediction.
-# For the January 2014 transition we guessed right while timeanddate.com
-# guessed wrong, so leave the fall-back prediction alone.
+# Monday in October, and springs back the penultimate Sunday in January.
+# This is ad hoc, but matches recent practice.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Fiji	1998	1999	-	Nov	Sun=1	2:00	1:00	S
@@ -372,7 +374,8 @@ Rule	Fiji	2009	only	-	Nov	29	2:00	1:00	S
 Rule	Fiji	2010	only	-	Mar	lastSun	3:00	0	-
 Rule	Fiji	2010	max	-	Oct	Sun=21	2:00	1:00	S
 Rule	Fiji	2011	only	-	Mar	Sun=1	3:00	0	-
-Rule	Fiji	2012	max	-	Jan	Sun=18	3:00	0	-
+Rule	Fiji	2012	2013	-	Jan	Sun=18	3:00	0	-
+Rule	Fiji	2014	max	-	Jan	Sun=18	2:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fiji	11:55:44 -	LMT	1915 Oct 26	# Suva
 			12:00	Fiji	FJ%sT	# Fiji Time
@@ -760,14 +763,29 @@ Zone Pacific/Funafuti	11:56:52 -	LMT	190
 
 # Johnston
 #
-# From Paul Eggert (2013-09-03):
+# From Paul Eggert (2014-03-11):
+# Sometimes Johnston kept Hawaii time, and sometimes it was an hour behind.
+# Details are uncertain.  We have no data for Johnston after 1970, so
+# treat it like Hawaii for now.
+#
 # In his memoirs of June 6th to October 4, 1945
 # http://www.315bw.org/Herb_Bach.htm (2005), Herbert C. Bach writes,
 # We started our letdown to Kwajalein Atoll and landed there at 5:00 AM
 # Johnston time, 1:30 AM Kwajalein time.  This was in June 1945, and
 # confirms that Johnston kept the same time as Honolulu in summer 1945.
-# We have no better information, so for now, assume this has been true
-# indefinitely into the past.
+#
+# From Lyle McElhaney (2014-03-11):
+# [W]hen JI was being used for that [atomic bomb] testing, the time being used
+# was not Hawaiian time but rather the same time being used on the ships,
+# which had a GMT offset of -11 hours.  This apparently applied to at least the
+# time from Operation Newsreel (Hardtack I/Teak shot, 1958-08-01) to the last
+# Operation Fishbowl shot (Tightrope, 1962-11-04) [See] Herman Hoerlin,
+# The United States High-Altitude Test Experience: A Review Emphasizing the
+# Impact on the Environment, Los Alamos LA-6405, Oct 1976
+# http://www.fas.org/sgp/othergov/doe/lanl/docs1/00322994.pdf.
+# See the table on page 4 where he lists GMT and local times for the tests; a
+# footnote for the JI tests reads that local time is JI time = Hawaii Time
+# Minus One Hour.
 #
 # See 'northamerica' for Pacific/Johnston.
 



CVS commit: src/distrib/sets/lists/base

2014-05-15 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu May 15 16:06:38 UTC 2014

Modified Files:
src/distrib/sets/lists/base: mi

Log Message:
Add ./usr/share/zoneinfo/Antarctica/Troll for tzdat2014c


To generate a diff of this commit:
cvs rdiff -u -r1.1066 -r1.1067 src/distrib/sets/lists/base/mi

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

Modified files:

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.1066 src/distrib/sets/lists/base/mi:1.1067
--- src/distrib/sets/lists/base/mi:1.1066	Tue Apr 15 22:09:27 2014
+++ src/distrib/sets/lists/base/mi	Thu May 15 16:06:38 2014
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1066 2014/04/15 22:09:27 ginsbach Exp $
+# $NetBSD: mi,v 1.1067 2014/05/15 16:06:38 apb Exp $
 #
 # Note:	Don't delete entries from here - mark them as obsolete instead,
 #	unless otherwise stated below.
@@ -5032,6 +5032,7 @@
 ./usr/share/zoneinfo/Antarctica/Rothera		base-sys-share		share
 ./usr/share/zoneinfo/Antarctica/South_Pole	base-sys-share		share
 ./usr/share/zoneinfo/Antarctica/Syowa		base-sys-share		share
+./usr/share/zoneinfo/Antarctica/Troll		base-sys-share		share
 ./usr/share/zoneinfo/Antarctica/Vostok		base-sys-share		share
 ./usr/share/zoneinfo/Arctic			base-sys-share
 ./usr/share/zoneinfo/Arctic/Longyearbyen	base-sys-share		share



CVS commit: src/distrib/sets

2014-05-15 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu May 15 16:32:07 UTC 2014

Modified Files:
src/distrib/sets: Makefile

Log Message:
Teach make sortlists to ignore .#* files (sometimes created by cvs),
and to squeeze multiple blank lines.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/distrib/sets/Makefile

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

Modified files:

Index: src/distrib/sets/Makefile
diff -u src/distrib/sets/Makefile:1.94 src/distrib/sets/Makefile:1.95
--- src/distrib/sets/Makefile:1.94	Mon Jan 27 21:37:17 2014
+++ src/distrib/sets/Makefile	Thu May 15 16:32:07 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.94 2014/01/27 21:37:17 apb Exp $
+#	$NetBSD: Makefile,v 1.95 2014/05/15 16:32:07 apb Exp $
 
 # Experimental RCS METALOG versioning
 # (Needs host's rcs(1) commands)
@@ -306,12 +306,13 @@ makedeps: .PHONY
 
 # Sort the lists files
 sortlists: .PHONY
-	find ${.CURDIR}/lists \! \( -name CVS -prune \) -type f -print \
+	find ${.CURDIR}/lists \! \( -name CVS -prune \) \! -name .#\* \
+	-type f -print \
 	| while read f ; do \
 	${_MKSHMSG} sorting $${f#${.CURDIR}/} ; \
 	{ grep '^#' $$f ; \
 	  grep -v '^#' $$f | sort ; \
-	} $$f.tmp; \
+	} | cat -s $$f.tmp; \
 	if cmp $$f $$f.tmp /dev/null; then \
 	  : $$f is unchanged ; \
 	  rm $$f.tmp ; \



CVS commit: src/distrib/sets/lists

2014-05-15 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu May 15 16:32:28 UTC 2014

Modified Files:
src/distrib/sets/lists/base: ad.arm ad.mips ad.powerpc md.amd64
md.sparc64 shl.mi
src/distrib/sets/lists/comp: ad.mips ad.powerpc md.amd64
md.playstation2 md.sparc64 mi
src/distrib/sets/lists/debug: ad.powerpc md.amd64 shl.mi
src/distrib/sets/lists/man: mi
src/distrib/sets/lists/modules: md.evbppc.powerpc mi
src/distrib/sets/lists/tests: mi
src/distrib/sets/lists/xbase: mi
src/distrib/sets/lists/xcomp: md.amd64 md.i386 mi

Log Message:
sort


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/distrib/sets/lists/base/ad.arm
cvs rdiff -u -r1.37 -r1.38 src/distrib/sets/lists/base/ad.mips
cvs rdiff -u -r1.6 -r1.7 src/distrib/sets/lists/base/ad.powerpc
cvs rdiff -u -r1.231 -r1.232 src/distrib/sets/lists/base/md.amd64
cvs rdiff -u -r1.218 -r1.219 src/distrib/sets/lists/base/md.sparc64
cvs rdiff -u -r1.700 -r1.701 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.47 -r1.48 src/distrib/sets/lists/comp/ad.mips
cvs rdiff -u -r1.66 -r1.67 src/distrib/sets/lists/comp/ad.powerpc
cvs rdiff -u -r1.218 -r1.219 src/distrib/sets/lists/comp/md.amd64
cvs rdiff -u -r1.12 -r1.13 src/distrib/sets/lists/comp/md.playstation2
cvs rdiff -u -r1.183 -r1.184 src/distrib/sets/lists/comp/md.sparc64
cvs rdiff -u -r1.1891 -r1.1892 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.6 -r1.7 src/distrib/sets/lists/debug/ad.powerpc
cvs rdiff -u -r1.50 -r1.51 src/distrib/sets/lists/debug/md.amd64
cvs rdiff -u -r1.60 -r1.61 src/distrib/sets/lists/debug/shl.mi
cvs rdiff -u -r1.1472 -r1.1473 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.1 -r1.2 src/distrib/sets/lists/modules/md.evbppc.powerpc
cvs rdiff -u -r1.67 -r1.68 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.568 -r1.569 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.121 -r1.122 src/distrib/sets/lists/xbase/mi
cvs rdiff -u -r1.37 -r1.38 src/distrib/sets/lists/xcomp/md.amd64
cvs rdiff -u -r1.44 -r1.45 src/distrib/sets/lists/xcomp/md.i386
cvs rdiff -u -r1.151 -r1.152 src/distrib/sets/lists/xcomp/mi

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

Modified files:

Index: src/distrib/sets/lists/base/ad.arm
diff -u src/distrib/sets/lists/base/ad.arm:1.41 src/distrib/sets/lists/base/ad.arm:1.42
--- src/distrib/sets/lists/base/ad.arm:1.41	Fri Mar 21 17:00:18 2014
+++ src/distrib/sets/lists/base/ad.arm	Thu May 15 16:32:28 2014
@@ -1,4 +1,4 @@
-# $NetBSD: ad.arm,v 1.41 2014/03/21 17:00:18 christos Exp $
+# $NetBSD: ad.arm,v 1.42 2014/05/15 16:32:28 apb Exp $
 ./lib/oabi	base-compat-shlib	compat
 ./lib/oabi/npf	base-npf-shlib		compat
 ./lib/oabi/npf/ext_log.so			base-npf-shlib		compat,pic
@@ -146,8 +146,8 @@
 ./usr/lib/oabi/libgnumalloc.so.1		base-compat-shlib	compat,pic
 ./usr/lib/oabi/libgnumalloc.so.1.0		base-compat-shlib	compat,pic
 ./usr/lib/oabi/libgomp.so.1			base-compat-shlib	compat,pic,gcc=45
-./usr/lib/oabi/libgomp.so.1.0			base-compat-shlib	compat,pic,gcc=45
 ./usr/lib/oabi/libgomp.so.1			base-compat-shlib	compat,pic,gcc=48
+./usr/lib/oabi/libgomp.so.1.0			base-compat-shlib	compat,pic,gcc=45
 ./usr/lib/oabi/libgomp.so.1.1			base-compat-shlib	compat,pic,gcc=48
 ./usr/lib/oabi/libgssapi.so.10			base-compat-shlib	compat,pic,kerberos
 ./usr/lib/oabi/libgssapi.so.10.0		base-compat-shlib	compat,pic,kerberos
@@ -223,9 +223,9 @@
 ./usr/lib/oabi/libnpf.so.0.0			base-compat-shlib	compat,pic,npf
 ./usr/lib/oabi/libobjc.so.3			base-compat-shlib	compat,pic,gcccmds,gcc=4
 ./usr/lib/oabi/libobjc.so.3			base-compat-shlib	compat,pic,gcccmds,gcc=45
-./usr/lib/oabi/libobjc.so.4			base-compat-shlib	compat,pic,gcccmds,gcc=48
 ./usr/lib/oabi/libobjc.so.3.0			base-compat-shlib	compat,pic,gcccmds,gcc=4
 ./usr/lib/oabi/libobjc.so.3.0			base-compat-shlib	compat,pic,gcccmds,gcc=45
+./usr/lib/oabi/libobjc.so.4			base-compat-shlib	compat,pic,gcccmds,gcc=48
 ./usr/lib/oabi/libobjc.so.4.0			base-compat-shlib	compat,pic,gcccmds,gcc=48
 ./usr/lib/oabi/libopcodes.so.6			base-compat-shlib	compat,pic,binutils
 ./usr/lib/oabi/libopcodes.so.6.0		base-compat-shlib	compat,pic,binutils

Index: src/distrib/sets/lists/base/ad.mips
diff -u src/distrib/sets/lists/base/ad.mips:1.37 src/distrib/sets/lists/base/ad.mips:1.38
--- src/distrib/sets/lists/base/ad.mips:1.37	Fri Mar 21 17:00:18 2014
+++ src/distrib/sets/lists/base/ad.mips	Thu May 15 16:32:28 2014
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips,v 1.37 2014/03/21 17:00:18 christos Exp $
+# $NetBSD: ad.mips,v 1.38 2014/05/15 16:32:28 apb Exp $
 ./lib/64	base-compat-shlib	compat,arch64
 ./lib/64/npf	base-npf-shlib		compat,arch64
 ./lib/64/npf/ext_log.sobase-npf-shlib		compat,pic,arch64
@@ -146,8 +146,8 @@
 ./usr/lib/64/libgnumalloc.so.1			base-compat-shlib	compat,pic,arch64
 ./usr/lib/64/libgnumalloc.so.1.0		base-compat-shlib	compat,pic,arch64
 ./usr/lib/64/libgomp.so.1			base-compat-shlib	

CVS commit: src/etc

2014-04-09 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Wed Apr  9 12:38:09 UTC 2014

Modified Files:
src/etc: rc

Log Message:
Add comments about the intended use of each type of metadata message.


To generate a diff of this commit:
cvs rdiff -u -r1.166 -r1.167 src/etc/rc

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

Modified files:

Index: src/etc/rc
diff -u src/etc/rc:1.166 src/etc/rc:1.167
--- src/etc/rc:1.166	Thu Aug 11 22:52:47 2011
+++ src/etc/rc	Wed Apr  9 12:38:09 2014
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: rc,v 1.166 2011/08/11 22:52:47 apb Exp $
+# $NetBSD: rc,v 1.167 2014/04/09 12:38:09 apb Exp $
 #
 # rc --
 #	Run the scripts in /etc/rc.d with rcorder, and log output
@@ -277,16 +277,20 @@ rc_postprocess_metadata()
 
 	case $keyword in
 	start)
-		# $args contains a date/time
+		# Marks the start of the entire /etc/rc script.
+		# $args contains a date/time.
 		rc_log_message [$0 starting at $args]
 		if ! $rc_silent; then
 			printf %s\n $args
 		fi
 		;;
 	cmd-name)
+		# Marks the start of a child script (usually one of
+		# the /etc/rc.d/* scripts).
 		rc_log_message [running $1]
 		;;
 	cmd-status)
+		# Marks the end of a child script.
 		# $1 is a command name, $2 is the command's exit status.
 		# If the command failed, report it, and add it to a list.
 		if [ $2 != 0 ]; then
@@ -307,13 +311,21 @@ rc_postprocess_metadata()
 		;;
 	nop)
 		# Do nothing.
+		# This has the side effect of flushing partial lines,
+		# and the echo() and printf() functions in rc.subr take
+		# advantage of this.
 		;;
 	note)
+		# Unlike most metadata messages, which should be used
+		# only by /etc/rc and rc.subr, the note message may be
+		# used directly by /etc.rc.d/* and similar scripts.
+		# It adds a note to the log file, without displaying
+		# it to stdout.
 		rc_log_message [NOTE: $args]
 		;;
 	end)
-		#
-		# If any scripts (or other commands) failed, report them.
+		# Marks the end of processing, after the last child script.
+		# If any child scripts (or other commands) failed, report them.
 		#
 		if [ -n $rc_failures ]; then
 			rc_log_message [failures]
@@ -330,11 +342,15 @@ rc_postprocess_metadata()
 		printf %s\n $args
 		;;
 	exit)
+		# Marks an exit from the rc_real_work() function.
+		# This may be a normal or abnormal exit.
+		#
 		rc_log_message [$0 exiting with status $1]
 		exit $1
 		;;
 	interrupted)
-		# $args is a human-readable message
+		# Marks an interrupt trapped by the rc_real_work() function.
+		# $args is a human-readable message.
 		rc_log_message $args
 		printf %s\n $args
 		;;



CVS commit: src/etc

2014-04-09 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Wed Apr  9 12:45:05 UTC 2014

Modified Files:
src/etc: rc

Log Message:
Send a nop metadata message to the postprocessor every few seconds,
to flush partial output lines.  This should help with PR 48714.


To generate a diff of this commit:
cvs rdiff -u -r1.167 -r1.168 src/etc/rc

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

Modified files:

Index: src/etc/rc
diff -u src/etc/rc:1.167 src/etc/rc:1.168
--- src/etc/rc:1.167	Wed Apr  9 12:38:09 2014
+++ src/etc/rc	Wed Apr  9 12:45:05 2014
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: rc,v 1.167 2014/04/09 12:38:09 apb Exp $
+# $NetBSD: rc,v 1.168 2014/04/09 12:45:05 apb Exp $
 #
 # rc --
 #	Run the scripts in /etc/rc.d with rcorder, and log output
@@ -119,6 +119,20 @@ rc_real_work()
 	kill -0 $RC_PID /dev/null 21 || RC_PID=$$
 
 	#
+	# As long as process $RC_PID is still running, send a nop
+	# metadata message to the postprocessor every few seconds.
+	# This should help flush partial lines that may appear when
+	# rc.d scripts that are NOT marked with KEYWORD: interactive
+	# nevertheless attempt to print prompts and wait for input.
+	#
+	(
+	while kill -0 $RC_PID ; do
+		print_rc_metadata nop
+		sleep 3
+	done
+	) 
+
+	#
 	# Get a list of all rc.d scripts, and use rcorder to choose
 	# what order to execute them.
 	#



CVS commit: src/crypto/external/bsd/openssl

2014-04-07 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Mon Apr  7 17:40:49 UTC 2014

Modified Files:
src/crypto/external/bsd/openssl: pkgconfig.mk

Log Message:
Run the mkpc script using ${HOST_SH}


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/crypto/external/bsd/openssl/pkgconfig.mk

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

Modified files:

Index: src/crypto/external/bsd/openssl/pkgconfig.mk
diff -u src/crypto/external/bsd/openssl/pkgconfig.mk:1.4 src/crypto/external/bsd/openssl/pkgconfig.mk:1.5
--- src/crypto/external/bsd/openssl/pkgconfig.mk:1.4	Fri Feb  1 21:02:48 2013
+++ src/crypto/external/bsd/openssl/pkgconfig.mk	Mon Apr  7 17:40:49 2014
@@ -1,4 +1,6 @@
-# $NetBSD: pkgconfig.mk,v 1.4 2013/02/01 21:02:48 christos Exp $
+# $NetBSD: pkgconfig.mk,v 1.5 2014/04/07 17:40:49 apb Exp $
+
+.include bsd.own.mk
 
 FILESDIR=/usr/lib/pkgconfig
 .for pkg in ${PKGCONFIG}
@@ -6,5 +8,5 @@ FILES+=${pkg}.pc
 FILESBUILD_${pkg}.pc=yes
 
 ${pkg}.pc: ${.CURDIR}/../../mkpc
-	${.ALLSRC} ${OPENSSLSRC}/crypto ${.TARGET}  ${.TARGET}
+	${HOST_SH} ${.ALLSRC} ${OPENSSLSRC}/crypto ${.TARGET}  ${.TARGET}
 .endfor



CVS commit: src/doc

2014-04-05 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Apr  5 11:18:03 UTC 2014

Modified Files:
src/doc: 3RDPARTY

Log Message:
Add a Location line for all three versions of gcc.  Explain why both
gcc.old and gcc trees are expected to persist in the future.  Briefly
describe how to import a new version of gcc.old.


To generate a diff of this commit:
cvs rdiff -u -r1.1104 -r1.1105 src/doc/3RDPARTY

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.1104 src/doc/3RDPARTY:1.1105
--- src/doc/3RDPARTY:1.1104	Thu Apr  3 15:35:55 2014
+++ src/doc/3RDPARTY	Sat Apr  5 11:18:03 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1104 2014/04/03 15:35:55 wiz Exp $
+#	$NetBSD: 3RDPARTY,v 1.1105 2014/04/05 11:18:03 apb Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -376,9 +376,19 @@ Home Page:	http://www.gnu.org/software/g
 Mailing List:	gcc-b...@gnu.org
 Responsible:	thorpej, mrg
 License:	GPLv3, LGPLv3.1
+Location:	gnu/dist/gcc4
+Location:	external/gpl3/gcc.old/dist
 Location:	external/gpl3/gcc/dist
 Notes:
-before importing:
+As of April 2014, there are three versions of gcc in the NetBSD tree.
+In the long term, we expect that there will often be two versions,
+in the gcc and gcc.old directories.  Having two versions allows
+migration from one version of gcc to another to happen for one port
+at a time, instead of for all ports simultaneously.
+When importing a new version of external/gpl3/gcc.old:
+	- copy the current version of external/gpl3/gcc
+	- import it to a NETBSD vendor branch in externalgpl3/gcc.old
+Before importing a new version of external/gpl3/gcc:
 	- delete all .cvsignore and .gitignore files
 	- delete java ada fortran their libraries and testsuites
 	- delete libffi zlib boehm-gc 



CVS commit: src/sys/arch/m68k/m68k

2014-03-29 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Mar 29 11:34:13 UTC 2014

Modified Files:
src/sys/arch/m68k/m68k: procfs_machdep.c

Log Message:
procfs_getcpuinfstr's len argument contains the buffer size on entry,
and the number of bytes used on return.  Use the actual buffer size in a
snprintf call, instead of sizeof(*buf), which is always 1.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/m68k/m68k/procfs_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/m68k/m68k/procfs_machdep.c
diff -u src/sys/arch/m68k/m68k/procfs_machdep.c:1.5 src/sys/arch/m68k/m68k/procfs_machdep.c:1.6
--- src/sys/arch/m68k/m68k/procfs_machdep.c:1.5	Sat Jul 22 06:58:17 2006
+++ src/sys/arch/m68k/m68k/procfs_machdep.c	Sat Mar 29 11:34:13 2014
@@ -1,7 +1,7 @@
-/*	$NetBSD: procfs_machdep.c,v 1.5 2006/07/22 06:58:17 tsutsui Exp $ */
+/*	$NetBSD: procfs_machdep.c,v 1.6 2014/03/29 11:34:13 apb Exp $ */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: procfs_machdep.c,v 1.5 2006/07/22 06:58:17 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: procfs_machdep.c,v 1.6 2014/03/29 11:34:13 apb Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -19,8 +19,7 @@ int
 procfs_getcpuinfstr(char *buf, int *len)
 {
 	const char *cpu, *mmu, *fpu;
-
-	*len = 0;
+	int maxlen = *len;
 
 	switch (cputype) {
 	case CPU_68020:
@@ -79,7 +78,7 @@ procfs_getcpuinfstr(char *buf, int *len)
 		break;
 	}
 
-	*len = snprintf(buf, sizeof(buf),
+	*len = snprintf(buf, maxlen,
 	/* as seen in Linux 2.4.27 */
 	CPU:\t\t%s\n
 	MMU:\t\t%s\n



CVS commit: src/usr.sbin/bootp/bootpd

2014-03-29 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Mar 29 18:23:00 UTC 2014

Modified Files:
src/usr.sbin/bootp/bootpd: bootpd.c

Log Message:
sizeof(pointer) is not a good buffer length to pass to strlcat.
Introduce a new variable, clntpathmaxlen, to hold the correct
buffer length, and pass that to strlcat.

The incorrect buffer length would have caused filename.hostname
lookups to fail.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/usr.sbin/bootp/bootpd/bootpd.c

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

Modified files:

Index: src/usr.sbin/bootp/bootpd/bootpd.c
diff -u src/usr.sbin/bootp/bootpd/bootpd.c:1.24 src/usr.sbin/bootp/bootpd/bootpd.c:1.25
--- src/usr.sbin/bootp/bootpd/bootpd.c:1.24	Mon Aug 29 20:38:54 2011
+++ src/usr.sbin/bootp/bootpd/bootpd.c	Sat Mar 29 18:23:00 2014
@@ -22,7 +22,7 @@ SOFTWARE.
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: bootpd.c,v 1.24 2011/08/29 20:38:54 joerg Exp $);
+__RCSID($NetBSD: bootpd.c,v 1.25 2014/03/29 18:23:00 apb Exp $);
 #endif
 
 /*
@@ -599,6 +599,7 @@ handle_request(void)
 	int32 dest;
 	char lrealpath[1024];
 	char *clntpath;
+	size_t clntpathmaxlen;
 	char *homedir, *bootfile;
 	int n;
 
@@ -811,9 +812,11 @@ HW addr type is IEEE 802.  convert to %s
 	if (hp-flags.tftpdir) {
 		strlcpy(lrealpath, hp-tftpdir-string, sizeof(lrealpath));
 		clntpath = lrealpath[strlen(lrealpath)];
+		clntpathmaxlen = sizeof(lrealpath) + lrealpath - clntpath;
 	} else {
 		lrealpath[0] = '\0';
 		clntpath = lrealpath;
+		clntpathmaxlen = sizeof(lrealpath)
 	}
 
 	/*
@@ -883,8 +886,8 @@ HW addr type is IEEE 802.  convert to %s
 	 * First try to find the file with a .host suffix
 	 */
 	n = strlen(clntpath);
-	strlcat(clntpath, ., sizeof(clntpath));
-	strlcat(clntpath, hp-hostname-string, sizeof(clntpath));
+	strlcat(clntpath, ., clntpathmaxlen);
+	strlcat(clntpath, hp-hostname-string, clntpathmaxlen);
 	if (chk_access(lrealpath, bootsize)  0) {
 		clntpath[n] = 0;			/* Try it without the suffix */
 		if (chk_access(lrealpath, bootsize)  0) {



CVS commit: src/usr.sbin/rpc.pcnfsd

2014-03-29 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Mar 29 18:54:37 UTC 2014

Modified Files:
src/usr.sbin/rpc.pcnfsd: extern.h pcnfsd_print.c pcnfsd_v2.c

Log Message:
Add a statuslen argument to get_pr_status(), and use it
as the length in a call to strlcpy().  The previous code would
have used the size of a pointer as the length.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/rpc.pcnfsd/extern.h
cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/rpc.pcnfsd/pcnfsd_print.c \
src/usr.sbin/rpc.pcnfsd/pcnfsd_v2.c

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

Modified files:

Index: src/usr.sbin/rpc.pcnfsd/extern.h
diff -u src/usr.sbin/rpc.pcnfsd/extern.h:1.2 src/usr.sbin/rpc.pcnfsd/extern.h:1.3
--- src/usr.sbin/rpc.pcnfsd/extern.h:1.2	Sat Apr 18 13:02:36 2009
+++ src/usr.sbin/rpc.pcnfsd/extern.h	Sat Mar 29 18:54:36 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: extern.h,v 1.2 2009/04/18 13:02:36 lukem Exp $	*/
+/*	$NetBSD: extern.h,v 1.3 2014/03/29 18:54:36 apb Exp $	*/
 
 extern	int		interrupted;
 extern	pr_list		printers;
@@ -19,7 +19,7 @@ void		free_pr_list_item __P((pr_list));
 void		free_pr_queue_item __P((pr_queue));
 struct passwd  *get_password __P((char *));
 pirstat		get_pr_status __P((printername, bool_t *, bool_t *, int *,
-		bool_t *, char *));
+		bool_t *, char *, size_t));
 void	   *grab __P((int));
 pcrstat		pr_cancel __P((char *, char *, char *));
 pirstat		pr_init __P((char *, char *, char **));

Index: src/usr.sbin/rpc.pcnfsd/pcnfsd_print.c
diff -u src/usr.sbin/rpc.pcnfsd/pcnfsd_print.c:1.12 src/usr.sbin/rpc.pcnfsd/pcnfsd_print.c:1.13
--- src/usr.sbin/rpc.pcnfsd/pcnfsd_print.c:1.12	Tue Aug 16 14:29:16 2011
+++ src/usr.sbin/rpc.pcnfsd/pcnfsd_print.c	Sat Mar 29 18:54:36 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcnfsd_print.c,v 1.12 2011/08/16 14:29:16 mbalmer Exp $	*/
+/*	$NetBSD: pcnfsd_print.c,v 1.13 2014/03/29 18:54:36 apb Exp $	*/
 
 /* RE_SID: @(%)/usr/dosnfs/shades_SCCS/unix/pcnfsd/v2/src/SCCS/s.pcnfsd_print.c 1.7 92/01/24 19:58:58 SMI */
 /*
@@ -904,13 +904,14 @@ free_pr_queue_item(curr)
 */
 
 pirstat
-get_pr_status(pn, avail, printing, qlen, needs_operator, status)
+get_pr_status(pn, avail, printing, qlen, needs_operator, status, statuslen)
 	printername pn;
 	bool_t *avail;
 	bool_t *printing;
 	int*qlen;
 	bool_t *needs_operator;
 	char   *status;
+	size_t statuslen;
 {
 	charbuff[256];
 	charcmd[64];
@@ -949,10 +950,10 @@ get_pr_status(pn, avail, printing, qlen,
 			if (!strstr(buff, disabled))
 *printing = TRUE;
 			if (strstr(buff, printing))
-strlcpy(status, printing, sizeof(status));
+strlcpy(status, printing, statuslen);
 			else
 if (strstr(buff, idle))
-	strlcpy(status, idle, sizeof(status));
+	strlcpy(status, idle, statuslen);
 			continue;
 		}
 		if (!strncmp(buff, UX:, 3)) {
@@ -968,13 +969,14 @@ get_pr_status(pn, avail, printing, qlen,
  * BSD way: lpc status
  */
 pirstat
-get_pr_status(pn, avail, printing, qlen, needs_operator, status)
+get_pr_status(pn, avail, printing, qlen, needs_operator, status, statuslen)
 	printername pn;
 	bool_t *avail;
 	bool_t *printing;
 	int*qlen;
 	bool_t *needs_operator;
 	char   *status;
+	size_t statuslen;
 {
 	charcmd[128];
 	charbuff[256];
@@ -1058,7 +1060,7 @@ get_pr_status(pn, avail, printing, qlen,
 			strstr(buff2, error) != NULL)
 *needs_operator = TRUE;
 			if (*needs_operator || strstr(buff2, waiting) != NULL)
-strlcpy(status, cp, sizeof(status));
+strlcpy(status, cp, statuslen);
 		}
 		pstat = PI_RES_OK;
 		break;
Index: src/usr.sbin/rpc.pcnfsd/pcnfsd_v2.c
diff -u src/usr.sbin/rpc.pcnfsd/pcnfsd_v2.c:1.12 src/usr.sbin/rpc.pcnfsd/pcnfsd_v2.c:1.13
--- src/usr.sbin/rpc.pcnfsd/pcnfsd_v2.c:1.12	Fri Oct  7 10:46:29 2011
+++ src/usr.sbin/rpc.pcnfsd/pcnfsd_v2.c	Sat Mar 29 18:54:36 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcnfsd_v2.c,v 1.12 2011/10/07 10:46:29 joerg Exp $	*/
+/*	$NetBSD: pcnfsd_v2.c,v 1.13 2014/03/29 18:54:36 apb Exp $	*/
 
 /* RE_SID: @(%)/usr/dosnfs/shades_SCCS/unix/pcnfsd/v2/src/SCCS/s.pcnfsd_v2.c 1.2 91/12/18 13:26:13 SMI */
 /*
@@ -238,7 +238,7 @@ pcnfsd2_pr_status_2_svc(arg, req)
 	static char status[128];
 
 	res.stat = get_pr_status(arg-pn, res.avail, res.printing,
-	res.qlen, res.needs_operator, status[0]);
+	res.qlen, res.needs_operator, status[0], sizeof(status));
 	res.status = status[0];
 	res.cm = no_comment[0];
 



CVS commit: src/doc

2014-03-28 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Mar 28 08:15:48 UTC 2014

Modified Files:
src/doc: 3RDPARTY

Log Message:
Add placeholder for osnet.


To generate a diff of this commit:
cvs rdiff -u -r1.1101 -r1.1102 src/doc/3RDPARTY

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.1101 src/doc/3RDPARTY:1.1102
--- src/doc/3RDPARTY:1.1101	Fri Mar 14 11:32:34 2014
+++ src/doc/3RDPARTY	Fri Mar 28 08:15:48 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1101 2014/03/14 11:32:34 roy Exp $
+#	$NetBSD: 3RDPARTY,v 1.1102 2014/03/28 08:15:48 apb Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1405,6 +1405,18 @@ License:	LGPL3
 Location:	external/lgpl3/gmp/dist
 Notes:
 
+Package:	osnet
+Version:	osnet-20100224
+Current Vers:	?
+Maintainer:	?
+Archive Site:	?
+Home Page:	?
+Mailing List:	?
+Responsible:	?
+License:	CDDL
+Location:	external/cddl/osnet
+Notes:
+
 Package:	sljit
 Version:	svn revision 186
 Current Vers:	svn revision 226



CVS commit: src/share/misc

2014-03-28 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Mar 28 10:16:28 UTC 2014

Modified Files:
src/share/misc: airport

Log Message:
+ICN:Incheon, South Korea
Also fix spelling of Incheon in the entry for JCN


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/share/misc/airport

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

Modified files:

Index: src/share/misc/airport
diff -u src/share/misc/airport:1.51 src/share/misc/airport:1.52
--- src/share/misc/airport:1.51	Thu Apr 25 13:34:10 2013
+++ src/share/misc/airport	Fri Mar 28 10:16:28 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: airport,v 1.51 2013/04/25 13:34:10 mbalmer Exp $
+#	$NetBSD: airport,v 1.52 2014/03/28 10:16:28 apb Exp $
 #	@(#)airport	8.1 (Berkeley) 6/8/93
 #
 # Some of this information is from http://www.mapping.com/airportcodes.html.
@@ -3143,6 +3143,7 @@ ICA:Icabaru, Venezuela
 ICI:Cicia, Fiji
 ICK:Nieuw Nickerie (New Nickerie), Suriname
 ICL:Clarinda (Schenck Field), IA, USA
+ICN:Incheon, South Korea
 ICR:Nicaro, Cuba
 ICT:Wichita Mid-Continent, Kansas, USA
 ICY:Icy Bay Airport, AK, USA
@@ -3404,7 +3405,7 @@ JCI:Kansas City (Johnson County Airport)
 JCJ:Cheju, South Korea
 JCK:Julia Creek, Queensland, Australia
 JCM:Jacobina, BA, Brazil
-JCN:Inchon (Heliport), South Korea
+JCN:Incheon (Heliport), South Korea
 JCR:Jacareacanga, PR, Brazil
 JCT:Junction (Kimble County Airport), TX, USA
 JCX:Los Angeles (Citicorp Heliport), CA, USA



CVS commit: src/games/hunt/huntd

2014-03-28 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Mar 28 17:49:11 UTC 2014

Modified Files:
src/games/hunt/huntd: get_names.c

Log Message:
If you are going to use memcpy instead of struct assignment, then at
least use sizeof(the correct variable).  The use of memcmp to test
two pointers for equality, one line earlier, is also weird but may be
correct.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/games/hunt/huntd/get_names.c

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

Modified files:

Index: src/games/hunt/huntd/get_names.c
diff -u src/games/hunt/huntd/get_names.c:1.10 src/games/hunt/huntd/get_names.c:1.11
--- src/games/hunt/huntd/get_names.c:1.10	Sat Jul  4 04:29:55 2009
+++ src/games/hunt/huntd/get_names.c	Fri Mar 28 17:49:11 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: get_names.c,v 1.10 2009/07/04 04:29:55 dholland Exp $	*/
+/*	$NetBSD: get_names.c,v 1.11 2014/03/28 17:49:11 apb Exp $	*/
 /*
  * Copyright (c) 1983-2003, Regents of the University of California.
  * All rights reserved.
@@ -32,7 +32,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: get_names.c,v 1.10 2009/07/04 04:29:55 dholland Exp $);
+__RCSID($NetBSD: get_names.c,v 1.11 2014/03/28 17:49:11 apb Exp $);
 #endif /* not lint */
 
 #include bsd.h
@@ -146,7 +146,7 @@ get_remote_name(char *his_address)
 	if (memcmp(his_machine_name, my_machine_name,
 		sizeof(his_machine_name)) == 0)
 		memcpy(his_machine_addr, my_machine_addr,
-		sizeof(his_machine_name));
+		sizeof(his_machine_addr));
 	else {
 		/* look up the address of the recipient's machine */
 		hp = gethostbyname(his_machine_name);



CVS commit: src/games/sail

2014-03-28 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Mar 28 17:53:47 UTC 2014

Modified Files:
src/games/sail: dr_2.c

Log Message:
temp is a pointer, and tempmax, not sizeof(temp), is the length of
the buffer that it points to.  Adjust a strlcat() call to suit.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/games/sail/dr_2.c

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

Modified files:

Index: src/games/sail/dr_2.c
diff -u src/games/sail/dr_2.c:1.25 src/games/sail/dr_2.c:1.26
--- src/games/sail/dr_2.c:1.25	Sat Mar 14 22:52:52 2009
+++ src/games/sail/dr_2.c	Fri Mar 28 17:53:47 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: dr_2.c,v 1.25 2009/03/14 22:52:52 dholland Exp $	*/
+/*	$NetBSD: dr_2.c,v 1.26 2014/03/28 17:53:47 apb Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)dr_2.c	8.1 (Berkeley) 5/31/93;
 #else
-__RCSID($NetBSD: dr_2.c,v 1.25 2009/03/14 22:52:52 dholland Exp $);
+__RCSID($NetBSD: dr_2.c,v 1.26 2014/03/28 17:53:47 apb Exp $);
 #endif
 #endif /* not lint */
 
@@ -286,7 +286,7 @@ try(struct ship *f, struct ship *t,
 	}
 	if ((ma  0  ta  0  (n = str_end(temp)) != 'l'  n != 'r') ||
 	!strlen(temp)) {
-		strlcat(temp, l, sizeof(temp));
+		strlcat(temp, l, tempmax);
 		new = score(f, t, temp, tempmax, rakeme);
 		if (new  *high  (!rakeme ||
 (gunsbear(f, t)  !gunsbear(t, f {



CVS commit: src/sbin/shutdown

2014-03-28 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Mar 28 18:27:14 UTC 2014

Modified Files:
src/sbin/shutdown: shutdown.c

Log Message:
When the third arg to fwrite() is a size in bytes, then the second arg
should be 1.  sizeof(*mbuf) happens to equal 1, but it's better not
to rely on that.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sbin/shutdown/shutdown.c

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

Modified files:

Index: src/sbin/shutdown/shutdown.c
diff -u src/sbin/shutdown/shutdown.c:1.55 src/sbin/shutdown/shutdown.c:1.56
--- src/sbin/shutdown/shutdown.c:1.55	Sat Aug 27 18:54:39 2011
+++ src/sbin/shutdown/shutdown.c	Fri Mar 28 18:27:14 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: shutdown.c,v 1.55 2011/08/27 18:54:39 joerg Exp $	*/
+/*	$NetBSD: shutdown.c,v 1.56 2014/03/28 18:27:14 apb Exp $	*/
 
 /*
  * Copyright (c) 1988, 1990, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1988, 19
 #if 0
 static char sccsid[] = @(#)shutdown.c	8.4 (Berkeley) 4/28/95;
 #else
-__RCSID($NetBSD: shutdown.c,v 1.55 2011/08/27 18:54:39 joerg Exp $);
+__RCSID($NetBSD: shutdown.c,v 1.56 2014/03/28 18:27:14 apb Exp $);
 #endif
 #endif /* not lint */
 
@@ -331,7 +331,7 @@ timewarn(time_t timeleft)
 		(void)fprintf(pf, System going down IMMEDIATELY\n\n);
 
 	if (mbuflen)
-		(void)fwrite(mbuf, sizeof(*mbuf), mbuflen, pf);
+		(void)fwrite(mbuf, 1, mbuflen, pf);
 
 	/*
 	 * play some games, just in case wall doesn't come back



CVS commit: src/crypto/external/bsd/heimdal/dist/lib

2014-03-27 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu Mar 27 16:10:46 UTC 2014

Modified Files:
src/crypto/external/bsd/heimdal/dist/lib/hcrypto: engine.c md2.c
src/crypto/external/bsd/heimdal/dist/lib/kadm5: ad.c
src/crypto/external/bsd/heimdal/dist/lib/krb5: test_pknistkdf.c

Log Message:
Fix sizeof errors in memset calls in heimdal.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/heimdal/dist/lib/hcrypto/engine.c \
src/crypto/external/bsd/heimdal/dist/lib/hcrypto/md2.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/heimdal/dist/lib/kadm5/ad.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/heimdal/dist/lib/krb5/test_pknistkdf.c

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

Modified files:

Index: src/crypto/external/bsd/heimdal/dist/lib/hcrypto/engine.c
diff -u src/crypto/external/bsd/heimdal/dist/lib/hcrypto/engine.c:1.1.1.1 src/crypto/external/bsd/heimdal/dist/lib/hcrypto/engine.c:1.2
--- src/crypto/external/bsd/heimdal/dist/lib/hcrypto/engine.c:1.1.1.1	Wed Apr 13 18:14:49 2011
+++ src/crypto/external/bsd/heimdal/dist/lib/hcrypto/engine.c	Thu Mar 27 16:10:45 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: engine.c,v 1.1.1.1 2011/04/13 18:14:49 elric Exp $	*/
+/*	$NetBSD: engine.c,v 1.2 2014/03/27 16:10:45 apb Exp $	*/
 
 /*
  * Copyright (c) 2006 Kungliga Tekniska Högskolan
@@ -90,7 +90,7 @@ ENGINE_finish(ENGINE *engine)
 if(engine-destroy)
 	(*engine-destroy)(engine);
 
-memset(engine, 0, sizeof(engine));
+memset(engine, 0, sizeof(*engine));
 engine-references = -1;
 
 
Index: src/crypto/external/bsd/heimdal/dist/lib/hcrypto/md2.c
diff -u src/crypto/external/bsd/heimdal/dist/lib/hcrypto/md2.c:1.1.1.1 src/crypto/external/bsd/heimdal/dist/lib/hcrypto/md2.c:1.2
--- src/crypto/external/bsd/heimdal/dist/lib/hcrypto/md2.c:1.1.1.1	Wed Apr 13 18:14:50 2011
+++ src/crypto/external/bsd/heimdal/dist/lib/hcrypto/md2.c	Thu Mar 27 16:10:45 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: md2.c,v 1.1.1.1 2011/04/13 18:14:50 elric Exp $	*/
+/*	$NetBSD: md2.c,v 1.2 2014/03/27 16:10:45 apb Exp $	*/
 
 /*
  * Copyright (c) 2006 Kungliga Tekniska Högskolan
@@ -132,5 +132,5 @@ MD2_Final (void *res, struct md2 *m)
 MD2_Update(m, pad, 16);
 
 memcpy(res, m-state, MD2_DIGEST_LENGTH);
-memset(m, 0, sizeof(m));
+memset(m, 0, sizeof(*m));
 }

Index: src/crypto/external/bsd/heimdal/dist/lib/kadm5/ad.c
diff -u src/crypto/external/bsd/heimdal/dist/lib/kadm5/ad.c:1.1.1.1 src/crypto/external/bsd/heimdal/dist/lib/kadm5/ad.c:1.2
--- src/crypto/external/bsd/heimdal/dist/lib/kadm5/ad.c:1.1.1.1	Wed Apr 13 18:15:29 2011
+++ src/crypto/external/bsd/heimdal/dist/lib/kadm5/ad.c	Thu Mar 27 16:10:46 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ad.c,v 1.1.1.1 2011/04/13 18:15:29 elric Exp $	*/
+/*	$NetBSD: ad.c,v 1.2 2014/03/27 16:10:46 apb Exp $	*/
 
 /*
  * Copyright (c) 2004 Kungliga Tekniska Högskolan
@@ -49,7 +49,7 @@
 #include krb5/base64.h
 #endif
 
-__RCSID($NetBSD: ad.c,v 1.1.1.1 2011/04/13 18:15:29 elric Exp $);
+__RCSID($NetBSD: ad.c,v 1.2 2014/03/27 16:10:46 apb Exp $);
 
 #ifdef OPENLDAP
 
@@ -1289,7 +1289,7 @@ kadm5_ad_randkey_principal(void *server_
  password,
  principal,
  (*keys)[0]);
-	memset(password, 0, sizeof(password));
+	memset(password, 0, plen);
 	if (ret) {
 	free(*keys);
 	*keys = NULL;

Index: src/crypto/external/bsd/heimdal/dist/lib/krb5/test_pknistkdf.c
diff -u src/crypto/external/bsd/heimdal/dist/lib/krb5/test_pknistkdf.c:1.1.1.1 src/crypto/external/bsd/heimdal/dist/lib/krb5/test_pknistkdf.c:1.2
--- src/crypto/external/bsd/heimdal/dist/lib/krb5/test_pknistkdf.c:1.1.1.1	Wed Apr 13 18:15:38 2011
+++ src/crypto/external/bsd/heimdal/dist/lib/krb5/test_pknistkdf.c	Thu Mar 27 16:10:46 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: test_pknistkdf.c,v 1.1.1.1 2011/04/13 18:15:38 elric Exp $	*/
+/*	$NetBSD: test_pknistkdf.c,v 1.2 2014/03/27 16:10:46 apb Exp $	*/
 
 /*
  * Copyright (c) 2008 Kungliga Tekniska Högskolan
@@ -143,7 +143,7 @@ test_dh2key(krb5_context context, int i,
 AlgorithmIdentifier ai;
 size_t size;
 
-memset(ticket, 0, sizeof(ticket));
+memset(ticket, 0, sizeof(ticket));
 
 ai.algorithm = *c-oid;
 ai.parameters = NULL;



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto

2014-03-27 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu Mar 27 16:26:22 UTC 2014

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto: rnd_keys.c

Log Message:
sizeof(array - 1) decays to sizeof(pointer), but (sizeof(array) - 1)
was actually wanted.

The effect of this bug is that only a few bytes of the hostname are mixed
into the random seed, instead of using the entire hostname.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/rnd_keys.c

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

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/rnd_keys.c
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/rnd_keys.c:1.1 src/crypto/external/bsd/openssl/lib/libcrypto/rnd_keys.c:1.2
--- src/crypto/external/bsd/openssl/lib/libcrypto/rnd_keys.c:1.1	Sun Jul 19 23:30:44 2009
+++ src/crypto/external/bsd/openssl/lib/libcrypto/rnd_keys.c	Thu Mar 27 16:26:22 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rnd_keys.c,v 1.1 2009/07/19 23:30:44 christos Exp $	*/
+/*	$NetBSD: rnd_keys.c,v 1.2 2014/03/27 16:26:22 apb Exp $	*/
 
 #include des_locl.h
 #include sys/time.h
@@ -72,7 +72,7 @@ des_init_random_number_generator(des_cbl
 
 	SHA1Init(sha);
 
-	gethostname(hname, sizeof(hname - 1));
+	gethostname(hname, sizeof(hname) - 1);
 	gettimeofday(when, NULL);
 
 	memcpy(seed_q, seed, sizeof(seed_q));



CVS commit: src/distrib/cdrom/macppc_installboot

2014-03-27 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu Mar 27 16:34:37 UTC 2014

Modified Files:
src/distrib/cdrom/macppc_installboot: installboot.c

Log Message:
Use calloc instead of malloc + memset.  This fixes a bug
in which the wrong size was passed to memset.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/distrib/cdrom/macppc_installboot/installboot.c

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

Modified files:

Index: src/distrib/cdrom/macppc_installboot/installboot.c
diff -u src/distrib/cdrom/macppc_installboot/installboot.c:1.4 src/distrib/cdrom/macppc_installboot/installboot.c:1.5
--- src/distrib/cdrom/macppc_installboot/installboot.c:1.4	Wed Mar 25 15:26:49 2009
+++ src/distrib/cdrom/macppc_installboot/installboot.c	Thu Mar 27 16:34:37 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: installboot.c,v 1.4 2009/03/25 15:26:49 tsutsui Exp $	*/
+/*	$NetBSD: installboot.c,v 1.5 2014/03/27 16:34:37 apb Exp $	*/
 
 /*-
  * Copyright (c) 2005 Izumi Tsutsui.  All rights reserved.
@@ -118,12 +118,11 @@ main(int argc, char **argv)
 
 	params-stage2 = argv[3];
 
-	bb = malloc(MACPPC_BOOT_BLOCK_MAX_SIZE);
+	bb = calloc(1, MACPPC_BOOT_BLOCK_MAX_SIZE);
 	if (bb == NULL)
 		err(1, Allocating %ul bytes for bbinfo,
 		MACPPC_BOOT_BLOCK_MAX_SIZE);
 
-	memset(bb, 0, sizeof(bb));
 	rv = read(params-s1fd, bb, params-s1stat.st_size);
 
 	if (rv == -1)



CVS commit: src/external/cddl/osnet/dist/lib/libdtrace/common

2014-03-27 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu Mar 27 19:34:39 UTC 2014

Modified Files:
src/external/cddl/osnet/dist/lib/libdtrace/common: dt_printf.c

Log Message:
format is a pointer, so sizeof(format) is not a good length
to pass to snprintf.  Try to calculate the correct length,
taking into account the amount of space already used.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/cddl/osnet/dist/lib/libdtrace/common/dt_printf.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/cddl/osnet/dist/lib/libdtrace/common/dt_printf.c
diff -u src/external/cddl/osnet/dist/lib/libdtrace/common/dt_printf.c:1.4 src/external/cddl/osnet/dist/lib/libdtrace/common/dt_printf.c:1.5
--- src/external/cddl/osnet/dist/lib/libdtrace/common/dt_printf.c:1.4	Wed Feb 20 22:45:12 2013
+++ src/external/cddl/osnet/dist/lib/libdtrace/common/dt_printf.c	Thu Mar 27 19:34:39 2014
@@ -1861,10 +1861,10 @@ dtrace_printf_format(dtrace_hdl_t *dtp, 
 			*f++ = '@';
 
 		if (width != 0)
-			f += snprintf(f, sizeof (format), %d, width);
+			f += snprintf(f, format + formatlen - f, %d, width);
 
 		if (prec != 0)
-			f += snprintf(f, sizeof (format), .%d, prec);
+			f += snprintf(f, format + formatlen - f, .%d, prec);
 
 		/*
 		 * If the output format is %s, then either %s is the underlying



CVS commit: src

2014-02-10 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Mon Feb 10 08:20:05 UTC 2014

Modified Files:
src: build.sh

Log Message:
Move the -U or -E must be set for build as an unprivileged user.
test from sanitycheck() to validatemakeparams().  If MKUNPRIVED is set
in mk.conf (and not on the build.sh command line) then it's not yet
available for use in the sanitycheck function.

Also move some other code for consistency.


To generate a diff of this commit:
cvs rdiff -u -r1.274 -r1.275 src/build.sh

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

Modified files:

Index: src/build.sh
diff -u src/build.sh:1.274 src/build.sh:1.275
--- src/build.sh:1.274	Mon Jan 13 20:00:20 2014
+++ src/build.sh	Mon Feb 10 08:20:05 2014
@@ -1,5 +1,5 @@
 #! /usr/bin/env sh
-#	$NetBSD: build.sh,v 1.274 2014/01/13 20:00:20 apb Exp $
+#	$NetBSD: build.sh,v 1.275 2014/02/10 08:20:05 apb Exp $
 #
 # Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1282,14 +1282,6 @@ parseoptions()
 #
 sanitycheck()
 {
-	# Non-root should always use either the -U or -E flag.
-	#
-	if ! ${do_expertmode}  \
-	[ $id_u -ne 0 ]  \
-	[ ${MKUNPRIVED:-no} = no ] ; then
-		bomb -U or -E must be set for build as an unprivileged user.
-	fi
-
 	# Install as non-root is a bad idea.
 	#
 	if ${do_install}  [ $id_u -ne 0 ] ; then
@@ -1515,6 +1507,22 @@ validatemakeparams()
 		statusmsg2 MAKECONF file: ${MAKECONF} (File not found)
 	fi
 
+	# Normalise MKOBJDIRS, MKUNPRIVED, and MKUPDATE.
+	# These may be set as build.sh options or in mk.conf.
+	# Don't export them as they're only used for tests in build.sh.
+	#
+	MKOBJDIRS=$(getmakevar MKOBJDIRS)
+	MKUNPRIVED=$(getmakevar MKUNPRIVED)
+	MKUPDATE=$(getmakevar MKUPDATE)
+
+	# Non-root should always use either the -U or -E flag.
+	#
+	if ! ${do_expertmode}  \
+	[ $id_u -ne 0 ]  \
+	[ ${MKUNPRIVED} = no ] ; then
+		bomb -U or -E must be set for build as an unprivileged user.
+	fi
+
 	if [ ${runcmd} = echo ]; then
 		TOOLCHAIN_MISSING=no
 		EXTERNAL_TOOLCHAIN=
@@ -1536,14 +1544,6 @@ validatemakeparams()
 		exit 1
 	fi
 
-	# Normalise MKOBJDIRS, MKUNPRIVED, and MKUPDATE
-	# These may be set as build.sh options or in mk.conf.
-	# Don't export them as they're only used for tests in build.sh.
-	#
-	MKOBJDIRS=$(getmakevar MKOBJDIRS)
-	MKUNPRIVED=$(getmakevar MKUNPRIVED)
-	MKUPDATE=$(getmakevar MKUPDATE)
-
 	if [ ${MKOBJDIRS} != no ]; then
 		# Create the top-level object directory.
 		#
@@ -1745,7 +1745,7 @@ createmakewrapper()
 	eval cat EOF ${makewrapout}
 #! ${HOST_SH}
 # Set proper variables to allow easy make building of a NetBSD subtree.
-# Generated from:  \$NetBSD: build.sh,v 1.274 2014/01/13 20:00:20 apb Exp $
+# Generated from:  \$NetBSD: build.sh,v 1.275 2014/02/10 08:20:05 apb Exp $
 # with these arguments: ${_args}
 #
 



CVS commit: src

2014-01-27 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Mon Jan 27 08:18:08 UTC 2014

Modified Files:
src/distrib/alpha/floppy-GENERIC: Makefile
src/distrib/alpha/rz25dist: Makefile
src/distrib/cobalt: Makefile
src/distrib/common: Makefile.image Makefile.mdset Makefile.minirootkmod
Makefile.tarfloppy
src/distrib/evbarm/gzboot/gzimg: Makefile
src/distrib/ews4800mips/floppies/instkernel: Makefile
src/distrib/prep/floppies/bootfloppy-common: Makefile.inc
src/distrib/prep/floppies/kernel-generic: Makefile
src/distrib/rs6000/bootfs: Makefile
src/distrib/sets: Makefile
src/distrib/sparc64/xminiroot: Makefile
src/distrib/x68k/floppies/bootfloppy.generic: Makefile
src/etc/etc.cats: Makefile.inc
src/external/mit/xorg/share/fonts: Makefile.bdf
src/external/mit/xorg/share/fonts/encodings: Makefile.enc
src/lib/libc/time: Makefile
src/libexec/httpd: Makefile
src/sys/arch/evbppc/conf: Makefile.obs405.inc
src/x11/share/fonts/bdf: Makefile.bdf
src/x11/share/fonts/encodings: Makefile.enc

Log Message:
Use ${TOOL_GZIP} instead of just gzip in all Makefiles
outside */dist/* subdirectories.

When USE_PIGZGZIP=yes, bsd.own.mk sets TOOL_GZIP=${TOOL_PIGZ},
so there's no need to test USE_PIGZGZIP in these Makefiles.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/distrib/alpha/floppy-GENERIC/Makefile
cvs rdiff -u -r1.29 -r1.30 src/distrib/alpha/rz25dist/Makefile
cvs rdiff -u -r1.3 -r1.4 src/distrib/cobalt/Makefile
cvs rdiff -u -r1.32 -r1.33 src/distrib/common/Makefile.image
cvs rdiff -u -r1.38 -r1.39 src/distrib/common/Makefile.mdset
cvs rdiff -u -r1.1 -r1.2 src/distrib/common/Makefile.minirootkmod
cvs rdiff -u -r1.16 -r1.17 src/distrib/common/Makefile.tarfloppy
cvs rdiff -u -r1.24 -r1.25 src/distrib/evbarm/gzboot/gzimg/Makefile
cvs rdiff -u -r1.4 -r1.5 src/distrib/ews4800mips/floppies/instkernel/Makefile
cvs rdiff -u -r1.12 -r1.13 \
src/distrib/prep/floppies/bootfloppy-common/Makefile.inc
cvs rdiff -u -r1.9 -r1.10 src/distrib/prep/floppies/kernel-generic/Makefile
cvs rdiff -u -r1.1 -r1.2 src/distrib/rs6000/bootfs/Makefile
cvs rdiff -u -r1.92 -r1.93 src/distrib/sets/Makefile
cvs rdiff -u -r1.29 -r1.30 src/distrib/sparc64/xminiroot/Makefile
cvs rdiff -u -r1.7 -r1.8 \
src/distrib/x68k/floppies/bootfloppy.generic/Makefile
cvs rdiff -u -r1.16 -r1.17 src/etc/etc.cats/Makefile.inc
cvs rdiff -u -r1.2 -r1.3 src/external/mit/xorg/share/fonts/Makefile.bdf
cvs rdiff -u -r1.2 -r1.3 \
src/external/mit/xorg/share/fonts/encodings/Makefile.enc
cvs rdiff -u -r1.16 -r1.17 src/lib/libc/time/Makefile
cvs rdiff -u -r1.17 -r1.18 src/libexec/httpd/Makefile
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbppc/conf/Makefile.obs405.inc
cvs rdiff -u -r1.7 -r1.8 src/x11/share/fonts/bdf/Makefile.bdf
cvs rdiff -u -r1.8 -r1.9 src/x11/share/fonts/encodings/Makefile.enc

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

Modified files:

Index: src/distrib/alpha/floppy-GENERIC/Makefile
diff -u src/distrib/alpha/floppy-GENERIC/Makefile:1.20 src/distrib/alpha/floppy-GENERIC/Makefile:1.21
--- src/distrib/alpha/floppy-GENERIC/Makefile:1.20	Fri Apr  3 22:36:34 2009
+++ src/distrib/alpha/floppy-GENERIC/Makefile	Mon Jan 27 08:18:07 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.20 2009/04/03 22:36:34 perry Exp $
+#	$NetBSD: Makefile,v 1.21 2014/01/27 08:18:07 apb Exp $
 
 .include bsd.own.mk
 .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib
@@ -42,7 +42,7 @@ netbsd: ${FLOPPYKERNEL}
 	@rm -f ${.TARGET} ${.TARGET}.tmp
 	cp ${.ALLSRC} ${.TARGET}.tmp
 	${STRIP} ${.TARGET}.tmp
-	gzip -9nf ${.TARGET}.tmp
+	${TOOL_GZIP} -9nf ${.TARGET}.tmp
 	mv ${.TARGET}.tmp.gz ${.TARGET}
 
 CLEANFILES+=	netbsd netbsd.tmp netbsd.tmp.gz

Index: src/distrib/alpha/rz25dist/Makefile
diff -u src/distrib/alpha/rz25dist/Makefile:1.29 src/distrib/alpha/rz25dist/Makefile:1.30
--- src/distrib/alpha/rz25dist/Makefile:1.29	Fri Apr  3 22:36:34 2009
+++ src/distrib/alpha/rz25dist/Makefile	Mon Jan 27 08:18:07 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.29 2009/04/03 22:36:34 perry Exp $
+# $NetBSD: Makefile,v 1.30 2014/01/27 08:18:07 apb Exp $
 
 .include ../../../Makefile.inc
 
@@ -77,21 +77,21 @@ diskimage.gz: mount-fs build-fs unmount-
 	umount ${DESTDIR}/usr ${DESTDIR}
 	/bin/rm -f $@
 	dd if=/dev/r${DESTDISK}c bs=`expr ${SECPERCYL} \* 512` \
-	count=${CYLS} | gzip -9n  $@
+	count=${CYLS} | ${TOOL_GZIP} -9n  $@
 
 bin.tar.gz: mount-fs build-fs
 	/bin/rm -f $@
 	(cd ${DESTDIR} ; find . | grep -v '^./etc' | \
 	grep -v '^./usr/X11R6' | grep -v '^./netbsd' | \
-	grep -v '^./boot' | pax -w -d | gzip -9n)  $@
+	grep -v '^./boot' | pax -w -d | ${TOOL_GZIP} -9n)  $@
 
 etc.tar.gz: mount-fs build-fs
 	/bin/rm -f $@
-	(cd ${DESTDIR} ; find ./etc | pax -w -d | gzip -9n)  $@
+	(cd ${DESTDIR} ; find ./etc | pax -w -d | ${TOOL_GZIP} 

CVS commit: src

2014-01-27 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Mon Jan 27 21:37:17 UTC 2014

Modified Files:
src/distrib/common/bootimage: Makefile.bootimage
src/distrib/sets: Makefile
src/etc: Makefile
src/libexec/httpd: Makefile
src/sys/arch/cobalt/stand/boot: Makefile
src/sys/arch/evbppc/conf: Makefile.obs405.inc
src/sys/arch/ews4800mips/stand/boot: Makefile

Log Message:
Pass the -n flag to gzip invocations.

This prevents it from embedding a timestamp in the output.  We pass
-n unconditionally, not conditional on MKREPRO, because many other
invocations of gzip already passed the -n flag unconditionally.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/distrib/common/bootimage/Makefile.bootimage
cvs rdiff -u -r1.93 -r1.94 src/distrib/sets/Makefile
cvs rdiff -u -r1.411 -r1.412 src/etc/Makefile
cvs rdiff -u -r1.18 -r1.19 src/libexec/httpd/Makefile
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/cobalt/stand/boot/Makefile
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbppc/conf/Makefile.obs405.inc
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/ews4800mips/stand/boot/Makefile

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

Modified files:

Index: src/distrib/common/bootimage/Makefile.bootimage
diff -u src/distrib/common/bootimage/Makefile.bootimage:1.7 src/distrib/common/bootimage/Makefile.bootimage:1.8
--- src/distrib/common/bootimage/Makefile.bootimage:1.7	Thu Jan 16 01:15:32 2014
+++ src/distrib/common/bootimage/Makefile.bootimage	Mon Jan 27 21:37:17 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootimage,v 1.7 2014/01/16 01:15:32 christos Exp $
+#	$NetBSD: Makefile.bootimage,v 1.8 2014/01/27 21:37:17 apb Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -390,7 +390,7 @@ ${IMGBASE}.img:	${TARGETFS} ${WORKLABEL}
 CLEANFILES+=	${IMGBASE}.img.gz ${IMGBASE}.img.gz.tmp
 
 ${IMGBASE}.img.gz:	${IMGBASE}.img
-	${TOOL_GZIP} -9c ${IMGBASE}.img  ${.TARGET}.tmp
+	${TOOL_GZIP} -9nc ${IMGBASE}.img  ${.TARGET}.tmp
 	mv ${.TARGET}.tmp ${.TARGET}
 
 clean:

Index: src/distrib/sets/Makefile
diff -u src/distrib/sets/Makefile:1.93 src/distrib/sets/Makefile:1.94
--- src/distrib/sets/Makefile:1.93	Mon Jan 27 08:18:07 2014
+++ src/distrib/sets/Makefile	Mon Jan 27 21:37:17 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.93 2014/01/27 08:18:07 apb Exp $
+#	$NetBSD: Makefile,v 1.94 2014/01/27 21:37:17 apb Exp $
 
 # Experimental RCS METALOG versioning
 # (Needs host's rcs(1) commands)
@@ -16,6 +16,7 @@ all:
 .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib
 
 COMPRESS_PROGRAM=${TOOL_GZIP}
+GZIP_FLAGS= -n
 
 SETSENV=	DESTDIR=${DESTDIR:Q} \
 		MACHINE=${MACHINE:Q} \
@@ -29,6 +30,7 @@ SETSENV=	DESTDIR=${DESTDIR:Q} \
 		MTREE=${TOOL_MTREE:Q} \
 		PAX=${TOOL_PAX:Q} \
 		COMPRESS_PROGRAM=${COMPRESS_PROGRAM:Q} \
+		GZIP=${GZIP_FLAGS:Q} \
 		PKG_CREATE=${TOOL_PKG_CREATE:Q} \
 		SED=${TOOL_SED:Q} \
 		TSORT=${TSORT:Q}

Index: src/etc/Makefile
diff -u src/etc/Makefile:1.411 src/etc/Makefile:1.412
--- src/etc/Makefile:1.411	Thu Jan 16 01:15:33 2014
+++ src/etc/Makefile	Mon Jan 27 21:37:17 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.411 2014/01/16 01:15:33 christos Exp $
+#	$NetBSD: Makefile,v 1.412 2014/01/27 21:37:17 apb Exp $
 #	from: @(#)Makefile	8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -194,7 +194,7 @@ etc-release: .EXEC .MAKE
 		cat ${NETBSDSRCDIR}/sys/conf/copyright; \
 		echo ; \
 		echo Build settings:; \
-		printf %20s   %s\n  Build date $$(date -u); \
+		printf %20s   %s\n Build date $$(date -u); \
 		printf %20s   %s\n  Built by $${USER-root}@$$(hostname); \
 		echo ; \
 		${PRINT_PARAMS} ; \
@@ -580,7 +580,7 @@ kernset-${configfile}: .PHONY build_kern
 	kerndir=${KERNOBJDIR}/${configfile:C/.*\///}; \
 	kernsuffixes=${KERNEL_SUFFIXES:S/^/./}; \
 	kern_tgz=${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets/kern-${configfile}.tgz; \
-	pax_cmd=COMPRESS_PROGRAM=${TOOL_GZIP:Q} GZIP=-9 ${TOOL_PAX} -O -zw -M -N ${NETBSDSRCDIR}/etc -f $${kern_tgz}; \
+	pax_cmd=COMPRESS_PROGRAM=${TOOL_GZIP:Q} GZIP=-9n ${TOOL_PAX} -O -zw -M -N ${NETBSDSRCDIR}/etc -f $${kern_tgz}; \
 	cd $${kerndir}  { \
 		kernels=; newest=; \
 		for kernel in $${kernlist}; do \
@@ -625,8 +625,8 @@ releasekern-${configfile}: .PHONY build_
 knl_gz=${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/kernel/$${kernel}-${configfile:C/.*\///}$${s}.gz; \
 [ $${knl_gz} -nt $${ks} ]  continue; \
 rm -f $${knl_gz}; \
-echo ${TOOL_GZIP} -c -9  $${kerndir}/$${ks}  $${knl_gz}; \
-${TOOL_GZIP} -c -9  $${ks}  $${knl_gz}; \
+echo ${TOOL_GZIP} -nc -9  $${kerndir}/$${ks}  $${knl_gz}; \
+${TOOL_GZIP} -nc -9  $${ks}  $${knl_gz}; \
 			done; \
 		done; \
 	}

Index: src/libexec/httpd/Makefile
diff -u src/libexec/httpd/Makefile:1.18 src/libexec/httpd/Makefile:1.19
--- src/libexec/httpd/Makefile:1.18	Mon Jan 27 08:18:08 2014
+++ src/libexec/httpd/Makefile	Mon Jan 27 21:37:17 2014
@@ -1,4 +1,4 @@

CVS commit: src/etc

2014-01-26 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sun Jan 26 16:53:00 UTC 2014

Modified Files:
src/etc: Makefile.params

Log Message:
Add MKREPRO and MKARZERO to the list of variables in RELEASEVARS.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/etc/Makefile.params

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

Modified files:

Index: src/etc/Makefile.params
diff -u src/etc/Makefile.params:1.8 src/etc/Makefile.params:1.9
--- src/etc/Makefile.params:1.8	Thu Jan 16 01:15:33 2014
+++ src/etc/Makefile.params	Sun Jan 26 16:53:00 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.params,v 1.8 2014/01/16 01:15:33 christos Exp $
+#	$NetBSD: Makefile.params,v 1.9 2014/01/26 16:53:00 apb Exp $
 #
 # Makefile fragment for printing build parameters.
 #
@@ -43,7 +43,7 @@ RELEASEVARS=	BSDOBJDIR BSDSRCDIR BUILDID
 		KERNARCHDIR KERNCONFDIR KERNOBJDIR KERNSRCDIR \
 		MACHINE MACHINE_ARCH MAKE MAKECONF MAKEFLAGS \
 		MAKEOBJDIR MAKEOBJDIRPREFIX MAKEVERBOSE \
-		MKATF MKBFD MKBINUTILS MKCATPAGES \
+		MKARZERO MKATF MKBFD MKBINUTILS MKCATPAGES \
 		MKCRYPTO MKCRYPTO_RC5 MKCVS \
 		MKDEBUG MKDEBUGLIB MKDOC MKDTRACE MKDYNAMICROOT \
 		MKGCC MKGCCCMDS MKGDB \
@@ -51,7 +51,7 @@ RELEASEVARS=	BSDOBJDIR BSDSRCDIR BUILDID
 		MKKERBEROS MKKYUA MKLDAP MKLINKLIB MKLINT MKLLVM \
 		MKMAN MKMANZ MKMDNS MKNLS MKNPF MKOBJ MKOBJDIRS \
 		MKPAM MKPCC MKPF MKPIC MKPICINSTALL MKPICLIB MKPOSTFIX \
-		MKPROFILE \
+		MKPROFILE MKREPRO \
 		MKSHARE MKSKEY MKSOFTFLOAT MKSTATICLIB \
 		MKUNPRIVED MKUPDATE MKX11 MKYP \
 		NBUILDJOBS NETBSDSRCDIR \



CVS commit: src/distrib/notes

2014-01-26 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sun Jan 26 17:00:03 UTC 2014

Modified Files:
src/distrib/notes: Makefile.inc

Log Message:
For MKREPRO, remove the %%CreationDate: comment line from
PostScript output files.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/distrib/notes/Makefile.inc

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

Modified files:

Index: src/distrib/notes/Makefile.inc
diff -u src/distrib/notes/Makefile.inc:1.41 src/distrib/notes/Makefile.inc:1.42
--- src/distrib/notes/Makefile.inc:1.41	Sat Oct 25 22:27:34 2008
+++ src/distrib/notes/Makefile.inc	Sun Jan 26 17:00:03 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.41 2008/10/25 22:27:34 apb Exp $
+#	$NetBSD: Makefile.inc,v 1.42 2014/01/26 17:00:03 apb Exp $
 #
 
 # Ross Harvey r...@netbsd.org
@@ -51,9 +51,12 @@ TOC.html=	${TOCS:M*.HTML.*}
 TOC.more=	${TOCS:M*.more.*}
 .endif
 
+REMOVE_CREATION_DATE= ${TOOL_SED} -e '/^%%CreationDate:/d'
 
 ${TARG}.ps: ${SRCS} ${TOC.ps} ${DISTRIBVERDEP}
-	${TOOL_GROFF} ${ARGS_PS}   -mdoc  ${MAIN}  $@
+	${TOOL_GROFF} ${ARGS_PS}   -mdoc  ${MAIN} \
+	${${MKREPRO:Uno} == yes:? | ${REMOVE_CREATION_DATE} :} \
+	 $@
 
 ${TARG}.pdf: ${TARG}.ps
 	ps2pdf ${TARG}.ps $@



CVS commit: src/etc

2014-01-26 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sun Jan 26 17:33:53 UTC 2014

Modified Files:
src/etc: Makefile.params

Log Message:
Add BUILDSEED to RELEASEVARS.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/etc/Makefile.params

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

Modified files:

Index: src/etc/Makefile.params
diff -u src/etc/Makefile.params:1.9 src/etc/Makefile.params:1.10
--- src/etc/Makefile.params:1.9	Sun Jan 26 16:53:00 2014
+++ src/etc/Makefile.params	Sun Jan 26 17:33:53 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.params,v 1.9 2014/01/26 16:53:00 apb Exp $
+#	$NetBSD: Makefile.params,v 1.10 2014/01/26 17:33:53 apb Exp $
 #
 # Makefile fragment for printing build parameters.
 #
@@ -37,7 +37,7 @@
 
 .include bsd.own.mk	# for some variables
 
-RELEASEVARS=	BSDOBJDIR BSDSRCDIR BUILDID \
+RELEASEVARS=	BSDOBJDIR BSDSRCDIR BUILDID BUILDSEED \
 		DESTDIR DISTRIBVER EXTERNAL_TOOLCHAIN HAVE_GCC HAVE_GDB \
 		HAVE_LLVM HAVE_PCC INSTALLWORLDDIR \
 		KERNARCHDIR KERNCONFDIR KERNOBJDIR KERNSRCDIR \



CVS commit: src/share/mk

2014-01-26 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Mon Jan 27 07:57:28 UTC 2014

Modified Files:
src/share/mk: bsd.README

Log Message:
Document TOOL_GZIP.


To generate a diff of this commit:
cvs rdiff -u -r1.326 -r1.327 src/share/mk/bsd.README

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

Modified files:

Index: src/share/mk/bsd.README
diff -u src/share/mk/bsd.README:1.326 src/share/mk/bsd.README:1.327
--- src/share/mk/bsd.README:1.326	Thu Jan 16 01:19:46 2014
+++ src/share/mk/bsd.README	Mon Jan 27 07:57:28 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.README,v 1.326 2014/01/16 01:19:46 christos Exp $
+#	$NetBSD: bsd.README,v 1.327 2014/01/27 07:57:28 apb Exp $
 #	@(#)bsd.README	8.2 (Berkeley) 4/2/94
 
 This is the README file for the make include files for the NetBSD
@@ -463,8 +463,8 @@ USE_YP		If no, disables building YP (N
 		If ${MKYP} is no, USE_YP will also be forced to no.
 
 USE_PIGZGZIP	If no, use the host gzip program to compress things.
-		Otherwise, build tools/pigz and use nbpigz to compress
-		things.
+		Otherwise, build tools/pigz, set TOOL_GZIP=${TOOL_PIGZ},
+		and use nbpigz to compress things.
 		Default: no.
 
 X11FLAVOUR	Set to Xorg or XFree86, depending on whether to build
@@ -786,6 +786,8 @@ TOOL_GREP		Print lines matching a patter
 
 TOOL_GROFF		Front end for groff document formatting system.  [groff]
 
+TOOL_GZIP		Compression/decompression tool.  [gzip]
+
 TOOL_HEXDUMP		Ascii, decimal, hexadecimal, octal dump.  [hexdump]
 
 TOOL_HP300MKBOOT	Make bootable image for hp300.  [hp300-mkboot]



CVS commit: src/distrib/sets

2014-01-23 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu Jan 23 21:45:27 UTC 2014

Modified Files:
src/distrib/sets: Makefile

Log Message:
Remove time= keywords from METALOG.sanitised.

The times add unnecessary differences to the DESTDIR trees for MKREPRO
builds, and they are not needed by anything.  (maketars, the chief
consumer of METALOG.sanitised, explicitly ignores the time fields.)

Also factor out some duplicated code and update comments.


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/distrib/sets/Makefile

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

Modified files:

Index: src/distrib/sets/Makefile
diff -u src/distrib/sets/Makefile:1.91 src/distrib/sets/Makefile:1.92
--- src/distrib/sets/Makefile:1.91	Thu Jan 16 01:15:33 2014
+++ src/distrib/sets/Makefile	Thu Jan 23 21:45:27 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.91 2014/01/16 01:15:33 christos Exp $
+#	$NetBSD: Makefile,v 1.92 2014/01/23 21:45:27 apb Exp $
 
 # Experimental RCS METALOG versioning
 # (Needs host's rcs(1) commands)
@@ -101,19 +101,25 @@ list_set_files_base list_set_files_x lis
 # MKUNPRIVED flag.
 #
 # The sanitise_METALOG target creates METALOG.sanitised from METALOG,
-# without modifying METALOG itself.  METALOG.sanitised is sorted, and
-# has duplicates merged.  This is used near the end of a build, after
-# build products have been installed in DESTDIR and corresponding lines
-# have been added to METALOG, but before METALOG.sanitised is used in
-# the creation of sets in RELEASEDIR.
+# without modifying METALOG itself.  This is used near the end of
+# a build, after build products have been installed in DESTDIR
+# and corresponding lines have been added to METALOG, but before
+# METALOG.sanitised is used in the creation of sets in RELEASEDIR.
+# For update builds, METALOG.sanitised has duplicates merged (keeping
+# only the last of multiple entries for the same item), but for clean
+# builds it's an error if a file or directory name appears twice.
+# METALOG.sanitised is always sorted and has timestamps removed.
 #
-# The clean_METALOG either deletes METALOG or replaces METALOG with
+# The clean_METALOG target either deletes METALOG, or replaces METALOG with
 # a sanitised version of itself, depending on the MKUPDATE flag, and
 # deletes old METALOG.* files.  This is intended to be used at the start
 # of a build, to ensure that repeated MKUPDATE builds do not cause
 # unbounded growth of METALOG.
 #
 
+METALOG_REMOVE_DUPLICATES= \
+	${TOOL_AWK} '{ a[$$1] = $$0; } END { for (f in a) print a[f]; }'
+
 .if ${MKUNPRIVED} == no
 METALOG.unpriv=
 sanitise_METALOG: .PHONY
@@ -124,17 +130,10 @@ clean_METALOG: .PHONY
 METALOG.unpriv= -M ${METALOG}.sanitised
 sanitise_METALOG: .PHONY ${METALOG}.sanitised
 ${METALOG}.sanitised: ${METALOG}
-# We keep only the last entry for update builds, but for clean builds we
-# want to make sure we install files only once.
-.if ${MKUPDATE} != no
-	${TOOL_AWK} \
-	'{ a[$$1] = $$0; } END { for (f in a) print a[f]; }' ${METALOG} | \
-	sort | ${TOOL_MTREE} -CSM -k all -N ${NETBSDSRCDIR}/etc \
-	${METALOG}.new
-.else
-	sort ${METALOG} | ${TOOL_MTREE} -CSM -k all -N ${NETBSDSRCDIR}/etc \
+	${METALOG} \
+	${${MKUPDATE} != no :? ${METALOG_REMOVE_DUPLICATES} | :} \
+	sort | ${TOOL_MTREE} -CSM -k all -R time -N ${NETBSDSRCDIR}/etc \
 	${METALOG}.new
-.endif
 	mv ${METALOG}.new ${METALOG}.sanitised
 .if defined(RCSMETALOG)
 	. ./metalog.subr; \



CVS commit: src/gnu/dist/gkermit

2014-01-21 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Tue Jan 21 20:24:30 UTC 2014

Modified Files:
src/gnu/dist/gkermit: gkermit.nr

Log Message:
Remove .ll 80, so the man page will use the default 78-character
line length.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/gnu/dist/gkermit/gkermit.nr

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

Modified files:

Index: src/gnu/dist/gkermit/gkermit.nr
diff -u src/gnu/dist/gkermit/gkermit.nr:1.1.1.1 src/gnu/dist/gkermit/gkermit.nr:1.2
--- src/gnu/dist/gkermit/gkermit.nr:1.1.1.1	Wed Nov  1 13:03:57 2006
+++ src/gnu/dist/gkermit/gkermit.nr	Tue Jan 21 20:24:29 2014
@@ -2,7 +2,6 @@
 .TH GKERMIT 1C 25 Dec 1999 UNIX G-Kermit
 .SH NAME
 gkermit \- G-Kermit (GNU Kermit) 1.00 file transfer software.
-.ll 80
 .SH SYNOPSIS
 .nf
 .sp



CVS commit: src/external/gpl3/gdb/lib/libbfd

2014-01-20 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Mon Jan 20 10:49:33 UTC 2014

Modified Files:
src/external/gpl3/gdb/lib/libbfd: Makefile

Log Message:
Don't embed ${DESTDIR} in the -DDEBUGDIR=... value.
DEBUGDIR should refer to a directory on the running system,
not the staging area used during a build.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/lib/libbfd/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/gpl3/gdb/lib/libbfd/Makefile
diff -u src/external/gpl3/gdb/lib/libbfd/Makefile:1.4 src/external/gpl3/gdb/lib/libbfd/Makefile:1.5
--- src/external/gpl3/gdb/lib/libbfd/Makefile:1.4	Tue Aug 13 19:29:45 2013
+++ src/external/gpl3/gdb/lib/libbfd/Makefile	Mon Jan 20 10:49:33 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2013/08/13 19:29:45 drochner Exp $
+#	$NetBSD: Makefile,v 1.5 2014/01/20 10:49:33 apb Exp $
 
 .include bsd.own.mk
 .include ../Makefile.inc
@@ -12,7 +12,7 @@ LIB=		bfd
 GCPPFLAGS=	${G_archdefs} ${G_DEFS} ${G_INCLUDES} ${G_TDEFAULTS}
 CPPFLAGS+=	-I${.CURDIR}/arch/${GDB_MACHINE_ARCH} -I${DIST}/include -I. \
 		-I${DIST}/bfd ${GCPPFLAGS:M-D*} ${GCPPFLAGS:M-I*:N-I.*} \
-		-DDEBUGDIR=\${DESTDIR}/usr/libdata/debug\
+		-DDEBUGDIR=\/usr/libdata/debug\
 
 GSRCS=		${G_libbfd_la_OBJECTS:libbfd.lo=lib_bfd.lo} \
 		${G_libbfd_la_DEPENDENCIES:M*.lo}



CVS commit: src/gnu/usr.bin/gettext

2014-01-20 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Mon Jan 20 10:57:38 UTC 2014

Modified Files:
src/gnu/usr.bin/gettext/libnlspr: Makefile
src/gnu/usr.bin/gettext/msginit: Makefile

Log Message:
Don't include ${DESTDIR} in -DLIBDIR=..., -DGETTEXTDATADIR=...,
and a few other variables.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/gnu/usr.bin/gettext/libnlspr/Makefile
cvs rdiff -u -r1.3 -r1.4 src/gnu/usr.bin/gettext/msginit/Makefile

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

Modified files:

Index: src/gnu/usr.bin/gettext/libnlspr/Makefile
diff -u src/gnu/usr.bin/gettext/libnlspr/Makefile:1.9 src/gnu/usr.bin/gettext/libnlspr/Makefile:1.10
--- src/gnu/usr.bin/gettext/libnlspr/Makefile:1.9	Thu May 26 12:56:28 2011
+++ src/gnu/usr.bin/gettext/libnlspr/Makefile	Mon Jan 20 10:57:38 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.9 2011/05/26 12:56:28 joerg Exp $
+#	$NetBSD: Makefile,v 1.10 2014/01/20 10:57:38 apb Exp $
 
 LIBISPRIVATE=	yes
 
@@ -70,9 +70,9 @@ write-tcl.c
 .PATH:	${DIST}/gettext/gettext-tools/src ${DIST}/gettext/gettext-tools/lib
 CPPFLAGS+=-I${DIST}/gettext/gettext-runtime/intl
 CPPFLAGS+=-I${DIST}/gettext/gettext-tools/src
-CPPFLAGS+=-DLIBDIR=\${DESTDIR}/usr/share\
-CPPFLAGS+=-DGETTEXTJAR=\${DESTDIR}/usr/share/gettext/gettext.jar\
-CPPFLAGS+=-DGETTEXTDATADIR=\${DESTDIR}/usr/share/gettext\
+CPPFLAGS+=-DLIBDIR=\/usr/share\
+CPPFLAGS+=-DGETTEXTJAR=\/usr/share/gettext/gettext.jar\
+CPPFLAGS+=-DGETTEXTDATADIR=\/usr/share/gettext\
 
 COPTS.format-java.c = -Wno-stack-protector
 COPTS.msgl-cat.c = -Wno-stack-protector

Index: src/gnu/usr.bin/gettext/msginit/Makefile
diff -u src/gnu/usr.bin/gettext/msginit/Makefile:1.3 src/gnu/usr.bin/gettext/msginit/Makefile:1.4
--- src/gnu/usr.bin/gettext/msginit/Makefile:1.3	Fri Nov 10 17:36:08 2006
+++ src/gnu/usr.bin/gettext/msginit/Makefile	Mon Jan 20 10:57:38 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2006/11/10 17:36:08 christos Exp $
+#	$NetBSD: Makefile,v 1.4 2014/01/20 10:57:38 apb Exp $
 
 PROG=	msginit
 SRCS+=	msginit.c \
@@ -9,9 +9,9 @@ localename.c
 .include ${.CURDIR}/../Makefile.inc.prog
 
 CPPFLAGS+=-I${DIST}/gettext/gettext-runtime/intl
-CPPFLAGS+=-DLIBDIR=\${DESTDIR}/usr/share\ \
--DPROJECTSDIR=\${DESTDIR}/usr/share\ \
--DLOCALE_ALIAS_PATH=\${DESTDIR}/usr/share/locale\
+CPPFLAGS+=-DLIBDIR=\/usr/share\ \
+-DPROJECTSDIR=\/usr/share\ \
+-DLOCALE_ALIAS_PATH=\/usr/share/locale\
 
 COPTS.msginit.c = -Wno-stack-protector
 COPTS.localealias.c = -Wno-stack-protector



CVS commit: src/usr.bin/make

2014-01-19 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sun Jan 19 10:23:29 UTC 2014

Modified Files:
src/usr.bin/make: make.1

Log Message:
Emphasise the fact that the regexp and replacement in :C/// are
subjected to variable expansion before regexp parsing.  This was already
documented if you read carefully enough, but more emphasis would have
helped me to figure out why I needed three or four backslashes where I
expected to need only two.


To generate a diff of this commit:
cvs rdiff -u -r1.228 -r1.229 src/usr.bin/make/make.1

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

Modified files:

Index: src/usr.bin/make/make.1
diff -u src/usr.bin/make/make.1:1.228 src/usr.bin/make/make.1:1.229
--- src/usr.bin/make/make.1:1.228	Fri Jan 10 16:28:34 2014
+++ src/usr.bin/make/make.1	Sun Jan 19 10:23:29 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: make.1,v 1.228 2014/01/10 16:28:34 wiz Exp $
+.\	$NetBSD: make.1,v 1.229 2014/01/19 10:23:29 apb Exp $
 .\
 .\ Copyright (c) 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\	from: @(#)make.1	8.4 (Berkeley) 3/19/94
 .\
-.Dd January 10, 2014
+.Dd January 19, 2014
 .Dt MAKE 1
 .Os
 .Sh NAME
@@ -1250,6 +1250,15 @@ and
 are orthogonal; the former specifies whether multiple words are
 potentially affected, the latter whether multiple substitutions can
 potentially occur within each affected word.
+.Pp
+As for the
+.Cm \:S
+modifier, the
+.Ar pattern
+and
+.Ar replacement
+are subjected to variable expansion before being parsed as
+regular expressions.
 .It Cm \:T
 Replaces each word in the variable with its last component.
 .It Cm \:u



CVS commit: src/lib/libc

2014-01-19 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sun Jan 19 11:36:45 UTC 2014

Modified Files:
src/lib/libc: Makefile

Log Message:
If MKREPRO=yes, make the tags file refer to /usr/src
instead of referring to the actual source directory ${NETBSDSRC}.


To generate a diff of this commit:
cvs rdiff -u -r1.162 -r1.163 src/lib/libc/Makefile

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

Modified files:

Index: src/lib/libc/Makefile
diff -u src/lib/libc/Makefile:1.162 src/lib/libc/Makefile:1.163
--- src/lib/libc/Makefile:1.162	Sat Jan 18 01:08:56 2014
+++ src/lib/libc/Makefile	Sun Jan 19 11:36:45 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.162 2014/01/18 01:08:56 joerg Exp $
+#	$NetBSD: Makefile,v 1.163 2014/01/19 11:36:45 apb Exp $
 #	@(#)Makefile	8.2 (Berkeley) 2/3/94
 #
 # All library objects contain sccsid strings by default; they may be
@@ -130,13 +130,24 @@ LSRCS := ${LSRCS} ${unwanted_file}
 NLS=	C.msg Pig.msg ca.msg cs.msg de.msg es.msg fi.msg fr.msg nl.msg \
 	no.msg pl.msg sk.msg sv.msg
 
+.if ${MKREPRO:Uno} == yes
+REGEX_SPECIALS=[][)(^$$.?*\\;]
+MKREPRO_SED=   -e 's;${NETBSDSRCDIR:C/${REGEX_SPECIALS}//g};/usr/src;'
+.endif
+
 realall: tags
 tags: ${SRCS}
 	${_MKTARGET_CREATE}
-	-${TOOL_CTAGS} -w ${.ALLSRC:M*.c}
+	-${TOOL_CTAGS} -f ${.TARGET}.tmp -w ${.ALLSRC:M*.c}
 	-egrep ^ENTRY(.*)|^FUNC(.*)|^SYSCALL(.*) /dev/null ${.ALLSRC:M*.S} | \
 	sed s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/; \
-	 ${.TARGET}; sort -o ${.TARGET} ${.TARGET}
+${.TARGET}.tmp
+.if ${MKREPRO:Uno} == yes
+	sed ${MKREPRO_SED} ${.TARGET}.tmp | sort -o ${.TARGET}
+.else
+	sort -o ${.TARGET} ${.TARGET}.tmp
+.endif
+	rm -f ${.TARGET}.tmp
 
 FILES=		tags
 FILESNAME=	libc.tags



CVS commit: src/tests/lib/libcurses

2014-01-19 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sun Jan 19 21:50:17 UTC 2014

Modified Files:
src/tests/lib/libcurses/director: Makefile
src/tests/lib/libcurses/slave: Makefile

Log Message:
Remove -g from CPPFLAGS and LDFLAGS in curses tests.

The debug information contains embedded references to the src directory,
which is bad for reproducible builds.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libcurses/director/Makefile
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libcurses/slave/Makefile

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

Modified files:

Index: src/tests/lib/libcurses/director/Makefile
diff -u src/tests/lib/libcurses/director/Makefile:1.6 src/tests/lib/libcurses/director/Makefile:1.7
--- src/tests/lib/libcurses/director/Makefile:1.6	Sun Jun  3 02:10:46 2012
+++ src/tests/lib/libcurses/director/Makefile	Sun Jan 19 21:50:17 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2012/06/03 02:10:46 joerg Exp $
+#	$NetBSD: Makefile,v 1.7 2014/01/19 21:50:17 apb Exp $
 #
 .include bsd.own.mk
 
@@ -12,8 +12,7 @@ NOMAN=	true
 SRCS=	testlang_parse.y testlang_conf.l director.c
 
 YHEADER=	1
-CPPFLAGS+=	-O0 -g -I${.CURDIR} -I.
-LDFLAGS+=	-g
+CPPFLAGS+=	-O0 -I${.CURDIR} -I.
 DPADD+=		${LIBL}
 LDADD+=		-ll -lutil -lc
 

Index: src/tests/lib/libcurses/slave/Makefile
diff -u src/tests/lib/libcurses/slave/Makefile:1.6 src/tests/lib/libcurses/slave/Makefile:1.7
--- src/tests/lib/libcurses/slave/Makefile:1.6	Thu Sep  8 18:44:38 2011
+++ src/tests/lib/libcurses/slave/Makefile	Sun Jan 19 21:50:17 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2011/09/08 18:44:38 jmmv Exp $
+#	$NetBSD: Makefile,v 1.7 2014/01/19 21:50:17 apb Exp $
 #
 .include bsd.own.mk
 
@@ -11,7 +11,7 @@ NOMAN=	true
 #MAN=	slave.7
 SRCS=	slave.c commands.c curses_commands.c
 
-CPPFLAGS+=	-g -I${.CURDIR} -I. -I${.CURDIR}/../director
+CPPFLAGS+=	-I${.CURDIR} -I. -I${.CURDIR}/../director
 LDADD+=		-lcurses -lterminfo -Wl,--no-fatal-warnings
 
 COPTS.curses_commands.c += -Wno-format-nonliteral



CVS commit: src/tests/lib/libcurses/director

2014-01-19 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sun Jan 19 22:09:34 UTC 2014

Modified Files:
src/tests/lib/libcurses/director: Makefile

Log Message:
Remove -O0 from CPPFLAGS, and instead set
COPTS.testlang_parse.c += -Wno-uninitialized.

Without the old -O0, and without the new -Wno-uninitialized,
gcc issues this bogus error:
testlang_parse.y:1400:8: error: 'cmd' may be used uninitialized in this function


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libcurses/director/Makefile

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

Modified files:

Index: src/tests/lib/libcurses/director/Makefile
diff -u src/tests/lib/libcurses/director/Makefile:1.7 src/tests/lib/libcurses/director/Makefile:1.8
--- src/tests/lib/libcurses/director/Makefile:1.7	Sun Jan 19 21:50:17 2014
+++ src/tests/lib/libcurses/director/Makefile	Sun Jan 19 22:09:34 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2014/01/19 21:50:17 apb Exp $
+#	$NetBSD: Makefile,v 1.8 2014/01/19 22:09:34 apb Exp $
 #
 .include bsd.own.mk
 
@@ -12,10 +12,11 @@ NOMAN=	true
 SRCS=	testlang_parse.y testlang_conf.l director.c
 
 YHEADER=	1
-CPPFLAGS+=	-O0 -I${.CURDIR} -I.
+CPPFLAGS+=	-I${.CURDIR} -I.
 DPADD+=		${LIBL}
 LDADD+=		-ll -lutil -lc
 
+COPTS.testlang_parse.c += -Wno-uninitialized
 CWARNFLAGS.clang+=	-Wno-format -Wno-conversion
 
 .include bsd.test.mk



CVS commit: src/crypto/external/bsd/heimdal/dist/lib

2014-01-18 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Jan 18 09:20:36 UTC 2014

Modified Files:
src/crypto/external/bsd/heimdal/dist/lib/asn1: gen.c
src/crypto/external/bsd/heimdal/dist/lib/com_err: compile_et.c

Log Message:
Use basename(filename) in Generated from %s comments in output files,
to avoid embedding the path to the build tree.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/heimdal/dist/lib/asn1/gen.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/heimdal/dist/lib/com_err/compile_et.c

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

Modified files:

Index: src/crypto/external/bsd/heimdal/dist/lib/asn1/gen.c
diff -u src/crypto/external/bsd/heimdal/dist/lib/asn1/gen.c:1.1.1.1 src/crypto/external/bsd/heimdal/dist/lib/asn1/gen.c:1.2
--- src/crypto/external/bsd/heimdal/dist/lib/asn1/gen.c:1.1.1.1	Wed Apr 13 18:14:40 2011
+++ src/crypto/external/bsd/heimdal/dist/lib/asn1/gen.c	Sat Jan 18 09:20:36 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: gen.c,v 1.1.1.1 2011/04/13 18:14:40 elric Exp $	*/
+/*	$NetBSD: gen.c,v 1.2 2014/01/18 09:20:36 apb Exp $	*/
 
 /*
  * Copyright (c) 1997 - 2005 Kungliga Tekniska Högskolan
@@ -36,8 +36,9 @@
  */
 
 #include gen_locl.h
+#include libgen.h
 
-__RCSID($NetBSD: gen.c,v 1.1.1.1 2011/04/13 18:14:40 elric Exp $);
+__RCSID($NetBSD: gen.c,v 1.2 2014/01/18 09:20:36 apb Exp $);
 
 FILE *privheaderfile, *headerfile, *codefile, *logfile, *templatefile;
 
@@ -155,7 +156,7 @@ init_generate (const char *filename, con
 fprintf (headerfile,
 	 /* Generated from %s */\n
 	 /* Do not edit */\n\n,
-	 filename);
+	 basename(filename));
 fprintf (headerfile,
 	 #ifndef __%s_h__\n
 	 #define __%s_h__\n\n, headerbase, headerbase);
@@ -268,7 +269,7 @@ init_generate (const char *filename, con
 	 #include errno.h\n
 	 #include limits.h\n
 	 #include krb5/krb5-types.h\n,
-	 filename);
+	 basename(filename));
 
 fprintf (templatefile,
 	 #include %s\n
@@ -366,7 +367,7 @@ generate_header_of_codefile(const char *
 	 #include errno.h\n
 	 #include limits.h\n
 	 #include krb5/krb5-types.h\n,
-	 orig_filename);
+	 basename(orig_filename));
 
 fprintf (codefile,
 	 #include %s\n

Index: src/crypto/external/bsd/heimdal/dist/lib/com_err/compile_et.c
diff -u src/crypto/external/bsd/heimdal/dist/lib/com_err/compile_et.c:1.1.1.1 src/crypto/external/bsd/heimdal/dist/lib/com_err/compile_et.c:1.2
--- src/crypto/external/bsd/heimdal/dist/lib/com_err/compile_et.c:1.1.1.1	Wed Apr 13 18:14:43 2011
+++ src/crypto/external/bsd/heimdal/dist/lib/com_err/compile_et.c	Sat Jan 18 09:20:36 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: compile_et.c,v 1.1.1.1 2011/04/13 18:14:43 elric Exp $	*/
+/*	$NetBSD: compile_et.c,v 1.2 2014/01/18 09:20:36 apb Exp $	*/
 
 /*
  * Copyright (c) 1998-2002 Kungliga Tekniska Högskolan
@@ -39,6 +39,7 @@
 
 #include compile_et.h
 #include getarg.h
+#include libgen.h
 
 #include roken.h
 #include err.h
@@ -77,7 +78,7 @@ generate_c(void)
 if(c_file == NULL)
 	return 1;
 
-fprintf(c_file, /* Generated from %s */\n, filename);
+fprintf(c_file, /* Generated from %s */\n, basename(filename));
 if(id_str)
 	fprintf(c_file, /* %s */\n, id_str);
 fprintf(c_file, \n);
@@ -142,7 +143,7 @@ generate_h(void)
 	if(!isalnum((unsigned char)*p))
 	*p = '_';
 
-fprintf(h_file, /* Generated from %s */\n, filename);
+fprintf(h_file, /* Generated from %s */\n, basename(filename));
 if(id_str)
 	fprintf(h_file, /* %s */\n, id_str);
 fprintf(h_file, \n);



CVS commit: src/sys/external/bsd/acpica/dist/compiler

2014-01-18 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Jan 18 09:25:24 UTC 2014

Modified Files:
src/sys/external/bsd/acpica/dist/compiler: aslutils.c

Log Message:
Use ACPI_DATE instead of __DATE__ in a version string that
ends up in the iasl executable.  ACPI_DATE is defined in
sys/external/bsd/acpica/dist/include/acapps.h.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/acpica/dist/compiler/aslutils.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/external/bsd/acpica/dist/compiler/aslutils.c
diff -u src/sys/external/bsd/acpica/dist/compiler/aslutils.c:1.6 src/sys/external/bsd/acpica/dist/compiler/aslutils.c:1.7
--- src/sys/external/bsd/acpica/dist/compiler/aslutils.c:1.6	Fri Dec 27 18:50:56 2013
+++ src/sys/external/bsd/acpica/dist/compiler/aslutils.c	Sat Jan 18 09:25:24 2014
@@ -454,7 +454,7 @@ UtDisplaySummary (
 /* Compiler name and version number */
 
 FlPrintFile (FileId, %s version %X%s [%s]\n\n,
-ASL_COMPILER_NAME, (UINT32) ACPI_CA_VERSION, ACPI_WIDTH, __DATE__);
+ASL_COMPILER_NAME, (UINT32) ACPI_CA_VERSION, ACPI_WIDTH, ACPI_DATE);
 }
 
 /* Summary of main input and output files */



CVS commit: src/sys/external/bsd/acpica/dist/include

2014-01-18 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Jan 18 09:48:24 UTC 2014

Modified Files:
src/sys/external/bsd/acpica/dist/include: acapps.h

Log Message:
Update ACPI_DATE to 18 Dec 2013, because acpica version 20131218
was imported on 27 Dec 2013.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/acpica/dist/include/acapps.h

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

Modified files:

Index: src/sys/external/bsd/acpica/dist/include/acapps.h
diff -u src/sys/external/bsd/acpica/dist/include/acapps.h:1.4 src/sys/external/bsd/acpica/dist/include/acapps.h:1.5
--- src/sys/external/bsd/acpica/dist/include/acapps.h:1.4	Fri Dec 27 18:50:57 2013
+++ src/sys/external/bsd/acpica/dist/include/acapps.h	Sat Jan 18 09:48:24 2014
@@ -68,7 +68,7 @@
 
 /* Macros for signons and file headers */
 #ifdef ACPI_REPRO
-#define ACPI_DATE 23 Jun 2011
+#define ACPI_DATE 18 Dec 2013
 #else
 #define ACPI_DATE __DATE__
 #endif



CVS commit: src/sys/dev/acpi/acpica

2014-01-18 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Jan 18 09:51:08 UTC 2014

Modified Files:
src/sys/dev/acpi/acpica: README

Log Message:
+ Please also update ACPI_DATE in include/acapps.h.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/acpi/acpica/README

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

Modified files:

Index: src/sys/dev/acpi/acpica/README
diff -u src/sys/dev/acpi/acpica/README:1.5 src/sys/dev/acpi/acpica/README:1.6
--- src/sys/dev/acpi/acpica/README:1.5	Fri Dec 27 18:53:16 2013
+++ src/sys/dev/acpi/acpica/README	Sat Jan 18 09:51:08 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: README,v 1.5 2013/12/27 18:53:16 christos Exp $
+#	$NetBSD: README,v 1.6 2014/01/18 09:51:08 apb Exp $
 
 This is the Intel ACPI Component Architecture, Intel's reference
 implementation of the core operating system ACPI support.  The
@@ -15,6 +15,8 @@ something sane that we can use. The curr
 	mv components/* .
 	rmdir components
 
+Please also update ACPI_DATE in include/acapps.h.
+
 The routines that the operating system must provide are documented
 in the following document:
 



CVS commit: src/share/man/man5

2014-01-15 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Wed Jan 15 11:42:43 UTC 2014

Modified Files:
src/share/man/man5: rc.conf.5

Log Message:
Document random_seed and random_file.


To generate a diff of this commit:
cvs rdiff -u -r1.156 -r1.157 src/share/man/man5/rc.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/share/man/man5/rc.conf.5
diff -u src/share/man/man5/rc.conf.5:1.156 src/share/man/man5/rc.conf.5:1.157
--- src/share/man/man5/rc.conf.5:1.156	Sun Jan 13 19:56:13 2013
+++ src/share/man/man5/rc.conf.5	Wed Jan 15 11:42:43 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: rc.conf.5,v 1.156 2013/01/13 19:56:13 wiz Exp $
+.\	$NetBSD: rc.conf.5,v 1.157 2014/01/15 11:42:43 apb Exp $
 .\
 .\ Copyright (c) 1996 Matthew R. Green
 .\ All rights reserved.
@@ -55,7 +55,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd October 2, 2012
+.Dd January 15, 2014
 .Dt RC.CONF 5
 .Os
 .Sh NAME
@@ -432,6 +432,26 @@ Checks and enables quotas by running
 .Xr quotacheck 8
 and
 .Xr quotaon 8 .
+.It Sy random_seed
+Boolean value.
+During boot-up, runs the
+.Xr rndctl 8
+utility with the
+.Fl L
+flag to seed the random number subsystem from an entropy file.
+During shutdown, runs the
+.Xr rndctl 8
+utility with the
+.Fl S
+flag to save some random information to the entropy file.
+The entropy file name is specified by the
+.Sy random_file
+variable, and defaults to
+.Pa /var/db/entropy-file .
+The entropy file must be on a local file system that is writable early during
+boot-up (just after the file systems specified in
+.Sy critical_filesystems_local
+have been mounted), and correspondingly late during shutdown.
 .It Sy rndctl
 Boolean value.
 Runs the



CVS commit: src/external/bsd/ntp/scripts

2014-01-15 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Wed Jan 15 12:58:23 UTC 2014

Modified Files:
src/external/bsd/ntp/scripts: mkver

Log Message:
If the importdate file exists, do not embed the date/time/build number
in the generated version.  This logic was present in an earlier revision
of this file, but was lost in CVS revision 1.3 dated 2013-12-28.

Add a comment to make it less likely that this code is lost again.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/ntp/scripts/mkver

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/ntp/scripts/mkver
diff -u src/external/bsd/ntp/scripts/mkver:1.3 src/external/bsd/ntp/scripts/mkver:1.4
--- src/external/bsd/ntp/scripts/mkver:1.3	Sat Dec 28 03:36:15 2013
+++ src/external/bsd/ntp/scripts/mkver	Wed Jan 15 12:58:23 2014
@@ -15,16 +15,23 @@ case o in
  *) ConfStr=${ConfStr}-o ;;
 esac
 
-ConfStr=$ConfStr `LC_TIME=C TZ=UTC date`
+ifile=`dirname $0`/../importdate
 
-if [ ! -f .version ]; then
-  echo 0  .version
-fi
-RUN=`cat .version`
-RUN=`expr $RUN + 1`
-echo $RUN  .version
+if [ -f $ifile ]; then
+  # NetBSD MKREPRO: Don't embed current date/time/run number
+  ConfStr=$ConfStr `cat $ifile`
+else
+  ConfStr=$ConfStr `LC_TIME=C TZ= date`
+
+  if [ ! -f .version ]; then
+echo 0  .version
+  fi
+  RUN=`cat .version`
+  RUN=`expr $RUN + 1`
+  echo $RUN  .version
 
-ConfStr=$ConfStr (${RUN})
+  ConfStr=$ConfStr (${RUN})
+fi
 
 echo Version ${ConfStr};
 



CVS commit: src/external/bsd/ntp

2014-01-15 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Wed Jan 15 14:40:30 UTC 2014

Modified Files:
src/external/bsd/ntp/dist/libntp: ntp_calendar.c
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
For MKREPRO, instead of using __DATE__ and __TIME__
in ntp_calendar.c::ntpcal_get_build_date(), use a date/time
extracted from the importdate file.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/ntp/dist/libntp/ntp_calendar.c
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/ntp/lib/libntp/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/ntp/dist/libntp/ntp_calendar.c
diff -u src/external/bsd/ntp/dist/libntp/ntp_calendar.c:1.2 src/external/bsd/ntp/dist/libntp/ntp_calendar.c:1.3
--- src/external/bsd/ntp/dist/libntp/ntp_calendar.c:1.2	Sat Dec 28 03:20:13 2013
+++ src/external/bsd/ntp/dist/libntp/ntp_calendar.c	Wed Jan 15 14:40:30 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntp_calendar.c,v 1.2 2013/12/28 03:20:13 christos Exp $	*/
+/*	$NetBSD: ntp_calendar.c,v 1.3 2014/01/15 14:40:30 apb Exp $	*/
 
 /*
  * ntp_calendar.c - calendar and helper functions
@@ -155,7 +155,11 @@ ntpcal_get_build_date(
 	 * problem.
 	 *
 	 */
+#ifdef MKREPRO_DATE
+	static const char build[] = MKREPRO_TIME / MKREPRO_DATE;
+#else
 	static const char build[] = __TIME__ / __DATE__;
+#endif
 	static const char mlist[] = JanFebMarAprMayJunJulAugSepOctNovDec;
 	char		  monstr[4];
 	const char *	  cp;

Index: src/external/bsd/ntp/lib/libntp/Makefile
diff -u src/external/bsd/ntp/lib/libntp/Makefile:1.7 src/external/bsd/ntp/lib/libntp/Makefile:1.8
--- src/external/bsd/ntp/lib/libntp/Makefile:1.7	Thu Jan  2 21:38:38 2014
+++ src/external/bsd/ntp/lib/libntp/Makefile	Wed Jan 15 14:40:30 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2014/01/02 21:38:38 joerg Exp $
+#	$NetBSD: Makefile,v 1.8 2014/01/15 14:40:30 apb Exp $
 
 LIBISPRIVATE=yes
 
@@ -79,4 +79,20 @@ CPPFLAGS+= -I${IDIST}/sntp/libopts
 
 COPTS.msyslog.c+=	-Wno-error=format-nonliteral
 
+# For MKREPRO, avoid using __DATE__ and __TIME__.
+# Instead, use the date and time from ${IMPORTDATE_FILE}.
+#
+# The file should contain one line, like this:
+#	Fri Dec 27 19:28:17 EST 2013 (import)
+#
+.if ${MKREPRO} == yes
+IMPORTDATE_FILE := ${.PARSEDIR}/../../importdate
+MKREPRO_DATE != ${TOOL_AWK} '{printf %3s %2d %4d, $2, $3, $6}' \
+	${IMPORTDATE_FILE} # Mmm DD 
+MKREPRO_TIME != ${TOOL_AWK} '{print $4}' \
+	${IMPORTDATE_FILE} # HH:MM:SS
+CPPFLAGS.ntp_calendar.c += -DMKREPRO_DATE=\${MKREPRO_DATE:Q}\
+CPPFLAGS.ntp_calendar.c += -DMKREPRO_TIME=\${MKREPRO_TIME:Q}\
+.endif
+
 .include bsd.lib.mk



CVS commit: src/sbin/rndctl

2014-01-15 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Wed Jan 15 15:05:27 UTC 2014

Modified Files:
src/sbin/rndctl: rndctl.c

Log Message:
Overwrite the seed file from the beginning, using pwrite(2).


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sbin/rndctl/rndctl.c

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

Modified files:

Index: src/sbin/rndctl/rndctl.c
diff -u src/sbin/rndctl/rndctl.c:1.26 src/sbin/rndctl/rndctl.c:1.27
--- src/sbin/rndctl/rndctl.c:1.26	Wed Jan 15 10:13:25 2014
+++ src/sbin/rndctl/rndctl.c	Wed Jan 15 15:05:27 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rndctl.c,v 1.26 2014/01/15 10:13:25 joerg Exp $	*/
+/*	$NetBSD: rndctl.c,v 1.27 2014/01/15 15:05:27 apb Exp $	*/
 
 /*-
  * Copyright (c) 1997 Michael Graff.
@@ -33,7 +33,7 @@
 #include sha1.h
 
 #ifndef lint
-__RCSID($NetBSD: rndctl.c,v 1.26 2014/01/15 10:13:25 joerg Exp $);
+__RCSID($NetBSD: rndctl.c,v 1.27 2014/01/15 15:05:27 apb Exp $);
 #endif
 
 
@@ -203,7 +203,7 @@ do_load(const char *const filename)
 	}
 
 	memset(rszero, 0, sizeof(rszero));
-	if (write(fd, rszero, sizeof(rszero)) != sizeof(rszero))
+	if (pwrite(fd, rszero, sizeof(rszero), (off_t)0) != sizeof(rszero))
 		err(1, overwrite);
 	fsync_range(fd, FDATASYNC|FDISKSYNC, (off_t)0, (off_t)0);
 	close(fd);



CVS commit: src/share/mk

2014-01-14 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Tue Jan 14 11:14:27 UTC 2014

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
Use parentheses in .if A  ( B || C || D || ... )


To generate a diff of this commit:
cvs rdiff -u -r1.760 -r1.761 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.760 src/share/mk/bsd.own.mk:1.761
--- src/share/mk/bsd.own.mk:1.760	Tue Dec 31 18:46:09 2013
+++ src/share/mk/bsd.own.mk	Tue Jan 14 11:14:27 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.760 2013/12/31 18:46:09 christos Exp $
+#	$NetBSD: bsd.own.mk,v 1.761 2014/01/14 11:14:27 apb Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -973,7 +973,7 @@ X11FLAVOUR?=	Xorg
 # Which platforms build the xorg-server drivers (as opposed
 # to just Xnest and Xvfb.)
 #
-.if ${X11FLAVOUR} == Xorg	 \
+.if ${X11FLAVOUR} == Xorg	 ( \
 ${MACHINE} == alpha	|| \
 ${MACHINE} == amd64	|| \
 ${MACHINE} == bebox	|| \
@@ -998,7 +998,7 @@ X11FLAVOUR?=	Xorg
 ${MACHINE} == sparc	|| \
 ${MACHINE} == sparc64	|| \
 ${MACHINE} == vax		|| \
-${MACHINE} == zaurus
+${MACHINE} == zaurus	)
 MKXORG_SERVER?=yes
 .else
 MKXORG_SERVER?=no



CVS commit: src/share/mk

2014-01-14 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Tue Jan 14 11:31:01 UTC 2014

Modified Files:
src/share/mk: bsd.lib.mk

Log Message:
Let MKARZERO default to the same value as MKREPRO, so callers
can set MKREPRO=yes and automatically get MKARZERO=yes.


To generate a diff of this commit:
cvs rdiff -u -r1.344 -r1.345 src/share/mk/bsd.lib.mk

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

Modified files:

Index: src/share/mk/bsd.lib.mk
diff -u src/share/mk/bsd.lib.mk:1.344 src/share/mk/bsd.lib.mk:1.345
--- src/share/mk/bsd.lib.mk:1.344	Mon Dec 16 21:34:16 2013
+++ src/share/mk/bsd.lib.mk	Tue Jan 14 11:31:01 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.lib.mk,v 1.344 2013/12/16 21:34:16 matt Exp $
+#	$NetBSD: bsd.lib.mk,v 1.345 2014/01/14 11:31:01 apb Exp $
 #	@(#)bsd.lib.mk	8.3 (Berkeley) 4/22/94
 
 .include bsd.init.mk
@@ -518,7 +518,7 @@ _YLSRCS=	${SRCS:M*.[ly]:C/\..$/.c/} ${YH
 
 realall: ${SRCS} ${ALLOBJS:O} ${_LIBS} ${_LIB.so.debug}
 
-MKARZERO?=no
+MKARZERO?= ${MKREPRO:Uno}
 
 .if ${MKARZERO} == yes
 _ARFL=crsD



CVS commit: src/share/mk

2014-01-14 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Tue Jan 14 11:32:35 UTC 2014

Modified Files:
src/share/mk: bsd.README

Log Message:
Document new default for MKARZERO.


To generate a diff of this commit:
cvs rdiff -u -r1.323 -r1.324 src/share/mk/bsd.README

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

Modified files:

Index: src/share/mk/bsd.README
diff -u src/share/mk/bsd.README:1.323 src/share/mk/bsd.README:1.324
--- src/share/mk/bsd.README:1.323	Fri Dec  6 23:14:15 2013
+++ src/share/mk/bsd.README	Tue Jan 14 11:32:35 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.README,v 1.323 2013/12/06 23:14:15 matt Exp $
+#	$NetBSD: bsd.README,v 1.324 2014/01/14 11:32:35 apb Exp $
 #	@(#)bsd.README	8.2 (Berkeley) 4/2/94
 
 This is the README file for the make include files for the NetBSD
@@ -1143,7 +1143,8 @@ LIBDIR		Target directory for libraries.
 MKARZERO	Normally, ar(1) sets the timestamps, uid, gid and
 		permissions in files inside its archives to those of
 		the file it was fed. This leads to non-reproduceable
-		builds. If MKARZERO is set to yes (default is no)
+		builds. If MKARZERO is set to yes (default is the
+		same as MKREPRO, or no if MKREPRO is not defined),
 		then the D flag is passed to ar, causing the
 		timestamp, uid and gid to be zeroed and the file
 		permissions to be set to 644. This allows .a files



CVS commit: src/etc

2014-01-14 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Tue Jan 14 13:23:46 UTC 2014

Modified Files:
src/etc: ntp.conf

Log Message:
Don't try to use server-specific restrict settings;
they do not work when the server is specified by domain name
and the name is associated with multiple IP addresses.

This also means that uncommenting restrict default ignore
will not work, so remove the comments suggesting that.

Also edit some other comments.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/etc/ntp.conf

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

Modified files:

Index: src/etc/ntp.conf
diff -u src/etc/ntp.conf:1.18 src/etc/ntp.conf:1.19
--- src/etc/ntp.conf:1.18	Mon Jan  6 11:26:06 2014
+++ src/etc/ntp.conf	Tue Jan 14 13:23:46 2014
@@ -1,4 +1,4 @@
-# $NetBSD: ntp.conf,v 1.18 2014/01/06 11:26:06 apb Exp $
+# $NetBSD: ntp.conf,v 1.19 2014/01/14 13:23:46 apb Exp $
 #
 # NetBSD default Network Time Protocol (NTP) configuration file for ntpd
 
@@ -50,20 +50,18 @@ mdnstries	0
 #   ntpq or ntpdc queries.
 #   noquery Deny all ntpq and ntpdc queries.  Does not affect time
 #   synchronisation.
-#   nopeer  Prevent establishing an new peer association.
-#   Does not affect preconfigured peer associations.
+#   nopeer  Prevent establishing new peer associations.
+#   Does not affect peers configured using peer lines.
 #   Does not affect client/server time synchronisation.
 #   noserve Deny all time synchronisation.  Does not affect ntpq or
 #   ntpdc queries.
 #   notrap  Deny the trap subset of the ntpdc control message protocol.
 #   notrust Deny packets that are not cryptographically authenticated.
 #
-# By default, either deny everything, or allow client/server time exchange
-# but deny configuration changes, queries, and peer associations that were not
-# explicitly configured.
-# (Uncomment one of the following restrict default lines.)
+# By default, allow client/server time exchange without prior
+# arrangement, but deny configuration changes, queries, and peer
+# associations that were not explicitly configured.
 #
-#restrict default ignore
 restrict default kod nopeer noquery
 
 # Fewer restrictions for the local subnet.
@@ -84,23 +82,18 @@ restrict ::1
 # and http://support.ntp.org/bin/view/Support/SelectingOffsiteNTPServers
 # for advice.
 #
-# Peers should be selected in such a way that the network path to them
-# is short, uncongested, and symmetric (that is, the series of links
-# and routers used to get to the peer is the same one that the peer
-# uses to get back).  The best place to start looking for NTP peers for
-# your system is within your own network, or at your Internet Service
-# Provider (ISP).
+# Peers or servers should be selected in such a way that the network
+# path to them is short, uncongested, and symmetric (that is, the series
+# of links and routers used to get to the peer is the same one that
+# the peer uses to get back).  The best place to start looking for NTP
+# peers for your system is within your own network, or at your Internet
+# Service Provider (ISP).
 #
 # Ideally, you should select at least three other systems to talk NTP
 # with, for an what I tell you three times is true effect.
-#
-# A restrict line for each configured peer or server might be necessary,
-# if the restrict default settings are very restrictive.  As a courtesy
-# to configured peers and servers, consider allowing them to query.
 
 #peer		an.ntp.peer.goes.here
 #server		an.ntp.server.goes.here
-#restrict	an.ntp.server.goes.here nomodify notrap
 
 # The pool.ntp.org project coordinates public time servers provided by
 # volunteers.  See http://www.pool.ntp.org.  The *.netbsd.pool.ntp.org
@@ -117,10 +110,6 @@ restrict ::1
 #
 
 server		0.netbsd.pool.ntp.org
-restrict	0.netbsd.pool.ntp.org nomodify notrap
 server		1.netbsd.pool.ntp.org
-restrict	1.netbsd.pool.ntp.org nomodify notrap
 server		2.netbsd.pool.ntp.org
-restrict	2.netbsd.pool.ntp.org nomodify notrap
 server		3.netbsd.pool.ntp.org
-restrict	3.netbsd.pool.ntp.org nomodify notrap



CVS commit: src

2014-01-13 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Mon Jan 13 20:00:20 UTC 2014

Modified Files:
src: build.sh

Log Message:
In the sanitycheck function, treat undefined MKUNPRIVED like no.

Other uses of MKUNPRIVED should not need this treatment, because
bsd.own.mk sets it to no by default, and build.sh uses getmakevar to
pick up that default (but that happens too late for the sanitycheck
function to take advantage of it).


To generate a diff of this commit:
cvs rdiff -u -r1.273 -r1.274 src/build.sh

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

Modified files:

Index: src/build.sh
diff -u src/build.sh:1.273 src/build.sh:1.274
--- src/build.sh:1.273	Fri Aug 30 10:29:06 2013
+++ src/build.sh	Mon Jan 13 20:00:20 2014
@@ -1,5 +1,5 @@
 #! /usr/bin/env sh
-#	$NetBSD: build.sh,v 1.273 2013/08/30 10:29:06 pooka Exp $
+#	$NetBSD: build.sh,v 1.274 2014/01/13 20:00:20 apb Exp $
 #
 # Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1286,7 +1286,7 @@ sanitycheck()
 	#
 	if ! ${do_expertmode}  \
 	[ $id_u -ne 0 ]  \
-	[ ${MKUNPRIVED} = no ] ; then
+	[ ${MKUNPRIVED:-no} = no ] ; then
 		bomb -U or -E must be set for build as an unprivileged user.
 	fi
 
@@ -1745,7 +1745,7 @@ createmakewrapper()
 	eval cat EOF ${makewrapout}
 #! ${HOST_SH}
 # Set proper variables to allow easy make building of a NetBSD subtree.
-# Generated from:  \$NetBSD: build.sh,v 1.273 2013/08/30 10:29:06 pooka Exp $
+# Generated from:  \$NetBSD: build.sh,v 1.274 2014/01/13 20:00:20 apb Exp $
 # with these arguments: ${_args}
 #
 



CVS commit: src/common/lib/libc/string

2014-01-09 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu Jan  9 11:25:11 UTC 2014

Modified Files:
src/common/lib/libc/string: strnlen.c

Log Message:
Make strnlen implementation usable from src/tools/compat.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/string/strnlen.c

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

Modified files:

Index: src/common/lib/libc/string/strnlen.c
diff -u src/common/lib/libc/string/strnlen.c:1.1 src/common/lib/libc/string/strnlen.c:1.2
--- src/common/lib/libc/string/strnlen.c:1.1	Thu Sep  1 22:35:18 2011
+++ src/common/lib/libc/string/strnlen.c	Thu Jan  9 11:25:11 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: strnlen.c,v 1.1 2011/09/01 22:35:18 jym Exp $	*/
+/*	$NetBSD: strnlen.c,v 1.2 2014/01/09 11:25:11 apb Exp $	*/
 
 /*-
  * Copyright (c) 2009 David Schultz d...@freebsd.org
@@ -26,9 +26,13 @@
  * SUCH DAMAGE.
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include nbtool_config.h
+#endif
+
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: strnlen.c,v 1.1 2011/09/01 22:35:18 jym Exp $);
+__RCSID($NetBSD: strnlen.c,v 1.2 2014/01/09 11:25:11 apb Exp $);
 #endif /* LIBC_SCCS and not lint */
 /* FreeBSD: src/lib/libc/string/strnlen.c,v 1.1 2009/02/28 06:00:58 das Exp */
 
@@ -38,6 +42,7 @@ __RCSID($NetBSD: strnlen.c,v 1.1 2011/0
 #include lib/libkern/libkern.h
 #endif
 
+#if !HAVE_STRNLEN
 size_t
 strnlen(const char *s, size_t maxlen)
 {
@@ -49,3 +54,4 @@ strnlen(const char *s, size_t maxlen)
 	}
 	return (len);
 }
+#endif /* !HAVE_STRNLEN */



CVS commit: src/tools/compat

2014-01-09 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu Jan  9 11:26:58 UTC 2014

Modified Files:
src/tools/compat: configure.ac

Log Message:
Add strnlen to configure tests in tools/compat


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/tools/compat/configure.ac

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

Modified files:

Index: src/tools/compat/configure.ac
diff -u src/tools/compat/configure.ac:1.80 src/tools/compat/configure.ac:1.81
--- src/tools/compat/configure.ac:1.80	Wed Aug 14 10:14:45 2013
+++ src/tools/compat/configure.ac	Thu Jan  9 11:26:58 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: configure.ac,v 1.80 2013/08/14 10:14:45 jmcneill Exp $
+#	$NetBSD: configure.ac,v 1.81 2014/01/09 11:26:58 apb Exp $
 #
 # Autoconf definition file for libnbcompat.
 #
@@ -160,7 +160,7 @@ AC_CHECK_FUNCS(atoll asprintf asnprintf 
 	pwrite raise_default_signal random setenv \
 	setgroupent setprogname setpassent \
 	snprintb_m snprintf strlcat strlcpy strmode \
-	strndup strsep strsuftoll strtoll \
+	strndup strnlen strsep strsuftoll strtoll \
 	user_from_uid uid_from_user vasprintf vasnprintf vsnprintf)
 
 AC_CHECK_DECLS([user_from_uid, uid_from_user, pwcache_userdb],,,[
@@ -169,7 +169,7 @@ AC_CHECK_DECLS([user_from_uid, uid_from_
 AC_CHECK_DECLS([group_from_gid, gid_from_group, pwcache_groupdb],,,[
 #include grp.h
 ])
-AC_CHECK_DECLS([strndup],,,[#include string.h])
+AC_CHECK_DECLS([strndup, strnlen],,,[#include string.h])
 AC_CHECK_DECLS([strsuftoll],,,[#include stdlib.h])
 AC_CHECK_DECLS([lchflags, lchmod, lchown],,,[
 #include sys/stat.h



CVS commit: src/tools/compat

2014-01-09 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu Jan  9 11:30:01 UTC 2014

Modified Files:
src/tools/compat: nbtool_config.h.in

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/tools/compat/nbtool_config.h.in

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

Modified files:

Index: src/tools/compat/nbtool_config.h.in
diff -u src/tools/compat/nbtool_config.h.in:1.33 src/tools/compat/nbtool_config.h.in:1.34
--- src/tools/compat/nbtool_config.h.in:1.33	Wed Aug 14 10:15:14 2013
+++ src/tools/compat/nbtool_config.h.in	Thu Jan  9 11:30:01 2014
@@ -1,6 +1,6 @@
 /* nbtool_config.h.in.  Generated automatically from configure.ac by autoheader.  */
 
-/*  $NetBSD: nbtool_config.h.in,v 1.33 2013/08/14 10:15:14 jmcneill Exp $*/
+/*  $NetBSD: nbtool_config.h.in,v 1.34 2014/01/09 11:30:01 apb Exp $*/
  
 #ifndef __NETBSD_NBTOOL_CONFIG_H__
 #define __NETBSD_NBTOOL_CONFIG_H__
@@ -203,6 +203,10 @@
don't. */
 #undef HAVE_DECL_STRNDUP
 
+/* Define to 1 if you have the declaration of `strnlen', and to 0 if you
+   don't. */
+#undef HAVE_DECL_STRNLEN
+
 /* Define to 1 if you have the declaration of `strsuftoll', and to 0 if you
don't. */
 #undef HAVE_DECL_STRSUFTOLL
@@ -462,6 +466,9 @@
 /* Define if you have the `strndup' function. */
 #undef HAVE_STRNDUP
 
+/* Define if you have the `strnlen' function. */
+#undef HAVE_STRNLEN
+
 /* Define if you have the `strsep' function. */
 #undef HAVE_STRSEP
 



CVS commit: src/tools/compat

2014-01-09 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu Jan  9 11:31:12 UTC 2014

Modified Files:
src/tools/compat: Makefile compat_defs.h

Log Message:
Declare and define strnlen if necessary.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/tools/compat/Makefile
cvs rdiff -u -r1.93 -r1.94 src/tools/compat/compat_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/tools/compat/Makefile
diff -u src/tools/compat/Makefile:1.70 src/tools/compat/Makefile:1.71
--- src/tools/compat/Makefile:1.70	Wed Dec 11 01:24:08 2013
+++ src/tools/compat/Makefile	Thu Jan  9 11:31:12 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.70 2013/12/11 01:24:08 joerg Exp $
+#	$NetBSD: Makefile,v 1.71 2014/01/09 11:31:12 apb Exp $
 
 HOSTLIB=	nbcompat
 
@@ -17,7 +17,8 @@ SRCS=		atoll.c basename.c cdbr.c cdbw.c 
 		setenv.c setgroupent.c \
 		setpassent.c setprogname.c sha1.c sha1hl.c sha2.c \
 		sha256hl.c sha384hl.c sha512hl.c snprintb.c snprintf.c \
-		stat_flags.c strlcat.c strlcpy.c strmode.c strndup.c \
+		stat_flags.c strlcat.c strlcpy.c strmode.c \
+		strndup.c strnlen.c \
 		strsep.c strsuftoll.c strtoll.c \
 		unvis.c vis.c err.c errx.c verr.c verrx.c \
 		vwarn.c vwarnx.c warn.c warnx.c fts.c glob.c efun.c

Index: src/tools/compat/compat_defs.h
diff -u src/tools/compat/compat_defs.h:1.93 src/tools/compat/compat_defs.h:1.94
--- src/tools/compat/compat_defs.h:1.93	Thu Oct 24 13:59:47 2013
+++ src/tools/compat/compat_defs.h	Thu Jan  9 11:31:12 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_defs.h,v 1.93 2013/10/24 13:59:47 apb Exp $	*/
+/*	$NetBSD: compat_defs.h,v 1.94 2014/01/09 11:31:12 apb Exp $	*/
 
 #ifndef	__NETBSD_COMPAT_DEFS_H__
 #define	__NETBSD_COMPAT_DEFS_H__
@@ -415,6 +415,9 @@ int pwcache_groupdb(int (*)(int), void (
 #if !HAVE_DECL_STRNDUP
 char		*strndup(const char *, size_t);
 #endif
+#if !HAVE_DECL_STRNLEN
+char		*strnlen(const char *, size_t);
+#endif
 #if !HAVE_DECL_LCHFLAGS
 int		lchflags(const char *, unsigned long);
 #endif



CVS commit: src/tools/compat

2014-01-09 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu Jan  9 16:08:46 UTC 2014

Modified Files:
src/tools/compat: compat_defs.h

Log Message:
fix prototype for strnlen.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/tools/compat/compat_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/tools/compat/compat_defs.h
diff -u src/tools/compat/compat_defs.h:1.94 src/tools/compat/compat_defs.h:1.95
--- src/tools/compat/compat_defs.h:1.94	Thu Jan  9 11:31:12 2014
+++ src/tools/compat/compat_defs.h	Thu Jan  9 16:08:46 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_defs.h,v 1.94 2014/01/09 11:31:12 apb Exp $	*/
+/*	$NetBSD: compat_defs.h,v 1.95 2014/01/09 16:08:46 apb Exp $	*/
 
 #ifndef	__NETBSD_COMPAT_DEFS_H__
 #define	__NETBSD_COMPAT_DEFS_H__
@@ -416,7 +416,7 @@ int pwcache_groupdb(int (*)(int), void (
 char		*strndup(const char *, size_t);
 #endif
 #if !HAVE_DECL_STRNLEN
-char		*strnlen(const char *, size_t);
+size_t		strnlen(const char *, size_t);
 #endif
 #if !HAVE_DECL_LCHFLAGS
 int		lchflags(const char *, unsigned long);



CVS commit: src/distrib/ews4800mips

2014-01-06 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Mon Jan  6 11:03:25 UTC 2014

Modified Files:
src/distrib/ews4800mips: Makefile

Log Message:
Add cdroms to the SUBDIR list for src/distrib/ews4800mips.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/distrib/ews4800mips/Makefile

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

Modified files:

Index: src/distrib/ews4800mips/Makefile
diff -u src/distrib/ews4800mips/Makefile:1.2 src/distrib/ews4800mips/Makefile:1.3
--- src/distrib/ews4800mips/Makefile:1.2	Tue Mar  6 21:57:00 2007
+++ src/distrib/ews4800mips/Makefile	Mon Jan  6 11:03:25 2014
@@ -1,6 +1,6 @@
-#	$NetBSD: Makefile,v 1.2 2007/03/06 21:57:00 bouyer Exp $
+#	$NetBSD: Makefile,v 1.3 2014/01/06 11:03:25 apb Exp $
 
-SUBDIR=		floppies
+SUBDIR=		floppies cdroms
 TARGETS+=	release
 
 iso_image:



CVS commit: src/etc

2014-01-06 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Mon Jan  6 11:21:34 UTC 2014

Modified Files:
src/etc: ntp.conf

Log Message:
Add several restrict lines to the default ntp.conf, with comments.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/etc/ntp.conf

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

Modified files:

Index: src/etc/ntp.conf
diff -u src/etc/ntp.conf:1.15 src/etc/ntp.conf:1.16
--- src/etc/ntp.conf:1.15	Sat Dec 28 03:18:39 2013
+++ src/etc/ntp.conf	Mon Jan  6 11:21:34 2014
@@ -1,4 +1,4 @@
-# $NetBSD: ntp.conf,v 1.15 2013/12/28 03:18:39 christos Exp $
+# $NetBSD: ntp.conf,v 1.16 2014/01/06 11:21:34 apb Exp $
 #
 # NetBSD default Network Time Protocol (NTP) configuration file for ntpd
 
@@ -36,6 +36,46 @@ mdnstries	0
 # the following line
 # enable mode7
 
+# Access control restrictions.
+# See /usr/share/doc/html/ntp/accopt.html for syntax.
+# See http://support.ntp.org/bin/view/Support/AccessRestrictions for advice.
+# Last match wins.
+#
+# Some of the more common keywords are:
+#   ignore  Deny packets of all kinds.
+#   kod Send kiss-o'-death packets if clients exceed rate
+#   limits.
+#   nomodifyDeny attempts to modify the state of the server via
+#   ntpq or ntpdc queries.
+#   noquery Deny all ntpq and ntpdc queries.  Does not affect time
+#   synchronisation.
+#   nopeer  Prevent establishing an new peer association.
+#   Does not affect preconfigured peer associations.
+#   Does not affect client/server time synchronisation.
+#   noserve Deny all time synchronisation.  Does not affect ntpq or
+#   ntpdc queries.
+#   notrap  Deny the trap subset of the ntpdc control message protocol.
+#   notrust Deny packets that are not cryptographically authenticated.
+#
+# By default, either deny everything, or allow client/server time exchange
+# but deny configuration changes, queries, and peer associations that were not
+# explicitly configured.
+# (Uncomment one of the following restrict default lines.)
+#
+#restrict default ignore
+restrict default kod nopeer noquery
+
+# Fewer restrictions for the local subnet.
+# (Uncomment and adjust as appropriate.)
+#
+#restrict 192.0.2.0 mask 255.255.255.0 kod nomodify notrap nopeer
+#restrict 2001:db8:: mask :::  kod nomodify notrap nopeer
+
+# No restrictions for localhost.
+#
+restrict 127.0.0.1
+restrict ::1
+
 # Hereafter should be server or peer statements to configure other
 # hosts to exchange NTP packets with. Peers should be selected in such
 # a way that the network path to them is symmetric (that is, the series
@@ -56,9 +96,13 @@ mdnstries	0
 # Ideally, you should select at least three other systems to talk NTP
 # with, for an what I tell you three times is true effect.
 #
+# A restrict line for each configured peer or server might be necessary,
+# if the restrict default settings are very restrictive.  As a courtesy
+# to configured peers and servers, consider allowing them to query.
 
 #peer		an.ntp.peer.goes.here
 #server		an.ntp.server.goes.here
+#restrict	an.ntp.server.goes.here nomodify notrap
 
 # Public servers from the pool.ntp.org project. Volunteer's servers
 # are dynamically assigned to the CNAMES below via DNS round-robin.
@@ -75,6 +119,10 @@ mdnstries	0
 # to the NetBSD project.
 
 server		0.netbsd.pool.ntp.org
+restrict	0.netbsd.pool.ntp.org nomodify notrap
 server		1.netbsd.pool.ntp.org
+restrict	1.netbsd.pool.ntp.org nomodify notrap
 server		2.netbsd.pool.ntp.org
+restrict	2.netbsd.pool.ntp.org nomodify notrap
 server		3.netbsd.pool.ntp.org
+restrict	3.netbsd.pool.ntp.org nomodify notrap



CVS commit: src/etc

2014-01-06 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Mon Jan  6 11:25:03 UTC 2014

Modified Files:
src/etc: ntp.conf

Log Message:
Attempt to improve comments about how to choose servers,
and about what tos minsane does.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/etc/ntp.conf

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

Modified files:

Index: src/etc/ntp.conf
diff -u src/etc/ntp.conf:1.16 src/etc/ntp.conf:1.17
--- src/etc/ntp.conf:1.16	Mon Jan  6 11:21:34 2014
+++ src/etc/ntp.conf	Mon Jan  6 11:25:03 2014
@@ -1,4 +1,4 @@
-# $NetBSD: ntp.conf,v 1.16 2014/01/06 11:21:34 apb Exp $
+# $NetBSD: ntp.conf,v 1.17 2014/01/06 11:25:03 apb Exp $
 #
 # NetBSD default Network Time Protocol (NTP) configuration file for ntpd
 
@@ -23,7 +23,8 @@ driftfile	/var/db/ntp.drift
 
 logconfig	-syncstatus
 
-# This will help minimize disruptions due to network congestion. Don't
+# Refuse to set the local clock if there are too few good peers or servers.
+# This may help minimize disruptions due to network congestion. Don't
 # do this if you configure only one server!
 
 tos		minsane 2
@@ -77,21 +78,18 @@ restrict 127.0.0.1
 restrict ::1
 
 # Hereafter should be server or peer statements to configure other
-# hosts to exchange NTP packets with. Peers should be selected in such
-# a way that the network path to them is symmetric (that is, the series
-# of links and routers used to get to the peer is the same one that the
-# peer uses to get back. NTP assumes such symmetry in its network delay
-# calculation. NTP will apply an incorrect adjustment to timestamps
-# received from the peer if the path is not symmetric. This can result
-# in clock skew (your system clock being maintained consistently wrong
-# by a certain amount).
-#
-# The best way to select symmetric peers is to make sure that the
-# network path to them is as short as possible (this reduces the chance
-# that there is more than one network path between you and your peer).
-# You can measure these distances with the traceroute(8)  program. The
-# best place to start looking for NTP peers for your system is within
-# your own network, or at your Internet Service Provider (ISP).
+# hosts to exchange NTP packets with.
+#
+# See http://support.ntp.org/bin/view/Support/DesigningYourNTPNetwork
+# and http://support.ntp.org/bin/view/Support/SelectingOffsiteNTPServers
+# for advice.
+#
+# Peers should be selected in such a way that the network path to them
+# is short, uncongested, and symmetric (that is, the series of links
+# and routers used to get to the peer is the same one that the peer
+# uses to get back).  The best place to start looking for NTP peers for
+# your system is within your own network, or at your Internet Service
+# Provider (ISP).
 #
 # Ideally, you should select at least three other systems to talk NTP
 # with, for an what I tell you three times is true effect.
@@ -104,8 +102,13 @@ restrict ::1
 #server		an.ntp.server.goes.here
 #restrict	an.ntp.server.goes.here nomodify notrap
 
-# Public servers from the pool.ntp.org project. Volunteer's servers
-# are dynamically assigned to the CNAMES below via DNS round-robin.
+# The pool.ntp.org project coordinates public time servers provided by
+# volunteers.  See http://www.pool.ntp.org.  The *.netbsd.pool.ntp.org
+# servers are intended to be used by default on NetBSD hosts, but
+# servers that are closer to you are likely to be better.  Consider
+# using servers specific to your country, a nearby country, or your
+# continent.
+#
 # The pool.ntp.org project needs more volunteers! The only criteria to
 # join are a nailed-up connection and a static IP address. For details,
 # see the web page:



CVS commit: src/etc

2014-01-06 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Mon Jan  6 11:26:06 UTC 2014

Modified Files:
src/etc: ntp.conf

Log Message:
Another comment change, missed in previous commit.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/etc/ntp.conf

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

Modified files:

Index: src/etc/ntp.conf
diff -u src/etc/ntp.conf:1.17 src/etc/ntp.conf:1.18
--- src/etc/ntp.conf:1.17	Mon Jan  6 11:25:03 2014
+++ src/etc/ntp.conf	Mon Jan  6 11:26:06 2014
@@ -1,4 +1,4 @@
-# $NetBSD: ntp.conf,v 1.17 2014/01/06 11:25:03 apb Exp $
+# $NetBSD: ntp.conf,v 1.18 2014/01/06 11:26:06 apb Exp $
 #
 # NetBSD default Network Time Protocol (NTP) configuration file for ntpd
 
@@ -116,11 +116,6 @@ restrict ::1
 #	http://www.pool.ntp.org/join.html
 #
 
-# Depending on the vagaries of DNS can occasionally pull in the same
-# server twice. The following CNAMES are guaranteed to be disjoint, at
-# least over some short interval. The following servers are allocated
-# to the NetBSD project.
-
 server		0.netbsd.pool.ntp.org
 restrict	0.netbsd.pool.ntp.org nomodify notrap
 server		1.netbsd.pool.ntp.org



CVS import: src/share/zoneinfo

2013-12-26 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu Dec 26 16:41:00 UTC 2013

Update of /cvsroot/src/share/zoneinfo
In directory ivanova.netbsd.org:/tmp/cvs-serv26967

Log Message:
Import tzdata2013i from ftp://ftp.iana.org/tz/releases/tzdata2013i.tar.gz.

Major changes from tzdata2013d to tzdata2013e:

  Fiji (Pacific/Fiji) DST in 2013 starts on October 27, not October 20.

  Several zones have been turned into links, either to correct errors,
  or where the differences were in older data (before 1943) that was
  thought to be unreliable.

  Some time zone abbreviations have been changed.

Major changes from tzdata2013e to tzdata2013f:

  Tocantins, Brazil (America/Araguaina) DST will not start in September
  2013.

  Jordan (Asia/Amman) moves to permanent UTC+3 (instead of UTC+2 with
  permanent DST since 2012).

  Palestine (Asia/Hebron and Asia/Gaza) will end DST at 00:00, not
  01:00, as from September 2013.

Major changes from tzdata2013f to tzdata2013g:

  Morocco (Africa/Casablanca) now observes DST from the last Sunday
  in March to the last Sunday in October, not April to September.
  respectively.

Major changes from tzdata2013g to tzdata2013h:

  Libya (Africa/Tripoli) has switched its time zone back to UTC+2
  without DST, instead of UTC+1 with DST.

  Western Sahara (Africa/El_Aaiun) uses Morocco's DST rules.

  Acre, Brazil (America/Rio_Branco) and (we guess) western Amazonas,
  Brazil (America/Eirunepe), will switch from UTC-4 to UTC-5 on
  2013-11-10.

  Add entries for DST transitions in Morocco in the year 2038.  This
  avoids some year-2038 glitches introduced in 2013g.

Major changes from tzdata2013h to tzdata2013i:

  Jordan (Asia/Amman) switches back to UTC+2 standard time at 00:00 on
  December 20, 2013.  The 2006-2011 DST transition schedule is planned
  to resume in 2014.  The switch to permanent UTC+3 is cancelled.

  In 2004, Cuba (America/Havana) began DST on March 28, not April 4.

  The files solar87, solar88, and solar89 are no longer distributed.
  The zones built from those files (Asia/Riyadh{87,88,89}) and
  Mideast/Riyadh{87,88,89}) are no longer installed.  They were a
  negative experiment -- that is, a demonstration that tz data can
  represent solar time only with some difficulty and error.  Their
  presence in the distribution caused confusion, as Riyadh civil time
  was generally not solar time in those years.

Status:

Vendor Tag: TZDATA
Release Tags:   TZDATA2013I

U src/share/zoneinfo/antarctica
C src/share/zoneinfo/Makefile
C src/share/zoneinfo/README
U src/share/zoneinfo/africa
C src/share/zoneinfo/australasia
U src/share/zoneinfo/asia
U src/share/zoneinfo/northamerica
U src/share/zoneinfo/europe
N src/share/zoneinfo/leapseconds.awk
U src/share/zoneinfo/southamerica
U src/share/zoneinfo/pacificnew
U src/share/zoneinfo/etcetera
U src/share/zoneinfo/backward
U src/share/zoneinfo/systemv
U src/share/zoneinfo/factory
U src/share/zoneinfo/iso3166.tab
U src/share/zoneinfo/zone.tab
U src/share/zoneinfo/leapseconds
N src/share/zoneinfo/leap-seconds.list
U src/share/zoneinfo/yearistype.sh

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

cvs checkout -jTZDATA:yesterday -jTZDATA src/share/zoneinfo



CVS commit: src/share/zoneinfo

2013-12-26 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu Dec 26 17:09:39 UTC 2013

Modified Files:
src/share/zoneinfo: Makefile australasia
Added Files:
src/share/zoneinfo: README
Removed Files:
src/share/zoneinfo: solar87 solar88 solar89

Log Message:
Merge tzdata2013i.  We previously has tzdata2013d plus part of
tzdata2013e.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/share/zoneinfo/Makefile
cvs rdiff -u -r0 -r1.3 src/share/zoneinfo/README
cvs rdiff -u -r1.33 -r1.34 src/share/zoneinfo/australasia
cvs rdiff -u -r1.1.1.5 -r0 src/share/zoneinfo/solar87 \
src/share/zoneinfo/solar88 src/share/zoneinfo/solar89

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

Modified files:

Index: src/share/zoneinfo/Makefile
diff -u src/share/zoneinfo/Makefile:1.44 src/share/zoneinfo/Makefile:1.45
--- src/share/zoneinfo/Makefile:1.44	Wed Mar  6 17:32:51 2013
+++ src/share/zoneinfo/Makefile	Thu Dec 26 17:09:39 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.44 2013/03/06 17:32:51 christos Exp $
+#	$NetBSD: Makefile,v 1.45 2013/12/26 17:09:39 apb Exp $
 
 .include bsd.own.mk
 
@@ -11,6 +11,10 @@
 # for handling POSIX-style time zone environment variables,
 # change the line below (after finding the zone you want in the
 # time zone files, or adding it to a time zone file).
+# (When a POSIX-style environment variable is handled, the rules in the
+# template file are used to determine spring forward and fall back days and
+# times; the environment variable itself specifies UT offsets of standard and
+# summer time.)
 # Alternately, if you discover you've got the wrong time zone, you can just
 #	zic -p rightzone
 
@@ -44,11 +48,9 @@ YDATA=		africa antarctica asia australas
 		europe northamerica southamerica pacificnew etcetera factory \
 		backward
 NDATA=		systemv
-SDATA=		solar87 solar88 solar89
-TDATA=		$(YDATA) $(NDATA) $(SDATA)
+TDATA=		$(YDATA) $(NDATA)
 TABDATA=	iso3166.tab zone.tab
-DATA=		$(YDATA) $(NDATA) $(SDATA) leapseconds # yearistype.sh
-USNO=		usno1988 usno1989
+DATA=		$(YDATA) $(NDATA) leapseconds # yearistype.sh
 
 TZBUILDDIR=	${.OBJDIR}/builddir
 

Index: src/share/zoneinfo/australasia
diff -u src/share/zoneinfo/australasia:1.33 src/share/zoneinfo/australasia:1.34
--- src/share/zoneinfo/australasia:1.33	Fri Sep 20 20:46:01 2013
+++ src/share/zoneinfo/australasia	Thu Dec 26 17:09:39 2013
@@ -496,6 +496,7 @@ Zone Pacific/Auckland	11:39:04 -	LMT	186
 Zone Pacific/Chatham	12:13:48 -	LMT	1957 Jan  1
 			12:45	Chatham	CHA%sT
 
+Link Pacific/Auckland Antarctica/McMurdo
 
 # Auckland Is
 # uninhabited; Maori and Moriori, colonial settlers, pastoralists, sealers,
@@ -745,7 +746,7 @@ Zone Pacific/Funafuti	11:56:52 -	LMT	190
 # 1886-1891; Baker was similar but exact dates are not known.
 # Inhabited by civilians 1935-1942; U.S. military bases 1943-1944;
 # uninhabited thereafter.
-# Howland observed Hawaii Standard Time (UTC-10:30) in 1937;
+# Howland observed Hawaii Standard Time (UT-10:30) in 1937;
 # see page 206 of Elgen M. Long and Marie K. Long,
 # Amelia Earhart: the Mystery Solved, Simon  Schuster (2000).
 # So most likely Howland and Baker observed Hawaii Time from 1935
@@ -758,8 +759,17 @@ Zone Pacific/Funafuti	11:56:52 -	LMT	190
 # no information; was probably like Pacific/Kiritimati
 
 # Johnston
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Pacific/Johnston	-10:00	-	HST
+#
+# From Paul Eggert (2013-09-03):
+# In his memoirs of June 6th to October 4, 1945
+# http://www.315bw.org/Herb_Bach.htm (2005), Herbert C. Bach writes,
+# We started our letdown to Kwajalein Atoll and landed there at 5:00 AM
+# Johnston time, 1:30 AM Kwajalein time.  This was in June 1945, and
+# confirms that Johnston kept the same time as Honolulu in summer 1945.
+# We have no better information, so for now, assume this has been true
+# indefinitely into the past.
+#
+# See 'northamerica' for Pacific/Johnston.
 
 # Kingman
 # uninhabited

Added files:

Index: src/share/zoneinfo/README
diff -u /dev/null src/share/zoneinfo/README:1.3
--- /dev/null	Thu Dec 26 17:09:39 2013
+++ src/share/zoneinfo/README	Thu Dec 26 17:09:39 2013
@@ -0,0 +1,64 @@
+README for the tz distribution
+
+What time is it? -- Richard Deacon as The King
+Any time you want it to be. -- Frank Baxter as The Scientist
+	(from the Bell System film About Time)
+
+The Time Zone Database (often called tz or zoneinfo) contains code and
+data that represent the history of local time for many representative
+locations around the globe.  It is updated periodically to reflect
+changes made by political bodies to time zone boundaries, UTC offsets,
+and daylight-saving rules.
+
+Unless otherwise specified, all files in the tz code and data are in
+the public domain, so clarified as of 2009-05-17 by Arthur David Olson.
+The few exceptions are code derived from BSD, which uses the BSD license.
+
+Here is a recipe for acquiring, building, installing, and testing the

CVS commit: src/distrib/sets/lists/base

2013-12-26 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu Dec 26 17:12:55 UTC 2013

Modified Files:
src/distrib/sets/lists/base: mi

Log Message:
Mark usr/share/zoneinfo/{Asia,Mideast}/Riyadh{87,88,89} as obsolete.
These solar time zones were removed in tzdata2013i.
CrVS: Committing in .


To generate a diff of this commit:
cvs rdiff -u -r1.1052 -r1.1053 src/distrib/sets/lists/base/mi

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

Modified files:

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.1052 src/distrib/sets/lists/base/mi:1.1053
--- src/distrib/sets/lists/base/mi:1.1052	Wed Dec 25 22:08:24 2013
+++ src/distrib/sets/lists/base/mi	Thu Dec 26 17:12:55 2013
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1052 2013/12/25 22:08:24 christos Exp $
+# $NetBSD: mi,v 1.1053 2013/12/26 17:12:55 apb Exp $
 #
 # Note:	Don't delete entries from here - mark them as obsolete instead,
 #	unless otherwise stated below.
@@ -5092,9 +5092,9 @@
 ./usr/share/zoneinfo/Asia/Qyzylorda		base-sys-share		share
 ./usr/share/zoneinfo/Asia/Rangoon		base-sys-share		share
 ./usr/share/zoneinfo/Asia/Riyadh		base-sys-share		share
-./usr/share/zoneinfo/Asia/Riyadh87		base-sys-share		share
-./usr/share/zoneinfo/Asia/Riyadh88		base-sys-share		share
-./usr/share/zoneinfo/Asia/Riyadh89		base-sys-share		share
+./usr/share/zoneinfo/Asia/Riyadh87		base-obsolete		obsolete
+./usr/share/zoneinfo/Asia/Riyadh88		base-obsolete		obsolete
+./usr/share/zoneinfo/Asia/Riyadh89		base-obsolete		obsolete
 ./usr/share/zoneinfo/Asia/Saigon		base-sys-share		share
 ./usr/share/zoneinfo/Asia/Sakhalin		base-sys-share		share
 ./usr/share/zoneinfo/Asia/Samarkand		base-sys-share		share
@@ -5355,9 +5355,9 @@
 ./usr/share/zoneinfo/Mexico/BajaSur		base-sys-share		share
 ./usr/share/zoneinfo/Mexico/General		base-sys-share		share
 ./usr/share/zoneinfo/Mideast			base-sys-share
-./usr/share/zoneinfo/Mideast/Riyadh87		base-sys-share		share
-./usr/share/zoneinfo/Mideast/Riyadh88		base-sys-share		share
-./usr/share/zoneinfo/Mideast/Riyadh89		base-sys-share		share
+./usr/share/zoneinfo/Mideast/Riyadh87		base-obsolete		obsolete
+./usr/share/zoneinfo/Mideast/Riyadh88		base-obsolete		obsolete
+./usr/share/zoneinfo/Mideast/Riyadh89		base-obsolete		obsolete
 ./usr/share/zoneinfo/Moscow			base-obsolete		obsolete
 ./usr/share/zoneinfo/NZbase-sys-share		share
 ./usr/share/zoneinfo/NZ-CHAT			base-sys-share		share



CVS commit: src/doc

2013-12-26 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu Dec 26 18:54:07 UTC 2013

Modified Files:
src/doc: 3RDPARTY

Log Message:
tzcode2013i and tzdata2013i have been merged.


To generate a diff of this commit:
cvs rdiff -u -r1.1077 -r1.1078 src/doc/3RDPARTY

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.1077 src/doc/3RDPARTY:1.1078
--- src/doc/3RDPARTY:1.1077	Thu Dec 26 18:38:21 2013
+++ src/doc/3RDPARTY	Thu Dec 26 18:54:07 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1077 2013/12/26 18:38:21 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1078 2013/12/26 18:54:07 apb Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1257,7 +1257,7 @@ Notes:
 Added changes from a5 - a12 manually.
 
 Package:	tz
-Version:	tzcode2013i / tzdata2013d
+Version:	tzcode2013i / tzdata2013i
 Current Vers:	tzcode2013i / tzdata2013i
 Maintainer:	Paul Eggert egg...@cs.ucla.edu
 Archive Site:	ftp://ftp.iana.org/tz/releases/



CVS commit: src/doc

2013-12-26 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu Dec 26 18:56:23 UTC 2013

Modified Files:
src/doc: CHANGES

Log Message:
zoneinfo: Import tzdata2013i. [apb 20131226]
Also fix a typp in the previous line, for tzcode2013i.


To generate a diff of this commit:
cvs rdiff -u -r1.1868 -r1.1869 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/CHANGES
diff -u src/doc/CHANGES:1.1868 src/doc/CHANGES:1.1869
--- src/doc/CHANGES:1.1868	Thu Dec 26 18:38:09 2013
+++ src/doc/CHANGES	Thu Dec 26 18:56:23 2013
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1868 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1869 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -316,4 +316,5 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	librt: Added shm_open(3) and shm_unlink(3). [rmind 20131219]
 	acafh(4): Added driver for Individual Computers ACA500. Enjoy NetBSD
 		on an Amiga 500.  [rkujawa 20131222] 
-	libc: Update to tzcode2012i. [christos 20131226]
+	libc: Update to tzcode2013i. [christos 20131226]
+	zoneinfo: Import tzdata2013i. [apb 20131226]



CVS commit: src

2013-12-26 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu Dec 26 20:14:38 UTC 2013

Modified Files:
src/distrib/sets/lists/base: mi
src/etc/mtree: NetBSD.dist.base

Log Message:
Remove empty directory /usr/share/zoneinfo/Mideast.
The files that used to be in this directory were removed in tzdata2013i.


To generate a diff of this commit:
cvs rdiff -u -r1.1053 -r1.1054 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.130 -r1.131 src/etc/mtree/NetBSD.dist.base

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

Modified files:

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.1053 src/distrib/sets/lists/base/mi:1.1054
--- src/distrib/sets/lists/base/mi:1.1053	Thu Dec 26 17:12:55 2013
+++ src/distrib/sets/lists/base/mi	Thu Dec 26 20:14:38 2013
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1053 2013/12/26 17:12:55 apb Exp $
+# $NetBSD: mi,v 1.1054 2013/12/26 20:14:38 apb Exp $
 #
 # Note:	Don't delete entries from here - mark them as obsolete instead,
 #	unless otherwise stated below.
@@ -5354,7 +5354,7 @@
 ./usr/share/zoneinfo/Mexico/BajaNorte		base-sys-share		share
 ./usr/share/zoneinfo/Mexico/BajaSur		base-sys-share		share
 ./usr/share/zoneinfo/Mexico/General		base-sys-share		share
-./usr/share/zoneinfo/Mideast			base-sys-share
+./usr/share/zoneinfo/Mideast			base-obsolete		obsolete
 ./usr/share/zoneinfo/Mideast/Riyadh87		base-obsolete		obsolete
 ./usr/share/zoneinfo/Mideast/Riyadh88		base-obsolete		obsolete
 ./usr/share/zoneinfo/Mideast/Riyadh89		base-obsolete		obsolete

Index: src/etc/mtree/NetBSD.dist.base
diff -u src/etc/mtree/NetBSD.dist.base:1.130 src/etc/mtree/NetBSD.dist.base:1.131
--- src/etc/mtree/NetBSD.dist.base:1.130	Sun Dec  1 09:13:54 2013
+++ src/etc/mtree/NetBSD.dist.base	Thu Dec 26 20:14:38 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.base,v 1.130 2013/12/01 09:13:54 martin Exp $
+#	$NetBSD: NetBSD.dist.base,v 1.131 2013/12/26 20:14:38 apb Exp $
 #	@(#)4.4BSD.dist	8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -1254,7 +1254,6 @@
 ./usr/share/zoneinfo/Europe
 ./usr/share/zoneinfo/Indian
 ./usr/share/zoneinfo/Mexico
-./usr/share/zoneinfo/Mideast
 ./usr/share/zoneinfo/Pacific
 ./usr/share/zoneinfo/US
 ./var



CVS commit: src/share/zoneinfo

2013-12-26 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Thu Dec 26 20:19:17 UTC 2013

Modified Files:
src/share/zoneinfo: Makefile

Log Message:
Change comments and variables to reduce differences with upstream.
No change in the installed files.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/share/zoneinfo/Makefile

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

Modified files:

Index: src/share/zoneinfo/Makefile
diff -u src/share/zoneinfo/Makefile:1.45 src/share/zoneinfo/Makefile:1.46
--- src/share/zoneinfo/Makefile:1.45	Thu Dec 26 17:09:39 2013
+++ src/share/zoneinfo/Makefile	Thu Dec 26 20:19:17 2013
@@ -1,12 +1,7 @@
-#	$NetBSD: Makefile,v 1.45 2013/12/26 17:09:39 apb Exp $
+#	$NetBSD: Makefile,v 1.46 2013/12/26 20:19:17 apb Exp $
 
 .include bsd.own.mk
 
-# Change the line below for your time zone (after finding the zone you want in
-# the time zone files, or adding it to a time zone file).
-# Alternately, if you discover you've got the wrong time zone, you can just
-#	zic -l rightzone
-
 # If you want something other than Eastern United States time as a template
 # for handling POSIX-style time zone environment variables,
 # change the line below (after finding the zone you want in the
@@ -17,9 +12,16 @@
 # summer time.)
 # Alternately, if you discover you've got the wrong time zone, you can just
 #	zic -p rightzone
+# to correct things.
+# Use the command
+#	make zonenames
+# to get a list of the values you can use for POSIXRULES.
+# If you want POSIX compatibility, use America/New_York.
 
-POSIXRULES=	US/Pacific
+POSIXRULES=	America/New_York
 
+# Compiled time zone information is placed in the TZDIR directory
+# (and subdirectories).
 # Use an absolute path name for TZDIR unless you're just testing the software.
 # Note: ${DESTDIR} is prepended to this for the actual copy.
 
@@ -27,7 +29,7 @@ TZDIR=	/usr/share/zoneinfo
 
 # If you always want time values interpreted as seconds since the epoch
 # (not counting leap seconds), use
-# 	REDO=		posix_only
+#	REDO=		posix_only
 # below.  If you always want right time values interpreted as seconds since
 # the epoch (counting leap seconds), use
 #	REDO=		right_only
@@ -44,10 +46,10 @@ REDO=		posix_only
 # Since . may not be in PATH...
 YEARISTYPE=	${HOST_SH} ${.CURDIR}/yearistype.sh
 
-YDATA=		africa antarctica asia australasia \
-		europe northamerica southamerica pacificnew etcetera factory \
-		backward
-NDATA=		systemv
+PRIMARY_YDATA=	africa antarctica asia australasia \
+		europe northamerica southamerica
+YDATA=		$(PRIMARY_YDATA) pacificnew etcetera backward
+NDATA=		systemv factory
 TDATA=		$(YDATA) $(NDATA)
 TABDATA=	iso3166.tab zone.tab
 DATA=		$(YDATA) $(NDATA) leapseconds # yearistype.sh



CVS commit: src

2013-12-17 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Tue Dec 17 09:54:08 UTC 2013

Modified Files:
src/bin/chmod: chmod.1
src/bin/cp: cp.1
src/sbin/chown: chgrp.1 chown.8
src/usr.bin/chflags: chflags.1

Log Message:
In all man pages that say:

The -H, -L and -P options are ignored unless the -R option is
specified.  In addition, these options override each other and the
command's actions are determined by the last one specified.

Add:

The default is as if the -P option had been specified.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/bin/chmod/chmod.1
cvs rdiff -u -r1.42 -r1.43 src/bin/cp/cp.1
cvs rdiff -u -r1.5 -r1.6 src/sbin/chown/chgrp.1
cvs rdiff -u -r1.6 -r1.7 src/sbin/chown/chown.8
cvs rdiff -u -r1.23 -r1.24 src/usr.bin/chflags/chflags.1

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

Modified files:

Index: src/bin/chmod/chmod.1
diff -u src/bin/chmod/chmod.1:1.24 src/bin/chmod/chmod.1:1.25
--- src/bin/chmod/chmod.1:1.24	Mon Oct 22 17:47:06 2012
+++ src/bin/chmod/chmod.1	Tue Dec 17 09:54:08 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: chmod.1,v 1.24 2012/10/22 17:47:06 christos Exp $
+.\	$NetBSD: chmod.1,v 1.25 2013/12/17 09:54:08 apb Exp $
 .\
 .\ Copyright (c) 1989, 1990, 1993, 1994
 .\	The Regents of the University of California.  All rights reserved.
@@ -106,6 +106,9 @@ options are ignored unless the
 option is specified.
 In addition, these options override each other and the
 command's actions are determined by the last one specified.
+The default is as if the
+.Fl P
+option had been specified.
 .Pp
 Only the owner of a file or the super-user is permitted to change
 the mode of a file.

Index: src/bin/cp/cp.1
diff -u src/bin/cp/cp.1:1.42 src/bin/cp/cp.1:1.43
--- src/bin/cp/cp.1:1.42	Sun Mar 25 22:37:08 2012
+++ src/bin/cp/cp.1	Tue Dec 17 09:54:08 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: cp.1,v 1.42 2012/03/25 22:37:08 wiz Exp $
+.\	$NetBSD: cp.1,v 1.43 2013/12/17 09:54:08 apb Exp $
 .\
 .\ Copyright (c) 1989, 1990, 1993, 1994
 .\	The Regents of the University of California.  All rights reserved.
@@ -213,6 +213,9 @@ options are ignored unless the
 option is specified.
 In addition, these options override each other and the
 command's actions are determined by the last one specified.
+The default is as if the
+.Fl P
+option had been specified.
 .Sh EXIT STATUS
 .Ex -std cp
 .Sh COMPATIBILITY

Index: src/sbin/chown/chgrp.1
diff -u src/sbin/chown/chgrp.1:1.5 src/sbin/chown/chgrp.1:1.6
--- src/sbin/chown/chgrp.1:1.5	Mon Oct 22 18:02:26 2012
+++ src/sbin/chown/chgrp.1	Tue Dec 17 09:54:08 2013
@@ -29,7 +29,7 @@
 .\ SUCH DAMAGE.
 .\
 .\ from: @(#)chgrp.1	8.3 (Berkeley) 3/31/94
-.\	$NetBSD: chgrp.1,v 1.5 2012/10/22 18:02:26 christos Exp $
+.\	$NetBSD: chgrp.1,v 1.6 2013/12/17 09:54:08 apb Exp $
 .\
 .Dd October 22, 2012
 .Dt CHGRP 1
@@ -118,6 +118,9 @@ options are ignored unless the
 option is specified.
 In addition, these options override each other and the
 command's actions are determined by the last one specified.
+The default is as if the
+.Fl P
+option had been specified.
 .Pp
 The
 .Ar group

Index: src/sbin/chown/chown.8
diff -u src/sbin/chown/chown.8:1.6 src/sbin/chown/chown.8:1.7
--- src/sbin/chown/chown.8:1.6	Tue Oct 23 17:30:59 2012
+++ src/sbin/chown/chown.8	Tue Dec 17 09:54:08 2013
@@ -26,7 +26,7 @@
 .\ SUCH DAMAGE.
 .\
 .\ from: @(#)chown.8	8.3 (Berkeley) 3/31/94
-.\	$NetBSD: chown.8,v 1.6 2012/10/23 17:30:59 wiz Exp $
+.\	$NetBSD: chown.8,v 1.7 2013/12/17 09:54:08 apb Exp $
 .\
 .Dd October 22, 2012
 .Dt CHOWN 8
@@ -104,6 +104,9 @@ options are ignored unless the
 option is specified.
 In addition, these options override each other and the
 command's actions are determined by the last one specified.
+The default is as if the
+.Fl P
+option had been specified.
 .Pp
 The
 .Fl L

Index: src/usr.bin/chflags/chflags.1
diff -u src/usr.bin/chflags/chflags.1:1.23 src/usr.bin/chflags/chflags.1:1.24
--- src/usr.bin/chflags/chflags.1:1.23	Wed Dec 12 13:30:06 2012
+++ src/usr.bin/chflags/chflags.1	Tue Dec 17 09:54:08 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: chflags.1,v 1.23 2012/12/12 13:30:06 wiz Exp $
+.\	$NetBSD: chflags.1,v 1.24 2013/12/17 09:54:08 apb Exp $
 .\
 .\ Copyright (c) 1989, 1990, 1993, 1994
 .\	The Regents of the University of California.  All rights reserved.
@@ -116,6 +116,9 @@ options are ignored unless the
 option is specified.
 In addition, these options override each other and the
 command's actions are determined by the last one specified.
+The default is as if the
+.Fl P
+option had been specified.
 .Pp
 The
 .Fl o



CVS commit: src/usr.bin/gencat

2013-11-27 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Wed Nov 27 17:38:11 UTC 2013

Modified Files:
src/usr.bin/gencat: gencat.c

Log Message:
Use LIST_FOREACH, LIST_NEXT, etc., instead of direct access to
the internals of queue.h structs.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/usr.bin/gencat/gencat.c

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

Modified files:

Index: src/usr.bin/gencat/gencat.c
diff -u src/usr.bin/gencat/gencat.c:1.35 src/usr.bin/gencat/gencat.c:1.36
--- src/usr.bin/gencat/gencat.c:1.35	Fri Mar  9 18:54:28 2012
+++ src/usr.bin/gencat/gencat.c	Wed Nov 27 17:38:11 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: gencat.c,v 1.35 2012/03/09 18:54:28 ginsbach Exp $	*/
+/*	$NetBSD: gencat.c,v 1.36 2013/11/27 17:38:11 apb Exp $	*/
 
 /*
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 #if defined(__RCSID)  !defined(lint)
-__RCSID($NetBSD: gencat.c,v 1.35 2012/03/09 18:54:28 ginsbach Exp $);
+__RCSID($NetBSD: gencat.c,v 1.36 2013/11/27 17:38:11 apb Exp $);
 #endif
 
 /***
@@ -108,7 +108,7 @@ struct _setT {
 LIST_ENTRY(_setT) entries;
 };
 
-static LIST_HEAD(sethead, _setT) sethead;
+static LIST_HEAD(sethead, _setT) sethead = LIST_HEAD_INITIALIZER(sethead);
 static struct _setT *curSet;
 
 static const char *curfile;
@@ -470,8 +470,6 @@ MCParse(int fd)
 	int setid = 0;
 	charquote = 0;
 
-	/* XXX: init sethead? */
-
 	while ((cptr = get_line(fd))) {
 		if (*cptr == '$') {
 			++cptr;
@@ -565,8 +563,6 @@ MCReadCat(int fd)
 	int	m, s;
 	int	msgno, setno;
 
-	/* XXX init sethead? */
-
 	n = read(fd, cat_hdr, sizeof(cat_hdr));
 	if (n  (ssize_t)sizeof(cat_hdr)) {
 		if (n == 0)
@@ -674,12 +670,10 @@ MCWriteCat(int fd)
 	nmsgs = 0;
 	string_size = 0;
 
-	for (set = sethead.lh_first; set != NULL;
-	set = set-entries.le_next) {
+	LIST_FOREACH(set, sethead, entries) {
 		nsets++;
 
-		for (msg = set-msghead.lh_first; msg != NULL;
-		msg = msg-entries.le_next) {
+		LIST_FOREACH(msg, set-msghead, entries) {
 			nmsgs++;
 			string_size += strlen(msg-str) + 1;
 		}
@@ -725,12 +719,10 @@ MCWriteCat(int fd)
 
 	msg_index = 0;
 	msg_offset = 0;
-	for (set = sethead.lh_first; set != NULL;
-	set = set-entries.le_next) {
+	LIST_FOREACH(set, sethead, entries) {
 
 		nmsgs = 0;
-		for (msg = set-msghead.lh_first; msg != NULL;
-		msg = msg-entries.le_next) {
+		LIST_FOREACH(msg, set-msghead, entries) {
 			int32_t msg_len = strlen(msg-str) + 1;
 
 			msg_hdr-__msgno = htonl(msg-msgId);
@@ -770,9 +762,10 @@ MCAddSet(int setId)
 		/* NOTREACHED */
 	}
 
-	p = sethead.lh_first;
+	p = LIST_FIRST(sethead);
 	q = NULL;
-	for (; p != NULL  p-setId  setId; q = p, p = p-entries.le_next);
+	for (; p != NULL  p-setId  setId; q = p, p = LIST_NEXT(p, entries))
+		continue;
 
 	if (p  p-setId == setId) {
 		;
@@ -810,9 +803,10 @@ MCAddMsg(int msgId, const char *str)
 		/* NOTREACHED */
 	}
 
-	p = curSet-msghead.lh_first;
+	p = LIST_FIRST(curSet-msghead);
 	q = NULL;
-	for (; p != NULL  p-msgId  msgId; q = p, p = p-entries.le_next);
+	for (; p != NULL  p-msgId  msgId; q = p, p = LIST_NEXT(p, entries))
+		continue;
 
 	if (p  p-msgId == msgId) {
 		free(p-str);
@@ -846,12 +840,13 @@ MCDelSet(int setId)
 		/* NOTREACHED */
 	}
 
-	set = sethead.lh_first;
-	for (; set != NULL  set-setId  setId; set = set-entries.le_next);
+	set = LIST_FIRST(sethead);
+	for (; set != NULL  set-setId  setId; set = LIST_NEXT(set, entries))
+		continue;
 
 	if (set  set-setId == setId) {
 		LIST_REMOVE(set, entries);
-		while ((msg = set-msghead.lh_first) != NULL) {
+		while ((msg = LIST_FIRST(set-msghead)) != NULL) {
 			LIST_REMOVE(msg, entries);
 			free(msg-str);
 			free(msg);
@@ -870,8 +865,9 @@ MCDelMsg(int msgId)
 	if (!curSet)
 		error(you can't delete a message before defining the set);
 
-	msg = curSet-msghead.lh_first;
-	for (; msg != NULL  msg-msgId  msgId; msg = msg-entries.le_next);
+	msg = LIST_FIRST(curSet-msghead);
+	for (; msg != NULL  msg-msgId  msgId; msg = LIST_NEXT(msg, entries))
+		continue;
 
 	if (msg  msg-msgId == msgId) {
 		LIST_REMOVE(msg, entries);



CVS commit: src/etc

2013-11-01 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Nov  1 06:22:24 UTC 2013

Modified Files:
src/etc: Makefile.params

Log Message:
Reinstate .include bsd.own.mk.  Without this, many variables are undefined.

Define DISTRIBVER in the same way that src/etc/Makefile defines it.
Without this, make params in src/Makefile uses an undefined value.

Remove a spurious 3.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/etc/Makefile.params

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

Modified files:

Index: src/etc/Makefile.params
diff -u src/etc/Makefile.params:1.4 src/etc/Makefile.params:1.5
--- src/etc/Makefile.params:1.4	Wed Oct 30 15:15:12 2013
+++ src/etc/Makefile.params	Fri Nov  1 06:22:24 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.params,v 1.4 2013/10/30 15:15:12 apb Exp $
+#	$NetBSD: Makefile.params,v 1.5 2013/11/01 06:22:24 apb Exp $
 #
 # Makefile fragment for printing build parameters.
 #
@@ -35,6 +35,8 @@
 #		@${PRINT_PARAMS}
 #
 
+.include bsd.own.mk
+
 RELEASEVARS=	BSDOBJDIR BSDSRCDIR BUILDID \
 		DESTDIR DISTRIBVER EXTERNAL_TOOLCHAIN HAVE_GCC HAVE_GDB \
 		HAVE_LLVM HAVE_PCC INSTALLWORLDDIR \
@@ -61,6 +63,17 @@ RELEASEVARS=	BSDOBJDIR BSDSRCDIR BUILDID
 		USETOOLS USR_OBJMACHINE \
 		X11SRCDIR X11FLAVOUR
 
+
+#
+# Duplicate the DISTRIBVER setting from src/etc/Makefile.
+#
+.ifndef DISTRIBVER
+DISTRIBVER!=	${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh
+.endif
+
+#
+# _params does the printing.
+#
 _params_redirect?= # empty
 
 _params: .PHONY
@@ -69,7 +82,7 @@ _params: .PHONY
 	@printf %20s = '%-s'\n ${var} ${${var}:C/'/'''/gW:Q} \
 	${_params_redirect}
 .else
-	@printf 3 %20s = (undefined)\n ${var} \
+	@printf %20s = (undefined)\n ${var} \
 	${_params_redirect}
 .endif
 .endfor



CVS commit: src/usr.bin/pkill

2013-11-01 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Nov  1 07:49:00 UTC 2013

Modified Files:
src/usr.bin/pkill: pkill.1

Log Message:
Document that patterns are specified using extended regular expressions.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/pkill/pkill.1

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

Modified files:

Index: src/usr.bin/pkill/pkill.1
diff -u src/usr.bin/pkill/pkill.1:1.25 src/usr.bin/pkill/pkill.1:1.26
--- src/usr.bin/pkill/pkill.1:1.25	Mon Jun  3 21:59:41 2013
+++ src/usr.bin/pkill/pkill.1	Fri Nov  1 07:49:00 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: pkill.1,v 1.25 2013/06/03 21:59:41 wiz Exp $
+.\	$NetBSD: pkill.1,v 1.26 2013/11/01 07:49:00 apb Exp $
 .\
 .\ Copyright (c) 2002 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd June 3, 2013
+.Dd November 1, 2013
 .Dt PKILL 1
 .Os
 .Sh NAME
@@ -77,6 +77,12 @@ The
 command searches the process table on the running system and sets the
 priority of all processes that match the criteria given on the command line.
 .Pp
+By default, matching applies to any substring of the command name
+.Pq Va argv[0] ,
+but options may be used to change this.
+Patterns are specified using extended regular expressions (see
+.Xr re_format 7 ) .
+.Pp
 The following options are available for
 .Nm pkill
 and



CVS commit: src/etc

2013-11-01 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Nov  1 11:09:05 UTC 2013

Modified Files:
src/etc: Makefile.params

Log Message:
HOST_SH is defined in bsd.sys.mk, so we need to include that
as well as bsd.own.mk.  Revert previous use of ${HOST_SH:Ush}.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/etc/Makefile.params

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

Modified files:

Index: src/etc/Makefile.params
diff -u src/etc/Makefile.params:1.6 src/etc/Makefile.params:1.7
--- src/etc/Makefile.params:1.6	Fri Nov  1 10:00:51 2013
+++ src/etc/Makefile.params	Fri Nov  1 11:09:05 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.params,v 1.6 2013/11/01 10:00:51 martin Exp $
+#	$NetBSD: Makefile.params,v 1.7 2013/11/01 11:09:05 apb Exp $
 #
 # Makefile fragment for printing build parameters.
 #
@@ -35,7 +35,8 @@
 #		@${PRINT_PARAMS}
 #
 
-.include bsd.own.mk
+.include bsd.own.mk	# for some variables
+.include bsd.sys.mk	# for more variables
 
 RELEASEVARS=	BSDOBJDIR BSDSRCDIR BUILDID \
 		DESTDIR DISTRIBVER EXTERNAL_TOOLCHAIN HAVE_GCC HAVE_GDB \
@@ -68,7 +69,7 @@ RELEASEVARS=	BSDOBJDIR BSDSRCDIR BUILDID
 # Duplicate the DISTRIBVER setting from src/etc/Makefile.
 #
 .ifndef DISTRIBVER
-DISTRIBVER!=	${HOST_SH:Ush} ${NETBSDSRCDIR}/sys/conf/osrelease.sh
+DISTRIBVER!=	${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh
 .endif
 
 #



<    1   2   3   4   5   6   7   8   >