Page MenuHomeFreeBSD

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

Authored by kevans on Oct 4 2019, 2:04 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 6, 10:33 PM
Unknown Object (File)
Sun, Dec 1, 6:59 PM
Unknown Object (File)
Sun, Dec 1, 5:54 PM
Unknown Object (File)
Nov 22 2024, 12:07 PM
Unknown Object (File)
Nov 17 2024, 1:29 PM
Unknown Object (File)
Nov 10 2024, 9:17 PM
Unknown Object (File)
Nov 10 2024, 1:47 PM
Unknown Object (File)
Nov 9 2024, 6:50 AM
Subscribers

Details

Summary

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 will be used in a rewrite of makesyscall.sh into lua.

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.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 27621

Event Timeline

This revision is now accepted and ready to land.Nov 14 2019, 7:16 PM

I don't like the lfs.h sharing detail, but it's fine enough we can work out after commit.

Instead of hacking around difficulty in including lfs.h from libexec/flua due to conflicting luaconf.h, -include it in via CFLAGS and remove the prototype entirely from interp_lua.c

This revision now requires review to proceed.Nov 16 2019, 3:18 AM

If you moved lfs.[ch] to libexec/flua/modules, then a simple -I addition to CFLAGS and a .PATH would get the job done.

Split out lfs/lposix to libexec/flua/modules

libexec/flua/modules/lfs.c
57

stray blank line..

346

I'd be tempted to break the line between S_IXGRP and S_IROTH

libexec/flua/modules/lposix.c
4

consider not including this phrase.

kevans marked 3 inline comments as done.

Address further review comments from @imp

This revision is now accepted and ready to land.Nov 18 2019, 8:42 PM