From nobody Wed Jan 05 01:54:33 2022 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 3276D193932E; Wed, 5 Jan 2022 01:54:34 +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 4JTCGK6M1Lz4QtD; Wed, 5 Jan 2022 01:54:33 +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 BB65323E91; Wed, 5 Jan 2022 01:54:33 +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 2051sXhC054390; Wed, 5 Jan 2022 01:54:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2051sXjD054389; Wed, 5 Jan 2022 01:54:33 GMT (envelope-from git) Date: Wed, 5 Jan 2022 01:54:33 GMT Message-Id: <202201050154.2051sXjD054389@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: df898828a4dc - stable/12 - ar: deprecate -T option 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/12 X-Git-Reftype: branch X-Git-Commit: df898828a4dc585d5be65ac710dbe0fdf9d7b3b9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641347673; 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=HfL4dGAB9ce5PDY4+WAAyBnBSYY1CPvBvGOcMgoKqMY=; b=mvHHfztd7hAGAwkERSh60NYjbdLsSgLf5O9fzvN0OAbQbKEFvf3QCZg+1orY6x5/mYOdwD ENfuL7j8x10fG2vLhEW6h0s/Qs50pln/EUV/b6eapD/8ECXMARQxqR4j0oIwFG8EsZjMOU /L7/tlbtmX8xUv1Dmi+7BDO5rWhqsieJm3aoe+NrOtVcuiT96kPrr94FoIMz/xBfy/sSt7 b2BJI7HZmdalkK887Cxm4S2KXjh2KGovpF/JdW/DlVsUUMyIBeNZ2yUsBKp4AMUHL5pSwi 5Yqf47NKX9VetF7nTlETLDZuoVcV373BQzusD1fNLlko6Vnd4iWb7ClabHDPsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641347673; a=rsa-sha256; cv=none; b=jdTroOetYJIp48nnEcTfisZCBQHQFOqTtCeE9TECeAXKy2eQ+GWzST0YYjPC4yoY+jfVJs zYlaQwXl6K3Ijq0pICTyEUHWVlOdxt5lzW2cgd5wYQ94SiS3SEiXCnKtwXODMD0abUEAqJ +ko0ouSksPnSO9EtGsXAZ1ZQS2v4ydBU7k3zZ0c6Kzof3ScQZodGSn55HubyNAZT2uj5y5 WaPbn6ZeU76gA2B0haRj9Gd46dg1T/y6TWCEZwv0O64LHPNmbyEyTMwJHX8sK6i7EeU9xN 5MU/UQ4GGtIrvb5ImiayAAsQ5xipv/stRAfR0lNGoYtWQzbcTdAElW5CHyzndg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=df898828a4dc585d5be65ac710dbe0fdf9d7b3b9 commit df898828a4dc585d5be65ac710dbe0fdf9d7b3b9 Author: Ed Maste AuthorDate: 2021-12-29 19:59:06 +0000 Commit: Ed Maste CommitDate: 2022-01-05 01:54:04 +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;