From nobody Thu Aug 01 14:50:28 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 4WZX2D6lypz5Ssyj; Thu, 01 Aug 2024 14:50:28 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZX2D4Rxrz4JT3; Thu, 1 Aug 2024 14:50:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523828; 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=27DZwGuAeaKT2geGsUsoCxYsIpMlDTEDe31TdV5D0i8=; b=pfm/46bnsgIZRPkxXiaqfMYnErWRkp+wBtMFIiIqUwGHcOSmu+YvCjzN6/CWSvTP8lQ9Oo CMYj3QPtPGDRXUQkZa+n70sNK3gFWfnwsjA1hhUObeMJhvf6NLqOH0rf8t1etcYHwPBWB4 IVXfODkfUzVyGGntZo7Vd/51K1ZGOetPuSSuIqE0BpE7EWeuEi5EJ1iCZ3sFmVnILpIpju JrqY4sVe39djQnLpyYPLHPcEZcSJSv/DBefI55lTpl4U5B/FEos8A5md1+vxp/hjv1gZxK watpaPyLP4G0ImBw9yTdVd8TkWSEVcnJaczwj13OE66stjtU6dcdS8lGBo6Usw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722523828; a=rsa-sha256; cv=none; b=UVxMad1jyPUXk/gXGkvY1deQGtbYblXB7ybH1Kh3DhlVGFbeZQRe5xuqdD1iDOOXcZSJot WSjZrzp0rx0eeXfROpQIUXAms7XCfaVvtRvBU2ZKgIQxgRucCHO0gff+yC48ZVJnmmDGyC EMF6VhoVpqgdPiJu9e+hCZ//cli6Y7DWLjxI8CndTY+fGF/d4+aEpPkK5KTSosN3Z505WD YyTcNDiAN5+rwM339ulIhbQZX3rTiEhw0qx0nVS4ZRR8Mz0YitLOWYry+xtavIQ1uyD5TV gMPMU2OfjO0R//WtWsnLMq7IkoRUmDXNhVK2OMd36IR8Rb/Gercb9P2NVmfLug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722523828; 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=27DZwGuAeaKT2geGsUsoCxYsIpMlDTEDe31TdV5D0i8=; b=TsNyO3g/EUqlW7dyi7QDfpvO1o1sscaidWIHOXdt35zUHr/TIEfaOnmL9kI9d4P8J2h2Wa v8jcEe5qRbh+KKdsrLFPkNK8t+O5moZeZlY7uVFxcvRDjw2drppncur3QZ2iHnhR/tcwuQ G26/1/stzmmyDaNqD9tEOYmA+Z4MspRisZ9OSw/bsK+DSyCC3Vw8lIjNffaspbPWfdBQsn BPJQ1VRSPL+2bFuh6CBBmWXtyH9RNRPtv22lW8wNT3aOp/9xW6JHg+TMLEKz9sRqTSUY7L mvszZXhnLgZpZBtQ624H+jh27qQBN8vSG6JIBcsXt1cYaffZ5muXUX1P+532qw== 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 4WZX2D40y7zptY; Thu, 1 Aug 2024 14:50:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471EoSWi049517; Thu, 1 Aug 2024 14:50:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471EoSEN049514; Thu, 1 Aug 2024 14:50:28 GMT (envelope-from git) Date: Thu, 1 Aug 2024 14:50:28 GMT Message-Id: <202408011450.471EoSEN049514@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 598b9677b3e9 - stable/14 - Revert "loader/lua: Remove compat shim for loader.lua_path" 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 598b9677b3e9ac01d81031d67426e49573b759d2 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=598b9677b3e9ac01d81031d67426e49573b759d2 commit 598b9677b3e9ac01d81031d67426e49573b759d2 Author: Warner Losh AuthorDate: 2024-07-29 22:57:04 +0000 Commit: Warner Losh CommitDate: 2024-08-01 14:49:54 +0000 Revert "loader/lua: Remove compat shim for loader.lua_path" This reverts commit ab97d42addae97a389c6f22d6bba62ed954bb8e7. There's too many people in the field with FreeBSD 12.0 loader.efi that stubbed their toe on upgrading to 14.1 since they'd not updated loader.efi. While we sort out that mess, add back this workaround. Can revisit after 14.2 maybe. MFC After: 3 days Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D45882 (cherry picked from commit 522a65a8d97a0d6b634266f1b4a89aa8f374279c) --- stand/lua/core.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/stand/lua/core.lua b/stand/lua/core.lua index eaabff6a7602..9226de564348 100644 --- a/stand/lua/core.lua +++ b/stand/lua/core.lua @@ -65,7 +65,13 @@ end -- message on failure. function try_include(module) if module:sub(1, 1) ~= "/" then - module = loader.lua_path .. "/" .. module + local lua_path = loader.lua_path + -- XXX Temporary compat shim; this should be removed once the + -- loader.lua_path export has sufficiently spread. + if lua_path == nil then + lua_path = "/boot/lua" + end + module = lua_path .. "/" .. module -- We only attempt to append an extension if an absolute path -- wasn't specified. This assumes that the caller either wants -- to treat this like it would require() and specify just the