git: ac849c0a1e5d - releng/15.0 - flua: Move to a new flua package

From: Colin Percival <cperciva_at_FreeBSD.org>
Date: Thu, 30 Oct 2025 16:15:34 UTC
The branch releng/15.0 has been updated by cperciva:

URL: https://cgit.FreeBSD.org/src/commit/?id=ac849c0a1e5d5dadf4e168029e2dfb58d788f91e

commit ac849c0a1e5d5dadf4e168029e2dfb58d788f91e
Author:     Lexi Winter <ivy@FreeBSD.org>
AuthorDate: 2025-10-25 17:21:37 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2025-10-30 16:15:09 +0000

    flua: Move to a new flua package
    
    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.
    
    Approved by:    re (cperciva)
    MFC after:      3 days
    Reviewed by:    kevans
    Sponsored by:   https://www.patreon.com/bsdivy
    Differential Revision:  https://reviews.freebsd.org/D53161
    
    (cherry picked from commit 957715f877b57a17545ead94d27ea8fd3ff4932a)
    (cherry picked from commit e4ef33391705db53568b69f44a54a6f2b86fb5ed)
---
 UPDATING                               |  6 ++++++
 libexec/flua/Makefile                  |  2 ++
 libexec/flua/Makefile.inc              |  2 ++
 release/packages/ucl/bsdinstall.ucl    |  5 +++++
 release/packages/ucl/flua-all.ucl      | 32 ++++++++++++++++++++++++++++++++
 release/packages/ucl/nuageinit-all.ucl |  7 +++++++
 release/packages/ucl/tests.ucl         | 27 +++++++++++++++++++++++++++
 7 files changed, 81 insertions(+)

diff --git a/UPDATING b/UPDATING
index 67bcbe9d5cd9..0d6ccdf8ea56 100644
--- a/UPDATING
+++ b/UPDATING
@@ -12,6 +12,12 @@ Items affecting the ports and packages system can be found in
 /usr/ports/UPDATING.  Please read that file before updating system packages
 and/or ports.
 
+20251030:
+	flua(1) has moved to the new FreeBSD-flua package.  If you use flua,
+	you may want to install this package if it's not otherwise installed
+	as a dependency of something else.  This change only affects pkgbase
+	users.
+
 20251023:
 	Bump __FreeBSD_version to 1500068 for LinuxKPI.  An embedded struct
 	has changed size and might possibly be an issue otherwise.
diff --git a/libexec/flua/Makefile b/libexec/flua/Makefile
index 86d27c0653d4..0b870817331c 100644
--- a/libexec/flua/Makefile
+++ b/libexec/flua/Makefile
@@ -1,5 +1,7 @@
 .include <src.lua.mk>
 
+PACKAGE=	flua
+
 SUBDIR+=	libfreebsd
 SUBDIR+=	libhash
 SUBDIR+=	libjail
diff --git a/libexec/flua/Makefile.inc b/libexec/flua/Makefile.inc
index 34505d54d7df..0ccb1a62f4cb 100644
--- a/libexec/flua/Makefile.inc
+++ b/libexec/flua/Makefile.inc
@@ -1,3 +1,5 @@
+PACKAGE=	flua
+
 SHLIBDIR?=	${LIBDIR}/flua
 
 CFLAGS+=	\
diff --git a/release/packages/ucl/bsdinstall.ucl b/release/packages/ucl/bsdinstall.ucl
index 7fe8898b9427..96ff220bfb54 100644
--- a/release/packages/ucl/bsdinstall.ucl
+++ b/release/packages/ucl/bsdinstall.ucl
@@ -21,4 +21,9 @@ deps {
 	"runtime" {
 		version = "${VERSION}"
 	},
+
+	# the pkgbase script requires flua
+	"flua" {
+		version = "${VERSION}"
+	},
 }
diff --git a/release/packages/ucl/flua-all.ucl b/release/packages/ucl/flua-all.ucl
new file mode 100644
index 000000000000..7488e2e36839
--- /dev/null
+++ b/release/packages/ucl/flua-all.ucl
@@ -0,0 +1,32 @@
+/*
+ * SPDX-License-Identifier: ISC
+ *
+ * Copyright (c) 2025 Lexi Winter <ivy@FreeBSD.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+comment = "Private Lua implementation"
+
+desc = <<EOD
+flua(1) is an implementation of Lua for use by the base system.  This facility
+is not intended for general use, and may be modified or removed at any time
+without notice.
+
+Supported versions of Lua for general use are available in the FreeBSD Ports
+Collection.
+EOD
+
+annotations {
+	set = "optional,optional-jail"
+}
diff --git a/release/packages/ucl/nuageinit-all.ucl b/release/packages/ucl/nuageinit-all.ucl
index c9913f8cfb88..8c7a0754040c 100644
--- a/release/packages/ucl/nuageinit-all.ucl
+++ b/release/packages/ucl/nuageinit-all.ucl
@@ -27,6 +27,13 @@ loaded from a local disk or CD-ROM.
 nuageinit implements the cloud-init (https://cloud-init.io/) specification.
 EOD
 
+deps {
+	# nuageinit is written in Lua
+	"flua" {
+		version = "${VERSION}"
+	},
+}
+
 annotations {
 	set = minimal
 }
diff --git a/release/packages/ucl/tests.ucl b/release/packages/ucl/tests.ucl
new file mode 100644
index 000000000000..bac72f1534d3
--- /dev/null
+++ b/release/packages/ucl/tests.ucl
@@ -0,0 +1,27 @@
+/*
+ * SPDX-License-Identifier: ISC
+ *
+ * Copyright (c) 2025 Lexi Winter <ivy@FreeBSD.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+
+deps {
+	# Quite a few tests require flua.
+	"flua" {
+		version = "${VERSION}"
+	},
+}
+
+