Re: MOTD is not created correctly (since 2022/02/18)

2023-05-24 Thread Jamie Landeg-Jones
Garance A Drosehn  wrote:

> Not that it helps you much, but I did notice it and have an alternate
> version of rc.d/motd on my own systems.  I had no particular attachment
> to the earlier format, so my motd starts out by printing the two lines
> of:
> ```
>  -KU 1302505 1302505 -b 18fa15f83c483db67b818e3a48bbb312908754b1
> FreeBSD 13.2-STABLE (Garance-13x) #0 -- Fri May  5 17:53:55 EDT 2023

I too was actually not all that fussed with the old style, but the
multiple spaces in the output bugged me, so I was going to change it
back, when I stumbled on the issue.

I actually have closer to yours in my ssh-banner:

**  **
 FreeBSD/amd64 13.2-STABLE - Build 1302505 (May 13, 2023)
   23:25 BST  up 1 01:30   0.16,  0.18,  0.16
  -- SOD OFF IF YOU AREN'T AUTHORISED


> But I thought that committing that would trigger a bikeshed debate, so I
> also have an option to produce the output we previously had.  And given
> that no one seemed to be complaining about the "full uname" version, I
> figured I had an option for that too.  And then I thought all these 
> options
> were overkill and would trigger and even longer debate, so I never 
> brought
> the ideas forward.   :)

:-)

Oh yeah, definitely! It would be worse than the fractional seconds in
sleep(1) debate!

Cheers, for the response,
Jamie



Re: MOTD is not created correctly (since 2022/02/18)

2023-05-23 Thread Garance A Drosehn

On 22 May 2023, at 23:18, Jamie Landeg-Jones wrote:

I've just finally updated to 13-stable, and can't be the first to 
notice this?!


/etc/rc.d/motd contains the line:

uname -v | sed -e 's,^\([^#]*\) #\(.* 
[1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 (\3) #\2,'


Note the space before the "$" - needed because the uname -v output 
used

to have a trailing space. This was fixed and comitted on 2022/02/18:

https://cgit.freebsd.org/src/commit/usr.bin/uname/uname.c?id=7e05fa3b449007adaa6e588ebb3b8d76f30b355c

Since then, the sed doesn't match, so the uname(1) output is 
unchanged.


There's no point altering the sed to work with both possibilities, so 
can
someone commit the fix of removing the ' ' before the '$' in 
/etc/rc.d/motd ?


Not that it helps you much, but I did notice it and have an alternate
version of rc.d/motd on my own systems.  I had no particular attachment
to the earlier format, so my motd starts out by printing the two lines
of:
```
-KU 1302505 1302505 -b 18fa15f83c483db67b818e3a48bbb312908754b1
FreeBSD 13.2-STABLE (Garance-13x) #0 -- Fri May  5 17:53:55 EDT 2023
```

(that first line is the output from
```printf '-KU %s -b %s\n' "$(uname -KU)" "$(uname -b)"```
)

But I thought that committing that would trigger a bikeshed debate, so I
also have an option to produce the output we previously had.  And given
that no one seemed to be complaining about the "full uname" version, I
figured I had an option for that too.  And then I thought all these 
options
were overkill and would trigger and even longer debate, so I never 
brought

the ideas forward.   :)

--
Garance Alistair Drosehn= dro...@rpi.edu
Lead Developer @rpi   andg...@freebsd.org
Rensselaer Polytechnic Institute; Troy, NY;  USA


Re: MOTD is not created correctly (since 2022/02/18)

2023-05-23 Thread Jamie Landeg-Jones
Xin Li  wrote:

> Maybe https://reviews.freebsd.org/D40225 ?
>
> (Nice find by the way!  I always feel that something was not right but 
> haven't looked close enough.)

Thanks! What is the best way to report things like this in the future?

I'm happy to create a phabricator report, Enji suggested a PR, and
previously, Warner said he's happy to accept github pull requests for
small changes.

Now, I admit I've not yet looked at how to do github pull requests, so
that omission is entirely my fault.

As for PRs, I've always done that previously, but these days they tend to
go unnoticed.

And I thought Phabricator was for comitters only. If that's not the case,
do I create a review there and add people myself? That has always seemed
a bit presumptuous!

Or is it a case of create PR/review, and then notify the appropriate mailing
list?

If so, when is it appropriate to use phabricator over PR, and vice verca?

I'm an old dog still used to "send-pr", but I'm happy to learn the new tricks! 
:-)

Cheers, Jamie



Re: MOTD is not created correctly (since 2022/02/18)

2023-05-23 Thread Enji Cooper


> On May 22, 2023, at 11:06 PM, Enji Cooper  wrote:
> 
>> 
>> On May 22, 2023, at 8:18 PM, Jamie Landeg-Jones  wrote:
>> 
>> I've just finally updated to 13-stable, and can't be the first to notice 
>> this?!
>> 
>> /etc/rc.d/motd contains the line:
>> 
>> uname -v | sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\) 
>> $,\1 (\3) #\2,'
>> 
>> Note the space before the "$" - needed because the uname -v output used
>> to have a trailing space. This was fixed and comitted on 2022/02/18:
>> 
>> https://cgit.freebsd.org/src/commit/usr.bin/uname/uname.c?id=7e05fa3b449007adaa6e588ebb3b8d76f30b355c
>> 
>> Since then, the sed doesn't match, so the uname(1) output is unchanged.
>> 
>> There's no point altering the sed to work with both posibilities, so can
>> someone commit the fix of removing the ' ' before the '$' in /etc/rc.d/motd ?
> 
> Hi Jamie,
>   Thank you for the note — could you please file a PR and reference it in 
> a reply?

Ah, never mind. I see that it’s been fixed recently on main.
-Enji


signature.asc
Description: Message signed with OpenPGP


Re: MOTD is not created correctly (since 2022/02/18)

2023-05-23 Thread Enji Cooper

> On May 22, 2023, at 8:18 PM, Jamie Landeg-Jones  wrote:
> 
> I've just finally updated to 13-stable, and can't be the first to notice 
> this?!
> 
> /etc/rc.d/motd contains the line:
> 
> uname -v | sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 
> (\3) #\2,'
> 
> Note the space before the "$" - needed because the uname -v output used
> to have a trailing space. This was fixed and comitted on 2022/02/18:
> 
> https://cgit.freebsd.org/src/commit/usr.bin/uname/uname.c?id=7e05fa3b449007adaa6e588ebb3b8d76f30b355c
> 
> Since then, the sed doesn't match, so the uname(1) output is unchanged.
> 
> There's no point altering the sed to work with both posibilities, so can
> someone commit the fix of removing the ' ' before the '$' in /etc/rc.d/motd ?

Hi Jamie,
Thank you for the note — could you please file a PR and reference it in 
a reply?
Thanks!
-Enji


signature.asc
Description: Message signed with OpenPGP


Re: MOTD is not created correctly (since 2022/02/18)

2023-05-22 Thread Xin Li

On 2023-05-22 8:18 PM, Jamie Landeg-Jones wrote:

I've just finally updated to 13-stable, and can't be the first to notice this?!

/etc/rc.d/motd contains the line:

uname -v | sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 
(\3) #\2,'

Note the space before the "$" - needed because the uname -v output used
to have a trailing space. This was fixed and comitted on 2022/02/18:

https://cgit.freebsd.org/src/commit/usr.bin/uname/uname.c?id=7e05fa3b449007adaa6e588ebb3b8d76f30b355c

Since then, the sed doesn't match, so the uname(1) output is unchanged.

There's no point altering the sed to work with both posibilities, so can
someone commit the fix of removing the ' ' before the '$' in /etc/rc.d/motd ?


Maybe https://reviews.freebsd.org/D40225 ?

(Nice find by the way!  I always feel that something was not right but 
haven't looked close enough.)


Cheers,


OpenPGP_signature
Description: OpenPGP digital signature


MOTD is not created correctly (since 2022/02/18)

2023-05-22 Thread Jamie Landeg-Jones
I've just finally updated to 13-stable, and can't be the first to notice this?!

/etc/rc.d/motd contains the line:

uname -v | sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 
(\3) #\2,'

Note the space before the "$" - needed because the uname -v output used
to have a trailing space. This was fixed and comitted on 2022/02/18:

https://cgit.freebsd.org/src/commit/usr.bin/uname/uname.c?id=7e05fa3b449007adaa6e588ebb3b8d76f30b355c

Since then, the sed doesn't match, so the uname(1) output is unchanged.

There's no point altering the sed to work with both posibilities, so can
someone commit the fix of removing the ' ' before the '$' in /etc/rc.d/motd ?

Cheers
Jamie