From nobody Sat Apr 11 15:49:11 2026 X-Original-To: dev-commits-src-branches@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 4ftJ4m1qtbz6YgpL for ; Sat, 11 Apr 2026 15:49:12 +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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftJ4l6vThz3Hsx for ; Sat, 11 Apr 2026 15:49:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775922552; 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=C4fETtfTJQcGmdGP9sQ0bpth5J0j9vyvqw4mMlUeFUg=; b=q7cAaWEO7zOClG1PVd37rrAeUUsPZ0FsYic5TCDFhELvUw8a6eLaTWT8BQhhpsyR9ODmY6 69BMettfJtfpLVBpnPhcty2qBCOJFO/ae4MsaZcit0ymBp65BhiUzPkRTF0QRYWU8wo8lP 3VEzR60W+DPMtEWobHNDSObVksHcksktmuhT6Ssy/UN3GY1IMT1ILGamcK9nOxJwHRgnxA UCWyScDCSg15RdZrBg0nrl96vz2rqAQHbCZI6bQQTK8B4tyiYkOPes3chFg9xhXSrSK/cV jRqtPUFmwlAM6nZwytNLC/dEpl/NjMDhihRO9tNA7U8Qt78fEkW7HEHp8GvSmw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775922552; a=rsa-sha256; cv=none; b=AjtEa8CWWC5fbOLj9f9bFzconNkWVH3aQIVxKUnw6rM/9/bSvK29SpA6EB+hKq8rTwvznS DtyDXqReX7LD+yQrYFg0+bIRiNm5hWCDoxnWgzaYNPdBEfw4Kf6K/Oy5bbrYPzaghb1iiL OjCkgLG74dZUdJdUbeysbVVEOt32Yi6HopBe/S2/mS0S1mRswRtM2cg2MiF+7CdpYARMmH LL5aogj/4LSkOaPRE4zXmeQD4IUVhBNdal2KDk3e/aWemx3rfbcSHHFJnDqQ3XXpjJ3Z1v aO8eGssYli7h9+LEWNzB3s6XLpA9zSaKxRinbXpGgTjLUnACTuVR7mfNEqv8Tw== 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=1775922552; 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=C4fETtfTJQcGmdGP9sQ0bpth5J0j9vyvqw4mMlUeFUg=; b=hvflzObGS1yOpnasjHY6oCcarhm2RY123DDNgD9zq+zaVJx61O8n/R7/QYcMqAd6kOF7Y7 nYbKN1Wx9YSVhmZXIYr3jPQ+hgQFU894NgEAmHZ0HbL/LFFvPCGSKYWN9nidcO2kXmPFF1 ds0dM3gZwP9h211Q2ob7FtJTLpZrUqtsIASZb0DALIsgeXkTfnGScp+93IscPptNDmJ5Yo oQpT1uBbEpOWyDQZjZAM/U2DM0YTxzBDfL/ONFbIoW8yD9VEVvIIfMpSaO1oovsbq8/6xi VsNh+K4wU5jVNPRvP97uJN8Kw3WP79a27eQNfqx6Vqx617mnpcA3RGkL+b+DPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftJ4l65yMzcdM for ; Sat, 11 Apr 2026 15:49:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 20377 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 11 Apr 2026 15:49:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 9ba365ad5374 - stable/15 - flua: kick out the remaining builtin modules List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org 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/15 X-Git-Reftype: branch X-Git-Commit: 9ba365ad53745e45b099dd28628e3e9e20d35112 Auto-Submitted: auto-generated Date: Sat, 11 Apr 2026 15:49:11 +0000 Message-Id: <69da6d77.20377.1754feb@gitrepo.freebsd.org> The branch stable/15 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=9ba365ad53745e45b099dd28628e3e9e20d35112 commit 9ba365ad53745e45b099dd28628e3e9e20d35112 Author: Kyle Evans AuthorDate: 2025-10-04 02:16:51 +0000 Commit: Kyle Evans CommitDate: 2026-04-11 03:18:35 +0000 flua: kick out the remaining builtin modules Bootstrap flua has some magic now to handle modules by building them in and discovering them via linker sets. This is slightly cleaner than always building them in and baking them into loadedlibs for both bootstrap and system flua. Adjust the stand build now that these three libs have their own new homes. lposix remains builtin because it's structured incorrectly in our version. Reviewed by: bapt, emaste, markj (cherry picked from commit b11a5709ec2b61fefb03bfdd38e2f06d2c1107c1) (cherry picked from commit 9c7db0931d486ce800aa71d9f41abfad9f7f691f) (cherry picked from commit d505ef08ffbe3b7383fbc6ed30121de9256ac18e) --- libexec/flua/Makefile | 4 +++- libexec/flua/lfbsd/Makefile | 5 +++++ libexec/flua/lfbsd/Makefile.inc | 2 ++ libexec/flua/{modules => lfbsd}/lfbsd.c | 4 ++++ libexec/flua/{modules => lfbsd}/lfbsd.h | 0 libexec/flua/lfs/Makefile | 5 +++++ libexec/flua/lfs/Makefile.inc | 2 ++ libexec/flua/{modules => lfs}/lfs.c | 7 ++++++- libexec/flua/{modules => lfs}/lfs.h | 0 libexec/flua/libhash/lhash.c | 2 ++ libexec/flua/linit_flua.c | 4 ---- stand/liblua/Makefile | 2 +- stand/loader.mk | 2 +- 13 files changed, 31 insertions(+), 8 deletions(-) diff --git a/libexec/flua/Makefile b/libexec/flua/Makefile index 02e177b12f3d..f1c46b270ded 100644 --- a/libexec/flua/Makefile +++ b/libexec/flua/Makefile @@ -8,6 +8,8 @@ PACKAGE= flua # than mucking about with the infrastructure to make them linkable -- thus, why # these are all structured to have a Makefile that describes what we want # *installed*, and a Makefile.inc that describes what we need to *build*. +FLUA_MODULES+= lfbsd +FLUA_MODULES+= lfs FLUA_MODULES+= libhash .ifndef BOOTSTRAPPING # Bootstrap flua can't usefully do anything with libjail anyways, because it @@ -54,7 +56,7 @@ SRCS+= lua.c # FreeBSD Extensions .PATH: ${.CURDIR}/modules SRCS+= linit_flua.c -SRCS+= lfs.c lposix.c lfbsd.c +SRCS+= lposix.c CFLAGS+= -I${SRCTOP}/lib/liblua -I${.CURDIR}/modules -I${LUASRC} CFLAGS+= -DLUA_PROGNAME="\"${PROG}\"" diff --git a/libexec/flua/lfbsd/Makefile b/libexec/flua/lfbsd/Makefile new file mode 100644 index 000000000000..e2a4aae14bcd --- /dev/null +++ b/libexec/flua/lfbsd/Makefile @@ -0,0 +1,5 @@ +SHLIB_NAME= fbsd.so +WARNS?= 3 + +.include "Makefile.inc" +.include diff --git a/libexec/flua/lfbsd/Makefile.inc b/libexec/flua/lfbsd/Makefile.inc new file mode 100644 index 000000000000..7a78ef82e0fc --- /dev/null +++ b/libexec/flua/lfbsd/Makefile.inc @@ -0,0 +1,2 @@ +.PATH: ${.PARSEDIR} +SRCS+= lfbsd.c diff --git a/libexec/flua/modules/lfbsd.c b/libexec/flua/lfbsd/lfbsd.c similarity index 99% rename from libexec/flua/modules/lfbsd.c rename to libexec/flua/lfbsd/lfbsd.c index ef660ba9fd77..541b6c9611df 100644 --- a/libexec/flua/modules/lfbsd.c +++ b/libexec/flua/lfbsd/lfbsd.c @@ -40,6 +40,8 @@ #include "lauxlib.h" #include "lfbsd.h" +#include "bootstrap.h" + #define FBSD_PROCESSHANDLE "fbsd_process_t*" struct fbsd_process { @@ -283,3 +285,5 @@ luaopen_fbsd(lua_State *L) return (1); } + +FLUA_MODULE(fbsd); diff --git a/libexec/flua/modules/lfbsd.h b/libexec/flua/lfbsd/lfbsd.h similarity index 100% rename from libexec/flua/modules/lfbsd.h rename to libexec/flua/lfbsd/lfbsd.h diff --git a/libexec/flua/lfs/Makefile b/libexec/flua/lfs/Makefile new file mode 100644 index 000000000000..3df83d6d2fc1 --- /dev/null +++ b/libexec/flua/lfs/Makefile @@ -0,0 +1,5 @@ +SHLIB_NAME= lfs.so +WARNS?= 3 + +.include "Makefile.inc" +.include diff --git a/libexec/flua/lfs/Makefile.inc b/libexec/flua/lfs/Makefile.inc new file mode 100644 index 000000000000..9d40c42dc0e6 --- /dev/null +++ b/libexec/flua/lfs/Makefile.inc @@ -0,0 +1,2 @@ +.PATH: ${.PARSEDIR} +SRCS+= lfs.c diff --git a/libexec/flua/modules/lfs.c b/libexec/flua/lfs/lfs.c similarity index 99% rename from libexec/flua/modules/lfs.c rename to libexec/flua/lfs/lfs.c index 8cb8d6fc9fed..517e16ae65c8 100644 --- a/libexec/flua/modules/lfs.c +++ b/libexec/flua/lfs/lfs.c @@ -66,9 +66,10 @@ #ifdef _STANDALONE #include "lstd.h" #include "lutils.h" -#include "bootstrap.h" #endif +#include "bootstrap.h" + #ifndef nitems #define nitems(x) (sizeof((x)) / sizeof((x)[0])) #endif @@ -446,3 +447,7 @@ luaopen_lfs(lua_State *L) #endif return 1; } + +#ifndef _STANDALONE +FLUA_MODULE(lfs); +#endif diff --git a/libexec/flua/modules/lfs.h b/libexec/flua/lfs/lfs.h similarity index 100% rename from libexec/flua/modules/lfs.h rename to libexec/flua/lfs/lfs.h diff --git a/libexec/flua/libhash/lhash.c b/libexec/flua/libhash/lhash.c index 7127ddc1d530..f455f006bf27 100644 --- a/libexec/flua/libhash/lhash.c +++ b/libexec/flua/libhash/lhash.c @@ -178,4 +178,6 @@ luaopen_hash(lua_State *L) return 1; } +#ifndef _STANDALONE FLUA_MODULE(hash); +#endif diff --git a/libexec/flua/linit_flua.c b/libexec/flua/linit_flua.c index e5e38353ec9b..65356c938671 100644 --- a/libexec/flua/linit_flua.c +++ b/libexec/flua/linit_flua.c @@ -33,9 +33,7 @@ #include "lualib.h" #include "lauxlib.h" -#include "lfs.h" #include "lposix.h" -#include "lfbsd.h" #include "bootstrap.h" @@ -58,9 +56,7 @@ static const luaL_Reg loadedlibs[] = { {LUA_BITLIBNAME, luaopen_bit32}, #endif /* FreeBSD Extensions */ - {"lfs", luaopen_lfs}, {"posix", luaopen_posix}, - {"fbsd", luaopen_fbsd}, {NULL, NULL} }; diff --git a/stand/liblua/Makefile b/stand/liblua/Makefile index ce7eb89fe494..b1c34ec0a466 100644 --- a/stand/liblua/Makefile +++ b/stand/liblua/Makefile @@ -24,7 +24,7 @@ SRCS+= lauxlib.c lbaselib.c lstrlib.c loadlib.c SRCS+= lerrno.c lpager.c lstd.c lutils.c SRCS+= gfx_utils.c -.PATH: ${FLUASRC}/modules +.PATH: ${FLUASRC}/lfs SRCS+= lfs.c .PATH: ${FLUALIB}/libhash SRCS+= lhash.c diff --git a/stand/loader.mk b/stand/loader.mk index 4073e523e552..e26ba1401912 100644 --- a/stand/loader.mk +++ b/stand/loader.mk @@ -89,7 +89,7 @@ SRCS+= interp_lua.c .include "${BOOTSRC}/lua.mk" LDR_INTERP= ${LIBLUA} LDR_INTERP32= ${LIBLUA32} -CFLAGS.interp_lua.c= -DLUA_PATH=\"${LUAPATH}\" -I${FLUASRC}/modules +CFLAGS.interp_lua.c= -DLUA_PATH=\"${LUAPATH}\" -I${FLUASRC}/lfs .elif ${LOADER_INTERP} == "4th" SRCS+= interp_forth.c .include "${BOOTSRC}/ficl.mk"