From owner-dev-commits-src-branches@freebsd.org Sun Jan 31 01:16:25 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D39804FF763; Sun, 31 Jan 2021 01:16:25 +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 4DStSn5hyJz3nK8; Sun, 31 Jan 2021 01:16:25 +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 B69581F94D; Sun, 31 Jan 2021 01:16:25 +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 10V1GPlc017386; Sun, 31 Jan 2021 01:16:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10V1GPmw017385; Sun, 31 Jan 2021 01:16:25 GMT (envelope-from git) Date: Sun, 31 Jan 2021 01:16:25 GMT Message-Id: <202101310116.10V1GPmw017385@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: e8a03eb0c4e1 - stable/12 - lualoader: improve loader.conf var processing MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: e8a03eb0c4e1fcb94d58d833ab060bef34646470 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2021 01:16:25 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=e8a03eb0c4e1fcb94d58d833ab060bef34646470 commit e8a03eb0c4e1fcb94d58d833ab060bef34646470 Author: Kyle Evans AuthorDate: 2021-01-24 19:25:34 +0000 Commit: Kyle Evans CommitDate: 2021-01-31 01:16:12 +0000 lualoader: improve loader.conf var processing lualoader was previously not processing \ as escapes; this commit fixes that and does better error checking on the value as well. Additionally, loader.conf had some odd restrictions on values that make little sense. Previously, lines like: kernel=foo Would simply be discarded with a malformed line complaint you might not see unless you disable beastie. lualoader tries to process these as well as it can and manipulates the environment, while forthloader did minimal processing and constructed a `set` command to do the heavy lifting instead. The lua approach was re-envisioned from building a `set` command so that we can appropriately reset the environment when, for example, boot environments change. Lift the previous restrictions to allow unquoted values on the right hand side of an expression. Note that an unquoted value is effectively: [A-Za-z0-9-][A-Za-z0-9-_.]* This commit also stops trying to weirdly limit what it can handle in a quoted value. Previously it only allowed spaces, alphanumeric, and punctuation, which is kind of weird. Change it here to grab as much as it can between two sets of quotes, then let processEnvVar() do the needful and complain if it finds something malformed looking. My extremely sophisticated test suite is as follows: <