From nobody Thu May 11 13:19:15 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 4QHCCq6RDxz4BDbr; Thu, 11 May 2023 13:19:19 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QHCCq4k79z4DZT; Thu, 11 May 2023 13:19:19 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-x72d.google.com with SMTP id af79cd13be357-75773956860so283908785a.0; Thu, 11 May 2023 06:19:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683811158; x=1686403158; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=egcIxBjMCMJsgaBX1/+TNHzARjb404W+Ebd5ED7lHss=; b=CX/ytlhPhhM2GcNcF/A8KouToCflamV4LM3fzgEXCyu3FJB2RtWPiwIidxxHRLCad+ BLRroTSk+TXLLw+dpTxQaVqHM4wlk86VqmUtJzQTqX3Fu+e0Om42eWNf1Tyxrmq8s1pZ CH/4H9cqJN1+lv7Wj5kPcvMeaq7e8zTrwbNXN968YhQNRBN21lT8Wlm5lZf6r39hHkKT tbtVYCEXl8NMkMLTeCJn+DH9hgg7gI0Ykio59LN5ixroj5ZGp267waZQthCfePkvOvit 1XtgSl53+o2IyM5njhJqxLZxMTVAonGUaj4yWYyye4DqFVdm8qQ+L3+xIFXQPhimMVC+ Ltsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683811158; x=1686403158; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=egcIxBjMCMJsgaBX1/+TNHzARjb404W+Ebd5ED7lHss=; b=BmpKEb9gkWftIgPinI4HsoWygUNnj8re2uLIGd5IUWoXkad7M5LdxTWchYHlChCE1h +rzFufWbcB2erH7vU5YuA3qlALK2zGRa6pJXuAp/g3OQrgCdYL003DcQFVHlG4BXDH59 u1lbfDzxFeTMN3Xiu7xRjx7tT+PwTA0wHEeZ2WVKX8y19NpKl/0+4/rI3mLzDeDtsoIt f2crzUi4ODVcu2vTPl0MNpSqu67sPLNv4tuvZsLqlo2DRNclGh8BN6EIuZgeitfkZIxd FPjrOF4AF+eNkifpEbH5ZhXkooaaywf2UtAEoXvH3ZHvpopdRj2Ex5paS9D7klYCBs6t 1jtg== X-Gm-Message-State: AC+VfDyNpe2sSY2WyDkTKR/ttNohVK4oikQ7EPpzyC1tG3lmMhguh8Pz fhEBk6WYfyBVoS6MfpkP7wx7Oba+c7Q= X-Google-Smtp-Source: ACHHUZ7Eza3YjGBmCrB1Geqx40TNbEHrTvR333Dk4ySiGm+UNZj+JrGEx3uZS4ivNiSEV7MI9aKEWg== X-Received: by 2002:a05:622a:2c2:b0:3f0:ab44:5b09 with SMTP id a2-20020a05622a02c200b003f0ab445b09mr33470257qtx.0.1683811158024; Thu, 11 May 2023 06:19:18 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id a13-20020aed278d000000b003ef1586721dsm2225968qtd.26.2023.05.11.06.19.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 06:19:17 -0700 (PDT) Date: Thu, 11 May 2023 09:19:15 -0400 From: Mark Johnston To: Kyle Evans Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 3cb2f5f369ec - main - lualoader: add support for .lua configuration files Message-ID: References: <202305110411.34B4BFEE047146@gitrepo.freebsd.org> 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=us-ascii Content-Disposition: inline In-Reply-To: <202305110411.34B4BFEE047146@gitrepo.freebsd.org> X-Rspamd-Queue-Id: 4QHCCq4k79z4DZT X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Thu, May 11, 2023 at 04:11:15AM +0000, Kyle Evans wrote: > The branch main has been updated by kevans: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3cb2f5f369ecfd6d15aeff2b47e21866551a20de > > commit 3cb2f5f369ecfd6d15aeff2b47e21866551a20de > Author: Kyle Evans > AuthorDate: 2023-05-11 04:10:53 +0000 > Commit: Kyle Evans > CommitDate: 2023-05-11 04:10:53 +0000 > > lualoader: add support for .lua configuration files > > If a file is specified in loader_conf_files that ends in '.lua', lualoader > will now load and execute that file. These may be used in place of a > traditional loader.conf to use more complicated logic, where some values > may be set based on others or based on the environment that the C bits has > left us with. > > Lua scripts are run in a limited environment. In particular, it does not get > access to any modules or, in-fact, anything except environment variable. > > A config.buildenv hook has been added so that a local module can add > whatever it may need to to the environment. > > When a global var is set in the lua script, it does not immediately alter > the loader environment. Instead, the script's environment is initially > empty and processed only if the whole script executes successfully. > Effectively, a lua configuration file either takes effect or it does not, > an error will not leave it in a half-baked state. > > Reviewed by: bcr (manpages), imp > Differential Revision: https://reviews.freebsd.org/D28450 Should this be in RELNOTES? It seems like a very useful feature.