From nobody Thu May 07 12:08:16 2026 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 4gB9xy1ym6z6c9Tl for ; Thu, 07 May 2026 12:08:22 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gB9xx6p3Tz3v69 for ; Thu, 07 May 2026 12:08:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1778155702; 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; bh=fnWAZTz6fBp47AK/a+NCMpJ1BOHSdqEzbUAD5ke1GBk=; b=JUt5ZMaC+FeYA5Dn88SEzlTsgh47x9fq7HrGWcyszBhpQZYb/je2E2HEx4hR1keYNLq7d8 fuhzMluhyN5EbYFP4SFK06BgWWAAZajru+mgr1vB3LumTPTLko0142M00tLFfFjBP/6fRZ waNkLXna7ZPWc3BY7eMWnjkbvFZbRo0t9KE8nWSunykg6U8SrhxZOQ2JbG+mhY8ayjyv1r bylz5HPxsa1B1fZnhT00+m5y3LBBXdiBQ7P8PAuvH5h9N6fOrexr/v4YKwWIK/8AVx+lyR Esy6xlSNsvrNKa84FiQBbOr1za3ggIjWUq91w/lb0olFL1iO/CCW+vto44AUpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1778155702; a=rsa-sha256; cv=none; b=pe2oPCtQQ7AeHAXKNk0NnwMxYfToe5Z01fW+1AQQ3BQyPMeYDhSJNd6HD+zqUTC4BEezs9 oT8pThoQS2Xwpn4j9CEqW4GrFOUhsJJCzT322yUV4deWug+hndJDa6ks6XP3S1SydS20PW FEzVt1o3c9Dc7iWSbPoqyyfWTCJZq7ZNpFUTpyWHiCJnlULzqGb2amWFKYQNexPQ5GfkoN rRcBUPlICGlhYZPdkS/t7VDwGiu5/FQZnKk+Mss/TxDdl2GpLC+n89Rn5ABB1vjPQfzbxx HwcqHk5g+IYLQZM54AnD4mkxIh6GAzGrgMSQr7qJ5ooVJUcP7HGkeQkEmyepKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1778155702; 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; bh=fnWAZTz6fBp47AK/a+NCMpJ1BOHSdqEzbUAD5ke1GBk=; b=nltpOBW5i5Rhm1+fLnvuIQeYNV/blCsxaz363nkpcfz+VlOdh/WJBsjHCGN3/yfvehyLoj srDN94rpfggLclloL3iz23aCAmthOAw9LC3VeNTYbA6cCB7DVIeJe8PdfSX2sPNAGMBnPM AxNH3CgE9Cikvq8jYyuc+QGf+nYbM2DpvpiMhJhiMTa6XhwOmzObwC2S4av7lofH/zk5gO 5DIgnxvLiisJfTJzhU2cYMTbczpQltDlgIaEjzSdMixSF9OTYiACHJ77itUI145BRaY3JF SXQYwzatvM6X3d5AOPdlY6HnusG0ixs5oJ34CSij+attQJQtyi8p4LHQlj5zgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gB9xx5wf8z8sr for ; Thu, 07 May 2026 12:08:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39d61 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 07 May 2026 12:08:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Boris Lytochkin From: Andrey V. Elsukov Subject: git: 4e57c937999d - stable/15 - etcupdate: fix arguments order of diff command 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4e57c937999df5b186ccf827542aee717baab07c Auto-Submitted: auto-generated Date: Thu, 07 May 2026 12:08:16 +0000 Message-Id: <69fc80b0.39d61.3bdd9662@gitrepo.freebsd.org> The branch stable/15 has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=4e57c937999df5b186ccf827542aee717baab07c commit 4e57c937999df5b186ccf827542aee717baab07c Author: Boris Lytochkin AuthorDate: 2026-04-30 11:31:34 +0000 Commit: Andrey V. Elsukov CommitDate: 2026-05-07 12:06:54 +0000 etcupdate: fix arguments order of diff command Due to misplacement of the second -L argument of diff command, it is treated by getopt_long as an error. Also add -l option for a diff command that alters the way it shows differences. Instead of printing full diff, it reports changed file the same way as added/removed files are reported. Reviewed by: imp Obtained from: Yandex LLC Differential Revision: https://reviews.freebsd.org/D56708 (cherry picked from commit 6d65c91b9a4743bbffc3508bf754e68b65bbd494) --- usr.sbin/etcupdate/etcupdate.8 | 7 ++++++- usr.sbin/etcupdate/etcupdate.sh | 14 ++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/usr.sbin/etcupdate/etcupdate.8 b/usr.sbin/etcupdate/etcupdate.8 index bf7ddb792907..6216722fc81f 100644 --- a/usr.sbin/etcupdate/etcupdate.8 +++ b/usr.sbin/etcupdate/etcupdate.8 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 15, 2024 +.Dd April 30, 2026 .Dt ETCUPDATE 8 .Os .Sh NAME @@ -51,6 +51,7 @@ .Ar tarball .Nm .Cm diff +.Op Fl l .Op Fl d Ar workdir .Op Fl D Ar destdir .Op Fl I Ar patterns @@ -468,6 +469,10 @@ shell pattern. This option may be specified multiple times to specify multiple patterns. Multiple space-separated patterns may also be specified in a single option. +.It Fl l +In +.Cm diff +mode list files that are changed locally, omit printing content difference. .It Fl L Ar logfile Specify an alternate path for the log file. The diff --git a/usr.sbin/etcupdate/etcupdate.sh b/usr.sbin/etcupdate/etcupdate.sh index 7bddd6593b56..f62343a24eee 100755 --- a/usr.sbin/etcupdate/etcupdate.sh +++ b/usr.sbin/etcupdate/etcupdate.sh @@ -531,9 +531,15 @@ diffnode() echo ;; $COMPARE_DIFFFILES) + if [ -n "$difflistonly" ]; then + echo + echo "Changed: $3" + echo + break; + fi echo "Index: $3" rule "=" - diff -u $diffargs -L "$3 ($4)" $1/$3 -L "$3 ($5)" $2/$3 + diff -u $diffargs -L "$3 ($4)" -L "$3 ($5)" $1/$3 $2/$3 ;; esac } @@ -1791,11 +1797,15 @@ ignore= nobuild= preworld= noroot= -while getopts "d:m:nprs:t:A:BD:FI:L:M:N" option; do +difflistonly= +while getopts "d:lm:nprs:t:A:BD:FI:L:M:N" option; do case "$option" in d) WORKDIR=$OPTARG ;; + l) + difflistonly=YES + ;; m) MAKE_CMD=$OPTARG ;;