From nobody Thu Feb 09 18:56:53 2023 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 4PCR1L0cmjz3n8BR; Thu, 9 Feb 2023 18:56:54 +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 4PCR1L084Hz3LRS; Thu, 9 Feb 2023 18:56:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675969014; 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=BOVxn3qLTbQRo/zIvJfsHtEB9l7DcCNl/j7enVHxhdM=; b=B2oXPCUuF5i3L45f8JAE4nWieUnivUpOaHKS+Om77ljj0dJRaJHU8Q3fG/3fGYjh4CfKK4 2/mJl2DAQVOzVCdw0CssKf8K/umEX0x3+6UIp0FQOzKHfnk14jgpwYALgYs5fzF/boy3l/ JhyJ1g/GsEBOaAHrwiARNQes5pT04BnGv+IKkJtKZ69furcV4U6LUJauFin2HxEgy5stBV JQzfkWsbzYBWrT972SO4AvBcWmgMY5pDKq3mN+luY0szSno1aKz2d9BGLrIuI5IYWOZxkk 3N9WU0iIVnqexRH6TWXvKE6fxS1YS43VAOdztCEXcsDhsYmq7emNTwJWktQp4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675969014; 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=BOVxn3qLTbQRo/zIvJfsHtEB9l7DcCNl/j7enVHxhdM=; b=ecAtA58fZDz/gd5UI3Jj8Ee2XR/rKeOhYht13azwJ3CZkblp6h00wLYglOeaa9eBl/mSbG F9IoesQd4fjP3yNKDOB8wgJ7q3B53HL6mXwA17zDPTDUT4SPonsMkH4jexYx/Uz3on8tve bursf9eGzMx6lcIuPjR83XKsLYsLz2j29D8syyH6uCECK8bBzY0aBuR8LI2ovnQYu0N30k LxX0gNTVYnUH4QVTg3Tc9ikLFberg20VIAI37i1kQ1utkGexlHhnbMaFdsoo99cVYpLumz Jt4H6IWDlDo0qKtbA7kOvU+wxuril5YKydsPTSezMmEpj+h/evWzs7GaUjnQcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675969014; a=rsa-sha256; cv=none; b=gLJV2nbTghv/SLlpZNyKx+3X8nuWHm/uxRUzorDgIR1ZQRw2DkNU3ZWs936U9HM/1Uxxrq RAkaXuhWBZeergVZ26SyTw7rfit6EezkbPqfuzRn2i7bR6sfKEME9ZgRX9w81KxHpu0JHo gI/rURi2dEjHtapZJY72YZr/flbB1Oz+y9EN1zxCfxXD8bI6DWYA8U9rf7q4w6WB8oTMo9 Cp9PmvBSffSrhXqQ6m2qdXpCxujkg6MuBdEJd/R1gx3x1yHi1JJhVYUEhTC74yBcH6t0yh rSxYP7IvBU8tyIK6zmXhslgtb22Wj9e3Hn20uxJRG2fSObOKhtzA66tCJ9AVaA== 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 4PCR1K6J9xzp0L; Thu, 9 Feb 2023 18:56:53 +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 319IurrK041010; Thu, 9 Feb 2023 18:56:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 319Iurns041009; Thu, 9 Feb 2023 18:56:53 GMT (envelope-from git) Date: Thu, 9 Feb 2023 18:56:53 GMT Message-Id: <202302091856.319Iurns041009@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: e9eee0f256a3 - main - lua: Export loaded modules env vars via environment 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: e9eee0f256a3501862beafaa6a45bcac8dd193d9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e9eee0f256a3501862beafaa6a45bcac8dd193d9 commit e9eee0f256a3501862beafaa6a45bcac8dd193d9 Author: Warner Losh AuthorDate: 2023-02-09 16:49:43 +0000 Commit: Warner Losh CommitDate: 2023-02-09 18:56:20 +0000 lua: Export loaded modules env vars via environment To make auditing and debugging easier, export foo_load=XXX foo_name=yyy etc to the loader env that we export to the kernel. Original by: dhw Sponsored by: Netflix Discussed with: kevans Differential Revsion: https://reviews.freebsd.org/D38466 --- stand/lua/config.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stand/lua/config.lua b/stand/lua/config.lua index 9ef7c0796f46..04d5cda1e704 100644 --- a/stand/lua/config.lua +++ b/stand/lua/config.lua @@ -256,6 +256,7 @@ local pattern_table = { modules[k] = {} end modules[k].load = v:upper() + setEnv(k .. "_load", v:upper()) end, }, -- module_name="value" @@ -263,6 +264,7 @@ local pattern_table = { str = MODULEEXPR .. "_name%s*=%s*$VALUE", process = function(k, v) setKey(k, "name", v) + setEnv(k .. "_name", v) end, }, -- module_type="value" @@ -270,6 +272,7 @@ local pattern_table = { str = MODULEEXPR .. "_type%s*=%s*$VALUE", process = function(k, v) setKey(k, "type", v) + setEnv(k .. "_type", v) end, }, -- module_flags="value" @@ -277,6 +280,7 @@ local pattern_table = { str = MODULEEXPR .. "_flags%s*=%s*$VALUE", process = function(k, v) setKey(k, "flags", v) + setEnv(k .. "_flags", v) end, }, -- module_before="value" @@ -284,6 +288,7 @@ local pattern_table = { str = MODULEEXPR .. "_before%s*=%s*$VALUE", process = function(k, v) setKey(k, "before", v) + setEnv(k .. "_before", v) end, }, -- module_after="value" @@ -291,6 +296,7 @@ local pattern_table = { str = MODULEEXPR .. "_after%s*=%s*$VALUE", process = function(k, v) setKey(k, "after", v) + setEnv(k .. "_after", v) end, }, -- module_error="value" @@ -298,6 +304,7 @@ local pattern_table = { str = MODULEEXPR .. "_error%s*=%s*$VALUE", process = function(k, v) setKey(k, "error", v) + setEnv(k .. "_error", v) end, }, -- exec="command"