git: 45d83c39262d - main - pkgbase: add a mechanism to be able to force a give ucl include

From: Baptiste Daroussin <bapt_at_FreeBSD.org>
Date: Wed, 20 Mar 2024 08:53:49 UTC
The branch main has been updated by bapt:

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

commit 45d83c39262d9e2727c6f409e19c653f19a5d7cc
Author:     Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2024-03-20 08:35:47 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2024-03-20 08:39:18 +0000

    pkgbase: add a mechanism to be able to force a give ucl include
    
    This is made in order to be able to find add the post-install scripts
    for the kernel, where PKGNAME varies for each KERNCONF but we don't want
    to dynamically duplicated the kernel.ucl file.
    
    At the same time we don't want the *-dbg* packages to actually include
    those post-install scripts
---
 Makefile.inc1                 | 2 ++
 release/packages/template.ucl | 1 +
 2 files changed, 3 insertions(+)

diff --git a/Makefile.inc1 b/Makefile.inc1
index 0c9213ea5104..2ed76aa68c65 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -2258,6 +2258,8 @@ create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}-${_kerne
 	${SRCDIR}/release/packages/generate-ucl.lua \
 		PKGNAME "kernel-${_kernel:tl}${flavor}" \
 		PKGGENNAME "kernel" \
+		FORCEINCLUDE "kernel${flavor}" \
+		UCLFILES "${SRCDIR}/release/packages/" \
 		VERSION "${PKG_VERSION}" \
 		KERNELDIR "kernel.${_kernel}" \
 		DESC "FreeBSD ${_kernel} kernel ${flavor}" \
diff --git a/release/packages/template.ucl b/release/packages/template.ucl
index 2e325e623336..a65f58868118 100644
--- a/release/packages/template.ucl
+++ b/release/packages/template.ucl
@@ -16,3 +16,4 @@ ${DESC}
 EOD
 .include(try=true,duplicate=rewrite) "${UCLFILES}/${PKGGENNAME}-all.ucl"
 .include(try=true,duplicate=rewrite) "${UCLFILES}/${PKGNAME}.ucl"
+.include(try=true,duplicate=rewrite) "${UCLFILES}/${FORCEINCLUDE}.ucl"