From nobody Wed Jun 05 05:45:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VvGf23K5Xz5LxCs; Wed, 05 Jun 2024 05:45:46 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4VvGf14jWcz56vv; Wed, 5 Jun 2024 05:45:45 +0000 (UTC) (envelope-from manu@bidouilliste.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1717566344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SjZBckpdmpRvY8fzVcPMd+ooIsWIiaL/RvwefCBH0pE=; b=rQ0vvxlSI1f2l+2SM4If+LkFLlK1m5gAcpAHGWtVdi+QrZq/0l7xoIIFzwNFD/PE+q/3Uy U96XeXDj3T5nRogF82wmv0MyR38VOXMtk2X14QusUzRJjsVhnOs7ObsQYImfR6ADZ+nobG PM3N2a9PZGba277gM008NuDyv6iwtk8= Received: from skull.home.blih.net (lfbn-lyo-1-2174-135.w90-66.abo.wanadoo.fr [90.66.97.135]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 5620865d (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 5 Jun 2024 05:45:44 +0000 (UTC) Date: Wed, 5 Jun 2024 07:45:34 +0200 From: Emmanuel Vadot To: Jessica Clarke Cc: John Baldwin , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: dcb65c5a94d4 - main - csh: Remove hardlink /.cshrc Message-Id: <20240605074534.92c8334aa97628f7b8c58296@bidouilliste.com> In-Reply-To: <885F8DF1-69E2-4AC7-87E2-B63F1588DE17@freebsd.org> References: <202405290757.44T7vbf4021395@gitrepo.freebsd.org> <20240605073006.165e209edd1d6ce0c8520c9e@bidouilliste.com> <885F8DF1-69E2-4AC7-87E2-B63F1588DE17@freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd15.0) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR] X-Rspamd-Queue-Id: 4VvGf14jWcz56vv On Wed, 5 Jun 2024 06:38:09 +0100 Jessica Clarke wrote: > On 5 Jun 2024, at 06:30, Emmanuel Vadot wrote: > >=20 > >=20 > > Hi John, > >=20 > > On Tue, 4 Jun 2024 16:07:53 -0700 > > John Baldwin wrote: > >=20 > >> On 5/29/24 3:57 AM, Emmanuel Vadot wrote: > >>> The branch main has been updated by manu: > >>>=20 > >>> URL: https://cgit.FreeBSD.org/src/commit/?id=3Ddcb65c5a94d4c622b1d486= 847dc20488f59974e7 > >>>=20 > >>> commit dcb65c5a94d4c622b1d486847dc20488f59974e7 > >>> Author: Emmanuel Vadot > >>> AuthorDate: 2024-05-27 13:12:18 +0000 > >>> Commit: Emmanuel Vadot > >>> CommitDate: 2024-05-29 07:56:58 +0000 > >>>=20 > >>> csh: Remove hardlink /.cshrc > >>>=20 > >>> Remove this historical artifact. > >>> csh will try to use /.csrch if the user has no home directory def= ined which > >>> is rather unlikely (To be exact if the concatenation of $HOME and= "/.cshrc" > >>> fail which is the same thing). > >>>=20 > >>> Also, with this change pkg will happily handle 3way merge for /ro= ot/.cshrc > >>>=20 > >>> Differential Revision: https://reviews.freebsd.org/D45382 > >>> Reviewed by: emaste, imp > >>> Sponsored by: Beckhoff Automation GmbH & Co. KG > >>=20 > >> FWIW, this happens anytime you use /bin/csh as root's shell and boot i= nto > >> single user mode. Similar to /.profile being used for single user mod= e if > >> root's shell is /bin/sh. Given we've changed the default shell for ro= ot, > >> then it's fine to do this change, but that probably should have been n= oted > >> in the commit log (in part to serve as a reminder so we don't remove t= he > >> links for sh). > >=20 > > I've thought about single user and csh and yes that's a case where csh > > will try to use /.cshrc but root shell doesn't matter here as you need > > to specify /bin/csh as the init prompt for single user mode, the > > default is still /bin/sh no matter what. > > For /.profile, /bin/sh in single-user mode does have $HOME point > > to /root so I think we can remove safely the /.profile hardlink. I > > haven't looked at why /bin/csh doesn't have $HOME set but if someone > > cares about using /bin/csh in single user mode (again nothing to do > > with root shell) they probably wants to do something about setting > > $HOME to /root/. >=20 > Are you sure it?s /root before .profile is sourced? root?s .profile > sets and exports HOME itself, so echo $HOME will be misleading at a > single-user prompt for the environment at .profile source time. >=20 > Note that root?s .cshrc doesn?t do this, which is likely what you?re > seeing? >=20 > Jess >=20 Yes indeed that's what I'm seeing, my bad :) --=20 Emmanuel Vadot