From nobody Mon Dec 13 01:29:29 2021 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 F2D9618DBA7E; Mon, 13 Dec 2021 01:29:29 +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 4JC3p151Xgz3vYT; Mon, 13 Dec 2021 01:29:29 +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 8D01138E0; Mon, 13 Dec 2021 01:29:29 +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 1BD1TT7F041110; Mon, 13 Dec 2021 01:29:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BD1TTLT041109; Mon, 13 Dec 2021 01:29:29 GMT (envelope-from git) Date: Mon, 13 Dec 2021 01:29:29 GMT Message-Id: <202112130129.1BD1TTLT041109@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: 0f0d52fd6ae7 - stable/13 - sbin: build ping if at least one of INET & INET6 is enabled 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/13 X-Git-Reftype: branch X-Git-Commit: 0f0d52fd6ae71657ea0797338e633696c1c3567d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639358969; 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=GnH9/WajvQVbaJRv01/KpFcjBp+Y6SmC8M9rEwmfIFA=; b=QqFF+S0DlbK0heF1JcR2fscFcmL8nOTp3MRznK2Kq3e5Xouwe2w/Cz08CN0PG78NIEDzU/ X/iHHkHtduz/1MtFe/qOxeRQdEsbyBP9tzbpxmL/7UnpIlawSKFI7g5ZF7NWGo2VmqL0Ox 9Msmt0e8a4IG/mZiRspvWHGgoI3jiHUjEuE5h7NWbLzf4FTNOMYlBNYtRuO1AjiSpb+VbS OpVn4gOhvqLFaKHGoHmPJNUJVd9Hxc9L486OD1xSmeFf3rYuQAoDlQDOoAj9QVM40RUy5c M98hbGFJWNd+3DeDzt4PHETmCO3UwmlTbAIqHaBR2KsjIm+GnQldy048mI9OFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639358969; a=rsa-sha256; cv=none; b=eB/BfJka8bIHyfSMDmoBSOKnuomJB7kzuxvIhSl/tBkz4FrPYNfLJmbuj16Z0wiqKy78im r/uVhUL19KTQEDFoFPS28pnzECPiOJ/I2o9bXWuBH0tFBey75Nfq6WcF8b9EzisPB9+w3s dABQag7YN6CgcGXC7GnPYxDuB/fOGnFX9wGuDuoqosEMP0KQL2xYJyR2F5NiRgsGIl++c/ +O2NPANioOqr19M6Eett0QNiSOukQRpe9Vlcc8lAzCvtixbjjdj/4h8p+j+/W+P+3lJPP2 RzmiWmPtgSKqvmc9pnHpLcufY/kJx4fiSPsmDgVIYLB7wJJJwGj5XRcHAnP4TA== 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=0f0d52fd6ae71657ea0797338e633696c1c3567d commit 0f0d52fd6ae71657ea0797338e633696c1c3567d Author: Ed Maste AuthorDate: 2021-11-28 17:50:13 +0000 Commit: Ed Maste CommitDate: 2021-12-13 01:28:58 +0000 sbin: build ping if at least one of INET & INET6 is enabled It does not build (and serves no purpose) if neither is true (i.e., building WITHOUT_INET and WITHOUT_INET6). Also add an explicit error in ping to make this case clear. PR: 260082 Sponsored by: The FreeBSD Foundation (cherry picked from commit a4ef9e58bc0c07110a54ba0fa88eb118c5377e6f) OptionalObsoleteFiles: remove ping with INET & INET6 disabled Reported by: kevans Fixes: a4ef9e58bc0c ("sbin: build ping if at least one of...") Sponsored by: The FreeBSD Foundation (cherry picked from commit 0179739a0096c62cb3c9665d68246046255ab849) --- sbin/Makefile | 5 ++++- sbin/ping/main.c | 2 ++ tools/build/mk/OptionalObsoleteFiles.inc | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/sbin/Makefile b/sbin/Makefile index 64840bae82bb..c9b548a8a390 100644 --- a/sbin/Makefile +++ b/sbin/Makefile @@ -53,7 +53,6 @@ SUBDIR=adjkerntz \ nfsiod \ nos-tun \ pfilctl \ - ping \ rcorder \ reboot \ recoverdisk \ @@ -69,6 +68,10 @@ SUBDIR=adjkerntz \ tunefs \ umount +.if ${MK_INET} != "no" || ${MK_INET6} != "no" +SUBDIR+= ping +.endif + SUBDIR.${MK_CCD}+= ccdconfig SUBDIR.${MK_CXX}+= devd SUBDIR.${MK_HAST}+= hastctl diff --git a/sbin/ping/main.c b/sbin/ping/main.c index c021e2c26b14..1d0b714f1480 100644 --- a/sbin/ping/main.c +++ b/sbin/ping/main.c @@ -57,6 +57,8 @@ __FBSDID("$FreeBSD$"); #define OPTSTR PING4OPTS #elif defined(INET6) #define OPTSTR PING6OPTS +#else +#error At least one of INET and INET6 is required #endif int diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 90e71f342b0e..c88ad051d940 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -2571,6 +2571,11 @@ OLD_DIRS+=usr/share/i18n/csmapper/KS OLD_DIRS+=usr/share/i18n/csmapper/GB .endif +.if ${MK_INET} == no && ${MK_INET6} == no +OLD_FILES+=sbin/ping +OLD_FILES+=usr/share/man/man8/ping.8.gz +.endif + .if ${MK_INET6} == no OLD_FILES+=sbin/ping6 OLD_FILES+=sbin/rtsol