Page MenuHomeFreeBSD

flua: support "require" in the base system
ClosedPublic

Authored by emaste on Apr 28 2020, 5:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 1, 8:49 PM
Unknown Object (File)
Sep 30 2024, 3:22 PM
Unknown Object (File)
Sep 30 2024, 4:42 AM
Unknown Object (File)
Sep 28 2024, 3:33 PM
Unknown Object (File)
Sep 18 2024, 9:44 AM
Unknown Object (File)
Aug 17 2024, 4:49 AM
Unknown Object (File)
Aug 14 2024, 10:30 AM
Unknown Object (File)
Aug 13 2024, 5:45 AM
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.