From nobody Fri Feb 02 19:06:07 2024 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 4TRQGl3VHyz59Hxp; Fri, 2 Feb 2024 19:06:07 +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 4TRQGl30LCz4mG2; Fri, 2 Feb 2024 19:06:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706900767; 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=aWsLS5RQnsNesFA6LUB0kqlKQbN/tq2sM0v/kbU7ATI=; b=q3U46E11UYqa5BpiLLPZbSDtCdTbEJTzAxEB/ikH3BzxsE/dvVHfMheuIZX/DdLnbrA11c 4Et8etS+TUSqNhC/R8l/ZZpmtFtT+KovbLut0P/vxUCQGf9uoOh0ucGjkID51xVzulLeOF TlyNKk3DZ0Hsp7cdjAF0VieiXnnF21C6mrgOy3q9wlQ0/FkkuDCLoTngxBKITi+a42M9NT mqgEnRW9cS/V6nb7wx8EF2V+D7iu/yVYrRPqjrVtPRDqqQ9vbwA8W0wSTz2KJ0uL4lPkIi JB6Dxej9CpQ5280ZWI+1PAa3AWtnYAdtF6MtbqpG85qckZr5eCZK1McJEF96Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706900767; 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=aWsLS5RQnsNesFA6LUB0kqlKQbN/tq2sM0v/kbU7ATI=; b=vq6arlVrCiavcyXLVV84Q8eRmnfhDl8yZNoKvZggNZA092/Gp19KqrjtINaf/q4xjGSIKG mhRKB4Q7a6nX/6dijEhjfS4QHp4KQNODq/kUEdJ0T7Yo/c5ERc5pCHtgO3H+kc0nxTXfUa Q+rsGikPvAJ103DnEytyFS405Uyis1sbz6y+c5QFrNfWw5isPhAU/3XS49ng4tWJdDNelD gA96cF8Ah4MR1avO/QsAoV5HFI0DKHcqlJd8kGH+dXwIjAiQIrWXWVihYB7tC2mKv68WfY cUw7yE9ABDrEaaqwhzWGKw5M50D0ENcRinUHpiLtQhTabR2iOdcP9fgjIpEjQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706900767; a=rsa-sha256; cv=none; b=SXi4PYSzXq7JlQBRb3/NZAgafPwIVvUfP662CetWf5Jmz5kVQP44y/V7CGlaVZ21+QX4g4 G6kA9peVLs/pUcc0lDncqmLqU/XwJCFil6HX1gvZyYhx/Amx8XJvaXr6qBjpOYtZl/CpXl 6HVoCmAe00e9EBZNwYZwDuQibhk4hmwev5t2stkGZ0U633i6VXmSHLP+/IBUSnmv6ptyO1 Wn4gVmuOkiKrg+COh3wl0xDh3YsgHVxJ4LgwKiDBcTLI19oi7JzHbz4L+WNJmZeCblRqlT 4kQtGkl7hqqQQKPP/TwZm7ufDlqvqMrZbcp4yFt33VbazN9bP8MGJihNOYJy5w== 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 4TRQGl24RXzjXB; Fri, 2 Feb 2024 19:06:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 412J67Gj054909; Fri, 2 Feb 2024 19:06:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 412J67qt054906; Fri, 2 Feb 2024 19:06:07 GMT (envelope-from git) Date: Fri, 2 Feb 2024 19:06:07 GMT Message-Id: <202402021906.412J67qt054906@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 994865caf250 - main - Revert "stand/lua: per-product conf if requested via product_vars" 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 994865caf250ea2a59b7b842e44680931e8b19f6 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=994865caf250ea2a59b7b842e44680931e8b19f6 commit 994865caf250ea2a59b7b842e44680931e8b19f6 Author: Warner Losh AuthorDate: 2024-02-02 19:02:23 +0000 Commit: Warner Losh CommitDate: 2024-02-02 19:04:57 +0000 Revert "stand/lua: per-product conf if requested via product_vars" This reverts commit 754cac4b283eb024a3a6a194130199c860e32ebf. No mail went out and commit message was wrong. Sponsored by: Netflix --- stand/defaults/loader.conf.5 | 34 +--------------------------------- stand/lua/config.lua | 25 ------------------------- 2 files changed, 1 insertion(+), 58 deletions(-) diff --git a/stand/defaults/loader.conf.5 b/stand/defaults/loader.conf.5 index 0d82a3dac9b3..42e5712d93b8 100644 --- a/stand/defaults/loader.conf.5 +++ b/stand/defaults/loader.conf.5 @@ -21,7 +21,7 @@ .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. -.Dd February 2, 2024 +.Dd January 10, 2024 .Dt LOADER.CONF 5 .Os .Sh NAME @@ -138,38 +138,6 @@ present file. should be treated as write-only. One cannot depend on any value remaining in the loader environment or carried over into the kernel environment. -.It Ar product_vars -When set, must be a space separated list of environment variable names to walk -through to guess product information. -The order matters as reading a config file override the previously defined -values. -Undefined variables are silently ignored. -.Pp -When product information can be guessed, for each product information found, -append -.Pa /boot/loader.conf.d/PRODUCT -to -.Ar loader_conf_dirs . -It can be typically used as follow: -.Bd -literal -smbios.system.planar.maker="PLANAR_MAKER" -smbios.system.planar.product="PLANAR_PRODUCT" -smbios.system.product="PRODUCT" -uboot.m_product="M_PRODUCT" -product_vars="smbios.system.planar.maker smbios.system.planar.product smbios.system.product uboot.m_product" -.Ed -.Pp -to read files found in the following directories, in that order: -.Bl -bullet -compact -.It -.Pa /boot/loader.conf.d/PLANAR_MAKER -.It -.Pa /boot/loader.conf.d/PLANAR_PRODUCT -.It -.Pa /boot/loader.conf.d/PRODUCT -.It -.Pa /boot/loader.conf.d/M_PRODUCT -.El .It Ar kernel Name of the kernel to be loaded. If no kernel name is set, no additional diff --git a/stand/lua/config.lua b/stand/lua/config.lua index 210bb9338783..8fdc805ee983 100644 --- a/stand/lua/config.lua +++ b/stand/lua/config.lua @@ -658,37 +658,12 @@ function config.readConf(file, loaded_files) if load_conf_dirs then local loader_conf_dirs = getEnv("loader_conf_dirs") - - -- If product_vars is set, it must be a list of environment variable names - -- to walk through to guess product information. The order matters as - -- reading a config files override the previously defined values. - -- - -- If product information can be guessed, for each product information - -- found, also read config files found in /boot/loader.conf.d/PRODUCT/. - local product_vars = getEnv("product_vars") - if product_vars then - local product_conf_dirs = "" - for var in product_vars:gmatch("%S+") do - local product = getEnv(var) - if product then - product_conf_dirs = product_conf_dirs .. " /boot/loader.conf.d/" .. product - end - end - - if loader_conf_dirs then - loader_conf_dirs = loader_conf_dirs .. product_conf_dirs - else - loader_conf_dirs = product_conf_dirs - end - end - if loader_conf_dirs ~= nil then for name in loader_conf_dirs:gmatch("[%w%p]+") do if lfs.attributes(name, "mode") ~= "directory" then print(MSG_FAILDIR:format(name)) goto nextdir end - for cfile in lfs.dir(name) do if cfile:match(".conf$") then local fpath = name .. "/" .. cfile