Re: Grammar and style edits to installation guide

2019-07-07 Thread Otto Moerbeek
On Sun, Jul 07, 2019 at 10:44:42PM -0700, Evan Silberman wrote:

> I noticed one thing that bothered me and decided to look for other
> things that bothered me. Changes were made without reference to the code
> of the installation program and without checking that the installer
> behaves as documented. I believe the included changes are harmless in
> that respect. I'm happy to provide explanations of any given line edit
> on request, but I hope they are self-explanatory. `make allarchs` ran
> without issues and I don't seem to have broken any formatting.
> 
> Regards,
> Evan Silberman
> 
> 
> Index: m4.common
> ===
> RCS file: /cvs/src/distrib/notes/m4.common,v
> retrieving revision 1.127
> diff -u -p -r1.127 m4.common
> --- m4.common 23 Aug 2017 02:59:45 -  1.127
> +++ m4.common 8 Jul 2019 05:36:28 -
> @@ -284,8 +284,8 @@ dnl Describes the boot of the ramdisk.
>  dnl Describes the serial terminal setup.
>  define({:-OpenBSDInstallPart3-:},
>  {:-  Once the kernel has loaded, you will be presented with the
> - OpenBSD kernel boot messages which contain information about
> - the hardware that was detected and supported by OpenBSD.
> + OpenBSD kernel boot messages, which contain information about
> + the supported hardware that was detected by OpenBSD.

This is not true. OpenBSD does print information about hardware
detected but not supported. e.g.:

"usb3_phy0" at mainbus0 not configured

-Otto

>  
>  dnl dot.profile
>   After the kernel is done initializing, you will be asked whether
> @@ -327,9 +327,9 @@ dnl install.sub (install) hostname
>  dnl install.sub (install) donetconfig
>   You will now be given an opportunity to configure the network.
>   The network configuration you enter (if any) can then be used to
> - do the install from another system using HTTP, and will also be
> - the configuration used by the system after the installation is
> - complete.
> + obtain installation sets from another system using HTTP, and
> + will also be the configuration used by the system after the
> + installation is complete.
>  
>  dnl XXX add a MDVLAN feature and document vlan setup
>   The install program will give you a list of network interfaces you
> @@ -409,10 +409,10 @@ dnl install.sub (install) user_setup()
>   with a lowercase letter.  If the login name matches this
>   criteria, and doesn't conflict with any of the administrative
>   user accounts (such as `root', `daemon' or `ftp'), you
> - will be prompted with the users descriptive name, as well
> - as its password, twice.
> + will be prompted for the user's descriptive name, then twice
> + for its password.
>  
> - As for the root password earlier, the install program will only
> + As with the root password earlier, the install program will only
>   check that the two passwords match, but you should make sure to
>   use a strong password here as well.
>  
> @@ -422,13 +422,11 @@ dnl install.sub (install) user_setup()
>  dnl install.sub (install) set_timezone
>  ifelse(MDTZ,,,
>  {:-
> - You may now be given the opportunity to configure the time zone
> - your system will be using (this depends on the installation
> - media you are using).
> -
> - If the installation program skips this question, do not be
> - alarmed, the time zone will be configured at the end
> - of the installation.
> + Depending on the installation media you are using, you may now
> + be given the opportunity to configure the time zone your system
> + will use.  If the installation program skips this question, do
> + not be alarmed: the time zone will be configured at the end of
> + the installation.
>  -:})dnl
>  dnl install.sh ask whether to use DUIDs before the md_prep_disklabel loop
>   The installation program will now tell you which disks it can
> @@ -512,7 +510,7 @@ define({:-OpenBSDInstallPart5-:},
>   partition layout) and the `n' command (to change mount points)
>   are of particular interest.
>  
> - Although the partitions position and size are written in exact
> + Although the partitions' position and size are written in exact
>   sector values, you do not need a calculator to create your
>   partitions!  Human-friendly units can be specified by adding `k',
>   `m' or `g' after any numbers to have them converted to kilobytes,
> @@ -652,10 +650,10 @@ define({:-OpenBSDCommonInstall-:},
>   A list of available distribution sets found on the
>   given location will be listed.
>  
> - You may individually select distribution sets to install,
> - by entering their name, or wildcards (e.g. `*.tgz' or
> - `base*|comp*', or `all' to select all the sets (which
> - is what most users will want to do).
> + You may individually select 

Grammar and style edits to installation guide

2019-07-07 Thread Evan Silberman
I noticed one thing that bothered me and decided to look for other
things that bothered me. Changes were made without reference to the code
of the installation program and without checking that the installer
behaves as documented. I believe the included changes are harmless in
that respect. I'm happy to provide explanations of any given line edit
on request, but I hope they are self-explanatory. `make allarchs` ran
without issues and I don't seem to have broken any formatting.

Regards,
Evan Silberman


Index: m4.common
===
RCS file: /cvs/src/distrib/notes/m4.common,v
retrieving revision 1.127
diff -u -p -r1.127 m4.common
--- m4.common   23 Aug 2017 02:59:45 -  1.127
+++ m4.common   8 Jul 2019 05:36:28 -
@@ -284,8 +284,8 @@ dnl Describes the boot of the ramdisk.
 dnl Describes the serial terminal setup.
 define({:-OpenBSDInstallPart3-:},
 {:-Once the kernel has loaded, you will be presented with the
-   OpenBSD kernel boot messages which contain information about
-   the hardware that was detected and supported by OpenBSD.
+   OpenBSD kernel boot messages, which contain information about
+   the supported hardware that was detected by OpenBSD.
 
 dnl dot.profile
After the kernel is done initializing, you will be asked whether
@@ -327,9 +327,9 @@ dnl install.sub (install) hostname
 dnl install.sub (install) donetconfig
You will now be given an opportunity to configure the network.
The network configuration you enter (if any) can then be used to
-   do the install from another system using HTTP, and will also be
-   the configuration used by the system after the installation is
-   complete.
+   obtain installation sets from another system using HTTP, and
+   will also be the configuration used by the system after the
+   installation is complete.
 
 dnl XXX add a MDVLAN feature and document vlan setup
The install program will give you a list of network interfaces you
@@ -409,10 +409,10 @@ dnl install.sub (install) user_setup()
with a lowercase letter.  If the login name matches this
criteria, and doesn't conflict with any of the administrative
user accounts (such as `root', `daemon' or `ftp'), you
-   will be prompted with the users descriptive name, as well
-   as its password, twice.
+   will be prompted for the user's descriptive name, then twice
+   for its password.
 
-   As for the root password earlier, the install program will only
+   As with the root password earlier, the install program will only
check that the two passwords match, but you should make sure to
use a strong password here as well.
 
@@ -422,13 +422,11 @@ dnl install.sub (install) user_setup()
 dnl install.sub (install) set_timezone
 ifelse(MDTZ,,,
 {:-
-   You may now be given the opportunity to configure the time zone
-   your system will be using (this depends on the installation
-   media you are using).
-
-   If the installation program skips this question, do not be
-   alarmed, the time zone will be configured at the end
-   of the installation.
+   Depending on the installation media you are using, you may now
+   be given the opportunity to configure the time zone your system
+   will use.  If the installation program skips this question, do
+   not be alarmed: the time zone will be configured at the end of
+   the installation.
 -:})dnl
 dnl install.sh ask whether to use DUIDs before the md_prep_disklabel loop
The installation program will now tell you which disks it can
@@ -512,7 +510,7 @@ define({:-OpenBSDInstallPart5-:},
partition layout) and the `n' command (to change mount points)
are of particular interest.
 
-   Although the partitions position and size are written in exact
+   Although the partitions' position and size are written in exact
sector values, you do not need a calculator to create your
partitions!  Human-friendly units can be specified by adding `k',
`m' or `g' after any numbers to have them converted to kilobytes,
@@ -652,10 +650,10 @@ define({:-OpenBSDCommonInstall-:},
A list of available distribution sets found on the
given location will be listed.
 
-   You may individually select distribution sets to install,
-   by entering their name, or wildcards (e.g. `*.tgz' or
-   `base*|comp*', or `all' to select all the sets (which
-   is what most users will want to do).
+   You may individually select distribution sets to install
+   by entering their names or wildcards (e.g. `*.tgz' or
+   `base*|comp*'), or you may enter `all' to select all the
+   sets (which is what most users will want to do).
You may also enter `abort' to deselect everything and
   

Re: ADMtec aue interface does not work with full 1500 VLAN_MTU

2019-07-07 Thread Chris Cappuccio
Christopher Zimmermann [chr...@openbsd.org] wrote:
> This works:
> 
> doas ifconfig vlan67 mtu 1496
> 
> this doesn't:
> 
> doas ifconfig vlan67 mtu 1497
> 
> 
> Should we therefore disable VLAN_MTU on this chipset?
> 
> - ifp->if_capabilities = IFCAP_VLAN_MTU;
> -


Yes absolutely. If IFCAP_VLAN_MTU actually worked for some chip versions,
more work is needed to distinguish the working chipsets.

Chris



Re: ed(1) man page doesn't mention use of single / and ?

2019-07-07 Thread Jason McIntyre
On Sun, Jul 07, 2019 at 10:12:13PM +0300, cho...@jtan.com wrote:
> ropers writes:
> > > matthew: "ed reacts differently depending whether or not it's included".
> > > can you explain how?
> 
> If I recall correctly, if the trailing delimiter is _not_ included then ed 
> prints the result of the substitution. Possibly only if interactive.
> 
> > W/r/t Matthew's concerns, I also note that the
> > > (.,.)s/re/replacement/
> > section does mention this in its second paragraph:
> > >> If one or two of the last delimiters is omitted, then the last line
> > >> affected is printed as though the print suffix p were specified.
> > I'm not quite sure what is meant by omission of *two* of the last
> > delimiters there, but this does at least seem relevant to what we're
> > discussing here.
> 
> Yes that sounds about right. Looks like some part of this behaviour is in 
> documented already.
> 
> The pedantic part of me likes getting this pointless thing right but the 
> pedantic part of me also wants to make sure it's actually right before 
> changing something that evidently works already and isn't bothering anybody. 
> I managed to learn ed with the manpage as it is.
> 
> It sounds like there might be a bit of confusion wrt. what does/doesn't 
> happen vs. what's documented. Can the various interactions under discussion 
> be actually clarified and enumerated to be sure we're not changing a minor 
> mistake for a new mistake? I can do this tomorrow if nobody else jumps in but 
> I'd get it wrong if I tried it now.
> 
> Matthew
> 

this is getting silly - we're mixing talking about how /re/ and ?re?
work as addresses and as regular expressions in other places. dropping
the trailing [/?] does not apply to regular expressions everywhere.

even if i have this wrong (to be fair, not that unlikely), we should
just concentrate on one thing at a time.

regarding how dropping two delimiters works in an 's' command, although
i'm not sure really of the reason, you can do:

1,$s/re

which effectively drops /replacement/

so here's my diff. i think we should keep it short.  if there are
other cases where things can dropped, i'd rather look at them
separately.

the question for me is: posix mandates this in address ranges. our
ed behaves this way. is there a reason not to document this?

jmc

Index: ed.1
===
RCS file: /cvs/src/bin/ed/ed.1,v
retrieving revision 1.70
diff -u -r1.70 ed.1
--- ed.126 Apr 2018 12:18:54 -  1.70
+++ ed.17 Jul 2019 19:56:11 -
@@ -267,6 +267,7 @@
 .Ar re .
 The search wraps to the beginning of the buffer and continues down to the
 current line, if necessary.
+The second slash can be omitted if it ends a line.
 .Qq //
 repeats the last search.
 .It Pf ? Ar re ?
@@ -274,6 +275,7 @@
 .Ar re .
 The search wraps to the end of the buffer and continues up to the
 current line, if necessary.
+The second question mark can be omitted if it ends a line.
 .Qq ??
 repeats the last search.
 .It \&' Ns Ar lc



Re: ed(1) man page doesn't mention use of single / and ?

2019-07-07 Thread chohag
ropers writes:
> > matthew: "ed reacts differently depending whether or not it's included".
> > can you explain how?

If I recall correctly, if the trailing delimiter is _not_ included then ed 
prints the result of the substitution. Possibly only if interactive.

> W/r/t Matthew's concerns, I also note that the
> > (.,.)s/re/replacement/
> section does mention this in its second paragraph:
> >> If one or two of the last delimiters is omitted, then the last line
> >> affected is printed as though the print suffix p were specified.
> I'm not quite sure what is meant by omission of *two* of the last
> delimiters there, but this does at least seem relevant to what we're
> discussing here.

Yes that sounds about right. Looks like some part of this behaviour is in 
documented already.

The pedantic part of me likes getting this pointless thing right but the 
pedantic part of me also wants to make sure it's actually right before changing 
something that evidently works already and isn't bothering anybody. I managed 
to learn ed with the manpage as it is.

It sounds like there might be a bit of confusion wrt. what does/doesn't happen 
vs. what's documented. Can the various interactions under discussion be 
actually clarified and enumerated to be sure we're not changing a minor mistake 
for a new mistake? I can do this tomorrow if nobody else jumps in but I'd get 
it wrong if I tried it now.

Matthew



Re: ed(1) man page doesn't mention use of single / and ?

2019-07-07 Thread ropers
On 07/07/2019, ropers  wrote:
> Second thought, maybe the 'i.e.'s should be changed to 'e.g.'s,
> because '/' and '?' also work (instead of '//' and '??',
> respectively), so '/re' and '?re' are indeed only examples.
>
> Or maybe this is overdoing it. I don't know. Whatever you all think is
> best and most correct. I have no strong personal opinion on this. I'm
> just trying to respond to mazocomp's reasonable observation and
> suggestion.

Okay, so here's an "e.g." version of the patch, which also removes an
extraneous `Ns` that was still present in the earlier, "i.e." version:

Index: ed.1
===
RCS file: /cvs/src/bin/ed/ed.1,v
retrieving revision 1.70
diff -u -r1.70 ed.1
--- ed.126 Apr 2018 12:18:54 -  1.70
+++ ed.17 Jul 2019 13:19:34 -
@@ -269,6 +269,9 @@
 current line, if necessary.
 .Qq //
 repeats the last search.
+The second slash is optional for a bare search without any suffixed
command, e.g.\&
+.Qq / Ns Ar re
+is sufficient when followed by a newline.
 .It Pf ? Ar re ?
 The previous line containing the regular expression
 .Ar re .
@@ -276,6 +279,9 @@
 current line, if necessary.
 .Qq ??
 repeats the last search.
+The second question mark is optional for a bare search without any
suffixed command, e.g.\&
+.Qq ? Ns Ar re
+is sufficient when followed by a newline.
 .It \&' Ns Ar lc
 The line previously marked by a
 .Ic k

However: *This isn't even my final form*, because it does not take
into account Matthew's concerns, which he hasn't clarified yet,
perhaps because he's not subscribed to tech@:


Thus Spake Chohag-jtan:
>> Better to be thorough, if this is to be done. The final slash in a
>> substitution is also unnecessary and ed reacts differently depending
>> whether or not it's included. I expect it's the same for the other
>> commands with delimited options.
>>
>> Matthew


Quoth the Jason:
> let's keep this on one mailing list only. since there's a diff, i guess
> tech is now fine.
>
> matthew: "ed reacts differently depending whether or not it's included".
> can you explain how?
>
> jmc


Also, it says in the DESCRIPTION in `man 1 ed` that
>> (...) commands have the structure:
>>   [address [,address]]command[parameters]
and I guess since /re[/] and ?re[?] are technically addresses, that
means that, with bare single addresses being legal and sufficient for
search, the command is technically optional too. So would one write
that as follows?
>>   [address [,address]][command[parameters]]
Or would it make more sense to add a second, bare address form there?

W/r/t Matthew's concerns, I also note that the
> (.,.)s/re/replacement/
section does mention this in its second paragraph:
>> If one or two of the last delimiters is omitted, then the last line
>> affected is printed as though the print suffix p were specified.
I'm not quite sure what is meant by omission of *two* of the last
delimiters there, but this does at least seem relevant to what we're
discussing here.


Oh, and Jason, earlier on you recommended NOT to document the second
delimiter omission with `g/RE`. Is there a reason why? I appreciate
that on its own, `g/RE` may not seem to make too much sense at first
sight, but it's actually different from `/RE`, and these are all
legal:

$ alias ed
alias ed='ed -p ed:\ '
$ ed ed.1
20317
ed: H
ed: /tuple
.Ar n Ns -tuple
ed: g/tuple
.Ar n Ns -tuple
.Ar n Ns -tuple .
ed: 200,210g/tuple
.Ar n Ns -tuple
.Ar n Ns -tuple .
ed: 200,205g/tuple
.Ar n Ns -tuple
ed: g/tuple/n
203 .Ar n Ns -tuple
208 .Ar n Ns -tuple .
ed: q
$

I've included the /n command form for clarification there.
This is my edited ed.1. YMMV w/r/t line numbers.
My ed has an `ed: ` prompt because I've aliased ed(1) to that. I would
*maybe* even weakly suggest this diff:

Index: dot.profile
===
RCS file: /cvs/src/etc/skel/dot.profile,v
retrieving revision 1.5
diff -u -r1.5 dot.profile
--- dot.profile 2 Feb 2018 02:29:54 -   1.5
+++ dot.profile 7 Jul 2019 16:17:19 -
@@ -4,3 +4,5 @@

 
PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games
 export PATH HOME TERM
+
+if (-x /bin/ed) alias ed='ed -p ed:\ '

(NB: Perhaps `alias ed='ed -p ed\>\ '` or `alias ed='ed -p ed\*\ '
would be more acceptable?)

This would be a confusion-decreasing convenience for new users, but
maybe this is imposing too much of a personal viewpoint; you tell me;
I have no strong opinion on this.

I do however have a strong opinion on the next thing I've just found:
The following diff incorporates three additional changes that fix a
documentation bug that could result in actual data loss, or at least
that's where it could lead an unwary user:

Index: ed.1
===
RCS file: /cvs/src/bin/ed/ed.1,v
retrieving revision 1.70
diff -u -r1.70 ed.1
--- ed.126 Apr 2018 

OpenSSH-based socket forwarder

2019-07-07 Thread Demi M. Obenour
I have found myself using OpenSSH for its forwarding abilities,
without actually using the remote shell feature.  In these cases, the
connection itself is over Xen shared memory, so I have no need for any
of the cryptography.

While allowing unencrypted SSH connections is obviously a bad
idea, I would be very interested in adding support for using SSH
as a pure forwarder, to allow forwarding sockets and X11 over an
already-established, secure channel.  While this is probably possible
with libssh, libssh2, or other libraries, OpenSSH’s excellent
security track-record makes it preferred here.

I suggest that ssh(1) and sshd(8) act as the client and server of
this protocol if invoked as forward-client(1) and forward-server(1),
respectively.  The protocol would be spoken over stdin/stdout.

Would there be any interest in this from the OpenSSH maintainers?
I have limited time, but would be willing to test patches.

Sincerely,

Demi