From nobody Wed Sep 10 20:41:41 2025 X-Original-To: dev-commits-src-branches@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 4cMXfY5W7fz66rbt; Wed, 10 Sep 2025 20:41:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cMXfY4lQ3z43Km; Wed, 10 Sep 2025 20:41:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757536901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7iXQRYHxAUBy2Ip+DJSO6tQagBZlWEYVOPQgBdEB+js=; b=hAxmOQiaB5jRvznQ99W/D9+YX+5SRnK6e4a5PcswG2jqhkB2cJcVI31NJ9HaTFYhvIWHb0 VDvJm2n5SwOxR99wwaz96HEPF03anymuktxKKWfClvyoUNgg6OsS0sbLi02Iyvr+QUd4cc 41v22Xe0YM0cGXIEABgzEPo5T6vCXSQmvbmWxe1kMHFRMis3DzJrDdc3uYYxr3ieoxMtyS XjGrSEUsM8cC6KxJEDMDCKXJXugiamLProiAXOI9PVEEksU7O3NQeZaJGJy2/j0y59bGea cXkh7+9t0vQMHaE16GQcaKQdmIzgaR81g3WE//x46FWmjDW167rZqFdQNMbsMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757536901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7iXQRYHxAUBy2Ip+DJSO6tQagBZlWEYVOPQgBdEB+js=; b=a0M/csUtsesb9fHZrdFvJmzLpTZDwYsu0dOcfG+p4LyaR/DE1G01yOjI31YABz8nEKSa+K 4cWw/krTXKgJqfSaBj3dCyN05L3KtnXk+tegtBL9NwYE4f99g1CIvxL8mU0u75gex6OQYt VG3EzQufUuV4N9XyWTt+QWj0EpWTwFWsWLAwqk96mIKHgWJuAsoRPDnMOkzcCHsrEI4mnR sMpoDGpH4kiVcnYbuBfbnGZL4P9ix9FPTJ8R0qCVtAAl8U7EcJ9HebG7IPSzinsxyBHgtW +qm0GbQTGbwf837vxo03cAsYeGaWZsrZFqMXDgI2btoPWlTM1IH7NgC5ODAn0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757536901; a=rsa-sha256; cv=none; b=Km81XjhFQJjIbpXpdwkpcoqoicHr+htfjqFxuyxpZx3GuzLWNXCSzM1iMFR2/pGBkyatwi nKagLHV+3YqmhrG/awwY1uicyjb68Brrss7Tdgdj3tcw1DWDEWrA3A1N5dSWqbffyMHI/C m6ypnn2tW8JFvigdtW9paNITmPuCJNbNryMW7rvSkSc1AvQy7dMtCjDkdG3dWPqPphlxM0 Z6VZxtMOGp9gyU1kJXsFu00Q2tx76fYIvVUk0g7p0eFv6c56Fe/rFuPjVDycCQgVhirLSo Q2RN62QyVHrCI/t4R4Q53tU4J/XsL2RcA+c6zW77pVhiFSQCdi5y5WVhlcYOUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cMXfY49vczclD; Wed, 10 Sep 2025 20:41:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58AKffNu092326; Wed, 10 Sep 2025 20:41:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58AKffAm092323; Wed, 10 Sep 2025 20:41:41 GMT (envelope-from git) Date: Wed, 10 Sep 2025 20:41:41 GMT Message-Id: <202509102041.58AKffAm092323@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Lexi Winter Subject: git: f103de98b855 - stable/14 - sh, csh: Add config tag to /.profile and /.cshrc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f103de98b855e69f1c0e1e90f7a174ae06acf892 Auto-Submitted: auto-generated The branch stable/14 has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=f103de98b855e69f1c0e1e90f7a174ae06acf892 commit f103de98b855e69f1c0e1e90f7a174ae06acf892 Author: Lexi Winter AuthorDate: 2025-09-02 08:22:56 +0000 Commit: Lexi Winter CommitDate: 2025-09-10 20:41:08 +0000 sh, csh: Add config tag to /.profile and /.cshrc The file /.profile is installed as a hard link to /root/.profile. The file in /root has the config tag, but the file in / does not, which causes it to be overwritten by pkg upgrade. Since they're linked, this also overwrites the file in /root. Add the config tag to the file in / as well, so pkg treates both links as config files and won't overwrite them. For stable/14, also add this to /.cshrc, which is no longer installed in 15.0. PR: 289097 MFC after: 3 days Reviewed by: bapt, emaste Differential Revision: https://reviews.freebsd.org/D52162 (cherry picked from commit aa730a66bc74696df85b21ec2719c75d8eab8c9f) sh: Fix non-NO_ROOT installconfig When building without NO_ROOT, ${TAG_ARGS} is not set, which means we pass ",config" as an install(1) argument. Only add the config tag if ${TAG_ARGS} is defined to begin with. Fixes: aa730a66bc74 ("sh: Add config tag to /.profile") Reported by: bz (cherry picked from commit b197d2abcb6895d78bc9df8404e374397aa44748) --- bin/csh/Makefile | 4 ++-- bin/sh/Makefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/csh/Makefile b/bin/csh/Makefile index 7e20c187dee2..712341ba2c26 100644 --- a/bin/csh/Makefile +++ b/bin/csh/Makefile @@ -172,7 +172,7 @@ beforeinstallconfig: afterinstallconfig: # XXX Set link mode explicitly via -m. We cannot use LINKMODE for this # link, as it would also apply to the tcsh link above. - ${INSTALL_LINK} ${TAG_ARGS} -m ${CONFMODE} ${DESTDIR}/root/.cshrc \ - ${DESTDIR}/.cshrc + ${INSTALL_LINK} ${TAG_ARGS:D${TAG_ARGS},config} -m ${CONFMODE} \ + ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc .include diff --git a/bin/sh/Makefile b/bin/sh/Makefile index 48b6d2852444..7197b248189c 100644 --- a/bin/sh/Makefile +++ b/bin/sh/Makefile @@ -76,6 +76,6 @@ beforeinstallconfig: LINKMODE=${CONFMODE} afterinstallconfig: - ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.profile ${DESTDIR}/.profile + ${INSTALL_LINK} ${TAG_ARGS:D${TAG_ARGS},config} ${DESTDIR}/root/.profile ${DESTDIR}/.profile .include