Commit graph

8316 commits

Author SHA1 Message Date
Andrew Turner
1c52229528 lib: Move libopencsd to /usr/lib and make private
libopencsd is used to decode Arm CoreSight traces. It isn't needed
during the boot so can be moved to /usr/lib, and may change it's API
so can be marked as private as onlt the future hwt tool will use it.

Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D51380
2025-07-30 11:11:38 +01:00
Colin Percival
0a3792d5c5 release: No newaliases when cross-building VMs
We've been running newaliases(8) when cross-building VMs for a long
time, and it's not entirely clear why -- especially since we don't
do it when we're building a native VM image.

If someone knows why running newaliases is important we can add it
back later, but only after newaliases gets unbroken: As of last week
(a3d4ae7cf3) newaliases fails with EPERM on /etc/dma/dma.conf.

This should unbreak VM (and cloudware) cross-builds.

With hat:	re@
2025-07-31 10:47:36 -07:00
Isaac Freund
6fa24b29d8 release, bsdinstall: include FreeBSD-kernel-man package
This package has been newly split off during man page reorganization and
should be considered part of the "base" component rather than being
ignored. Update pkgbase release and bsdinstall scripts for this change.

Reviewed by:	ivy
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51519
2025-07-30 18:57:17 -04:00
Lexi Winter
14f57afb85 bmake: Add a package for bmake and share/mk
bmake along with /usr/share/mk seems to meet the criteria for being in
its own package: it's self-contained and the majority of users (who are
using binary packages) don't need to install it, so it doesn't belong in
FreeBSD-utilities.  Instead, put it in its own package.

Add a dependency on the new package from:

- sendmail (uses make to build its configuration)
- NIS (uses make to build the database).

But not from examples, because while some of the examples do require
make, they are intended as examples rather than something to be used
directly.

Reviewed by:	manu, sjg
Differential Revision:	https://reviews.freebsd.org/D50149
2025-07-28 10:17:36 +01:00
Lexi Winter
76446b5aa3 gssd: move to a new package
It's reasonable to want to install gssd without the Kerberos utilities
(e.g., if using security/krb5 from ports), so move gssd to its own
package to allow this.

Reviewed by:	manu, cy
Differential Revision:	https://reviews.freebsd.org/D51486
2025-07-25 18:31:27 +01:00
Lexi Winter
caddfcd546 share/man: Move many manpages to more correct packages
At the moment, all the manpages in share/man are in the utilities-man
package.  Move some of them to the package they should actually be in,
using the new MANGROUPS feature.

Move all of section 3 to clibs-man.  Although some of these are from
/usr/include/sys rather than libc, you can't practically use them
without libc, and clibs-man is where the libc manpages live already.

Move all of sections 4 and 9 to a new kernel-man package, except for
atf-test-case.4 which goes to tests-man.  atf-test-case.4 is in the
wrong section, but this needs to be fixed upstream.

kernel-man requires special handling in generate-ucl.lua since it's
got a -man suffix but doesn't want the ' (manual pages)' automatic
suffix.  For now, fix this by adding a list of packages that don't
get automatic suffixes.

Reviewed by:	ifreund_freebsdfoundation.org, manu, emaste
Differential Revision:	https://reviews.freebsd.org/D51504
2025-07-25 18:31:26 +01:00
Lexi Winter
4cb1baa7d8 krb5: use 'kerberos' as package name
Rename krb5 and krb5-lib to kerberos and kerberos-lib to match the
existing Heimdal package names.  Since it's not possible to build or
install both at the same time, and Heimdal will be removed anyway,
there's no benefit to using a different package name for MIT Kerberos
and doing so will create friction for pkgbase users.

Move a few things (e.g., headers) from kerberos to kerberos-lib.

Move the KDC to a new package, kerberos-kdc, so the client utilities
can be installed without the KDC.  As most systems won't have the KDC
running, this saves a bit of disk space for jails/containers.

Remove a few instances of 'PACKAGE=' in target-specific Makefiles
where we can set that in the parent's Makefile.inc instead.

Revert 01c587521d ("OCI: Attempt to fix "runtime" container")
which is no longer required.

The KDC init script is still installed in the 'rc' package for
compatibility with the security/krb5 port; we should fix this
at some point, possibly after Heimdal is removed.

Reviewed by:	manu, kevans, des
Approved by:	des (mentor), kevans (mentor)
Differential Revision:	https://reviews.freebsd.org/D51420
2025-07-24 11:35:35 +01:00
Colin Percival
01c587521d OCI: Attempt to fix "runtime" container
Chase the kerberos -> krb5 change in pkgbase packages.

We don't currently have any way of making this conditional on the
WITH_MITKRB5 variable, so we're going based on the default value.
On the other hand, that's also true of other WITH_* variables too.

This change might get backed out shortly; discussions are underway
about whether MIT Kerberos 5 should be "krb5" or simply "kerberos".

With hat:	re (unbreaking weekly snapshot builds)
Co-authored-by:	dch
Differential Revision:	https://reviews.freebsd.org/D51481
2025-07-24 00:49:48 -07:00
Dag-Erling Smørgrav
5fe15d7cf3 release: Don't install caroot in OCI images.
Instead, use certctl to install certificates directly from the source
tree into the image.

Reviewed by:	dfr
Differential Revision:	https://reviews.freebsd.org/D51404
2025-07-22 21:07:07 +02:00
Wolfram Schneider
479b9db526 release: make symlink creation for src.tgz more robust
PR: 288256
Approved by:	emaste
Differential Revision:	https://reviews.freebsd.org/D51335
2025-07-22 05:22:39 +00:00
Doug Rabson
2e2903faa6 release: Generalise the OCI image build's pkg config
Allow building OCI images if the source tree is not /usr/src. This also
removes the copy of /etc/pkg/FreeBSD.conf which is not needed for the
OCI image build.

MFC after:	3 days
2025-07-21 13:43:21 +01:00
Cy Schubert
5df4eb5fd7 krb5: Add pkgbase templates
Repored by:	fluffy
2025-07-20 21:37:38 -07:00
Joseph Mingrone
655fcdde1a
release: Install wireless firmware to bootonly media
Also install wireless firmware packages to the bootonly ISO and the
mini-memstick image so users can fetch installation files over a
wireless connection.

Reported by:	Mark Philips <mark@freebsdfoundation.org>
Reviewed by:	bz, emaste, imp, releng (cperciva)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D51348
2025-07-18 13:27:32 -03:00
Dag-Erling Smørgrav
c19877b03f release: Let caroot depend on certctl, not vice versa.
This makes it possible to remove the caroot package and still have the
tool needed to install its replacement (e.g. security/ca_root_nss).

Reviewed by:	ivy
Differential Revision:	https://reviews.freebsd.org/D42095
2025-07-17 20:13:56 +02:00
Lexi Winter
b2e9c8e69b packages: add package ucl for libopencsd-all
This package is installed on arm64 (only) and was missing an entry in
Makefile.package so it was missed in the mechanical conversion run.

This fixes the arm64 package build.

Fixes:		f75b20e7dd ("packages: make UCL files required")
Reported by:	dch, cperciva
Reviewed by:	kevans
Approved by:	kevans (mentor)
Differential Revision:	https://reviews.freebsd.org/D51374
2025-07-17 18:49:44 +01:00
Bojan Novković
483ef23ebb release: Consistently use variables for invoking certain tools
This change cleans up the inconsistent ways of invoking makefs and mkimg
by making sure that these tools are invoked through their corresponding
variables. This was previously only used in a few amd64 and arm64 release
scripts.

Sponsored by:   Klara, Inc.
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51039
Reviewed by:	emaste, markj
2025-07-16 17:04:03 +02:00
Bojan Novković
ceab09e3db release: Add a helper script for common tools
Add a helper script that populates variables used to invoke several tools.
This is also the first step towards cleaning up several inconsistencies
related to tool invocation in various release scripts (e.g. ${MAKEFS} vs makefs).

Sponsored by: Klara, Inc.
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51038
Reviewed by:	emaste, des
2025-07-16 17:03:49 +02:00
Ed Maste
e48d5d23bb release: Sort loader.conf lines consistently
loader_brand was in a different spot in the dvd image compared to the
others.

Reviewed by:	jrm
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51342
2025-07-16 09:36:16 -04:00
Lexi Winter
953b3a0614 release/packages/generate-ucl.sh: use correct exit status
Propagate the exit status from generate-ucl.lua, so that if parsing
the UCL fails, the package generation step also fails.

Approved by:	kevans (mentor)
Review by:	kevans
Differential Revision:	https://reviews.freebsd.org/D51190
2025-07-15 06:12:45 +01:00
Lexi Winter
237db83d02 packages: handle suffixes in generate-ucl.lua
Move handling of comment/desc suffixes from generate-ucl.sh to
generate-ucl.lua.

Reviewed by:	des, bapt
Approved by:	des (mentor)
Differential Revision:	https://reviews.freebsd.org/D50284
2025-07-15 06:12:44 +01:00
Lexi Winter
d9c11f0799 packages: handle dependencies in ucl
For packages with specific dependencies, add the dependencies in their
UCL files instead of listing them in generate-ucl.sh.

generate-ucl.sh has logic to add automatic subpackage dependencies, so
e.g. "FreeBSD-foo-dev" depends on "FreeBSD-foo".  Move this into
generate-ucl.lua instead.

This means we no longer need to pre-process the UCL in generate-ucl.sh,
and we can undo the hack where it calls generate-ucl.lua with the same
filename as both input and output file.

Reviewed by:	des, bapt
Approved by:	des (mentor)
Differential Revision:	https://reviews.freebsd.org/D50283
2025-07-15 06:12:44 +01:00
Lexi Winter
f75b20e7dd 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
2025-07-15 06:12:44 +01:00
Lexi Winter
2912175172 packages: create UCL files for package descriptions
Mechanically convert Makefile.package into individual UCL files for each
package and delete it.

Move handling of the 'comment' and 'desc' fields from generate-ucl.sh to
template.ucl; this provides the default values for some packages which
don't have a UCL file yet.

Reviewed by:	des, bapt, emaste
Approved by:	des (mentor)
Differential Revision:	https://reviews.freebsd.org/D50280
2025-07-15 06:12:44 +01:00
Lexi Winter
e64ad23241 packages: move ucl files to a subdirectory
We want to have a UCL file for every package, to set fields like
comment, desc, license, etc.; to avoid cluttering release/packages with
~200 new files, move these to the ucl/ directory.

Add a better description for the yp package to demonstrate how this will
work in practice.

Clean up the handling of the package comment suffix for generated
packages (dev, lib32, etc.) and do the UCL modifications in
generate-ucl.lua, so we don't overwrite the ucl's comment.

Add a long-form suffix to the description for generated packages to
explain what they do.

Eventually, we should require the ucl file exists (try=false) to prevent
people accidentally creating new packages with a typo, but for now, keep
the ucl optional.

Reviewed by:	kevans, des, bapt, emaste
Approved by:	kevans (mentor), des (mentor)
Differential Revision:	https://reviews.freebsd.org/D50160
2025-07-15 06:12:44 +01:00
Krzysztof Galazka
b9e3e8491f release: Fix dvdrom building dependency
While building legacy dist sets incorrect target 'dvd1' was used
to set dependency on packagesystem. Because of that generated archives
were incomplete and MANIFEST file was missing.

Signed-off-by: Krzysztof Galazka <kgalazka@FreeBSD.org>

Fixes:	 3f494a4e5c (release: Add NODISTSETS to skip legacy dist sets)
Reviewed by:	emaste
Approved by:	kbowling (mentor), erj (mentor)
Sponsored by:   Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D51062
2025-06-26 21:53:48 +02:00
Mark Johnston
df84bd484c release: Sort keys in generate-ucl.lua
When writing out the UCL file containing a package's metadata, metadata
values consisting of key-value pairs were not sorted.  For instance, in
the certctl package we could have either

"deps": {
	"FreeBSD-openssl": {
		...
	},
	"FreeBSD-caroot": {
		...
	},
}

or

"deps": {
	"FreeBSD-caroot": {
		...
	},
	"FreeBSD-openssl": {
		...
	},
}

This breaks reproducibility.

Use the undocumented third parameter to libucl's to_format() to request
recursive sorting of keys.

Reviewed by:	manu, bapt
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D51021
2025-06-25 13:46:31 +00:00
Joseph Mingrone
ac7a19d41e
lualoader: Add distinct brand for installer
Make it obvious to users that the system is booting into the installer.

Reviewed by:	kevans, manu
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D51001
2025-06-24 12:11:15 -03:00
Ed Maste
3f494a4e5c release: Add NODISTSETS to skip legacy dist sets
`make -DPKGBASE -DNODISTSETS` can now be used to build an installer
without any support for dist sets.

Reviewed by:	Isaac Freund <ifreund@freebsdfoundation.org>
Event:		Kitchener-Waterloo Hackathon 202506
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50919
2025-06-23 10:44:14 -04:00
Colin Percival
be7272d78a release: Don't fail if we can't hardlink a VM img
For compatibility with code written before we added ZFS images, we
create compatibility hardlinks from non-FS-labelled image filenames
to the ${VMFS} (typically UFS) images.  This fails if the image
didn't build, and can take down the entire release build if we're
not careful.

Fixes:	611c1457ff ("release: Add set -e to abort upon failure")
2025-06-20 11:22:34 -07:00
Colin Percival
609720ed97 release: Don't fail if one VM image fails
Replace "mk-vmimage.sh" with "mk-vmimage.sh || true" so that a single
VM image failing doesn't result in the entire release build dying.

Fixes:	611c1457ff ("release: Add set -e to abort upon failure")
2025-06-19 23:30:30 -07:00
Colin Percival
e094f9015b release/GCE: Remember whether we mounted /dev
Don't unmount /dev inside the image if we didn't mount it.  We might
end up unmounting a /dev which is still needed.

Fixes:	611c1457ff ("release: Add set -e to abort upon failure")
2025-06-19 11:15:10 -07:00
Ed Maste
76279bb21d release: Remove extra blank comment lines 2025-06-17 14:26:42 -04:00
Ed Maste
611c1457ff release: Add set -e to abort upon failure
We don't want to blindly continue and produce broken VM images if
something goes wrong.

Reviewed by:	cperciva
Event:		Kitchener-Waterloo Hackathon 202506
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50711
2025-06-17 13:40:33 -04:00
Ed Maste
b8ae4def0f release: Refactor dist set logic
Add to the METALOG immediately following the operation itself to make
the logic easier to follow.  Fuse adjacent identical loops.  Both of
these are now possible as we no longer have separate paths for NO_ROOT
builds.

Move MANIFEST out of the loops for disc1 and dvd1 and copy it
explicitly, so that all three MANIFEST operations are identical, and
shared by pkgbase and legacy code paths for disc1 and dvd1.

Reviewed by:	jrm
Event:		Kitchener-Waterloo Hackathon 202506
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50383
2025-06-17 13:15:52 -04:00
Lexi Winter
6b2993e74e packages: fix ownership of /tmp and /dev
release/packages/runtime.ucl manually adds "/tmp" and "/dev" to the
"directories" key, which causes them to be included in the manifest
with the user/group owner of whoever built the package repository:

drwxr-xr-x   7 ivy wheel 512 Jun  1 17:24 /dev
drwxrwxrwt  10 ivy wheel  10 Jun  1 17:42 /tmp

Remove the manual entries and instead put an explicit package tag
in etc/mtree/BSD.root.dist.  This also means /tmp gets the right
mode by default and we can remove the chmod from the post-install
script.

Reviewed by:	manu, kevans, emaste
Approved by:	kevans (mentor)
Differential Revision:	https://reviews.freebsd.org/D50636
2025-06-04 06:38:48 +01:00
Ed Maste
ac4c4c2739 release: Remove stray review reference
release/Makefile.oracle had a stray reference to the Phabricator review
in a comment.
2025-06-03 08:03:16 -04:00
Lexi Winter
f947f58ce6 packages: rename elftoolchain to toolchain, add more things
Rename the existing "elftoolchain" package to "toolchain", and move
everything which is gated by MK_TOOLCHAIN (e.g. lex, yacc, ...) to the
toolchain package.

This means we have one package called "toolchain" which contains all the
development-related utilities which are not compilers or already part of
some other package (e.g., llvm).

Reviewed by:	des, emaste
Approved by:	des (mentor)
Differential Revision:	https://reviews.freebsd.org/D50286
2025-05-28 02:16:30 +01:00
Ed Maste
a49621c1d0 release: Move -DNO_ROOT and -DDB_FROM_SRC into ${IMAKE}
All invocations specified -DNO_ROOT, so simplify by moving -DNO_ROOT
directly into ${IMAKE}.

Do the same for -DDB_FROM_SRC.  Although it was not previously passed
for all targets it is appropriate for all release artifact builds.

Reviewed by:	brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50356
2025-05-27 15:54:07 -04:00
Ed Maste
79537a90dc release: Add some comments and tidy dist set targets
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50458
2025-05-26 13:43:28 -04:00
Ed Maste
a28f7eb863 release: Avoid pipe in tarball creation
Previously errors from invoking tar for src.txz or ports.txz were eaten
by the pipeline.  If something fails in creating these tarballs we want
the build to fail rather than producing subtly broken artifacts.  Use
${TAR_XZ_CMD} to add -J to tar's commandline rather than | xz.

Reviewed by:	bz
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50459
2025-05-24 21:00:41 -04:00
Ed Maste
366a9fb9e7 release: Add ${PKGBASE_REPO} dependency for dvd
A user may build only dvd1.iso, which would fail if the pkgbase-repo
did not already exist.  Builds using `make release` build disc1 before
dvd1 so that case would work, but it must be possible to build only
one artifact.

Fixes: 62d18f8c4c ("release: Add -DPKGBASE option to include pkgbase packages")
Sponsored by:	The FreeBSD Foundation
2025-05-21 08:48:50 -04:00
Isaac Freund
62d18f8c4c release: Add -DPKGBASE option to include pkgbase packages
If this option is set, an offline repo of pkgbase packages corresponding
to base.txz and kernel.txz will be included in the disc1 release media
rather than the base.txz and kernel.txz tarballs.

Reviewed by:	bapt
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50346
2025-05-20 16:30:12 -04:00
Lexi Winter
e7bcd658eb packages: move floppy utilities into a new package
Very few people use floppy disks nowadays.  Move the fd utilities into a
new package.

Reviewed by:	imp, des
Approved by:	des (mentor)
Differential Revision:	https://reviews.freebsd.org/D50291
2025-05-15 01:02:52 +01:00
Colin Percival
9a685c09f0 EC2: Remove old broken_txfifo workaround
Early versions of Xen, including those used in the early days of EC2,
had a bug in their UART emulation whereby the TX FIFO wouldn't send the
expected interrupt when emptying; as a result, FreeBSD would write 16
characters to the serial console and then stop because we thought the
FIFO was forever full.

In 2013 (1c60b24baa) I added a loader tunable "hw.broken_txfifo"
which spinwaits for the FIFO TX rather than relying on the interrupt,
and enabled this in loader.conf in EC2 images.

A decade later, this workaround is almost certainly no longer needed in
EC2 -- most instances don't run Xen, and the bug was long since fixed
in Xen anyway -- but we've been holding on to the workaround "just in
case".  Unfortunately, the spinwait behaviour is causing latency spikes
and triggering warnings from the ena(4) driver.

This commit removes the hw.broken_txfifo setting from loader.conf in
EC2 images, but leaves the loader tunable and associated code, since it
has been necessary in some other environments.  (It seems that the TX
FIFO missing-interrupts bug has been independently written at least
three times!)

MFC after:	1 minute
Sponsored by:	Amazon
2025-05-14 16:54:04 -07:00
Isaac Freund
1203e7b1f0 release: Use pkg install -f
Without -f, pkg will not write to the METALOG file if the packages
are already installed from a previous build, causing the packages to
not be included in the final install media.

Official builds start with a clean target directory and won't encounter
an issue, but this change supports iteration in development of the
release targets.

Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50344
2025-05-14 08:24:45 -04:00
Ed Maste
d3f15bc2a5 release: Pass -DNO_ROOT to dvd1 installworld/installkernel
Accidentally lost during a rebase.

Fixes: 89cf4b85db ("release: Use NO_ROOT mode for dvd1.iso")
Sponsored by:	The FreeBSD Foundation
2025-05-13 13:26:35 -04:00
Ed Maste
89cf4b85db release: Use NO_ROOT mode for dvd1.iso
All ISO/memstick images are now built without requiring root.

Reviewed by:	brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50269
2025-05-13 13:01:53 -04:00
Ed Maste
9a354a41be release: Use "debug info" in dist set descriptions
"Kernel (Debugging)" could suggest that this is a debugging kernel --
an alternative to a "Kernel (Standard)".  These dist sets contain the
standalone debug info files for the kernel, base system, and other
components.  Change the MANIFEST descriptions (used by bsdinstall's
dist selection menu) to use "debug info".

Reviewed by:	brooks
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50254
2025-05-13 12:59:21 -04:00
Ed Maste
21040b3cfa release: Exclude release/obj from the src tarball
A user may run `make objlink` in release/ in order to have easy access
to built release artifacts.  We don't want this to appear in src.txz.

Reviewed by:	brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50262
2025-05-13 12:39:12 -04:00
Ed Maste
79e70e12f5 release: Pass -N to pkg-stage if NO_ROOT set
PR:		283387
Reviewed by:	brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50268
2025-05-11 20:40:08 -04:00