From nobody Thu May 11 16:17:28 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 4QHH9b3VGjz49R36; Thu, 11 May 2023 16:17:39 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QHH9b31fpz4lP8; Thu, 11 May 2023 16:17:39 +0000 (UTC) (envelope-from kevans@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683821859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jwEQRUQin50PRgCycGRbNjNyyCkdMwn1vlAmypt5b5M=; b=cpQPzfHDhW497bXQ03OyAScCED09kZJpGtr9O1qiW6musrT/e7GdBSRB58z8RmVs7tUTrj 9ZXv1yJT6myd0thbECU/+ABjFU2MGtJ/zRk1maeiY8U5vsG4QEpEL8jA4H2ht9M+7yvCpV VSekViDfl+Bm+Em+Xdsqt0JmB6f8I4YWDPQHKct7hRhDCrTQN71dB/sS0hFOLQ2/N0KBqJ 4AYxnif9mRWxHrZjczhZYXJUAejaHNGVdM6MSJk67UebUAjHSC/dZM7ZGDA5bLvJscXZMu 9ly4Z492ztAjeSMTyu+F8xW0x2wOMRHlaYjVqTJADdKlgYQJ+jjtcOZ0+RiOAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683821859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jwEQRUQin50PRgCycGRbNjNyyCkdMwn1vlAmypt5b5M=; b=R02FOcm3wdCt327IT6sdENw95Dooz5tpZ/VjGEG6x4HtCZPmXjVJmbAUwgh+ZVIck+KOHD EU3k1EiRPeVrjVX+iI6lGyeD6eFB3KyVNgN08yC+V/JDC/kc6K39nkJ17NjAIrr18V2WYv A1tNhisoXg5goP1GqFphiNrS9hRtGlL7myB7M9sY4Yian8McJguAr6UsLpml5hxhP9aT3v Q+8JUBy4QKVPiTdRBpVzIj3EDLSev4HlrWIVNrT1Dr+URCq5LUMnKyPvhxoewz9XLk/VaX cVUr3odD6xb1YwP/pAqBtmnRjfFj3Mc9Uvy6okw9hQcN2M7OYPY1AdabERnprw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683821859; a=rsa-sha256; cv=none; b=htMLM0+DUiqds/8MUPquqIWJhW96JaB04XKsjQmHKWv6ca5jgMroB+dH6V9lJ2Hy3TAS1q XlU3wc6eRFNxiU5EGfRivnKKVu4kk4AqoBiHNTWrDUze3kBY+Sex5W3IHi2MdjATRKDhK+ QmcxsbRONvNKiJKOHbwOtrKMBeqHlxIf8LNNphEAHrM7puKzhkcb/kkSvtV+VoQpa61R+m nunMppFdWMlJQ8sDH2xIIkC5j0mEXAExLqLyo7fyso0ACziV99grO+lE/m0YljOrmbQREI XDFVAfAkAnlPIsJAHEQV9R6sdp1djAsieoQX4+WnIaZY4VCqCiaL+SsxaNeavg== Received: from mail-qv1-f41.google.com (mail-qv1-f41.google.com [209.85.219.41]) (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)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 4QHH9b1mtjzM9d; Thu, 11 May 2023 16:17:39 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f41.google.com with SMTP id 6a1803df08f44-61a4e03ccbcso79455476d6.2; Thu, 11 May 2023 09:17:39 -0700 (PDT) X-Gm-Message-State: AC+VfDxIUKw1eyuNT35dPe833ckw8jES2unDLt9LLqFyQTYbSQhRRSDR K/wosV2/CCnjRef9gQ3bvAi3Yq9WU6IBwqu9NLQ= X-Google-Smtp-Source: ACHHUZ4H7/fvrv2RKe6zfLtUOThIR041trpkKlZIEXnlbUIn1x2js9TRImKzOJxBQB2+NrcjQVixlXVQCpE5PwEHfuY= X-Received: by 2002:a05:6214:4111:b0:606:5103:9c98 with SMTP id kc17-20020a056214411100b0060651039c98mr29499737qvb.34.1683821858882; Thu, 11 May 2023 09:17:38 -0700 (PDT) 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 References: <202305110411.34B4BFEE047146@gitrepo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Thu, 11 May 2023 11:17:28 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 3cb2f5f369ec - main - lualoader: add support for .lua configuration files To: Warner Losh Cc: Mark Johnston , src-committers , "" , "" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-ThisMailContainsUnwantedMimeParts: N On Thu, May 11, 2023 at 8:23=E2=80=AFAM Warner Losh wrote: > > > > On Thu, May 11, 2023, 7:19 AM Mark Johnston wrote: >> >> 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=3D3cb2f5f369ecfd6d15aeff2= b47e21866551a20de >> > >> > 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', l= ualoader >> > 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 do= es not get >> > access to any modules or, in-fact, anything except environment var= iable. >> > >> > A config.buildenv hook has been added so that a local module can a= dd >> > whatever it may need to to the environment. >> > >> > When a global var is set in the lua script, it does not immediatel= y alter >> > the loader environment. Instead, the script's environment is initi= ally >> > empty and processed only if the whole script executes successfully= . >> > Effectively, a lua configuration file either takes effect or it do= es 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. > > > Yes.... unless Kyle objects :) > Ah, yeah, that's a good idea. I wrote a pitch here: https://reviews.freebsd.org/D40066