From nobody Thu Apr 30 11:37:56 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 4g5scB1BPhz6bhQM for ; Thu, 30 Apr 2026 11:38:02 +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 4g5sc95KR4z3Sjx for ; Thu, 30 Apr 2026 11:38:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777549081; 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=dkk2DwwaFeTH1eC3P77V+Sh/HKYnItbgt6+8wxJl97Y=; b=VZa8WsoXN/CMIiOsLql509GSOLWRMxWgfI08pjJ5VuwLZLtA2dYJMy2GCqE8ETQkeajimO ZZes/KlM8/fTnP3T4oRI9o5FqEkFePUdd3FSho7kTBw/sbxftc1YJ+qnuw4bvKdRSuI6Xa ddXqhtQmbAZecokLeCkM8YsRUWMOQ2sccXK19+hIxltig7Vlhv0HUg3zLR1wZzpXQxWTTs m3JBx5HdDToG5dYMzsU7lK087qhq2bbpmbrxcO5TGrz4IoYa9u6y6ZmMSo6OshLMXdJfyp N7FFMBr8km0FbbqECQEJy10sr0r0JRwlXLjbQ7GwrBFR2ROfuxec1et9OzXOWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777549081; a=rsa-sha256; cv=none; b=ALolBNlk2HK/sxS0E/HG2WRKbWZxZDnm0SX6Waqd9WmIimh6mtieiMByB+TZg8OuVUgt1t GjNoKLJ9cIC7dwD2NJWX1xQnnf0ac5yvqu9j6pcAK9yy9/E8AIrFn3w8ZLhIzsw2hTTWx7 s7mY4/W7Enu6vsJAK+1Wl2w6nVr+0egn5HRZGg3XhxGyOWBmpw3nvYaBuv8ZLOmyk2178V fk25+nWdOL9IY0h4C7cq5sNH1+7zcaQpmInZ1g0brWj0A6QVAwWcxfbBNxtTD4irb43PHK hlBqon/YQSFkoqmtQN8uSKZoQovb+POXwBrlV+bsxdAAFOOjQim2ej5u46CIDg== 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=1777549081; 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=dkk2DwwaFeTH1eC3P77V+Sh/HKYnItbgt6+8wxJl97Y=; b=RNh1ZmnBCiIzTq/u6JI3CWNrphUUvdwwj9F5Q0FDmdGp3l8sHKsV2AWusTY6FR6NsNsUVW 9Tftccm6aySTLvsXsQAMSaVsHWw2MP1d+I4studtEI4r+V6f/zovziOvT1fJJ/Qdk56z0W 1iWoyVQAHb4KTuNgL5NEJbz+J82kx6AiSQjwna3CtV42DYhXSf2f1cUr/I3BU3MOlbQor9 tINOMLjNwtGOVo8C9tUWO9eoqsdAcDBRP9wLk/Zp/f4r4V7vYfr/Y8IEa7KoY8Wwc4l1VC orPcncle/Fv3revpzgA94Q36Oo03YSD7KjURIgmmy9+w74q9c9+OuEWQaz7wMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5sc9462fz1NtM for ; Thu, 30 Apr 2026 11:38:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21ffc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 30 Apr 2026 11:37:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Boris Lytochkin From: Andrey V. Elsukov Subject: git: 6d65c91b9a47 - main - 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 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/main X-Git-Reftype: branch X-Git-Commit: 6d65c91b9a4743bbffc3508bf754e68b65bbd494 Auto-Submitted: auto-generated Date: Thu, 30 Apr 2026 11:37:56 +0000 Message-Id: <69f33f14.21ffc.507c8a33@gitrepo.freebsd.org> The branch main has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=6d65c91b9a4743bbffc3508bf754e68b65bbd494 commit 6d65c91b9a4743bbffc3508bf754e68b65bbd494 Author: Boris Lytochkin AuthorDate: 2026-04-30 11:31:34 +0000 Commit: Andrey V. Elsukov CommitDate: 2026-04-30 11:31:34 +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 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56708 --- 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 8f4737136d72..3ff11ec836ae 100755 --- a/usr.sbin/etcupdate/etcupdate.sh +++ b/usr.sbin/etcupdate/etcupdate.sh @@ -527,9 +527,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 } @@ -1787,11 +1793,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 ;;