From nobody Wed Jan 05 01:54:09 2022 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 038461938E7A; Wed, 5 Jan 2022 01:54:10 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JTCFs5KTkz4QxW; Wed, 5 Jan 2022 01:54:09 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 9655623E30; Wed, 5 Jan 2022 01:54:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2051s9MR054242; Wed, 5 Jan 2022 01:54:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2051s9pd054241; Wed, 5 Jan 2022 01:54:09 GMT (envelope-from git) Date: Wed, 5 Jan 2022 01:54:09 GMT Message-Id: <202201050154.2051s9pd054241@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 2076973231d8 - stable/13 - ar: deprecate -T option 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: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2076973231d8d2e1c46bc5825e676a44643b6bfa Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641347649; 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=vXbyVFxy4bL3T9v+d1mMUoce/VrE8Zihq0NeWY/MXCM=; b=a7aJK8tv0J4MiTEM+kfUuW+w3Hhdm6u5T4ilm7BpEHbalW3qPMG88LRdPgIIewXXFol7KL HeFhnCCwZO0lXOW3Kajwz0Cs6DKPmprIt6S0EgCaKbKI5h/m+hBHMQRdIzd3huV9uzV+5f j7wA010XM1MQOocVXD3nqmryElVMZSdZI2GKxsN84NQkONhmh0zQMSWK9eD538Q3IQukqU wQwFgNzY9r6pNQ/61FT/JE3wfHo7nBc8sqEiS0rCJGkdWzor7o0QQYqqN5NTZEKEXxBUkK +TyttTcDkI4E1hSAgeuN4LJk9hIELwlr0NjFYahfVm0vjQl6TcqC3Hdl1oz3fQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641347649; a=rsa-sha256; cv=none; b=FSErWdzKkWBRi+ibBp5aUeft10VfUxLYxX1z4u2ZlYViuKtBNjJV4w964+LFjUKi68+7jY w3yxhA5l7Tc21VqbLeSs7N78AJ7WIfumE+h+V+SUvMMayKe3NDVp70zeCMn/cHDbnWDfqA sjEa23N/TpT88SVaUWLw+anfs3uX58MLTthaEFcCRkaUnq6UuHwx3UNL3NAlEzLUO03hZE 2ct2d/O5Qw2CFmcR52MpHNHGn3CFWefiCqAvqFwxEhhMxkBR4/haD7sqcS45xHh22lQl+l cJt4r6+PmJiyG/4k8nN4316iJpcVRRdh68L8lkn2Xh2+9YtH6+W6ySSRmwRkSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2076973231d8d2e1c46bc5825e676a44643b6bfa commit 2076973231d8d2e1c46bc5825e676a44643b6bfa Author: Ed Maste AuthorDate: 2021-12-29 19:59:06 +0000 Commit: Ed Maste CommitDate: 2022-01-05 01:53:27 +0000 ar: deprecate -T option Other ar implementations (GNU, LLVM) use -T to mean thin archive rather than use only the first fifteen characters of the archive member name. We support both -T and -f for this, with -f documented as an alias of -T. An exp-run showed that the ports invoking `ar -T` expect thin archives, not truncated names. Switch -f to be the documented flag for this behaviour, and emit a warning when -T is used. The warning will be changed to an error in the future (in main), once ports no longer use -T. PR: 260523 [exp-run] MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit edadbb46065d9ee9559140b2522197fcdba57064) --- usr.bin/ar/ar.1 | 14 +++++++++----- usr.bin/ar/ar.c | 6 +++++- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/usr.bin/ar/ar.1 b/usr.bin/ar/ar.1 index 9d9a860e6ca5..ce0dab1c5af7 100644 --- a/usr.bin/ar/ar.1 +++ b/usr.bin/ar/ar.1 @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 16, 2016 +.Dd December 29, 2021 .Dt AR 1 .Os .Sh NAME @@ -222,8 +222,8 @@ and .Fl U options are specified on the command line, the final one takes precedence. .It Fl f -Synonymous with option -.Fl T . +Use only the first fifteen characters of the archive member name or +command line file name argument when naming archive members. .It Fl i Ar member-before Synonymous with option .Fl b . @@ -314,8 +314,12 @@ List the files specified by arguments in the order in which they appear in the archive, one per line. If no files are specified, all files in the archive are listed. .It Fl T -Use only the first fifteen characters of the archive member name or -command line file name argument when naming archive members. +Deprecated alias for +.Fl f . +In other implementations of +.Nm , +.Fl T +creates a "thin" archive. .It Fl u Conditionally update the archive or extract members. When used with the diff --git a/usr.bin/ar/ar.c b/usr.bin/ar/ar.c index b131163342a6..51d114f6b7fa 100644 --- a/usr.bin/ar/ar.c +++ b/usr.bin/ar/ar.c @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -194,7 +195,6 @@ main(int argc, char **argv) Uflag = 0; break; case 'f': - case 'T': bsdar->options |= AR_TR; break; case 'j': @@ -227,6 +227,10 @@ main(int argc, char **argv) case 's': bsdar->options |= AR_S; break; + case 'T': + warnx("-T is deprecated"); + bsdar->options |= AR_TR; + break; case 't': set_mode(bsdar, opt); break;