Page MenuHomeFreeBSD

flua: support "require" in the base system
ClosedPublic

Authored by emaste on Apr 28 2020, 5:29 PM.
Tags
None
Referenced Files
F81625467: D24605.diff
Fri, Apr 19, 4:32 AM
Unknown Object (File)
Thu, Apr 11, 6:48 PM
Unknown Object (File)
Fri, Mar 22, 9:07 PM
Unknown Object (File)
Fri, Mar 22, 8:58 PM
Unknown Object (File)
Fri, Mar 22, 8:52 PM
Unknown Object (File)
Mar 20 2024, 12:56 AM
Unknown Object (File)
Mar 8 2024, 8:32 AM
Unknown Object (File)
Mar 7 2024, 11:57 PM
Subscribers

Details

Summary

Use /usr not /usr/local for base system components. Use /usr/lib/flua and /usr/share/flua (not lua) for consistency and to avoid other software accidentally finding our modules.

Also drop the version from the path, as flua represents an unspecified lua version that corresponds to the FreeBSD version it comes with.

Enable dlopen.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

emaste created this revision.

Posted initially for discussion, not a final committable change.

That said we could start using .lua modules in /usr/share/flua.

lib/liblua/luaconf.h
78

This does not yet work (without changes to add some flua symbols to dynamic sym list).

lib/liblua/luaconf.h
211

Yup, this is exactly what I had in mind -- we might consider only defining LUA_ROOT if it's not defined, so we have the possibility of defining it to somewhere /nonexistent (or somewhere valid) in the BOOTSTRAPPING build to make sure the bootstrap flua can't pick up host modules that may not match the flua being built.

emaste added inline comments.
lib/liblua/luaconf.h
211

What's your opinion on dropping the version?

lib/liblua/luaconf.h
211

Dropping the version does seem like a good idea... nothing should need to know/care as stuff installed here should be pretty tightly coupled to flua in some way, and it does reinforce the (lack of) stability guarantees, I think.

This revision was not accepted when it landed; it landed in state Needs Review.Aug 13 2020, 12:19 AM
This revision was automatically updated to reflect the committed changes.