<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/libexec/flua, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>stand: lua: break out a few more dirent types in lfs</title>
<updated>2026-03-09T21:39:10+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2026-03-09T21:38:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=bc531a96c9b28b1cabcd5deb0c9f8f6d815cfebc'/>
<id>bc531a96c9b28b1cabcd5deb0c9f8f6d815cfebc</id>
<content type='text'>
These are non-standard and specific to the version used in loader.  We
have some desire to recognize symlinks to avoid filtering out kernel
symlinks in the autodetection bits when they would be perfectly fine to
`load`.

This won't be usable right away, so any impending use will need to be
careful to account for nil.

Reported by:	leres
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These are non-standard and specific to the version used in loader.  We
have some desire to recognize symlinks to avoid filtering out kernel
symlinks in the autodetection bits when they would be perfectly fine to
`load`.

This won't be usable right away, so any impending use will need to be
careful to account for nil.

Reported by:	leres
</pre>
</div>
</content>
</entry>
<entry>
<title>flua: Fix SIGSEGV in lua_chown when uid/gid doesn't exist</title>
<updated>2026-02-08T20:35:25+00:00</updated>
<author>
<name>Jesús Daniel Colmenares Oviedo</name>
<email>dtxdf@FreeBSD.org</email>
</author>
<published>2026-02-08T20:35:25+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=436af5715cdbea87de53d63fcc3762591d93b028'/>
<id>436af5715cdbea87de53d63fcc3762591d93b028</id>
<content type='text'>
When lua_chown is used to call chown(2) internally, it first resolves
the user and/or group by calling the getpwnam_r(3) and getgrnam_r(3)
functions, respectively. However, although it checks for errors, it does
not check when entries are not found (which is not an error), which
means that the buffer will be set to NULL, and since lua_chown attempts
to access the NULL structure, it will receive a SIGSEGV signal.

Reviewed by:			imp@
Approved by:			imp@
Differential Revision:		https://reviews.freebsd.org/D55172
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When lua_chown is used to call chown(2) internally, it first resolves
the user and/or group by calling the getpwnam_r(3) and getgrnam_r(3)
functions, respectively. However, although it checks for errors, it does
not check when entries are not found (which is not an error), which
means that the buffer will be set to NULL, and since lua_chown attempts
to access the NULL structure, it will receive a SIGSEGV signal.

Reviewed by:			imp@
Approved by:			imp@
Differential Revision:		https://reviews.freebsd.org/D55172
</pre>
</div>
</content>
</entry>
<entry>
<title>flua: lposix: fix WARNS=6 issues</title>
<updated>2026-01-28T15:43:14+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2026-01-28T15:37:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b41b6fdb3a1635de4c2a9280aab12b83e3aeffc5'/>
<id>b41b6fdb3a1635de4c2a9280aab12b83e3aeffc5</id>
<content type='text'>
lposix is the last holdout of modules built into flua until we can fix
the module design to have the right parts require()able.  Address a
valid bug in lua_read() found at a higher WARNS and drop the override
entirely.  Some of the modules could possibly be re-evaluated.

Fixes:	c2caf3b3313 ("flua: lposix: add more useful functions [...]")
Reported by:	des
Reviewed by:	des
Sponsored by:	Klara, Inc.
Sponsored by:	NetApp, Inc.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
lposix is the last holdout of modules built into flua until we can fix
the module design to have the right parts require()able.  Address a
valid bug in lua_read() found at a higher WARNS and drop the override
entirely.  Some of the modules could possibly be re-evaluated.

Fixes:	c2caf3b3313 ("flua: lposix: add more useful functions [...]")
Reported by:	des
Reviewed by:	des
Sponsored by:	Klara, Inc.
Sponsored by:	NetApp, Inc.
</pre>
</div>
</content>
</entry>
<entry>
<title>libexec/lua: Fix two typos in the manual pages</title>
<updated>2025-11-19T14:24:30+00:00</updated>
<author>
<name>Gordon Bergling</name>
<email>gbe@FreeBSD.org</email>
</author>
<published>2025-11-19T14:24:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=58b86e40ce76de649db19d9d1f8571d5c942d44b'/>
<id>58b86e40ce76de649db19d9d1f8571d5c942d44b</id>
<content type='text'>
- s/environnement/environment/
- s/interger/integer/

MFC after:	3 days
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- s/environnement/environment/
- s/interger/integer/

MFC after:	3 days
</pre>
</div>
</content>
</entry>
<entry>
<title>flua: Move to a new flua package</title>
<updated>2025-10-26T02:22:47+00:00</updated>
<author>
<name>Lexi Winter</name>
<email>ivy@FreeBSD.org</email>
</author>
<published>2025-10-25T17:21:37+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=957715f877b57a17545ead94d27ea8fd3ff4932a'/>
<id>957715f877b57a17545ead94d27ea8fd3ff4932a</id>
<content type='text'>
flua is a standalone third-party component that deserves its own
package.  In particular, this means things can use flua without
having to depend on FreeBSD-utilities, which will be useful as
more base utilities use flua.

This saves ~500kB in FreeBSD-utilities for systems which don't
need flua.

MFC after:	3 days
Reviewed by:	kevans
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D53161
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
flua is a standalone third-party component that deserves its own
package.  In particular, this means things can use flua without
having to depend on FreeBSD-utilities, which will be useful as
more base utilities use flua.

This saves ~500kB in FreeBSD-utilities for systems which don't
need flua.

MFC after:	3 days
Reviewed by:	kevans
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D53161
</pre>
</div>
</content>
</entry>
<entry>
<title>flua: unbreak the build</title>
<updated>2025-10-04T15:04:35+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2025-10-04T15:01:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d505ef08ffbe3b7383fbc6ed30121de9256ac18e'/>
<id>d505ef08ffbe3b7383fbc6ed30121de9256ac18e</id>
<content type='text'>
Local tree pollution let this escape.  *sigh*.

Pointy hat:	kevans
Pointy hat:	kevans
Pointy hat:	kevans
Fixes:	9c7db0931d486ce ("flua: move lposix back into flua for now")
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Local tree pollution let this escape.  *sigh*.

Pointy hat:	kevans
Pointy hat:	kevans
Pointy hat:	kevans
Fixes:	9c7db0931d486ce ("flua: move lposix back into flua for now")
</pre>
</div>
</content>
</entry>
<entry>
<title>flua: move lposix back into flua for now</title>
<updated>2025-10-04T13:57:59+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2025-10-04T13:57:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=9c7db0931d486ce800aa71d9f41abfad9f7f691f'/>
<id>9c7db0931d486ce800aa71d9f41abfad9f7f691f</id>
<content type='text'>
The real luaposix is structured differently, and our builtin version
tends to model that in its own special way.  Build it back in until we
get the shlib model just right to unbreak nuageinit, among other things.

This is a partial revert of the below-referenced commit; the other two
modules are simple, though, and were accurately split out.

Reported by:	markj
Fixes:	b11a5709ec2b6 ("flua: kick out the remaining builtin modules")
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The real luaposix is structured differently, and our builtin version
tends to model that in its own special way.  Build it back in until we
get the shlib model just right to unbreak nuageinit, among other things.

This is a partial revert of the below-referenced commit; the other two
modules are simple, though, and were accurately split out.

Reported by:	markj
Fixes:	b11a5709ec2b6 ("flua: kick out the remaining builtin modules")
</pre>
</div>
</content>
</entry>
<entry>
<title>flua: kick out the remaining builtin modules</title>
<updated>2025-10-04T02:16:51+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2025-10-04T02:16:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b11a5709ec2b61fefb03bfdd38e2f06d2c1107c1'/>
<id>b11a5709ec2b61fefb03bfdd38e2f06d2c1107c1</id>
<content type='text'>
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.

Reviewed by:	bapt, emaste
Differential Revision:	https://reviews.freebsd.org/D51891
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.

Reviewed by:	bapt, emaste
Differential Revision:	https://reviews.freebsd.org/D51891
</pre>
</div>
</content>
</entry>
<entry>
<title>flua: support our flua modules in the bootstrap flua</title>
<updated>2025-10-04T02:16:51+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2025-10-04T02:16:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=151bd3516b541823b16793460d73916e63d2b9c1'/>
<id>151bd3516b541823b16793460d73916e63d2b9c1</id>
<content type='text'>
This version builds every module into the flua binary itself, since all
of the bootstrap tools are built -DNO_SHARED.  As a result, we also
cannot dlsym(), so we can't really discover the names of our newly
builtin modules.  Instead, just build out a linker set with all of our
luaopen_*() functions to register everything up-front.

Building in all of the modules isn't strictly necessary, but it means
that we have an example of how to add a bootstrap module everywhere you
go and one doesn't need to consider whether bootstrap flua can use a
module when writing scripts.  On my build machine, the consequence on
our binary size is an increase from around 1.6M -&gt; 1.9M, which isn't
really that bad.

.lua modules can install into their usual path below $WORLDTMP/legacy
and we'll pick them up automagically by way of the ctor that sets up
LUA_PATH early on.

This re-lands bootstrap module support with a more sensible subset, and
after having verified that it cross-builds fine on macOS and Linux -- we
cannot do libfreebsd on !FreeBSD because it's more system header
dependant.  We also need to bootstrap libmd to bring in libhash, and
libucl + libyaml.

Reviewed by:	bapt, emaste (both previous version)
Differential Revision:	https://reviews.freebsd.org/D51890
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This version builds every module into the flua binary itself, since all
of the bootstrap tools are built -DNO_SHARED.  As a result, we also
cannot dlsym(), so we can't really discover the names of our newly
builtin modules.  Instead, just build out a linker set with all of our
luaopen_*() functions to register everything up-front.

Building in all of the modules isn't strictly necessary, but it means
that we have an example of how to add a bootstrap module everywhere you
go and one doesn't need to consider whether bootstrap flua can use a
module when writing scripts.  On my build machine, the consequence on
our binary size is an increase from around 1.6M -&gt; 1.9M, which isn't
really that bad.

.lua modules can install into their usual path below $WORLDTMP/legacy
and we'll pick them up automagically by way of the ctor that sets up
LUA_PATH early on.

This re-lands bootstrap module support with a more sensible subset, and
after having verified that it cross-builds fine on macOS and Linux -- we
cannot do libfreebsd on !FreeBSD because it's more system header
dependant.  We also need to bootstrap libmd to bring in libhash, and
libucl + libyaml.

Reviewed by:	bapt, emaste (both previous version)
Differential Revision:	https://reviews.freebsd.org/D51890
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "flua: support our flua modules in the bootstrap flua"</title>
<updated>2025-10-04T00:53:28+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2025-10-04T00:52:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=bbef1c72b4873b657fdb0466b48b15d1d4f0a731'/>
<id>bbef1c72b4873b657fdb0466b48b15d1d4f0a731</id>
<content type='text'>
This reverts commit 1953a12ee2cde1afacb3e3f7612d89695c96e04f, because it
cannot work at all on macOS without more work, at a minimum.  We use
linker sets for module discovery, but we don't have a version of this
that works for mach-o at the moment.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 1953a12ee2cde1afacb3e3f7612d89695c96e04f, because it
cannot work at all on macOS without more work, at a minimum.  We use
linker sets for module discovery, but we don't have a version of this
that works for mach-o at the moment.
</pre>
</div>
</content>
</entry>
</feed>
