From owner-svn-src-head@freebsd.org Wed Apr 29 13:41:33 2020 Return-Path: Delivered-To: svn-src-head@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 8598B2B4CA3; Wed, 29 Apr 2020 13:41:33 +0000 (UTC) (envelope-from emaste@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49C06P2k9Yz4DMt; Wed, 29 Apr 2020 13:41:33 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 58A0C655A; Wed, 29 Apr 2020 13:41:33 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03TDfXo0019046; Wed, 29 Apr 2020 13:41:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03TDfWV4019044; Wed, 29 Apr 2020 13:41:32 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004291341.03TDfWV4019044@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 29 Apr 2020 13:41:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360460 - head/lib/liblua X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/liblua X-SVN-Commit-Revision: 360460 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2020 13:41:33 -0000 Author: emaste Date: Wed Apr 29 13:41:32 2020 New Revision: 360460 URL: https://svnweb.freebsd.org/changeset/base/360460 Log: liblua: ensure that "require" will fail in bootstrap flua We do not want to support bootstrapping lua modules, so ensure that require will fail by providing a nonexistent path. Reviewed by: kevans MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24610 Modified: head/lib/liblua/Makefile head/lib/liblua/luaconf.h Modified: head/lib/liblua/Makefile ============================================================================== --- head/lib/liblua/Makefile Wed Apr 29 11:46:01 2020 (r360459) +++ head/lib/liblua/Makefile Wed Apr 29 13:41:32 2020 (r360460) @@ -26,4 +26,9 @@ SRCS+= lauxlib.c lbaselib.c lbitlib.c lcorolib.c ldbli CFLAGS+= -I${.CURDIR} -I${.CURDIR}/modules -I${LUASRC} CFLAGS+= -DLUA_PROGNAME="\"${PROG}\"" +.if defined(BOOTSTRAPPING) +CFLAGS+= -DLUA_PATH_DEFAULT="\"/nonexistent/?.lua\"" +CFLAGS+= -DLUA_CPATH_DEFAULT="\"/nonexistent/?.so\"" +.endif + .include Modified: head/lib/liblua/luaconf.h ============================================================================== --- head/lib/liblua/luaconf.h Wed Apr 29 11:46:01 2020 (r360459) +++ head/lib/liblua/luaconf.h Wed Apr 29 13:41:32 2020 (r360460) @@ -208,12 +208,16 @@ #define LUA_ROOT "/usr/local/" #define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR "/" #define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR "/" +#if !defined(LUA_PATH_DEFAULT) #define LUA_PATH_DEFAULT \ LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \ LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" \ "./?.lua;" "./?/init.lua" +#endif +#if !defined(LUA_CPATH_DEFAULT) #define LUA_CPATH_DEFAULT \ LUA_CDIR"?.so;" LUA_CDIR"loadall.so;" "./?.so" +#endif #endif /* } */