Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Trev

Hans Petter Selasky wrote on 23/9/21 5:55 pm:
I've always used "tcsh" for root. The little help you get on the command 
line to search and repeat commands is very useful compared to plain "sh".


+1




Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Rick Macklem
Dirk Meyer wrote:
>Baptiste Daroussin schrieb:,
[stuff snipped]
>
>We have already "toor" for sh.
As an aside, I will note that having multiple passwd entries for the same uid 
somewhat
breaks the mapping done by nfsuserd(8), since it will map the uid to one of the 
names.

It is not a big issue, but in my perfect world, there would not be "toor".

I don't have an opinion on what shell root should use.

rick

I disgree on the "user friendly" part of sh.
History search in sh and bash can't hold a candle angainst csh.

Migration of aliase will be painful as ">&" and "|&" is not supoported.

I vote strongly against it.

kind regards Dirk

- Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany
- [dirk.me...@dinoex.sub.org],[dirk.me...@guug.de],[din...@freebsd.org]





Re: latest current fails to boot.

2021-09-23 Thread Konstantin Belousov
On Thu, Sep 23, 2021 at 09:20:51PM +0200, Johan Hendriks wrote:
> 
> On 23/09/2021 19:52, Konstantin Belousov wrote:
> > On Fri, Sep 24, 2021 at 12:43:01AM +0900, Tomoaki AOKI wrote:
> > > On Wed, 22 Sep 2021 23:09:05 +0900
> > > Tomoaki AOKI  wrote:
> > > 
> > > > On Wed, 22 Sep 2021 05:47:46 -0700
> > > > David Wolfskill  wrote:
> > > > 
> > > > > On Wed, Sep 22, 2021 at 02:39:37PM +0200, Johan Hendriks wrote:
> > > > > > I did a git pull this morning and it fails to boot.
> > > > > > I hangs at Setting hostid : 0x917bf354
> > > > > > 
> > > > > > This is a vm running on vmware.
> > > > > > If i boot the old kernel from yesterday it boots normally.
> > > > > > 
> > > > > > uname -a
> > > > > > FreeBSD varnish-cdn-node03 14.0-CURRENT FreeBSD 14.0-CURRENT #0
> > > > > > main-n249518-5572fda3a2f: Tue Sep 21 14:40:22 CEST 2021
> > > > > > root@varnish-cdn-node03:/usr/obj/usr/src/amd64.amd64/sys/KRNL amd64
> > > > > > 
> > > > > I had no issues with my build machine or either of two laptops, either
> > > > > from yesterday:
> > > > > 
> > > > > FreeBSD g1-55.catwhisker.org 14.0-CURRENT FreeBSD 14.0-CURRENT #358 
> > > > > main-n249518-5572fda3a2f3: Tue Sep 21 05:15:22 PDT 2021 
> > > > > r...@g1-55.catwhisker.org:/common/S4/obj/usr/src/amd64.amd64/sys/CANARY
> > > > >   amd64 1400033 1400033
> > > > > 
> > > > > or today:
> > > > > 
> > > > > FreeBSD g1-55.catwhisker.org 14.0-CURRENT FreeBSD 14.0-CURRENT #359 
> > > > > main-n249556-c96da1994587: Wed Sep 22 04:24:17 PDT 2021 
> > > > > r...@g1-55.catwhisker.org:/common/S4/obj/usr/src/amd64.amd64/sys/CANARY
> > > > >   amd64 1400033 1400033
> > > > > 
> > > > > [uname strings from my main laptop shown, but I keep the machines
> > > > > in sync rather aggressively.]
> > > > > 
> > > > > Perhaps the issue you are encountering involves things not in my
> > > > > environment (such as VMs or ZFS)?
> > > > > 
> > > > > Peace,
> > > > > david
> > > > > -- 
> > > > > David H. Wolfskill  da...@catwhisker.org
> > > > > Life is not intended to be a zero-sum game.
> > > > > 
> > > > > See https://www.catwhisker.org/~david/publickey.gpg for my public key.
> > > > For me, on bare metal (non-vm) amd64 with root-on-ZFS,
> > > > 
> > > >Fails to boot to multiuser at git: 8db1669959ce
> > > >Boot fine at git: 0b79a76f8487
> > > > 
> > > > Boot to singleuser is fine even with failed revision.
> > > > 
> > > > Failure mode:
> > > >   Hard hangup or spinning and non-operable. Hard power-off needed.
> > > >   Seems to happen after starting rc.conf processing and before setting
> > > >   hostid.
> > > > 
> > > > -- 
> > > > Tomoaki AOKI
> > > > 
> > > Additional info and correction.
> > >   *Hung up before setting hostuuid, not hostid.
> > > 
> > >   *^T doesn't respond at all, only hard power off worked.
> > > 
> > >   *`kldload nvidia-modeset.ko` on single user mode sanely work.
> > > 
> > > 
> > > Why I could know rc.conf is started to be processed:
> > > 
> > >   I have lines below at the end of /etc/rc.conf and its output is always
> > >   the first line related to /etc/rc.conf, at least for non-verbose boot.
> > >   The next line is normally "Setting hostuuid: " line, which was not
> > >   displayed when boot hung up.
> > > 
> > > 
> > > kldstat -q -n nvidia.ko
> > > if [ 0 -ne $? ] ; then
> > >echo "Loading nvidia-driver modules via rc.conf."
> > >if [ -e /boot/modules/nvidia-modeset.ko ] ; then
> > >  kld_list="${kld_list} nvidia-modeset.ko"
> > >else
> > >  kld_list="${kld_list} nvidia.ko"
> > >fi
> > > fi
> > If you do not load nvidia-modeset.ko at all, does the boot proceed?
> > 
> > When the boot hangs, can you enter into ddb?
> > 
> > 
> I do not load a nvidia-modeset.ko kernel module and it will not boot. It
> hangs with Setting hostid : as the last message. Then only a powercycle gets
> me back. If i boot in single user mode all is fine, but as soon as i exit
> single user mode it hangs at the same spot.

Can you enter ddb at the hang point?
Do you load any other modules besides nvidia, from rc.conf?



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Brooks Davis
On Wed, Sep 22, 2021 at 10:36:45AM +0200, Baptiste Daroussin wrote:
> Hello,
> 
> TL;DR: this is not a proposal to deorbit csh from base!!!
> 
> For years now, csh is the default root shell for FreeBSD, csh can be confusing
> as a default shell for many as all other unix like settled on a bourne shell
> compatible interactive shell: zsh, bash, or variant of ksh.

Think we should switch in 14+.

My main argument is that shell one-liners in documentation are almost
always written in Bourne syntax.  I believe the fact that we're an
outlier is confusing the sort of new users we hope to attract with
thinks like Raspberry-pi and cloud images.  As a long-time user, it even
trips me up when I do some work on a FreeBSD box after spending most of
my time on other systems.

-- Brooks


signature.asc
Description: PGP signature


Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Tim Rice



On 9/22/21 8:52 AM, Rodney W. Grimes wrote:
>> On Wed, Sep 22, 2021 at 08:34:58AM -0700, John Baldwin wrote:
>>> I think this is fine.  I would also be fine with either removing 'toor' 
>>> from the
>>> default password file or just leaving it as-is for POLA.  (I would probably
>>> prefer removing it outright.)
>> HardenedBSD recently removed toor. No one has complained (yet?). A
>> small Twitter poll[0] showed that 85% of people who responded do not
>> use toor.
> A truely disastisified customer does not complain, they simply
> go some place else for there products.  Be carefull in what you
> believe silence to be saying.
I do not see csh as root's shell as a pain point.
The #1 pain point on FreeBSD if you are used to various flavors of
linux, Solaris, UnixWare, etc.
is ps(1) not having POSIX style arguments.

-- 

Tim Rice
tim.r...@xinuos.com




Re: latest current fails to boot.

2021-09-23 Thread Johan Hendriks



On 23/09/2021 19:52, Konstantin Belousov wrote:

On Fri, Sep 24, 2021 at 12:43:01AM +0900, Tomoaki AOKI wrote:

On Wed, 22 Sep 2021 23:09:05 +0900
Tomoaki AOKI  wrote:


On Wed, 22 Sep 2021 05:47:46 -0700
David Wolfskill  wrote:


On Wed, Sep 22, 2021 at 02:39:37PM +0200, Johan Hendriks wrote:

I did a git pull this morning and it fails to boot.
I hangs at Setting hostid : 0x917bf354

This is a vm running on vmware.
If i boot the old kernel from yesterday it boots normally.

uname -a
FreeBSD varnish-cdn-node03 14.0-CURRENT FreeBSD 14.0-CURRENT #0
main-n249518-5572fda3a2f: Tue Sep 21 14:40:22 CEST 2021
root@varnish-cdn-node03:/usr/obj/usr/src/amd64.amd64/sys/KRNL amd64


I had no issues with my build machine or either of two laptops, either
from yesterday:

FreeBSD g1-55.catwhisker.org 14.0-CURRENT FreeBSD 14.0-CURRENT #358 
main-n249518-5572fda3a2f3: Tue Sep 21 05:15:22 PDT 2021 
r...@g1-55.catwhisker.org:/common/S4/obj/usr/src/amd64.amd64/sys/CANARY  amd64 
1400033 1400033

or today:

FreeBSD g1-55.catwhisker.org 14.0-CURRENT FreeBSD 14.0-CURRENT #359 
main-n249556-c96da1994587: Wed Sep 22 04:24:17 PDT 2021 
r...@g1-55.catwhisker.org:/common/S4/obj/usr/src/amd64.amd64/sys/CANARY  amd64 
1400033 1400033

[uname strings from my main laptop shown, but I keep the machines
in sync rather aggressively.]

Perhaps the issue you are encountering involves things not in my
environment (such as VMs or ZFS)?

Peace,
david
--
David H. Wolfskill  da...@catwhisker.org
Life is not intended to be a zero-sum game.

See https://www.catwhisker.org/~david/publickey.gpg for my public key.

For me, on bare metal (non-vm) amd64 with root-on-ZFS,

   Fails to boot to multiuser at git: 8db1669959ce
   Boot fine at git: 0b79a76f8487

Boot to singleuser is fine even with failed revision.

Failure mode:
  Hard hangup or spinning and non-operable. Hard power-off needed.
  Seems to happen after starting rc.conf processing and before setting
  hostid.

--
Tomoaki AOKI


Additional info and correction.
  *Hung up before setting hostuuid, not hostid.

  *^T doesn't respond at all, only hard power off worked.

  *`kldload nvidia-modeset.ko` on single user mode sanely work.


Why I could know rc.conf is started to be processed:

  I have lines below at the end of /etc/rc.conf and its output is always
  the first line related to /etc/rc.conf, at least for non-verbose boot.
  The next line is normally "Setting hostuuid: " line, which was not
  displayed when boot hung up.


kldstat -q -n nvidia.ko
if [ 0 -ne $? ] ; then
   echo "Loading nvidia-driver modules via rc.conf."
   if [ -e /boot/modules/nvidia-modeset.ko ] ; then
 kld_list="${kld_list} nvidia-modeset.ko"
   else
 kld_list="${kld_list} nvidia.ko"
   fi
fi

If you do not load nvidia-modeset.ko at all, does the boot proceed?

When the boot hangs, can you enter into ddb?


I do not load a nvidia-modeset.ko kernel module and it will not boot. It 
hangs with Setting hostid : as the last message. Then only a powercycle 
gets me back. If i boot in single user mode all is fine, but as soon as 
i exit single user mode it hangs at the same spot.






Re: latest current fails to boot.

2021-09-23 Thread Juraj Lutter



> On 23 Sep 2021, at 19:52, Konstantin Belousov  wrote:
> 
> If you do not load nvidia-modeset.ko at all, does the boot proceed?
> 
> When the boot hangs, can you enter into ddb?

That also brings up a question: Does nvidia kmods (and probably also drm kmod) 
match the kernel?


—
Juraj Lutter
o...@freebsd.org




Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Lucas Nali de Magalhães
On Sep 23, 2021, at 3:01 PM, Lucas Nali de Magalhães  
wrote:
> 
> 
>>> On Sep 22, 2021, at 5:38 AM, Baptiste Daroussin  wrote:
>>> 
>> TL;DR: this is not a proposal to deorbit csh from base!!! (…)
> 
> I'm used to see FreeBSD remembered as a traditional OS full of professionalism
> and open to innovation. The front door for the BSD world and an OS that 
> doesn't
> copy Linux. But more and more I'm seeing that BSD will need a new front door
> soon, that this OS is becoming more and more another Linux, that 
> professionalism
> is being left aside and that innovation is being undone and/or simply erased.
> I wish I were about to write that it's the first time in a lot of time that I 
> see a problem
> being systematically recreated but this isn't true either. And I feel sad I'm 
> being
> getting used to this, too.
> 
> Mark Millard found that LLVM multi-threaded linker is buggy on Armv7 and 
> reported
> it in another thread. I commented on it, even. It wasn't mention in that 
> thread that the
> numbers there shows another problem recreated that must be solved again. The
> processes there were killed *before* virtual memory started to being heavily 
> used. This
> goes against the intended use of virtual memory. If virtual memory isn't used 
> it's lost
> resource: a thing that must be removed from the system, optimized away. In 
> that
> specific case, virtual memory should have entered into place, being fully 
> filled and then
> the process will be killed. And just to be complete, the non-debuggability of 
> LLVM were
> a known problem of LLVM by the time of the discussions that lead to it's 
> import in the
> tree.

And, by mentioning problems needing solution, I received:

Post to freebsd-a...@freebsd.org denied: Re: [HEADSUP] making /bin/sh the 
default shell for root

This used to not be a problem. I know of what followed were the truth and I've 
no intention in changing
my status about this. And this huge thread is about a cosmetic change. 
Fantastic!

-- 
rollingbits —  rollingb...@icloud.com  rollingb...@gmail.com  
rollingb...@yahoo.com





Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Lucas Nali de Magalhães
> On Sep 22, 2021, at 5:38 AM, Baptiste Daroussin  wrote:
> TL;DR: this is not a proposal to deorbit csh from base!!! (…)

I'm used to see FreeBSD remembered as a traditional OS full of professionalism
and open to innovation. The front door for the BSD world and an OS that doesn't
copy Linux. But more and more I'm seeing that BSD will need a new front door
soon, that this OS is becoming more and more another Linux, that professionalism
is being left aside and that innovation is being undone and/or simply erased.
I wish I were about to write that it's the first time in a lot of time that I 
see a problem
being systematically recreated but this isn't true either. And I feel sad I'm 
being
getting used to this, too.

Mark Millard found that LLVM multi-threaded linker is buggy on Armv7 and 
reported
it in another thread. I commented on it, even. It wasn't mention in that thread 
that the
numbers there shows another problem recreated that must be solved again. The
processes there were killed *before* virtual memory started to being heavily 
used. This
goes against the intended use of virtual memory. If virtual memory isn't used 
it's lost
resource: a thing that must be removed from the system, optimized away. In that
specific case, virtual memory should have entered into place, being fully 
filled and then
the process will be killed. And just to be complete, the non-debuggability of 
LLVM were
a known problem of LLVM by the time of the discussions that lead to it's import 
in the
tree.

-- 
rollingbits —  rollingb...@icloud.com  rollingb...@gmail.com  
rollingb...@yahoo.com





Re: latest current fails to boot.

2021-09-23 Thread Konstantin Belousov
On Fri, Sep 24, 2021 at 12:43:01AM +0900, Tomoaki AOKI wrote:
> On Wed, 22 Sep 2021 23:09:05 +0900
> Tomoaki AOKI  wrote:
> 
> > On Wed, 22 Sep 2021 05:47:46 -0700
> > David Wolfskill  wrote:
> > 
> > > On Wed, Sep 22, 2021 at 02:39:37PM +0200, Johan Hendriks wrote:
> > > > I did a git pull this morning and it fails to boot.
> > > > I hangs at Setting hostid : 0x917bf354
> > > > 
> > > > This is a vm running on vmware.
> > > > If i boot the old kernel from yesterday it boots normally.
> > > > 
> > > > uname -a
> > > > FreeBSD varnish-cdn-node03 14.0-CURRENT FreeBSD 14.0-CURRENT #0 
> > > > main-n249518-5572fda3a2f: Tue Sep 21 14:40:22 CEST 2021 
> > > > root@varnish-cdn-node03:/usr/obj/usr/src/amd64.amd64/sys/KRNL amd64
> > > > 
> > > 
> > > I had no issues with my build machine or either of two laptops, either
> > > from yesterday:
> > > 
> > > FreeBSD g1-55.catwhisker.org 14.0-CURRENT FreeBSD 14.0-CURRENT #358 
> > > main-n249518-5572fda3a2f3: Tue Sep 21 05:15:22 PDT 2021 
> > > r...@g1-55.catwhisker.org:/common/S4/obj/usr/src/amd64.amd64/sys/CANARY  
> > > amd64 1400033 1400033
> > > 
> > > or today:
> > > 
> > > FreeBSD g1-55.catwhisker.org 14.0-CURRENT FreeBSD 14.0-CURRENT #359 
> > > main-n249556-c96da1994587: Wed Sep 22 04:24:17 PDT 2021 
> > > r...@g1-55.catwhisker.org:/common/S4/obj/usr/src/amd64.amd64/sys/CANARY  
> > > amd64 1400033 1400033
> > > 
> > > [uname strings from my main laptop shown, but I keep the machines
> > > in sync rather aggressively.]
> > > 
> > > Perhaps the issue you are encountering involves things not in my
> > > environment (such as VMs or ZFS)?
> > > 
> > > Peace,
> > > david
> > > -- 
> > > David H. Wolfskill  da...@catwhisker.org
> > > Life is not intended to be a zero-sum game.
> > > 
> > > See https://www.catwhisker.org/~david/publickey.gpg for my public key.
> > 
> > For me, on bare metal (non-vm) amd64 with root-on-ZFS,
> > 
> >   Fails to boot to multiuser at git: 8db1669959ce
> >   Boot fine at git: 0b79a76f8487
> > 
> > Boot to singleuser is fine even with failed revision.
> > 
> > Failure mode:
> >  Hard hangup or spinning and non-operable. Hard power-off needed.
> >  Seems to happen after starting rc.conf processing and before setting
> >  hostid.
> > 
> > -- 
> > Tomoaki AOKI
> > 
> 
> Additional info and correction.
>  *Hung up before setting hostuuid, not hostid.
> 
>  *^T doesn't respond at all, only hard power off worked.
> 
>  *`kldload nvidia-modeset.ko` on single user mode sanely work.
> 
> 
> Why I could know rc.conf is started to be processed:
> 
>  I have lines below at the end of /etc/rc.conf and its output is always
>  the first line related to /etc/rc.conf, at least for non-verbose boot.
>  The next line is normally "Setting hostuuid: " line, which was not
>  displayed when boot hung up.
> 
> 
> kldstat -q -n nvidia.ko
> if [ 0 -ne $? ] ; then
>   echo "Loading nvidia-driver modules via rc.conf."
>   if [ -e /boot/modules/nvidia-modeset.ko ] ; then
> kld_list="${kld_list} nvidia-modeset.ko"
>   else
> kld_list="${kld_list} nvidia.ko"
>   fi
> fi

If you do not load nvidia-modeset.ko at all, does the boot proceed?

When the boot hangs, can you enter into ddb?



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Chris

On 2021-09-23 09:40, Rodney W. Grimes wrote:


Quoting Miroslav Lachman <000.f...@quip.cz>:

> On 22/09/2021 22:50, grarpamp wrote:
>>> propose to make it the default shell for root starting FreeBSD 14.0-RELEASE

...


Whoever wants is free to add other users with root pemissions is free
to do so.


That is a zero sum argument.  Ie, same can be said about those who
wish to have the current default changed.  Changing that default is
actually going to require NEW special casing of any code that expects
the now 30+ year default.  Those who DO like it changed, have already
made changes to have it changed, so changing the default only adds
to work for both parties, to me a net loss.

^
I'm well inclined to agree here. But my past expressions of such have
been largely been ignored. In *this* case; it's not a big affect for me;
as I roll out all my updates from build farms. So all my users are already
predefined, and their dot files are preserved. But still,
more changes == more work. :-(

Out of curiosity; has anyone actually done a real assessment to determine
the *actual* value of this (proposed) change? I mean in the end, do we
really know the cost to loss ratio?

--Chris


Leave the defaults alone, provide tools and such to make it easier
for people to tweak those defaults on install.  Stop adding work
to both the people who like how it is now, and people who like
the idea of this change, its not productive for anyone.



Rolf M Dietze


0xBDE49540.asc
Description: application/pgp-keys


Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Christian Groessler

I'd say, leave it as it is.

People are used to it since over 30 years.

Where does it hurt?

regards,
chris




Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Rodney W. Grimes
> On 9/22/21 10:36 AM, Baptiste Daroussin wrote:
> > Hello,
> > 
> > TL;DR: this is not a proposal to deorbit csh from base!!!
> > 
> > For years now, csh is the default root shell for FreeBSD, csh can be 
> > confusing
> > as a default shell for many as all other unix like settled on a bourne shell
> > compatible interactive shell: zsh, bash, or variant of ksh.
> > 
> > Recently our sh(1) has receive update to make it more user friendly in
> > interactive mode:
> > * command completion (thanks pstef@)
> > * improvement in the emacs mode, to make it behave by default like other 
> > shells
> > * improvement in the vi mode (in particular the vi edit to respect $EDITOR)
> > * support for history as described by POSIX.
> > 
> > This makes it a usable shell by default, which is why I would like to 
> > propose to
> > make it the default shell for root starting FreeBSD 14.0-RELEASE (not MFCed)
> > 
> > If no strong arguments has been raised until October 15th, I will make this
> > proposal happen.
> > 
> > Again just in case: THIS IS NOT A PROPOSAL TO REMOVE CSH FROM BASE!
> > 
> > Best regards,
> > Baptiste
> > 
> 
> Hello,
> 
> I applaud the proposal to change the default login shell of root to 
> /bin/sh. As you mention the rest of the Unix(-like) world has used a 
> Bourne-like root login shell forever. It is one of the first things I 
> change on a new FreeBSD install anyway.

So now you stop changing it, something you have grown use to doing,
and all of us who want the old behavior have to add a change item
to our list of post install stuff.  We BOTH end up with version
conditional tweaks to the base system.  Is that a good idea?

> While there, you could change "Charlie &" in the gecos field to 
> something more sensible, e.g. just "Superuser". I know Charlie is there 
> since 4.2BSD, but the reference to a long forgotten baseball player is 
> probably lost by now. Also, a lot of explanation is often needed when 
> users receive (automated) emails from Charlie Root.
> 
> Once the login shell of root has changed to /bin/sh, I do not see any 
> reason to keep toor around. It is there since 4.3BSD, but I don't know 
> anybody who uses it in the long term. Many will just change the login 
> shell of root to a Bourne-like shell right away.

Your lack of knowing anyone who uses it, does not indicate lack
of use.  If I want a /bin/sh root user I type:
su - toor
So now you know someone who uses it!

> 
> I have experimented a bit with the new usability features of sh in 14.0 
> and I must say that it was quite a positive experience. I could easily 
> suppress the urge to install and use bash instead of sh. I wonder if the 
> changes (but not the ones to /etc/passwd) could be MFC'd in a few 
> months, once they have matured a bit, so they would land in 13.1. As you 
> mention elsewhere in this thread, usage in scripts is not affected by 
> these changes. And for interactive use it could be a POLA violation, but 
> the astonishment would be a positive one.
> 
> -- 
> Kind regards,
> 
> Hans Ottevanger
> 
> Eindhoven, Netherlands.
> h...@beastielabs.net
> www.beastielabs.net
> 
> 

-- 
Rod Grimes rgri...@freebsd.org



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Piotr P. Stefaniak

On 2021-09-23 09:40:50, Rodney W. Grimes wrote:

Those who DO like it changed, have already made changes to have it
changed, so changing the default only adds to work for both parties, to
me a net loss.


Aren't you forgetting about someone?



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Rodney W. Grimes
> 
> Quoting Miroslav Lachman <000.f...@quip.cz>:
> 
> > On 22/09/2021 22:50, grarpamp wrote:
> >>> propose to make it the default shell for root starting FreeBSD 
> >>> 14.0-RELEASE
> >>
> >> Make it so.
> >>
> >> The whole rest of rc, pkg, base scripts and subsystems use a lot of  
> >> sh, not csh.
> >> So this is a good compatibility, consistancy, and gotcha-removing update,
> >> needed for decades.
> >>
> >> Even "bash" is a majority spoken shell in Linux/world, helping
> >> make crossovers if BSD becomes a bit more bash-like.
> >
> > More bashism and linuxism in BSD world, you are waking the devil.
> >
> >> The bsd sh feature updates are filling useful/needed capability gaps.
> >
> > Moving to sh without maintain the same history search behavior  
> > (start of the command and Up & Down arrows) are like cutting one leg.
> >
> > The (t)csh is what I really like on every FreeBSD machine. Never  
> > seen good configured bash (prompt + history search) on any other OS  
> > I ever visited. Not saying it is not possible but if FreeBSD will  
> > switch default shell to something else I expect to do it the way  
> > that it is more user friendly and powerful than on other OSes where  
> > everything is leaved to "users can customize it". Current state of  
> > sh behavior is really that "bad" way.
> we are talking of the default sehll for the root user. One does not
> really work as root user, but if son nothing stops who ever wants to
> to exec zsh or exec tcsh?
> 
> Whoever wants is free to add other users with root pemissions is free
> to do so.

That is a zero sum argument.  Ie, same can be said about those who
wish to have the current default changed.  Changing that default is
actually going to require NEW special casing of any code that expects
the now 30+ year default.  Those who DO like it changed, have already
made changes to have it changed, so changing the default only adds
to work for both parties, to me a net loss.

Leave the defaults alone, provide tools and such to make it easier
for people to tweak those defaults on install.  Stop adding work
to both the people who like how it is now, and people who like
the idea of this change, its not productive for anyone.


> Rolf M Dietze

-- 
Rod Grimes rgri...@freebsd.org



Re: latest current fails to boot.

2021-09-23 Thread Tomoaki AOKI
On Wed, 22 Sep 2021 23:09:05 +0900
Tomoaki AOKI  wrote:

> On Wed, 22 Sep 2021 05:47:46 -0700
> David Wolfskill  wrote:
> 
> > On Wed, Sep 22, 2021 at 02:39:37PM +0200, Johan Hendriks wrote:
> > > I did a git pull this morning and it fails to boot.
> > > I hangs at Setting hostid : 0x917bf354
> > > 
> > > This is a vm running on vmware.
> > > If i boot the old kernel from yesterday it boots normally.
> > > 
> > > uname -a
> > > FreeBSD varnish-cdn-node03 14.0-CURRENT FreeBSD 14.0-CURRENT #0 
> > > main-n249518-5572fda3a2f: Tue Sep 21 14:40:22 CEST 2021 
> > > root@varnish-cdn-node03:/usr/obj/usr/src/amd64.amd64/sys/KRNL amd64
> > > 
> > 
> > I had no issues with my build machine or either of two laptops, either
> > from yesterday:
> > 
> > FreeBSD g1-55.catwhisker.org 14.0-CURRENT FreeBSD 14.0-CURRENT #358 
> > main-n249518-5572fda3a2f3: Tue Sep 21 05:15:22 PDT 2021 
> > r...@g1-55.catwhisker.org:/common/S4/obj/usr/src/amd64.amd64/sys/CANARY  
> > amd64 1400033 1400033
> > 
> > or today:
> > 
> > FreeBSD g1-55.catwhisker.org 14.0-CURRENT FreeBSD 14.0-CURRENT #359 
> > main-n249556-c96da1994587: Wed Sep 22 04:24:17 PDT 2021 
> > r...@g1-55.catwhisker.org:/common/S4/obj/usr/src/amd64.amd64/sys/CANARY  
> > amd64 1400033 1400033
> > 
> > [uname strings from my main laptop shown, but I keep the machines
> > in sync rather aggressively.]
> > 
> > Perhaps the issue you are encountering involves things not in my
> > environment (such as VMs or ZFS)?
> > 
> > Peace,
> > david
> > -- 
> > David H. Wolfskill  da...@catwhisker.org
> > Life is not intended to be a zero-sum game.
> > 
> > See https://www.catwhisker.org/~david/publickey.gpg for my public key.
> 
> For me, on bare metal (non-vm) amd64 with root-on-ZFS,
> 
>   Fails to boot to multiuser at git: 8db1669959ce
>   Boot fine at git: 0b79a76f8487
> 
> Boot to singleuser is fine even with failed revision.
> 
> Failure mode:
>  Hard hangup or spinning and non-operable. Hard power-off needed.
>  Seems to happen after starting rc.conf processing and before setting
>  hostid.
> 
> -- 
> Tomoaki AOKI
> 

Additional info and correction.
 *Hung up before setting hostuuid, not hostid.

 *^T doesn't respond at all, only hard power off worked.

 *`kldload nvidia-modeset.ko` on single user mode sanely work.


Why I could know rc.conf is started to be processed:

 I have lines below at the end of /etc/rc.conf and its output is always
 the first line related to /etc/rc.conf, at least for non-verbose boot.
 The next line is normally "Setting hostuuid: " line, which was not
 displayed when boot hung up.


kldstat -q -n nvidia.ko
if [ 0 -ne $? ] ; then
  echo "Loading nvidia-driver modules via rc.conf."
  if [ -e /boot/modules/nvidia-modeset.ko ] ; then
kld_list="${kld_list} nvidia-modeset.ko"
  else
kld_list="${kld_list} nvidia.ko"
  fi
fi


-- 
Tomoaki AOKI



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Chris

On 2021-09-23 02:29, Mike Bristow wrote:

On Wed, Sep 22, 2021 at 10:00:49AM -0300, Renato Botelho wrote:

+1 for keeping this behavior on default config


-1 for this.

Things should be as default-as-possible, so that the behaviour of
/bin/sh as root on FreeBSD is unsuprising to someone used to /bin/sh
on other systems or users, because they won't be used to the magic
config.

I have no problem with a section of root's .profile having the
approprate magic commented out so that folk who want this can easily
have it, of course.

OK this bit confuses me.
If you logon as root. Then simply exec vipw(8) and change the default
shell to (t)csh. The .cshrc template will sucked out of /etc/ into /root/
where you'll live happily ever after. No (un)commenting involved. :-)

--Chris


Cheers,
Mike


0xBDE49540.asc
Description: application/pgp-keys


Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Chris

On 2021-09-23 01:55, Hans Ottevanger wrote:

On 9/22/21 10:36 AM, Baptiste Daroussin wrote:

Hello,

TL;DR: this is not a proposal to deorbit csh from base!!!

For years now, csh is the default root shell for FreeBSD, csh can be 
confusing
as a default shell for many as all other unix like settled on a bourne 
shell

compatible interactive shell: zsh, bash, or variant of ksh.

Recently our sh(1) has receive update to make it more user friendly in
interactive mode:
* command completion (thanks pstef@)
* improvement in the emacs mode, to make it behave by default like other 
shells

* improvement in the vi mode (in particular the vi edit to respect $EDITOR)
* support for history as described by POSIX.

This makes it a usable shell by default, which is why I would like to 
propose to
make it the default shell for root starting FreeBSD 14.0-RELEASE (not 
MFCed)


If no strong arguments has been raised until October 15th, I will make this
proposal happen.

Again just in case: THIS IS NOT A PROPOSAL TO REMOVE CSH FROM BASE!

Best regards,
Baptiste



Hello,

I applaud the proposal to change the default login shell of root to /bin/sh. 
As
you mention the rest of the Unix(-like) world has used a Bourne-like root 
login
shell forever. It is one of the first things I change on a new FreeBSD 
install

anyway.

While there, you could change "Charlie &" in the gecos field to something 
more
sensible, e.g. just "Superuser". I know Charlie is there since 4.2BSD, but 
the
reference to a long forgotten baseball player is probably lost by now. Also, 
a lot
of explanation is often needed when users receive (automated) emails from 
Charlie

Root.

Once the login shell of root has changed to /bin/sh, I do not see any reason 
to
keep toor around. It is there since 4.3BSD, but I don't know anybody who 
uses it
in the long term. Many will just change the login shell of root to a 
Bourne-like

shell right away.

I have experimented a bit with the new usability features of sh in 14.0 and 
I must
say that it was quite a positive experience. I could easily suppress the 
urge to
install and use bash instead of sh. I wonder if the changes (but not the 
ones to
/etc/passwd) could be MFC'd in a few months, once they have matured a bit, 
so they


It was mentioned in the OP this *wouldn't* be MFC'd. An aspect I'm glad to 
hear.


would land in 13.1. As you mention elsewhere in this thread, usage in 
scripts is

not affected by these changes. And for interactive use it could be a POLA
violation, but the astonishment would be a positive one.


--Chris

0xBDE49540.asc
Description: application/pgp-keys


Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Julian H. Stacey
Gary Jennejohn wrote:
> On Wed, 22 Sep 2021 08:52:53 -0700 (PDT)
> "Rodney W. Grimes"  wrote:
>
> > > On Wed, Sep 22, 2021 at 08:34:58AM -0700, John Baldwin wrote:  
> > > > On 9/22/21 1:36 AM, Baptiste Daroussin wrote:  
> > > > > Hello,
> > > > > 
> > > > > TL;DR: this is not a proposal to deorbit csh from base!!!
> > > > > 
> > > > > For years now, csh is the default root shell for FreeBSD, csh can be 
> > > > > confusing
> > > > > as a default shell for many as all other unix like settled on a 
> > > > > bourne shell
> > > > > compatible interactive shell: zsh, bash, or variant of ksh.
> > > > > 
> > > > > Recently our sh(1) has receive update to make it more user friendly in
> > > > > interactive mode:
> > > > > * command completion (thanks pstef@)
> > > > > * improvement in the emacs mode, to make it behave by default like 
> > > > > other shells
> > > > > * improvement in the vi mode (in particular the vi edit to respect 
> > > > > $EDITOR)
> > > > > * support for history as described by POSIX.
> > > > > 
> > > > > This makes it a usable shell by default, which is why I would like to 
> > > > > propose to
> > > > > make it the default shell for root starting FreeBSD 14.0-RELEASE (not 
> > > > > MFCed)
> > > > > 
> > > > > If no strong arguments has been raised until October 15th, I will 
> > > > > make this
> > > > > proposal happen.
> > > > > 
> > > > > Again just in case: THIS IS NOT A PROPOSAL TO REMOVE CSH FROM BASE!  
> > > > 
> > > > I think this is fine.  I would also be fine with either removing 'toor' 
> > > > from the
> > > > default password file or just leaving it as-is for POLA.  (I would 
> > > > probably
> > > > prefer removing it outright.)  
> > > 
> > > HardenedBSD recently removed toor. No one has complained (yet?). A
> > > small Twitter poll[0] showed that 85% of people who responded do not
> > > use toor.  
> > 
> > A truely disastisified customer does not complain, they simply
> > go some place else for there products.  Be carefull in what you
> > believe silence to be saying.
> > 
>
> I use toor on every FreeBSD machine as the root login using bash.
> I never log in as root.

Toor has been an occasional lifeline during re-build dissters.
Need root & toor to have different executables,
& home directories & passwords, & no environment vars on one etc.

> But removing it wouldn't be a deal breaker for me.  I'd just put it
> back into /etc/passwd.

Ditto.  `One Best Tool' debates can consume time.

Best keep time for other things, ( eg I've an interesting regression to chase:
12.2-RELEASE OK, but 12.2-STABLE & 13.0-RELEASE Generic kernels panic on
boot & wont produce a /var/crash/vmcore.2 & won't drop into DDB ).

Cheers,
-- 
Julian Stacey  http://berklix.com/jhs/  http://stolenvotes.uk



Re: installworld with NO_ROOT produces paths with .. for man pages

2021-09-23 Thread Baptiste Daroussin
On Thu, Sep 23, 2021 at 02:38:27PM +0300, Andriy Gapon wrote:
> On 28/08/2021 17:28, Andriy Gapon wrote:
> > 
> > This seems to be related to the recent change to install manual pages
> > for all platforms.
> > 
> > My method of creating a cross-platform installation image is to install
> > with NO_ROOT and then to tar up with @METALOG argument.
> > On the destination I simply untar the archive into a destination
> > directory (typically a fresh ZFS BE).
> > 
> > Today I noticed some complaints when extracting the archive, here is a few:
> > ./usr/share/man/man4/i386/../smapi.4.gz: Path contains '..'
> > ./usr/share/man/man4/i386/../vpd.4.gz: Path contains '..'
> > ./usr/share/man/man4/powerpc/../adb.4.gz: Path contains '..'
> > ./usr/share/man/man4/powerpc/../akbd.4.gz: Path contains '..'
> > 
> > This is a not a big deal but would be nice to "straighten" the
> > installation paths when installing such manual pages.
> > 
> > P.S.
> > NO_ROOT does not seem to be documented outside of the source code.
> > 
> 
> I think that it would be nice to fix that .. issue.
> Any suggestions?


MLINKS+=${_manpage} ../${_manpage}

so install(1) does what it is asked to do and write it do the metalog as such.

First it is a bad idea to have .. in mlink as we are creating hardlinks, so we
could have a cross device issue.

The issue was reported when those links were added: 0a0f7486413c

https://lists.freebsd.org/pipermail/dev-commits-src-all/2021-July/009164.html

imho the right way to do this would be to have a new kind of macros which would
create relative symlinks using ${INSTALL_RSYMLINK} to replace MLINKS

Best regards,
Bapt



Re: installworld with NO_ROOT produces paths with .. for man pages

2021-09-23 Thread Andriy Gapon

On 28/08/2021 17:28, Andriy Gapon wrote:


This seems to be related to the recent change to install manual pages for all 
platforms.


My method of creating a cross-platform installation image is to install with 
NO_ROOT and then to tar up with @METALOG argument.
On the destination I simply untar the archive into a destination directory 
(typically a fresh ZFS BE).


Today I noticed some complaints when extracting the archive, here is a few:
./usr/share/man/man4/i386/../smapi.4.gz: Path contains '..'
./usr/share/man/man4/i386/../vpd.4.gz: Path contains '..'
./usr/share/man/man4/powerpc/../adb.4.gz: Path contains '..'
./usr/share/man/man4/powerpc/../akbd.4.gz: Path contains '..'

This is a not a big deal but would be nice to "straighten" the installation 
paths when installing such manual pages.


P.S.
NO_ROOT does not seem to be documented outside of the source code.



I think that it would be nice to fix that .. issue.
Any suggestions?

--
Andriy Gapon



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Mike Bristow
On Wed, Sep 22, 2021 at 10:00:49AM -0300, Renato Botelho wrote:
> +1 for keeping this behavior on default config

-1 for this.

Things should be as default-as-possible, so that the behaviour of
/bin/sh as root on FreeBSD is unsuprising to someone used to /bin/sh
on other systems or users, because they won't be used to the magic
config.

I have no problem with a section of root's .profile having the
approprate magic commented out so that folk who want this can easily
have it, of course.

Cheers,
Mike


-- 
Mike Bristow  m...@urgle.com




Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Hans Ottevanger

On 9/22/21 10:36 AM, Baptiste Daroussin wrote:

Hello,

TL;DR: this is not a proposal to deorbit csh from base!!!

For years now, csh is the default root shell for FreeBSD, csh can be confusing
as a default shell for many as all other unix like settled on a bourne shell
compatible interactive shell: zsh, bash, or variant of ksh.

Recently our sh(1) has receive update to make it more user friendly in
interactive mode:
* command completion (thanks pstef@)
* improvement in the emacs mode, to make it behave by default like other shells
* improvement in the vi mode (in particular the vi edit to respect $EDITOR)
* support for history as described by POSIX.

This makes it a usable shell by default, which is why I would like to propose to
make it the default shell for root starting FreeBSD 14.0-RELEASE (not MFCed)

If no strong arguments has been raised until October 15th, I will make this
proposal happen.

Again just in case: THIS IS NOT A PROPOSAL TO REMOVE CSH FROM BASE!

Best regards,
Baptiste



Hello,

I applaud the proposal to change the default login shell of root to 
/bin/sh. As you mention the rest of the Unix(-like) world has used a 
Bourne-like root login shell forever. It is one of the first things I 
change on a new FreeBSD install anyway.


While there, you could change "Charlie &" in the gecos field to 
something more sensible, e.g. just "Superuser". I know Charlie is there 
since 4.2BSD, but the reference to a long forgotten baseball player is 
probably lost by now. Also, a lot of explanation is often needed when 
users receive (automated) emails from Charlie Root.


Once the login shell of root has changed to /bin/sh, I do not see any 
reason to keep toor around. It is there since 4.3BSD, but I don't know 
anybody who uses it in the long term. Many will just change the login 
shell of root to a Bourne-like shell right away.


I have experimented a bit with the new usability features of sh in 14.0 
and I must say that it was quite a positive experience. I could easily 
suppress the urge to install and use bash instead of sh. I wonder if the 
changes (but not the ones to /etc/passwd) could be MFC'd in a few 
months, once they have matured a bit, so they would land in 13.1. As you 
mention elsewhere in this thread, usage in scripts is not affected by 
these changes. And for interactive use it could be a POLA violation, but 
the astonishment would be a positive one.


--
Kind regards,

Hans Ottevanger

Eindhoven, Netherlands.
h...@beastielabs.net
www.beastielabs.net



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Miroslav Lachman

On 23/09/2021 10:13, Rolf M. Dietze wrote:


Quoting Miroslav Lachman <000.f...@quip.cz>:


On 22/09/2021 22:50, grarpamp wrote:
propose to make it the default shell for root starting FreeBSD 
14.0-RELEASE


Make it so.

The whole rest of rc, pkg, base scripts and subsystems use a lot of 
sh, not csh.
So this is a good compatibility, consistancy, and gotcha-removing 
update,

needed for decades.

Even "bash" is a majority spoken shell in Linux/world, helping
make crossovers if BSD becomes a bit more bash-like.


More bashism and linuxism in BSD world, you are waking the devil.


The bsd sh feature updates are filling useful/needed capability gaps.


Moving to sh without maintain the same history search behavior (start 
of the command and Up & Down arrows) are like cutting one leg.


The (t)csh is what I really like on every FreeBSD machine. Never seen 
good configured bash (prompt + history search) on any other OS I ever 
visited. Not saying it is not possible but if FreeBSD will switch 
default shell to something else I expect to do it the way that it is 
more user friendly and powerful than on other OSes where everything is 
leaved to "users can customize it". Current state of sh behavior is 
really that "bad" way.



we are talking of the default sehll for the root user. One does not
really work as root user, but if son nothing stops who ever wants to
to exec zsh or exec tcsh?


It seems like "nobody" and "everybody" mistaken words. If "one" really 
does not work as root user then what is the meaning of the first 
paragraph from Baptiste's message and why change something?


Miroslav Lachman



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Rolf M. Dietze



Quoting Miroslav Lachman <000.f...@quip.cz>:


On 22/09/2021 22:50, grarpamp wrote:

propose to make it the default shell for root starting FreeBSD 14.0-RELEASE


Make it so.

The whole rest of rc, pkg, base scripts and subsystems use a lot of  
sh, not csh.

So this is a good compatibility, consistancy, and gotcha-removing update,
needed for decades.

Even "bash" is a majority spoken shell in Linux/world, helping
make crossovers if BSD becomes a bit more bash-like.


More bashism and linuxism in BSD world, you are waking the devil.


The bsd sh feature updates are filling useful/needed capability gaps.


Moving to sh without maintain the same history search behavior  
(start of the command and Up & Down arrows) are like cutting one leg.


The (t)csh is what I really like on every FreeBSD machine. Never  
seen good configured bash (prompt + history search) on any other OS  
I ever visited. Not saying it is not possible but if FreeBSD will  
switch default shell to something else I expect to do it the way  
that it is more user friendly and powerful than on other OSes where  
everything is leaved to "users can customize it". Current state of  
sh behavior is really that "bad" way.

we are talking of the default sehll for the root user. One does not
really work as root user, but if son nothing stops who ever wants to
to exec zsh or exec tcsh?

Whoever wants is free to add other users with root pemissions is free
to do so.


Rolf M Dietze






Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Hans Petter Selasky

Hi,

I've always used "tcsh" for root. The little help you get on the command 
line to search and repeat commands is very useful compared to plain "sh".


Sorry for top-posting.

--HPS



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Miroslav Lachman

On 22/09/2021 22:50, grarpamp wrote:

propose to make it the default shell for root starting FreeBSD 14.0-RELEASE


Make it so.

The whole rest of rc, pkg, base scripts and subsystems use a lot of sh, not csh.
So this is a good compatibility, consistancy, and gotcha-removing update,
needed for decades.

Even "bash" is a majority spoken shell in Linux/world, helping
make crossovers if BSD becomes a bit more bash-like.


More bashism and linuxism in BSD world, you are waking the devil.


The bsd sh feature updates are filling useful/needed capability gaps.


Moving to sh without maintain the same history search behavior (start of 
the command and Up & Down arrows) are like cutting one leg.


The (t)csh is what I really like on every FreeBSD machine. Never seen 
good configured bash (prompt + history search) on any other OS I ever 
visited. Not saying it is not possible but if FreeBSD will switch 
default shell to something else I expect to do it the way that it is 
more user friendly and powerful than on other OSes where everything is 
leaved to "users can customize it". Current state of sh behavior is 
really that "bad" way.


If you want to catch users on sh, do it better, please!


"csh considered harmful"

toor needs to go as part of simple cruft removal for a cleaner base,
else you would have to add zoor, koor, boor, toor, etc. No no no no!

Nobody leave FreeBSD just to get run csh on their windows command prompt ;)

Users are always free to customize local installs as desired.


It cuts both ways. If users are free to customize they can switch from 
current default csh to sh and no change in base is needed.



Miroslav Lachman



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Alex Dupre
+100 for keeping this behavior on default config ;-)

On 22/09/21 15:00, Renato Botelho wrote:
> +1 for keeping this behavior on default config
> 
> On 22/09/21 06:19, Daniel Morante via freebsd-current wrote:
>> Will history/completion continue to work the same way? (for example
>> typing part of the command, pressing UP and having it complete based
>> on history)
-- 
Alex Dupre