Re: CVS commit: src/usr.bin/chflags

2023-05-24 Thread Jan Schaumann
Valery Ushakov  wrote:
> On Wed, May 24, 2023 at 22:33:17 +, Jan Schaumann wrote:

> > Briefly describe the 'arch' and 'nodump' flags.
> 
> What makes them special and why is that these two have to be described
> here and not in chflags(2), where the flags are actually defined?

Unlike the other flags, they are not intuitive.  As
they are exposed to the end-user (versus the
programmer), it seems useful to describe them in
section 1 of the manual pages.

> In any case, please, at least skim through mdoc.samples(7) once.

I did.  I suspect sometimes what's "obvious" ends up
being subjective, though.  'Cm' looked to me to be
intended for use with non-dash-preceded flags, not as
arguments to the command.  I might even have
considered 'Ar' more "obvious".

-Jan


Re: CVS commit: src/usr.bin/chflags

2023-05-24 Thread Valery Ushakov
On Wed, May 24, 2023 at 22:33:17 +, Jan Schaumann wrote:

> Module Name:  src
> Committed By: jschauma
> Date: Wed May 24 22:33:17 UTC 2023
> 
> Modified Files:
>   src/usr.bin/chflags: chflags.1
> 
> Log Message:
> Briefly describe the 'arch' and 'nodump' flags.

What makes them special and why is that these two have to be described
here and not in chflags(2), where the flags are actually defined?

In any case, please, at least skim through mdoc.samples(7) once.
Using Va, a "generic variable reference", is pretty obviously a wrong
choice for a command line argument I would think.  And nothing in the
surrounding source to cargo-cult from (which is not a bad strategy, in
general, if done judiciously) suggests that particular choice.

-uwe


CVS commit: src/usr.bin/chflags

2023-05-24 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu May 25 01:31:27 UTC 2023

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

Log Message:
chflags(1): fix wrong markup in previous


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 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.



CVS commit: src/usr.bin/chflags

2023-05-24 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu May 25 01:31:27 UTC 2023

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

Log Message:
chflags(1): fix wrong markup in previous


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 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/usr.bin/chflags/chflags.1
diff -u src/usr.bin/chflags/chflags.1:1.29 src/usr.bin/chflags/chflags.1:1.30
--- src/usr.bin/chflags/chflags.1:1.29	Wed May 24 22:33:17 2023
+++ src/usr.bin/chflags/chflags.1	Thu May 25 01:31:27 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: chflags.1,v 1.29 2023/05/24 22:33:17 jschauma Exp $
+.\"	$NetBSD: chflags.1,v 1.30 2023/05/25 01:31:27 uwe Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -105,13 +105,13 @@ The following keywords are currently def
 .El
 .Pp
 The
-.Va arch
+.Cm arch
 flag is only used in connection with certain foreign
 filesystems (e.g., MS-DOS, where it indicates whether
 a file has been modified since it was last backed up).
 .Pp
 A file with the
-.Va nodump
+.Cm nodump
 flag set will by default only be backed up by
 .Xr dump 8
 during full backups.



CVS commit: src/usr.bin/chflags

2023-05-24 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Wed May 24 22:33:17 UTC 2023

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

Log Message:
Briefly describe the 'arch' and 'nodump' flags.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 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/usr.bin/chflags/chflags.1
diff -u src/usr.bin/chflags/chflags.1:1.28 src/usr.bin/chflags/chflags.1:1.29
--- src/usr.bin/chflags/chflags.1:1.28	Fri May 19 19:50:59 2023
+++ src/usr.bin/chflags/chflags.1	Wed May 24 22:33:17 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: chflags.1,v 1.28 2023/05/19 19:50:59 uwe Exp $
+.\"	$NetBSD: chflags.1,v 1.29 2023/05/24 22:33:17 jschauma Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\"	@(#)chflags.1	8.4 (Berkeley) 5/2/95
 .\"
-.Dd May 19, 2023
+.Dd May 24, 2023
 .Dt CHFLAGS 1
 .Os
 .Sh NAME
@@ -104,6 +104,18 @@ The following keywords are currently def
 .It Li uchg Ta user immutable Ta owner or super-user
 .El
 .Pp
+The
+.Va arch
+flag is only used in connection with certain foreign
+filesystems (e.g., MS-DOS, where it indicates whether
+a file has been modified since it was last backed up).
+.Pp
+A file with the
+.Va nodump
+flag set will by default only be backed up by
+.Xr dump 8
+during full backups.
+.Pp
 Putting the letters
 .Sq Cm no
 before a keyword causes the flag to be turned off.



CVS commit: src/usr.bin/chflags

2023-05-24 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Wed May 24 22:33:17 UTC 2023

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

Log Message:
Briefly describe the 'arch' and 'nodump' flags.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 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.



CVS commit: src/usr.bin/m4

2023-05-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed May 24 22:14:31 UTC 2023

Modified Files:
src/usr.bin/m4: gnum4.c

Log Message:
use strchr


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/m4/gnum4.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/m4/gnum4.c
diff -u src/usr.bin/m4/gnum4.c:1.12 src/usr.bin/m4/gnum4.c:1.13
--- src/usr.bin/m4/gnum4.c:1.12	Wed May 24 17:58:19 2023
+++ src/usr.bin/m4/gnum4.c	Wed May 24 18:14:31 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: gnum4.c,v 1.12 2023/05/24 21:58:19 lukem Exp $ */
+/* $NetBSD: gnum4.c,v 1.13 2023/05/24 22:14:31 christos Exp $ */
 /* $OpenBSD: gnum4.c,v 1.39 2008/08/21 21:01:04 espie Exp $ */
 
 /*
@@ -33,7 +33,7 @@
 #include "nbtool_config.h"
 #endif
 #include 
-__RCSID("$NetBSD: gnum4.c,v 1.12 2023/05/24 21:58:19 lukem Exp $");
+__RCSID("$NetBSD: gnum4.c,v 1.13 2023/05/24 22:14:31 christos Exp $");
 
 #include 
 #include 
@@ -438,7 +438,7 @@ twiddle(const char *p)
 			p+=2;
 			continue;
 		}
-		if (*p == '(' || *p == ')' || *p == '|' || *p == '{' || *p == '}')
+		if (strchr("()|{}", *p) != NULL)
 			addchar('\\');
 
 		addchar(*p);



CVS commit: src/usr.bin/m4

2023-05-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed May 24 22:14:31 UTC 2023

Modified Files:
src/usr.bin/m4: gnum4.c

Log Message:
use strchr


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/m4/gnum4.c

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



CVS commit: src/usr.bin/m4

2023-05-24 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Wed May 24 21:58:19 UTC 2023

Modified Files:
src/usr.bin/m4: gnum4.c

Log Message:
m4 -g: { and } aren't supported in patsubst() or regexp()

When running in -g (GNU m4) emulation, patsubst() and regexp()
use the GNU m4 emacs-like regexes as implemented by gnulib,
which don't support {..} intervals.
When converting a GNU m4 regex to a POSIX ERE, escape raw { and }.

Autoconf relies on the GNU m4 regex behaviour.

See:
- 
https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Redefined-M4-Macros.html
- 
https://www.gnu.org/software/gnulib/manual/html_node/emacs-regular-expression-syntax.html

This fixes the tools/compat/configure regen.

PR toolchain/57431


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/m4/gnum4.c

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



CVS commit: src/usr.bin/m4

2023-05-24 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Wed May 24 21:58:19 UTC 2023

Modified Files:
src/usr.bin/m4: gnum4.c

Log Message:
m4 -g: { and } aren't supported in patsubst() or regexp()

When running in -g (GNU m4) emulation, patsubst() and regexp()
use the GNU m4 emacs-like regexes as implemented by gnulib,
which don't support {..} intervals.
When converting a GNU m4 regex to a POSIX ERE, escape raw { and }.

Autoconf relies on the GNU m4 regex behaviour.

See:
- 
https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Redefined-M4-Macros.html
- 
https://www.gnu.org/software/gnulib/manual/html_node/emacs-regular-expression-syntax.html

This fixes the tools/compat/configure regen.

PR toolchain/57431


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/m4/gnum4.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/m4/gnum4.c
diff -u src/usr.bin/m4/gnum4.c:1.11 src/usr.bin/m4/gnum4.c:1.12
--- src/usr.bin/m4/gnum4.c:1.11	Tue Dec  7 20:24:07 2021
+++ src/usr.bin/m4/gnum4.c	Wed May 24 21:58:19 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: gnum4.c,v 1.11 2021/12/07 20:24:07 rillig Exp $ */
+/* $NetBSD: gnum4.c,v 1.12 2023/05/24 21:58:19 lukem Exp $ */
 /* $OpenBSD: gnum4.c,v 1.39 2008/08/21 21:01:04 espie Exp $ */
 
 /*
@@ -33,7 +33,7 @@
 #include "nbtool_config.h"
 #endif
 #include 
-__RCSID("$NetBSD: gnum4.c,v 1.11 2021/12/07 20:24:07 rillig Exp $");
+__RCSID("$NetBSD: gnum4.c,v 1.12 2023/05/24 21:58:19 lukem Exp $");
 
 #include 
 #include 
@@ -438,7 +438,7 @@ twiddle(const char *p)
 			p+=2;
 			continue;
 		}
-		if (*p == '(' || *p == ')' || *p == '|')
+		if (*p == '(' || *p == ')' || *p == '|' || *p == '{' || *p == '}')
 			addchar('\\');
 
 		addchar(*p);



CVS commit: src/external/gpl3/autoconf/dist/lib/autoconf

2023-05-24 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Wed May 24 21:49:38 UTC 2023

Modified Files:
src/external/gpl3/autoconf/dist/lib/autoconf: general.m4

Log Message:
revert previous: autoconf doesn't use EREs

autoconf relies upon GNU m4 emacs-style regexs, which
don't support intervals so don't escape these.
A fix to usr.bin/m4 -g (GNU m4 emulation) is incoming.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/autoconf/dist/lib/autoconf/general.m4

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/autoconf/dist/lib/autoconf/general.m4
diff -u src/external/gpl3/autoconf/dist/lib/autoconf/general.m4:1.2 src/external/gpl3/autoconf/dist/lib/autoconf/general.m4:1.3
--- src/external/gpl3/autoconf/dist/lib/autoconf/general.m4:1.2	Wed May 24 14:34:16 2023
+++ src/external/gpl3/autoconf/dist/lib/autoconf/general.m4	Wed May 24 21:49:38 2023
@@ -2119,7 +2119,7 @@ m4_define([AC_DEFINE_UNQUOTED], [_AC_DEF
 # no backslash, no command substitution, no complex variable
 # substitution, and no quadrigraphs.
 m4_define([_AC_DEFINE_UNQUOTED],
-[m4_if(m4_bregexp([$1], [\\\|`\|\$(\|\$\{\|@]), [-1],
+[m4_if(m4_bregexp([$1], [\\\|`\|\$(\|\${\|@]), [-1],
[AS_ECHO(["AS_ESCAPE([$1], [""])"]) >>confdefs.h],
[cat >>confdefs.h <<_ACEOF
 [$1]



CVS commit: src/external/gpl3/autoconf/dist/lib/autoconf

2023-05-24 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Wed May 24 21:49:38 UTC 2023

Modified Files:
src/external/gpl3/autoconf/dist/lib/autoconf: general.m4

Log Message:
revert previous: autoconf doesn't use EREs

autoconf relies upon GNU m4 emacs-style regexs, which
don't support intervals so don't escape these.
A fix to usr.bin/m4 -g (GNU m4 emulation) is incoming.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/autoconf/dist/lib/autoconf/general.m4

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



Re: CVS commit: src/external/gpl3/autoconf/dist/lib/autoconf

2023-05-24 Thread Luke Mewburn
I experimented with this, and my analysis of the gnulib emacs regexp
wasn't quite correct.

When I reverted this autoconf change, and fixed m4 as below,
regen works. I'm testing a full build of NetBSD now.


On 23-05-25 06:36, Luke Mewburn wrote:
  | Hi Christos,
  | 
  | Whilst this initially fixed my tools/compat regen problem,
  | I'm not sure it's correct long term.
  | 
  | I think we need to revert this, and fix usr.bin/m4 -g (GNU)
  | emulation for m4 regexp() and patsubst() ?
  | 
  | A quick comparison of usr.bin/m4/gnum4.c twiddle() versus
  |   
https://www.gnu.org/software/gnulib/manual/html_node/emacs-regular-expression-syntax.html
  | we may need to make the following changes to twiddle():
  | 1. convert m4 \{ and \} into ERE { and }

This we don't need; gnulib emacs regexp doesn't support { } intervals.


  | 2. convert m4 { and } into ERE \{ and \}

This worked.


  | 3. possibly implement \b, \B, \`, and \'

I haven't done this.


  | 
  | but further analysis and addition of testsuites before & after,
  | comparing behaviour of GNU m4 versus our m4, is probably warranted.
  | 
  | 
  | Details:
  | 
  | autoconf 'm4_bregexp' is GNU m4 1.4.x 'regexp' (well, GNU m4 before 2.x),
  | and 'm4_bpatsubst' is m4 'patsubst'.
  | See:
  | - 
https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Redefined-M4-Macros.html
  | 
  | 
  | GNU m4 1.4.x defines 'regexp' as:
  | Searches for regexp in string. The syntax for regular expressions is
  | the same as in GNU Emacs, which is similar to BRE, Basic Regular
  | Expressions in POSIX. See Syntax of Regular Expressions in the GNU
  | Emacs Manual.
  | 'patsubst' is similar:
  | Searches string for matches of regexp, and substitutes replacement for
  | each match. The syntax for regular expressions is the same as in GNU
  | Emacs (see Regexp).
  | See:
  | - https://www.gnu.org/software/m4/manual/html_node/Regexp.html
  | - https://www.gnu.org/software/m4/manual/html_node/Patsubst.html
  | 
  | 
  | GNU m4 1.4.x defines 'regexp' as:
  | Searches for regexp in string. The syntax for regular expressions is
  | the same as in GNU Emacs, which is similar to BRE, Basic Regular
  | Expressions in POSIX. See Syntax of Regular Expressions in the GNU
  | Emacs Manual.
  | See:
  | - https://www.gnu.org/software/m4/manual/html_node/Regexp.html
  | 
  | 
  | Emacs regexps look to be BREs with extras including \| for alternation.
  | See:
  | - https://www.gnu.org/software/emacs/manual/html_node/emacs/Regexps.html
  | - 
https://www.gnu.org/software/emacs/manual/html_node/elisp/Regexp-Backslash.html
  | 
  | Note: except that GNU m4 code inspection shows it's uses the gnulib
  | implementation of Emacs regex, which is documented differently to Emacs'
  | own regex! See below.
  | 
  | 
  | GNU m4 uses gnulib for its regexp implementation (per code inspection),
  | and doesn't seem to change the syntax from the gnulib default, which
  | as far as I can tell is Emacs (RE_SYNTAX_EMACS 0. 
  | See:
  | - 
https://www.gnu.org/software/gnulib/manual/html_node/emacs-regular-expression-syntax.html
  | - 
https://www.gnu.org/software/gnulib/manual/html_node/Predefined-Syntaxes.html
  | Note that this seems to differ from the Emacs manual above.
  | 
  | 
  | POSIX BREs don't support '|' alternation at all, per NetBSD re_format(7):
  | Obsolete (“basic”) regular expressions differ in several respects.
  | ‘|’ is an ordinary character and there is no equivalent for its
  | functionality.
  | and Linux (glibc) regex(7):
  | Obsolete ("basic") regular expressions differ in several respects.
  | '|', '+', and '?' are ordinary characters and there is no equivalent
  | for their functionality.
  | 
  | 
  | It looks like usr.bin/m4's -g (GNU) compatibility option supports
  | rewriting the GNU m4 regexp() and patsubst() expressions to be POSIX ERE.
  | This is done in usr.bin/m4/gnum4.c by the twiddle() function if -g 
(mimic_gnu)
  | is in operation.
  | 
  | See intro for proposed solution.
  | 
  | 
  | regards,
  | Luke.
  | 
  | 
  | 
  | On 23-05-24 10:34, Christos Zoulas wrote:
  |   | Module Name:src
  |   | Committed By:   christos
  |   | Date:   Wed May 24 14:34:16 UTC 2023
  |   | 
  |   | Modified Files:
  |   | src/external/gpl3/autoconf/dist/lib/autoconf: general.m4
  |   | 
  |   | Log Message:
  |   | quote { to make regcomp happy
  |   | 
  |   | 
  |   | To generate a diff of this commit:
  |   | cvs rdiff -u -r1.1.1.1 -r1.2 \
  |   | src/external/gpl3/autoconf/dist/lib/autoconf/general.m4
  |   | 
  |   | 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/autoconf/dist/lib/autoconf/general.m4
  |   | diff -u src/external/gpl3/autoconf/dist/lib/autoconf/general.m4:1.1.1.1 

Re: CVS commit: src/external/gpl3/autoconf/dist/lib/autoconf

2023-05-24 Thread Luke Mewburn
Hi Christos,

Whilst this initially fixed my tools/compat regen problem,
I'm not sure it's correct long term.

I think we need to revert this, and fix usr.bin/m4 -g (GNU)
emulation for m4 regexp() and patsubst() ?

A quick comparison of usr.bin/m4/gnum4.c twiddle() versus
  
https://www.gnu.org/software/gnulib/manual/html_node/emacs-regular-expression-syntax.html
we may need to make the following changes to twiddle():
1. convert m4 \{ and \} into ERE { and }
2. convert m4 { and } into ERE \{ and \}
3. possibly implement \b, \B, \`, and \'

but further analysis and addition of testsuites before & after,
comparing behaviour of GNU m4 versus our m4, is probably warranted.


Details:

autoconf 'm4_bregexp' is GNU m4 1.4.x 'regexp' (well, GNU m4 before 2.x),
and 'm4_bpatsubst' is m4 'patsubst'.
See:
- 
https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Redefined-M4-Macros.html


GNU m4 1.4.x defines 'regexp' as:
Searches for regexp in string. The syntax for regular expressions is
the same as in GNU Emacs, which is similar to BRE, Basic Regular
Expressions in POSIX. See Syntax of Regular Expressions in the GNU
Emacs Manual.
'patsubst' is similar:
Searches string for matches of regexp, and substitutes replacement for
each match. The syntax for regular expressions is the same as in GNU
Emacs (see Regexp).
See:
- https://www.gnu.org/software/m4/manual/html_node/Regexp.html
- https://www.gnu.org/software/m4/manual/html_node/Patsubst.html


GNU m4 1.4.x defines 'regexp' as:
Searches for regexp in string. The syntax for regular expressions is
the same as in GNU Emacs, which is similar to BRE, Basic Regular
Expressions in POSIX. See Syntax of Regular Expressions in the GNU
Emacs Manual.
See:
- https://www.gnu.org/software/m4/manual/html_node/Regexp.html


Emacs regexps look to be BREs with extras including \| for alternation.
See:
- https://www.gnu.org/software/emacs/manual/html_node/emacs/Regexps.html
- 
https://www.gnu.org/software/emacs/manual/html_node/elisp/Regexp-Backslash.html

Note: except that GNU m4 code inspection shows it's uses the gnulib
implementation of Emacs regex, which is documented differently to Emacs'
own regex! See below.


GNU m4 uses gnulib for its regexp implementation (per code inspection),
and doesn't seem to change the syntax from the gnulib default, which
as far as I can tell is Emacs (RE_SYNTAX_EMACS 0. 
See:
- 
https://www.gnu.org/software/gnulib/manual/html_node/emacs-regular-expression-syntax.html
- https://www.gnu.org/software/gnulib/manual/html_node/Predefined-Syntaxes.html
Note that this seems to differ from the Emacs manual above.


POSIX BREs don't support '|' alternation at all, per NetBSD re_format(7):
Obsolete (“basic”) regular expressions differ in several respects.
‘|’ is an ordinary character and there is no equivalent for its
functionality.
and Linux (glibc) regex(7):
Obsolete ("basic") regular expressions differ in several respects.
'|', '+', and '?' are ordinary characters and there is no equivalent
for their functionality.


It looks like usr.bin/m4's -g (GNU) compatibility option supports
rewriting the GNU m4 regexp() and patsubst() expressions to be POSIX ERE.
This is done in usr.bin/m4/gnum4.c by the twiddle() function if -g (mimic_gnu)
is in operation.

See intro for proposed solution.


regards,
Luke.



On 23-05-24 10:34, Christos Zoulas wrote:
  | Module Name:src
  | Committed By:   christos
  | Date:   Wed May 24 14:34:16 UTC 2023
  | 
  | Modified Files:
  | src/external/gpl3/autoconf/dist/lib/autoconf: general.m4
  | 
  | Log Message:
  | quote { to make regcomp happy
  | 
  | 
  | To generate a diff of this commit:
  | cvs rdiff -u -r1.1.1.1 -r1.2 \
  | src/external/gpl3/autoconf/dist/lib/autoconf/general.m4
  | 
  | 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/autoconf/dist/lib/autoconf/general.m4
  | diff -u src/external/gpl3/autoconf/dist/lib/autoconf/general.m4:1.1.1.1 
src/external/gpl3/autoconf/dist/lib/autoconf/general.m4:1.2
  | --- src/external/gpl3/autoconf/dist/lib/autoconf/general.m4:1.1.1.1 Sat Jan 
16 13:36:00 2016
  | +++ src/external/gpl3/autoconf/dist/lib/autoconf/general.m4 Wed May 24 
10:34:16 2023
  | @@ -2119,7 +2119,7 @@ m4_define([AC_DEFINE_UNQUOTED], [_AC_DEF
  |  # no backslash, no command substitution, no complex variable
  |  # substitution, and no quadrigraphs.
  |  m4_define([_AC_DEFINE_UNQUOTED],
  | -[m4_if(m4_bregexp([$1], [\\\|`\|\$(\|\${\|@]), [-1],
  | +[m4_if(m4_bregexp([$1], [\\\|`\|\$(\|\$\{\|@]), [-1],
  | [AS_ECHO(["AS_ESCAPE([$1], [""])"]) >>confdefs.h],
  | [cat >>confdefs.h <<_ACEOF
  |  [$1]
  | 



CVS commit: src/sys/kern

2023-05-24 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed May 24 20:22:23 UTC 2023

Modified Files:
src/sys/kern: kern_entropy.c

Log Message:
entropy(9): Avoid race between rnd_add_data and ioctl(RNDCTL).

XXX pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/kern/kern_entropy.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/kern/kern_entropy.c
diff -u src/sys/kern/kern_entropy.c:1.60 src/sys/kern/kern_entropy.c:1.61
--- src/sys/kern/kern_entropy.c:1.60	Wed May 24 20:22:12 2023
+++ src/sys/kern/kern_entropy.c	Wed May 24 20:22:23 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_entropy.c,v 1.60 2023/05/24 20:22:12 riastradh Exp $	*/
+/*	$NetBSD: kern_entropy.c,v 1.61 2023/05/24 20:22:23 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.60 2023/05/24 20:22:12 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.61 2023/05/24 20:22:23 riastradh Exp $");
 
 #include 
 #include 
@@ -1910,6 +1910,14 @@ rnd_add_data(struct krndsource *rs, cons
 		return;
 	}
 
+	/*
+	 * Hold up the reset xcall before it zeroes the entropy counts
+	 * on this CPU or globally.  Otherwise, we might leave some
+	 * nonzero entropy attributed to an untrusted source in the
+	 * event of a race with a change to flags.
+	 */
+	kpreempt_disable();
+
 	/* Load a snapshot of the flags.  Ioctl may change them under us.  */
 	flags = atomic_load_relaxed(>flags);
 
@@ -1922,7 +1930,7 @@ rnd_add_data(struct krndsource *rs, cons
 	if (!atomic_load_relaxed(_collection) ||
 	ISSET(flags, RND_FLAG_NO_COLLECT) ||
 	!ISSET(flags, RND_FLAG_COLLECT_VALUE|RND_FLAG_COLLECT_TIME))
-		return;
+		goto out;
 
 	/* If asked, ignore the estimate.  */
 	if (ISSET(flags, RND_FLAG_NO_ESTIMATE))
@@ -1939,6 +1947,9 @@ rnd_add_data(struct krndsource *rs, cons
 		rnd_add_data_1(rs, , sizeof extra, 0,
 		RND_FLAG_COLLECT_TIME);
 	}
+
+out:	/* Allow concurrent changes to flags to finish.  */
+	kpreempt_enable();
 }
 
 static unsigned



CVS commit: src/sys/kern

2023-05-24 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed May 24 20:22:23 UTC 2023

Modified Files:
src/sys/kern: kern_entropy.c

Log Message:
entropy(9): Avoid race between rnd_add_data and ioctl(RNDCTL).

XXX pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/kern/kern_entropy.c

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



CVS commit: src/sys/kern

2023-05-24 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed May 24 20:22:12 UTC 2023

Modified Files:
src/sys/kern: kern_entropy.c

Log Message:
entropy(9): On flags change, cancel any scheduled consolidation.

We've been instructed to lose confidence in existing entropy sources,
so let's make sure to re-gather enough entropy before the next
consolidation can happen, in case some of what would be counted in
consolidation is from those entropy sources.

XXX pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/kern/kern_entropy.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/kern/kern_entropy.c
diff -u src/sys/kern/kern_entropy.c:1.59 src/sys/kern/kern_entropy.c:1.60
--- src/sys/kern/kern_entropy.c:1.59	Fri Mar  3 12:52:49 2023
+++ src/sys/kern/kern_entropy.c	Wed May 24 20:22:12 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_entropy.c,v 1.59 2023/03/03 12:52:49 riastradh Exp $	*/
+/*	$NetBSD: kern_entropy.c,v 1.60 2023/05/24 20:22:12 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.59 2023/03/03 12:52:49 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.60 2023/05/24 20:22:12 riastradh Exp $");
 
 #include 
 #include 
@@ -2414,6 +2414,7 @@ entropy_ioctl(unsigned long cmd, void *d
 			E->pending = 0;
 			atomic_store_relaxed(>needed,
 			ENTROPY_CAPACITY*NBBY);
+			E->consolidate = false;
 			mutex_exit(>lock);
 		}
 



CVS commit: src/sys/kern

2023-05-24 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed May 24 20:22:12 UTC 2023

Modified Files:
src/sys/kern: kern_entropy.c

Log Message:
entropy(9): On flags change, cancel any scheduled consolidation.

We've been instructed to lose confidence in existing entropy sources,
so let's make sure to re-gather enough entropy before the next
consolidation can happen, in case some of what would be counted in
consolidation is from those entropy sources.

XXX pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/kern/kern_entropy.c

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



CVS commit: src/tests/usr.bin/c++

2023-05-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed May 24 20:02:34 UTC 2023

Modified Files:
src/tests/usr.bin/c++: t_tsan_vptr_race.sh

Log Message:
match the new compiler warning


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/c++/t_tsan_vptr_race.sh

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



CVS commit: src/tests/usr.bin/c++

2023-05-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed May 24 20:02:34 UTC 2023

Modified Files:
src/tests/usr.bin/c++: t_tsan_vptr_race.sh

Log Message:
match the new compiler warning


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/c++/t_tsan_vptr_race.sh

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

Modified files:

Index: src/tests/usr.bin/c++/t_tsan_vptr_race.sh
diff -u src/tests/usr.bin/c++/t_tsan_vptr_race.sh:1.7 src/tests/usr.bin/c++/t_tsan_vptr_race.sh:1.8
--- src/tests/usr.bin/c++/t_tsan_vptr_race.sh:1.7	Sun Jun 12 04:55:36 2022
+++ src/tests/usr.bin/c++/t_tsan_vptr_race.sh	Wed May 24 16:02:34 2023
@@ -88,7 +88,7 @@ EOF
 
 	c++ -fsanitize=thread -o test test.cc
 	paxctl +a test
-	atf_check -s ignore -o ignore -e match:"WARNING: ThreadSanitizer: data race on vptr \(ctor/dtor vs virtual call\)" ./test
+	atf_check -s ignore -o ignore -e match:"WARNING: ThreadSanitizer: data race" ./test
 }
 
 vptr_race_profile_body(){
@@ -119,10 +119,9 @@ int main() {
   return 0;
 }
 EOF
-
-	c++ -fsanitize=thread -static -o test -pg test.cc
+	c++ -fsanitize=thread -o test -pg test.cc
 	paxctl +a test
-	atf_check -s ignore -o ignore -e match:"WARNING: ThreadSanitizer: data race on vptr \(ctor/dtor vs virtual call\)" ./test
+	atf_check -s ignore -o ignore -e match:"WARNING: ThreadSanitizer: data race" ./test
 }
 
 vptr_race_pic_body(){
@@ -165,7 +164,7 @@ EOF
 	paxctl +a test
 
 	export LD_LIBRARY_PATH=.
-	atf_check -s ignore -o ignore -e match:"WARNING: ThreadSanitizer: data race on vptr \(ctor/dtor vs virtual call\)" ./test
+	atf_check -s ignore -o ignore -e match:"WARNING: ThreadSanitizer: data race" ./test
 }
 vptr_race_pie_body(){
 
@@ -202,7 +201,7 @@ EOF
 
 	c++ -fsanitize=thread -o test -fpie -pie test.cc
 	paxctl +a test
-	atf_check -s ignore -o ignore -e match:"WARNING: ThreadSanitizer: data race on vptr \(ctor/dtor vs virtual call\)" ./test
+	atf_check -s ignore -o ignore -e match:"WARNING: ThreadSanitizer: data race" ./test
 }
 
 



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

2023-05-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed May 24 18:22:05 UTC 2023

Modified Files:
src/tests/lib/libc/hash: t_hmac.c

Log Message:
no more md5 for you.


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

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



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

2023-05-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed May 24 18:22:05 UTC 2023

Modified Files:
src/tests/lib/libc/hash: t_hmac.c

Log Message:
no more md5 for you.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/hash/t_hmac.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/hash/t_hmac.c
diff -u src/tests/lib/libc/hash/t_hmac.c:1.2 src/tests/lib/libc/hash/t_hmac.c:1.3
--- src/tests/lib/libc/hash/t_hmac.c:1.2	Wed Feb  7 08:18:33 2018
+++ src/tests/lib/libc/hash/t_hmac.c	Wed May 24 14:22:05 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_hmac.c,v 1.2 2018/02/07 13:18:33 christos Exp $	*/
+/*	$NetBSD: t_hmac.c,v 1.3 2023/05/24 18:22:05 christos Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_hmac.c,v 1.2 2018/02/07 13:18:33 christos Exp $");
+__RCSID("$NetBSD: t_hmac.c,v 1.3 2023/05/24 18:22:05 christos Exp $");
 
 #include 
 #include 
@@ -52,7 +52,9 @@ test(void)
 #if OPENSSL_VERSION_NUMBER < 0x1010L
 		EVP_md2(),
 #endif
+#if OPENSSL_VERSION_NUMBER < 0x3000L
 		EVP_md4(),
+#endif
 		EVP_md5(),
 		EVP_ripemd160(),
 		EVP_sha1(),
@@ -65,7 +67,9 @@ test(void)
 #if OPENSSL_VERSION_NUMBER < 0x1010L
 		"md2",
 #endif
+#if OPENSSL_VERSION_NUMBER < 0x3000L
 		"md4",
+#endif
 		"md5",
 		"rmd160",
 		"sha1",
@@ -91,7 +95,8 @@ test(void)
 			memset(tmp1, 0, sizeof(tmp1));
 			memset(tmp2, 0, sizeof(tmp2));
 			e1 = HMAC(evps[t], key, i, data, j, tmp1, );
-			ATF_REQUIRE(e1 != NULL);
+			ATF_REQUIRE_MSG(e1 != NULL, "hash %s could not be "
+			"created", names[t]);
 			tmp2len = hmac(names[t], key, i, data, j, tmp2,
 			sizeof(tmp2));
 			ATF_REQUIRE_MSG(tmp1len == tmp2len, "hash %s len %u "



CVS commit: src/sys/arch/arm/nxp

2023-05-24 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed May 24 16:43:40 UTC 2023

Modified Files:
src/sys/arch/arm/nxp: imx6_platform.c

Log Message:
introduce imx6sx_platform_bootstrap(), which calls imx_platform_bootstrap()
and then checks for an "arm,cortex-a9-twd-timer" compatible entry in the
fdt. If not present, create one so that a9ptmr will attach.
We need this entry as this is the only timer we support for this platform,
but the upstream imx6sx.dtsi is missing the entry for it (and all A9 CPUs
have it anyway).

Thanks to Jared McNeill for advices and review.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/nxp/imx6_platform.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/arm/nxp/imx6_platform.c
diff -u src/sys/arch/arm/nxp/imx6_platform.c:1.8 src/sys/arch/arm/nxp/imx6_platform.c:1.9
--- src/sys/arch/arm/nxp/imx6_platform.c:1.8	Thu May  4 13:28:04 2023
+++ src/sys/arch/arm/nxp/imx6_platform.c	Wed May 24 16:43:40 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: imx6_platform.c,v 1.8 2023/05/04 13:28:04 bouyer Exp $	*/
+/*	$NetBSD: imx6_platform.c,v 1.9 2023/05/24 16:43:40 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: imx6_platform.c,v 1.8 2023/05/04 13:28:04 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx6_platform.c,v 1.9 2023/05/24 16:43:40 bouyer Exp $");
 
 #include "arml2cc.h"
 #include "opt_console.h"
@@ -175,6 +175,76 @@ imx_platform_bootstrap(void)
 	arm_fdt_cpu_bootstrap();
 }
 
+static void
+imx6sx_platform_bootstrap(void)
+{
+	void *fdt_data;
+	int ofw_root;
+	int soc_node, timer_node, intc_node, clks_node;
+	int ret;
+	fdt32_t intval[3];
+	fdt32_t clkval[2];
+	u_int val32;
+
+	imx_platform_bootstrap();
+
+	/*
+	 * if there's no entry for the TWD timer in the provided DTB, fake one.
+	 * we can't boot witthout it.
+	 * The upstream imx6sx.dtsi is missing the entry
+	 */
+
+	fdt_data = __UNCONST(fdtbus_get_data());
+	KASSERT(fdt_data != NULL);
+	ofw_root = OF_peer(0);
+	if (of_find_bycompat(ofw_root, "arm,cortex-a9-twd-timer") > 0) {
+		/* already there */
+		VPRINTF("timer already present\n");
+		return;
+	}
+	VPRINTF("creating timer fdt@%p", fdt_data);
+	soc_node = fdt_path_offset(fdt_data, "/soc");
+	VPRINTF(" soc_node %d", soc_node);
+	KASSERT(soc_node >= 0);
+
+	timer_node = fdt_add_subnode(fdt_data, soc_node, "timer@a00600");
+	VPRINTF(" timer_node %d\n", timer_node);
+	KASSERT(timer_node >= 0);
+
+	ret = fdt_setprop_string(fdt_data, timer_node, "compatible",
+	"arm,cortex-a9-twd-timer");
+	KASSERTMSG(ret == 0, "fdt_setprop(compatible) returns %d", ret);
+
+	ret = fdt_appendprop_addrrange(fdt_data, soc_node, timer_node,
+	"reg", 0x00a00600, 0x20);
+	KASSERTMSG(ret == 0, "fdt_appendprop_addrrange returns %d", ret);
+
+	intval[0] = cpu_to_fdt32(1);
+	intval[1] = cpu_to_fdt32(13);
+	intval[2] = cpu_to_fdt32(0xf01);
+	ret = fdt_setprop(fdt_data, timer_node, "interrupts",
+	intval, sizeof(intval));
+	KASSERTMSG(ret == 0, "fdt_setprop(interrupts) returns %d", ret);
+
+	intc_node = of_find_bycompat(ofw_root, "arm,cortex-a9-gic");
+	KASSERT(intc_node >= 0);
+	val32 = 0;
+	of_getprop_uint32(intc_node, "phandle", );
+	ret = fdt_setprop_u32(fdt_data, timer_node, "interrupt-parent",
+	val32);
+	KASSERTMSG(ret == 0, "fdt_setprop(interrupt-parent) returns %d", ret);
+
+	val32 = 0;
+	clks_node = of_find_bycompat(ofw_root, "fsl,imx6sx-ccm");
+	KASSERT(clks_node >= 0);
+	of_getprop_uint32(clks_node, "phandle", );
+	clkval[0] = cpu_to_fdt32(val32);
+	clkval[1] = cpu_to_fdt32(30); /* IMX6SXCLK_TWD */
+	ret = fdt_setprop(fdt_data, timer_node, "clocks",
+	clkval, sizeof(clkval));
+	KASSERTMSG(ret == 0, "fdt_setprop(clocks) returns %d", ret);
+}
+
 static int
 imx_platform_mpstart(void)
 {
@@ -256,7 +326,7 @@ static const struct fdt_platform imx6_pl
 
 static const struct fdt_platform imx6sx_platform = {
 	.fp_devmap = imx6sx_platform_devmap,
-	.fp_bootstrap = imx_platform_bootstrap,
+	.fp_bootstrap = imx6sx_platform_bootstrap,
 	.fp_init_attach_args = imx_platform_init_attach_args,
 	.fp_device_register = imx_platform_device_register,
 	.fp_reset = imx6_platform_reset,



CVS commit: src/sys/arch/arm/nxp

2023-05-24 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed May 24 16:43:40 UTC 2023

Modified Files:
src/sys/arch/arm/nxp: imx6_platform.c

Log Message:
introduce imx6sx_platform_bootstrap(), which calls imx_platform_bootstrap()
and then checks for an "arm,cortex-a9-twd-timer" compatible entry in the
fdt. If not present, create one so that a9ptmr will attach.
We need this entry as this is the only timer we support for this platform,
but the upstream imx6sx.dtsi is missing the entry for it (and all A9 CPUs
have it anyway).

Thanks to Jared McNeill for advices and review.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/nxp/imx6_platform.c

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



CVS commit: src/external/gpl3/autoconf/dist/lib/autoconf

2023-05-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed May 24 14:34:16 UTC 2023

Modified Files:
src/external/gpl3/autoconf/dist/lib/autoconf: general.m4

Log Message:
quote { to make regcomp happy


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/autoconf/dist/lib/autoconf/general.m4

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/autoconf/dist/lib/autoconf/general.m4
diff -u src/external/gpl3/autoconf/dist/lib/autoconf/general.m4:1.1.1.1 src/external/gpl3/autoconf/dist/lib/autoconf/general.m4:1.2
--- src/external/gpl3/autoconf/dist/lib/autoconf/general.m4:1.1.1.1	Sat Jan 16 13:36:00 2016
+++ src/external/gpl3/autoconf/dist/lib/autoconf/general.m4	Wed May 24 10:34:16 2023
@@ -2119,7 +2119,7 @@ m4_define([AC_DEFINE_UNQUOTED], [_AC_DEF
 # no backslash, no command substitution, no complex variable
 # substitution, and no quadrigraphs.
 m4_define([_AC_DEFINE_UNQUOTED],
-[m4_if(m4_bregexp([$1], [\\\|`\|\$(\|\${\|@]), [-1],
+[m4_if(m4_bregexp([$1], [\\\|`\|\$(\|\$\{\|@]), [-1],
[AS_ECHO(["AS_ESCAPE([$1], [""])"]) >>confdefs.h],
[cat >>confdefs.h <<_ACEOF
 [$1]



CVS commit: src/external/gpl3/autoconf/dist/lib/autoconf

2023-05-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed May 24 14:34:16 UTC 2023

Modified Files:
src/external/gpl3/autoconf/dist/lib/autoconf: general.m4

Log Message:
quote { to make regcomp happy


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/autoconf/dist/lib/autoconf/general.m4

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



CVS commit: src/doc

2023-05-24 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Wed May 24 13:09:53 UTC 2023

Modified Files:
src/doc: CHANGES

Log Message:
CHANGES: rm SHAREDSTRINGS, mkstr, xstr


To generate a diff of this commit:
cvs rdiff -u -r1.2967 -r1.2968 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.2967 src/doc/CHANGES:1.2968
--- src/doc/CHANGES:1.2967	Tue May 23 20:24:24 2023
+++ src/doc/CHANGES	Wed May 24 13:09:53 2023
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2967 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2968 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -103,5 +103,7 @@ Changes from NetBSD 10.0 to NetBSD 11.0:
 		[skrll 20230507]
 	riscv: Add Google Goldfish RTC driver. [skrll 20230508]
 	OpenSSL: Imported 3.0.8. [christos 20230510]
-	ctfmerge: Add error handling to pthread APIs.
+	ctfmerge(1): Add error handling to pthread APIs.
 		Fix semaphores for macOS host tool.  [lukem 20230523]
+	share/mk: Deprecate non-functional SHAREDSTRINGS. [lukem 20230524]
+	mkstr(1), xstr(1): Obsolete unused PDP-11-era tools. [lukem 20230524]



CVS commit: src/doc

2023-05-24 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Wed May 24 13:09:53 UTC 2023

Modified Files:
src/doc: CHANGES

Log Message:
CHANGES: rm SHAREDSTRINGS, mkstr, xstr


To generate a diff of this commit:
cvs rdiff -u -r1.2967 -r1.2968 src/doc/CHANGES

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



CVS commit: src

2023-05-24 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Wed May 24 13:00:16 UTC 2023

Modified Files:
src/distrib/evbsh3/rom/ramdiskcommon: ramdiskbin.conf
src/distrib/sets/lists/comp: mi
src/distrib/sets/lists/debug: mi
src/usr.bin: Makefile
src/usr.bin/crunch/examples: really-big.conf
src/usr.sbin/makemandb: nostem.txt
Removed Files:
src/usr.bin/mkstr: Makefile mkstr.1 mkstr.c
src/usr.bin/xstr: Makefile pathnames.h xstr.1 xstr.c

Log Message:
obsolete mkstr(1) and xstr(1)

These were only used on PDP-11 for two programs we don't ship,
and have been obsolete since the VAX days.

xstr never worked in the build.sh cross-build environment (22 years), or
parallel make environment (nearly 28 years), didn't work in the orignal 386bsd
import, and has never been needed in NetBSD as we don't have the older BSD
programs (pascal, pre-nvi ex) that needed mkstr/xstr on PDP-11.

PR toolchain/35964


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/distrib/evbsh3/rom/ramdiskcommon/ramdiskbin.conf
cvs rdiff -u -r1.2428 -r1.2429 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.398 -r1.399 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.238 -r1.239 src/usr.bin/Makefile
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/crunch/examples/really-big.conf
cvs rdiff -u -r1.3 -r0 src/usr.bin/mkstr/Makefile
cvs rdiff -u -r1.14 -r0 src/usr.bin/mkstr/mkstr.1
cvs rdiff -u -r1.17 -r0 src/usr.bin/mkstr/mkstr.c
cvs rdiff -u -r1.3 -r0 src/usr.bin/xstr/Makefile
cvs rdiff -u -r1.4 -r0 src/usr.bin/xstr/pathnames.h
cvs rdiff -u -r1.20 -r0 src/usr.bin/xstr/xstr.1
cvs rdiff -u -r1.26 -r0 src/usr.bin/xstr/xstr.c
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/makemandb/nostem.txt

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



CVS commit: src

2023-05-24 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Wed May 24 13:00:16 UTC 2023

Modified Files:
src/distrib/evbsh3/rom/ramdiskcommon: ramdiskbin.conf
src/distrib/sets/lists/comp: mi
src/distrib/sets/lists/debug: mi
src/usr.bin: Makefile
src/usr.bin/crunch/examples: really-big.conf
src/usr.sbin/makemandb: nostem.txt
Removed Files:
src/usr.bin/mkstr: Makefile mkstr.1 mkstr.c
src/usr.bin/xstr: Makefile pathnames.h xstr.1 xstr.c

Log Message:
obsolete mkstr(1) and xstr(1)

These were only used on PDP-11 for two programs we don't ship,
and have been obsolete since the VAX days.

xstr never worked in the build.sh cross-build environment (22 years), or
parallel make environment (nearly 28 years), didn't work in the orignal 386bsd
import, and has never been needed in NetBSD as we don't have the older BSD
programs (pascal, pre-nvi ex) that needed mkstr/xstr on PDP-11.

PR toolchain/35964


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/distrib/evbsh3/rom/ramdiskcommon/ramdiskbin.conf
cvs rdiff -u -r1.2428 -r1.2429 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.398 -r1.399 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.238 -r1.239 src/usr.bin/Makefile
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/crunch/examples/really-big.conf
cvs rdiff -u -r1.3 -r0 src/usr.bin/mkstr/Makefile
cvs rdiff -u -r1.14 -r0 src/usr.bin/mkstr/mkstr.1
cvs rdiff -u -r1.17 -r0 src/usr.bin/mkstr/mkstr.c
cvs rdiff -u -r1.3 -r0 src/usr.bin/xstr/Makefile
cvs rdiff -u -r1.4 -r0 src/usr.bin/xstr/pathnames.h
cvs rdiff -u -r1.20 -r0 src/usr.bin/xstr/xstr.1
cvs rdiff -u -r1.26 -r0 src/usr.bin/xstr/xstr.c
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/makemandb/nostem.txt

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

Modified files:

Index: src/distrib/evbsh3/rom/ramdiskcommon/ramdiskbin.conf
diff -u src/distrib/evbsh3/rom/ramdiskcommon/ramdiskbin.conf:1.10 src/distrib/evbsh3/rom/ramdiskcommon/ramdiskbin.conf:1.11
--- src/distrib/evbsh3/rom/ramdiskcommon/ramdiskbin.conf:1.10	Wed Apr 12 17:29:49 2017
+++ src/distrib/evbsh3/rom/ramdiskcommon/ramdiskbin.conf	Wed May 24 13:00:14 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: ramdiskbin.conf,v 1.10 2017/04/12 17:29:49 christos Exp $
+#	$NetBSD: ramdiskbin.conf,v 1.11 2023/05/24 13:00:14 lukem Exp $
 
 srcdirs bin sbin libexec usr.bin usr.sbin
 
@@ -39,7 +39,7 @@ progs compress crontab ctags cut dirname
 progs fstat ftp gencat getopt head hexdump id
 progs indent ipcrm ipcs join jot kdump ktrace lam last lastcomm leave less
 progs lex lock logger login logname look m4 mail man menuc mesg mkdep
-progs mkfifo mkstr mktemp msgc msgs netgroup netstat newsyslog nfsstat
+progs mkfifo mktemp msgc msgs netgroup netstat newsyslog nfsstat
 progs nice nl nohup paste patch pr printenv printf quota renice rev rpcgen
 progs rpcinfo rs sed showmount shuffle skey skeyinfo skeyinit soelim
 progs su systat tail tee tftp time touch tset tsort tty uname

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2428 src/distrib/sets/lists/comp/mi:1.2429
--- src/distrib/sets/lists/comp/mi:1.2428	Fri May 12 11:13:09 2023
+++ src/distrib/sets/lists/comp/mi	Wed May 24 13:00:15 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2428 2023/05/12 11:13:09 riastradh Exp $
+#	$NetBSD: mi,v 1.2429 2023/05/24 13:00:15 lukem Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -58,7 +58,7 @@
 ./usr/bin/lto-dumpcomp-c-bin		gcccmds,gcc=10
 ./usr/bin/luac	comp-util-bin
 ./usr/bin/menuc	comp-c-bin
-./usr/bin/mkstr	comp-c-bin
+./usr/bin/mkstr	comp-obsolete		obsolete
 ./usr/bin/mkubootimagecomp-util-bin
 ./usr/bin/msgattribcomp-c-bin
 ./usr/bin/msgc	comp-c-bin
@@ -93,7 +93,7 @@
 ./usr/bin/unifdefallcomp-util-bin
 ./usr/bin/unprotoizecomp-obsolete		obsolete
 ./usr/bin/xgettextcomp-c-bin
-./usr/bin/xstr	comp-c-bin
+./usr/bin/xstr	comp-obsolete		obsolete
 ./usr/bin/yacc	comp-c-bin
 ./usr/include/a.out.hcomp-c-include
 ./usr/include/adosfs/adosfs.h			comp-c-include
@@ -4613,7 +4613,7 @@
 ./usr/share/man/cat1/lto-dump.0			comp-c-catman		gcccmds,.cat,gcc=10
 ./usr/share/man/cat1/luac.0			comp-util-catman	.cat
 ./usr/share/man/cat1/menuc.0			comp-c-catman		.cat
-./usr/share/man/cat1/mkstr.0			comp-c-catman		.cat
+./usr/share/man/cat1/mkstr.0			comp-obsolete		obsolete
 ./usr/share/man/cat1/msg_clear.0		comp-obsolete		obsolete
 ./usr/share/man/cat1/msg_display.0		comp-obsolete		obsolete
 ./usr/share/man/cat1/msg_display_add.0		comp-obsolete		obsolete
@@ -4649,7 +4649,7 @@
 ./usr/share/man/cat1/tsort.0			comp-c-catman		.cat
 ./usr/share/man/cat1/unifdef.0			comp-c-catman		.cat
 ./usr/share/man/cat1/unifdefall.0		comp-c-catman		.cat
-./usr/share/man/cat1/xstr.0			comp-c-catman		.cat
+./usr/share/man/cat1/xstr.0			comp-obsolete		obsolete
 ./usr/share/man/cat1/yacc.0			comp-c-catman		

CVS commit: src/share/mk

2023-05-24 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Wed May 24 10:07:16 UTC 2023

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

Log Message:
deprecate SHAREDSTRINGS build option

Hasn't worked for at least 20 years (and never in the cross-build environment,
nor did it work with parallel make), and has never been needed in NetBSD as we
don't have the older BSD programs (pascal, pre-nvi ex) that needed mkstr/xstr
on PDP-11.

PR toolchain/35964


To generate a diff of this commit:
cvs rdiff -u -r1.442 -r1.443 src/share/mk/bsd.README
cvs rdiff -u -r1.343 -r1.344 src/share/mk/bsd.prog.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.README
diff -u src/share/mk/bsd.README:1.442 src/share/mk/bsd.README:1.443
--- src/share/mk/bsd.README:1.442	Sat Oct  1 08:55:45 2022
+++ src/share/mk/bsd.README	Wed May 24 10:07:16 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.README,v 1.442 2022/10/01 08:55:45 rillig Exp $
+#	$NetBSD: bsd.README,v 1.443 2023/05/24 10:07:16 lukem Exp $
 #	@(#)bsd.README	8.2 (Berkeley) 4/2/94
 
 This is the README file for the make "include" files for the NetBSD
@@ -1832,10 +1832,6 @@ DPADD		Additional dependencies for the p
 		LIBXXF86MISC?=		${DESTDIR}/usr/X11R7/lib/libXxf86misc.a
 		LIBXXF86VM?=		${DESTDIR}/usr/X11R7/lib/libXxf86vm.a
 
-SHAREDSTRINGS	If defined, a new .c.o rule is used that results in shared
-		strings, using xstr(1). Note that this will not work with
-		parallel makes.
-
 STRIPFLAG	The flag passed to the install program to cause the binary
 		to be stripped.
 

Index: src/share/mk/bsd.prog.mk
diff -u src/share/mk/bsd.prog.mk:1.343 src/share/mk/bsd.prog.mk:1.344
--- src/share/mk/bsd.prog.mk:1.343	Mon May  8 14:31:08 2023
+++ src/share/mk/bsd.prog.mk	Wed May 24 10:07:16 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.prog.mk,v 1.343 2023/05/08 14:31:08 christos Exp $
+#	$NetBSD: bsd.prog.mk,v 1.344 2023/05/24 10:07:16 lukem Exp $
 #	@(#)bsd.prog.mk	8.2 (Berkeley) 4/2/94
 
 .ifndef HOSTPROG
@@ -35,22 +35,6 @@ realinstall:	proginstall scriptsinstall
 
 CLEANFILES+= a.out [Ee]rrs mklog core *.core .gdbinit
 
-.if defined(SHAREDSTRINGS)
-CLEANFILES+=strings
-.c.o:
-	${CC} -E ${CPPFLAGS} ${CFLAGS} ${.IMPSRC} | xstr -c -
-	@${CC} ${CPPFLAGS} ${CFLAGS} -c x.c ${OBJECT_TARGET}
-	${CTFCONVERT_RUN}
-	@rm -f x.c
-
-.cc.o .cpp.o .cxx.o .C.o:
-	${CXX} -E ${CPPFLAGS} ${CXXFLAGS} ${.IMPSRC} | xstr -c -
-	@${MV} x.c x.cc
-	@${CXX} ${CPPFLAGS} ${CXXFLAGS} -c x.cc ${OBJECT_TARGET}
-	${CTFCONVERT_RUN}
-	@rm -f x.cc
-.endif
-
 .if defined(MKPIE) && (${MKPIE} != "no") && !defined(NOPIE)
 CFLAGS+=	${PIE_CFLAGS}
 AFLAGS+=	${PIE_AFLAGS}



CVS commit: src/share/mk

2023-05-24 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Wed May 24 10:07:16 UTC 2023

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

Log Message:
deprecate SHAREDSTRINGS build option

Hasn't worked for at least 20 years (and never in the cross-build environment,
nor did it work with parallel make), and has never been needed in NetBSD as we
don't have the older BSD programs (pascal, pre-nvi ex) that needed mkstr/xstr
on PDP-11.

PR toolchain/35964


To generate a diff of this commit:
cvs rdiff -u -r1.442 -r1.443 src/share/mk/bsd.README
cvs rdiff -u -r1.343 -r1.344 src/share/mk/bsd.prog.mk

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