History log of /freebsd-current/libexec/flua/Makefile
Revision Date Author Comments
# 1f31e00e 13-Sep-2023 Baptiste Daroussin <bapt@FreeBSD.org>

flua: add fbsd module

This module is bundled into flua, it only provides for now the exec
function. The point of the function is to be able to execute a program
without actually executing a shell.

to use it:
fbsd.exec({"id", "bapt"})

Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D41840


# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# 967fbfd9 13-Aug-2020 Kyle Evans <kevans@FreeBSD.org>

Properly disable LUA_USE_DLOPEN for bootstrap flua

flua does have some specific bits that will include luaconf.h, but the
definition of LUA_USE_DLOPEN for those won't matter. This belongs in liblua
instead.

To expand on my previous commit, which was a little sparse with details,
it's not really safe to allow LUA_USE_DLOPEN with host lib paths being used.
The host system could have an entirely different lua version and this could
cause us to crash and burn.

If we want to revive this later, we need to make sure to define c module
paths inside OBJDIR that are compiled against whatever version we've
bootstrapped.

Pointy hat: kevans


# c2a2b4f3 13-Aug-2020 Kyle Evans <kevans@FreeBSD.org>

flua: don't allow dlopen, et al., for bootstrap flua

There are some logistics issues that need to be sorted out here before we
can actually allow this to work.


# 3bd84195 13-Aug-2020 Ed Maste <emaste@FreeBSD.org>

flua: support "require" for binary objects in the base system

Export symbols from flua, and enable dlopen.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D26059


# 94a82666 21-Jun-2020 Ryan Moeller <freqlabs@FreeBSD.org>

flua: add ucl library

libucl comes with a Lua library binding. Build it into flua.

This lets us parse/generate config files in the various formats supported by
libucl with flua. For example, the following script will detect the format of
an object written to stdin as one of UCL config, JSON, or YAML and write it to
stdout as pretty-printed JSON:

local ucl = require('ucl')
local parser = ucl.parser()
parser:parse_string(io.read('*a'))
local obj = parser:get_object()
print(ucl.to_format(obj, 'json'))

Reviewed by: kevans, pstef
Approved by: mmacy (mentor)
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D25009


# 28d832f9 30-Mar-2020 Kyle Evans <kevans@FreeBSD.org>

flua: follow-up to r359453, don't bother with libedit in bootstrap

The bootstrap flua should not be used for REPL-like activities; exclude it
to save the dependency on libedit and not waste time with it.

X-MFC-With: r359453


# b4a19ee2 30-Mar-2020 Kyle Evans <kevans@FreeBSD.org>

flua: enable readline bits, courtesy of libedit

This is a nicer experience when attempting to run ad-hoc lua bits in the
flua REPL.

PR: 245121
MFC after: 1 week


# 564b9ff2 17-Mar-2020 Brooks Davis <brooks@FreeBSD.org>

Add an internal liblua and use it in flua.

The new liblua will be used in a forthcoming import of kyua.

Reviewed by: kevans
Obtained from: CheriBSD
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D24090


# 061f7e2f 18-Nov-2019 Kyle Evans <kevans@FreeBSD.org>

flua: newer GCC complains about format-nonliteral at WARNS=2

Disable that one, too.


# 506f3640 18-Nov-2019 Kyle Evans <kevans@FreeBSD.org>

Add flua to the base system, install to /usr/libexec

FreeBSDlua ("flua") is a FreeBSD-private lua, flavored with whatever
extensions we need for base system operations. We currently support a subset
of lfs and lposix that are used in the rewrite of makesyscall.sh into lua,
added in r354786.

flua is intentionally written such that one can install standard lua and
some set of lua modules from ports and achieve the same effect.

linit_flua is a copy of linit.c from contrib/lua with lfs and lposix added
in. This is similar to what we do in stand/. linit.c has been renamed to
make it clear that this has flua-specific bits.

luaconf has been slightly obfuscated to make extensions more difficult. Part
of the problem is that flua is already hard enough to use as a bootstrap
tool because it's not in PATH- attempting to do extension loading would
require a special bootstrap version of flua with paths changed to protect
the innocent.

src.lua.mk has been added to make it easy for in-tree stuff to find flua,
whether it's bootstrap-flua or relying on PATH frobbing by Makefile.inc1.

Reviewed by: brooks, emaste (both earlier version), imp
Differential Revision: https://reviews.freebsd.org/D21893