From nobody Wed Dec 29 20:15:04 2021 X-Original-To: dev-commits-src-main@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 37AED191FAE0; Wed, 29 Dec 2021 20:15:05 +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 4JPN1N5rHQz546X; Wed, 29 Dec 2021 20:15:04 +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 9F864312B; Wed, 29 Dec 2021 20:15:04 +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 1BTKF428061805; Wed, 29 Dec 2021 20:15:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BTKF4w6061804; Wed, 29 Dec 2021 20:15:04 GMT (envelope-from git) Date: Wed, 29 Dec 2021 20:15:04 GMT Message-Id: <202112292015.1BTKF4w6061804@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: edadbb46065d - main - ar: deprecate -T option List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: edadbb46065d9ee9559140b2522197fcdba57064 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640808904; 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=UPrY5UuraEbMZ853tEx+tZdT5LMpF1frwutAeempG/g=; b=MPf92qVObxuW7ESZ7Ct6ShKEQ0s2s5POxh43lqnMxut57TOs7/WQkmwmsq0oYk42loxQr2 EtSv4cVeqmJgzN4seAnVcP2cRp0+YxxrvCreE8X4c2PrfW619xn2nO71C0bSvncF3drE4w RDjXRGUbSDb8yyQMXsq+gciDxHG+bMRdXXb/V2+UazPS8XFshcMiXQj0pVhuCUZMQaJC9Z ekVYtHxWpDTmLcoW/4OGmb7M9r58qoh+KoVZAolBe2EJXskhq2keU/KnOj9mLVks7fExcg lZ2o6pYFKeBmwxoPjyl+DzMZAroKLKR4E7h2vnG5DGK7VeQeFGzT9WGEXtpD7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640808904; a=rsa-sha256; cv=none; b=OYYxpb+MEqPyk+cHMmV1sUmIjc6iTaOH2qSnuXGmNXUY3FzWQI+PAO9NXWKiSnEtOkBei2 MNbWFFFkCGFbT6rtM6hd/xkQeOyZu/3nUPJsU2iT2421AIE3RWfL7er6AmsXCj+eco1yYM j6uE2r0KhLwKWiI6u1bkq9QMmJ4L6q9IwC0KXfS5R2bNhtZn9oGx/Dpnoe0nG0Dn+ttGZ1 INvBzeO7JRXnVy1vrCDzwvAH+UaVgtRSZ62Am5HFUXherDw97lCGES7ihlmvnlw39I+diG 6dg322YL7L7t3NIDeLqHHclK77MD0IE25n3EDtk7tGAyBx8iO1pRvpia37ZqxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=edadbb46065d9ee9559140b2522197fcdba57064 commit edadbb46065d9ee9559140b2522197fcdba57064 Author: Ed Maste AuthorDate: 2021-12-29 19:59:06 +0000 Commit: Ed Maste CommitDate: 2021-12-29 20:14:06 +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 --- 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 fdfebb8eb459..4353efcb0ff2 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 @@ -193,7 +194,6 @@ main(int argc, char **argv) Uflag = 0; break; case 'f': - case 'T': bsdar->options |= AR_TR; break; case 'j': @@ -226,6 +226,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;