packages: make UCL files required

Modify template.ucl to require that the "all" UCL file exists for every
package.  This prevents packages being added accidentally, and ensures
each package has as least a perfunctory comment and description.

Add missing UCL files for all existing packages.

Modify special packages created by Makefile.inc1 to pass the appropriate
parameters to generate-ucl to find their UCL files.

Reviewed by:	des, bapt
Approved by:	des (mentor)
Differential Revision:	https://reviews.freebsd.org/D50281
This commit is contained in:
Lexi Winter 2025-07-07 14:37:19 +01:00
parent 2912175172
commit f75b20e7dd
60 changed files with 291 additions and 27 deletions

View file

@ -2130,11 +2130,10 @@ create-source-src-package: _pkgbootstrap .PHONY
PKGNAME "src" \
PKGGENNAME "src" \
VERSION "${PKG_VERSION}" \
DESC "FreeBSD Kernel Sources" \
COMMENT "FreeBSD Userland Sources" \
PKG_NAME_PREFIX "${PKG_NAME_PREFIX}" \
PKG_MAINTAINER "${PKG_MAINTAINER}" \
PKG_WWW "${PKG_WWW}" \
UCLFILES "${SRCDIR}/release/packages/ucl" \
${SRCDIR}/release/packages/template.ucl \
${SSTAGEDIR}/src.ucl
${PKG_CMD} -o ABI=${PKG_ABI} \
@ -2155,13 +2154,12 @@ create-source-src-sys-package: _pkgbootstrap .PHONY
> ${SSTAGEDIR}/src-sys.plist
${SRCDIR}/release/packages/generate-ucl.lua \
PKGNAME "src-sys" \
PKGGENNAME "src" \
PKGGENNAME "src-sys" \
VERSION "${PKG_VERSION}" \
DESC "FreeBSD Kernel Sources" \
COMMENT "FreeBSD Kernel Sources" \
PKG_NAME_PREFIX "${PKG_NAME_PREFIX}" \
PKG_MAINTAINER "${PKG_MAINTAINER}" \
PKG_WWW "${PKG_WWW}" \
UCLFILES "${SRCDIR}/release/packages/ucl" \
${SRCDIR}/release/packages/template.ucl \
${SSTAGEDIR}/src-sys.ucl
${PKG_CMD} -o ABI=${PKG_ABI} \
@ -2226,12 +2224,12 @@ create-dtb-package:
@if [ -f ${KSTAGEDIR}/${DISTDIR}/dtb.plist ]; then \
${SRCDIR}/release/packages/generate-ucl.lua \
PKGNAME "dtb" \
PKGGENNAME "dtb" \
VERSION "${PKG_VERSION}" \
COMMENT "FreeBSD Devicetree Blobs" \
DESC "FreeBSD Devicetree Blobs" \
PKG_NAME_PREFIX "${PKG_NAME_PREFIX}" \
PKG_MAINTAINER "${PKG_MAINTAINER}" \
PKG_WWW "${PKG_WWW}" \
UCLFILES "${SRCDIR}/release/packages/ucl" \
${SRCDIR}/release/packages/template.ucl \
${KSTAGEDIR}/${DISTDIR}/dtb.ucl ; \
awk -F\" ' \
@ -2257,13 +2255,15 @@ create-kernel-packages-flavor${flavor:C,^""$,${_default_flavor},}: _pkgbootstrap
-v kernel=yes -v _kernconf=${INSTALLKERNEL} ; \
${SRCDIR}/release/packages/generate-ucl.lua \
PKGNAME "kernel-${INSTALLKERNEL:tl}${flavor}" \
PKGGENNAME "kernel" \
VERSION "${PKG_VERSION}" \
KERNELDIR "kernel" \
COMMENT "FreeBSD ${INSTALLKERNEL} kernel ${flavor}" \
DESC "FreeBSD ${INSTALLKERNEL} kernel ${flavor}" \
KERNEL_NAME "${INSTALLKERNEL}" \
KERNEL_FLAVOR "${flavor}" \
PKG_NAME_PREFIX "${PKG_NAME_PREFIX}" \
PKG_MAINTAINER "${PKG_MAINTAINER}" \
PKG_WWW "${PKG_WWW}" \
UCLFILES "${SRCDIR}/release/packages/ucl" \
${SRCDIR}/release/packages/template.ucl \
${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.ucl ; \
awk -F\" ' \
@ -2296,14 +2296,14 @@ create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}-${_kerne
PKGNAME "kernel-${_kernel:tl}${flavor}" \
PKGGENNAME "kernel" \
FORCEINCLUDE "kernel${flavor}" \
UCLFILES "${SRCDIR}/release/packages/" \
VERSION "${PKG_VERSION}" \
KERNEL_NAME "${_kernel:tl}" \
KERNEL_FLAVOR "${flavor}" \
KERNELDIR "kernel.${_kernel}" \
DESC "FreeBSD ${_kernel} kernel ${flavor}" \
COMMENT "FreeBSD ${_kernel} kernel ${flavor}" \
PKG_NAME_PREFIX "${PKG_NAME_PREFIX}" \
PKG_MAINTAINER "${PKG_MAINTAINER}" \
PKG_WWW "${PKG_WWW}" \
UCLFILES "${SRCDIR}/release/packages/ucl" \
${SRCDIR}/release/packages/template.ucl \
${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.ucl ; \
awk -F\" ' \

View file

@ -5,6 +5,10 @@
mancx=" (manual pages)"
mandx="This package contains the online manual pages."
lib32mancx=" (32-bit manual pages)"
lib32mandx="This package contains the online manual pages for 32-bit components
on a 64-bit host."
lib32cx=" (32-bit libraries)"
lib32dx="This package contains 32-bit libraries for running 32-bit applications on
a 64-bit host."
@ -113,6 +117,12 @@ main() {
desc_suffix="$dbg32dx"
pkgdeps="${outname}"
;;
*-man-lib32)
outname="${outname%%-man-lib32}"
comment_suffix="$lib32mancx"
desc_suffix="$lib32mandx"
pkgdeps="${outname}"
;;
*-lib32)
outname="${outname%%-lib32}"
comment_suffix="$lib32cx"

View file

@ -14,6 +14,6 @@ licenses = [ BSD2CLAUSE ]
desc = <<EOD
${PKGNAME} package
EOD
.include(try=true,duplicate=rewrite) "${UCLFILES}/${PKGGENNAME}-all.ucl"
.include(try=false,duplicate=rewrite) "${UCLFILES}/${PKGGENNAME}-all.ucl"
.include(try=true,duplicate=rewrite) "${UCLFILES}/${PKGNAME}.ucl"
.include(try=true,duplicate=rewrite) "${UCLFILES}/${FORCEINCLUDE}.ucl"

View file

@ -0,0 +1,5 @@
comment = "Concatenated disk driver (ccd) configuration utility"
desc = <<EOD
ccdconfig(8) is used to configure the concatenated disk driver, ccd(4).
ccdconfig(8) may also be started on boot using the "ccd" rc(8) service.
EOD

View file

@ -0,0 +1,4 @@
comment = "CAM Target Layer"
desc = <<EOD
The CAM Target Layer allows CAM to export storage targets, e.g. via iSCSI.
EOD

View file

@ -0,0 +1,4 @@
comment = "FreeBSD Devicetree Blobs"
desc = <<EOD
FreeBSD Devicetree Blobs
EOD

View file

@ -1,4 +0,0 @@
comment = "ElfToolchain programs and libraries"
desc = <<EOD
ElfToolchain programs and libraries
EOD

View file

@ -0,0 +1,4 @@
comment = "Floppy disk support"
desc = <<EOD
Utilities for formatting and managing floppy disks supported by fdc(4).
EOD

View file

@ -0,0 +1,4 @@
comment = "IP Filter (ipf) packet filter management tools"
desc = <<EOD
IP Filter (ipf) is a stateful packet filter for IPv4 and IPv6 networks.
EOD

View file

@ -0,0 +1,4 @@
comment = "ipfw (IP firewall) management utilities"
desc = <<EOD
ipfw provides stateful packet filtering, NAT and traffic shaping for IP traffic.
EOD

View file

@ -0,0 +1,6 @@
comment = "iSCSI target, initiator, and management tools"
desc = <<EOD
iSCSI allows a block device to be exported from one system to another over a
network. This package provides the iSCSI target and initiator and associated
management tools.
EOD

View file

@ -1,4 +1,4 @@
comment = "FreeBSD Kernel"
comment = "FreeBSD ${KERNEL_NAME} Kernel ${KERNEL_FLAVOR}"
desc = <<EOD
FreeBSD Kernel
FreeBSD ${KERNEL_NAME} Kernel ${KERNEL_FLAVOR}
EOD

View file

@ -0,0 +1,5 @@
comment = "9P network protocol library"
desc = <<EOD
lib9p implements the server side of the 9p2000, 9p2000.u and 9p2000.L revisions
of the 9P protocol
EOD

View file

@ -0,0 +1,4 @@
comment = "Archive handling library"
desc = <<EOD
libarchive allows applications to read and write archive files of various types.
EOD

View file

@ -0,0 +1,5 @@
comment = "rpoll(3) interface for event-driven I/O"
desc = <<EOD
libbegemot provides rpoll(3), a simplified interface for handling event-driven
I/O programming.
EOD

View file

@ -0,0 +1,4 @@
comment = "LLVM BlocksRuntime library"
desc = <<EOD
The LLVM libBlocksRuntime library.
EOD

View file

@ -0,0 +1,5 @@
comment = "Periodic statistics library"
desc = <<EOD
libbsdstat is a library for managing and display periodically collected
statistics.
EOD

View file

@ -0,0 +1,6 @@
comment = "Basic Security Module (BSM) audit library"
desc = <<EOD
The libbsm library routines provide an interface to BSM audit record streams,
allowing both the parsing of existing audit streams, as well as the creation of
new audit records and streams.
EOD

View file

@ -0,0 +1,5 @@
comment = "bzip2 compression library"
desc = <<EOD
libbz2 allows applications to compress and decompress data using the bzip2
compression algorithm.
EOD

View file

@ -0,0 +1,5 @@
comment = "Casper library"
desc = <<EOD
The libcasper library provides for the control of application capabilities
through the casper process.
EOD

View file

@ -0,0 +1,4 @@
comment = "Compatibility library"
desc = <<EOD
libcompat provides implementations of some obsolete library functions.
EOD

View file

@ -0,0 +1,4 @@
comment = "LLVM compiler_rt library"
desc = <<EOD
The libcompiler_rt library from LLVM.
EOD

View file

@ -0,0 +1,5 @@
comment = "Userland character device library"
desc = <<EOD
The libcuse library contains functions to create a character device in
userspace.
EOD

View file

@ -0,0 +1,6 @@
comment = "DWARF access library"
desc = <<EOD
The DWARF Access Library provides functions that allow an application to read
and write debugging information in object files. The format of debugging
information accessible through this API is defined by the DWARF standard.
EOD

View file

@ -0,0 +1,4 @@
comment = "Private libevent1 library"
desc = <<EOD
A private library used by applications in the base system.
EOD

View file

@ -0,0 +1,5 @@
comment = "NetBSD stack backtrace library"
desc = <<EOD
libexecinfo provides the backtrace(3) interface to allow an application to
examine its current call stack.
EOD

View file

@ -0,0 +1,6 @@
comment = "Intel(R) Processor Trace decoder library"
desc = <<EOD
The Intel Processor Trace (Intel PT) Decoder Library is Intel's reference
implementation for decoding Intel PT. It can be used as a standalone library
or it can be partially or fully integrated into your tool.
EOD

View file

@ -0,0 +1,6 @@
comment="NLnet Labs LDNS library"
desc = <<EOD
The goal of ldns is to simplify DNS programming in C. ldns supports all
low-level DNS and DNSSEC operations. It also defines a higher level API which
allows a programmer to for instance create or sign packets.
EOD

View file

@ -0,0 +1,5 @@
comment = "XZ LZMA library"
desc = <<EOD
liblzma allows applications to compress and decompress data using the XZ
compression algorithm.
EOD

View file

@ -0,0 +1,5 @@
comment = "Magic number recognition library"
desc = <<EOD
libmagic allows an application to identity data using the magic(5) magic number
database.
EOD

View file

@ -0,0 +1,5 @@
comment = "Library for handling relative and absolute pathnames"
desc = <<EOD
libpathconv provides the abs2rel() and rel2abs() functions to convert between
absolute and relative pathnames.
EOD

View file

@ -0,0 +1,5 @@
comment = "RPC GSS-API authentication library"
desc = <<EOD
librpcsec_gss provides an API to allow applications to interact with the
RPCSEC_GSS security mechanism.
EOD

View file

@ -0,0 +1,5 @@
comment = "Receive-side scaling library"
desc = <<EOD
The librss library and the functions it provides are used for both fetching the
system RSS configuration and interacting with RSS aware sockets.
EOD

View file

@ -0,0 +1,5 @@
comment = "Bluetooth Service Discovery Protocol library"
desc = <<EOD
libsdp allows applications to interact with the Bluetooth Service Discovery
Protocol.
EOD

View file

@ -0,0 +1,4 @@
comment = "Private SQLite library"
desc = <<EOD
A private version of SQLite for use by applications in the base system.
EOD

View file

@ -0,0 +1,6 @@
comment = "Preloaded library to change standard streams initial buffering"
desc = <<EOD
The libstdbuf library is meant to be preloaded with the LD_PRELOAD environment
variable to as to change the initial buffering of standard input, standard
output and standard error streams.
EOD

View file

@ -0,0 +1,4 @@
comment = "C11 threading library"
desc = <<EOD
libstdthreads provides the thread-control interface defined in the C99 standard.
EOD

View file

@ -0,0 +1,5 @@
comment = "Library for interacting with threaded processes"
desc = <<EOD
libthread_db is used by the debugger to examine and interact with a
multithreaded process being debugger.
EOD

View file

@ -0,0 +1,5 @@
comment = "Private Universal Configuration Library (UCL) library"
desc = <<EOD
A private library for reading and writing UCL files, for used by applications
in the base system.
EOD

View file

@ -0,0 +1,8 @@
comment = "Low-level access to UFS filesystems"
desc = <<EOD
The libufs library and the functions it provides are used for implementing
utilities which need to access a UFS file system at a low level from userland.
Facilities provided are used to implement utilities such as newfs(8) and
dumpfs(8). The libufs library is designed to be simple, and to provide
functions that are traditionally useful to have.
EOD

View file

@ -0,0 +1,13 @@
comment = "Video Graphics Library"
desc = <<EOD
libvgl is a library that enables the programmer access to the graphics modes
supported by the console driver (syscons). The library takes care of
programming the actual video hardware, and provides a number of simple
functions to do various graphic operations. There is also support for a mouse
via the standard mouse system in FreeBSD, including the ability to
transparently have a mouse pointer superimposed on the graphic image currently
being worked on. The library takes care of screen switching by storing the
current image in memory before switching to another virtual console, and
restoring when the user switches back. This allows several graphic
applications at once, but on different virtual consoles.
EOD

View file

@ -0,0 +1,4 @@
comment = "Front-end to vmm(4) virtualization driver"
desc = <<EOD
libvmmapi provides an interface for applications to access the vmm(4) driver.
EOD

View file

@ -0,0 +1,5 @@
comment = "YACC library"
desc = <<EOD
liby provides default implementations of main() and yyerror() for use with
applications which use yacc(1).
EOD

View file

@ -0,0 +1,5 @@
comment = "Private YAML library"
desc = <<EOD
The libprivateyaml library is used by the FreeBSD base system to parse YAML
files. This library is not intended for use outside of the base system.
EOD

View file

@ -0,0 +1,5 @@
comment = "ZFS filesystem library"
desc = <<EOD
libzfs allows applications to manage ZFS pools and filesystems. Several
libraries which libzfs requires are also provided.
EOD

View file

@ -1 +1,6 @@
comment = "ELF linker from the LLVM project"
desc = <<EOD
ld.lld is the ELF linker provided by LLVM.
EOD
licenses = [ NCSA ]

View file

@ -1 +1,6 @@
comment = "LLVM debugger"
desc = <<EOD
lldb is a source-level debugger from the LLVM project.
EOD
licenses = [ NCSA ]

View file

@ -0,0 +1,4 @@
comment = "Locale definitions"
desc = <<EOD
Provides the locale definitions (LC_*) for supported locales.
EOD

View file

@ -0,0 +1,4 @@
comment = "Network Address Translation (NAT) daemon for ipfw"
desc = <<EOD
natd provides userland NAT support for ipfw using divert(4) sockets.
EOD

View file

@ -0,0 +1,4 @@
comment = "OpenBSD packet filter"
desc = <<EOD
pf is an advanced stateful packet filter developed by the OpenBSD project.
EOD

View file

@ -0,0 +1,5 @@
comment = "Userland PPP implementation"
desc = <<EOD
ppp(8) is a userland implementations of the Point to Point Protocol for serial
lines and Ethernet (PPPoE).
EOD

View file

@ -0,0 +1,8 @@
comment = "Filesystem quota consistency checker"
desc = <<EOD
The quotacheck utility examines each file system, builds a table of current
disk usage, and compares this table against that recorded in the disk quota
file for the file system. If any inconsistencies are detected, both the quota
file and the current system copy of the incorrect quotas are updated (the
latter only occurs if an active file system is checked).
EOD

View file

@ -0,0 +1,5 @@
comment = "System userland source code"
desc = <<EOD
The source code used to rebuild the system, located in /usr/src.
This package includes everything except the kernel source code.
EOD

View file

@ -0,0 +1,5 @@
comment = "System kernel source code"
desc = <<EOD
The source code used to rebuild the system, located in /usr/src.
This package includes the kernel source code.
EOD

View file

@ -1,4 +0,0 @@
comment = "Syscons Console"
desc = <<EOD
Syscons Console
EOD

View file

@ -0,0 +1,4 @@
comment = "syscons(4) fonts and keymaps"
desc = <<EOD
Fonts and keymaps for use with the legacy syscons(4) video console driver.
EOD

View file

@ -0,0 +1,4 @@
comment = "Utilities for program development"
desc = <<EOD
Utilities for program development.
EOD

View file

@ -1,4 +0,0 @@
comment = "VT fonts and keyboard files"
desc = <<EOD
VT fonts and keyboard files
EOD

View file

@ -0,0 +1,4 @@
comment = "vt(4) fonts and keymaps"
desc = <<EOD
Fonts and keymaps for use with the vt(4) video console driver.
EOD

View file

@ -0,0 +1,5 @@
comment = "Timezone database"
desc = <<EOD
The timezone database allows applications to convert dates and times between
UTC and local timezones.
EOD