Commit graph

8486 commits

Author SHA1 Message Date
Adrian Chadd
7afa03963c powerpc: fix release image building for Apple partitions
Some checks are pending
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
awk changed somewhere between 14 and 15 and it stopped accepting
a hexadecimal number as its input - it will always return 0.
This results in a very badly written apple boot block.

So just remove it; do the math in shell.

PR:		kern/292341
Differential Revision:	https://reviews.freebsd.org/D54639
Reviewed by:	imp
MFC after:	1 week
2026-01-10 23:04:57 -08:00
Minsoo Choo
7a00382beb release: remove powerpcspe
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by:	jhibbits, emaste
Pull request:	https://github.com/freebsd/freebsd-src/pull/1914
2026-01-09 11:29:43 -05:00
Baptiste Daroussin
d64db8892f release: make sh the default shell
The default shell for root has been changed to sh(1) followup changing
in release images sh(1) the shell for the "freebsd" user.

MFC After:	1 week
Reviewed by:	manu, emaste (re)
Approved by:	manu, emaste (re)
Differential Revision:	https://reviews.freebsd.org/D54602
2026-01-09 09:07:20 +01:00
William Carrel
9ae43352c8 GCE: ARM64 Support: Add hw.pci.honor_msi_blacklist=0.
Some checks are pending
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
This is required for MSI support on GCE ARM64 instances which is
prerequisite to gve(4) not panicking at boot, and nvme(4) also has
a real sad time without interrupts. Tested on a variety of c4a VMs.

This is meant to be a temporary hack; long term fix would be to
check for the hypervisor and quirk gve(4) device with
PCI_QUIRK_ENABLE_MSI_VM.

PR:		kern/292081
MFC after:	1 week
2026-01-08 00:59:07 -08:00
William Carrel
f604d84618 GCE: Enable vtnet(4) Multiqueue.
Removes hw.vtnet.mq_disable=1.

This workaround was originally introduced nearly a decade ago to
address stability issues on KVM that have long since been resolved
in both the FreeBSD driver and the GCE hypervisor. Removing this
allows network interrupts to scale across multiple vCPUs.

Tested on n2-highcpu-16 VM with 15.0-RELEASE and confirmed multiple
queue pairs active and interrupts handling across cores.

PR:		kern/292081
MFC after:	1 day
2026-01-08 00:59:06 -08:00
William Carrel
709c1049fe GCE: Fix growfs path
The sed command was missing the ${DESTDIR} prefix, meaning it was
attempting to modify the build host's /etc/rc.d/growfs instead of
the target image's script. Tested in an arm64 builder that builds
as non-root.

PR:		kern/292081
MFC after:	1 day
2026-01-08 00:59:06 -08:00
Baptiste Daroussin
d07198ff72 release: stop disabling sendmail
sendmail is already disabled by default everywhere since 14.0

MFC After:	1 week
Approved by:	emaste (re)
Reviewed by:	emaste (re)
Differential Revision:	https://reviews.freebsd.org/D54575
2026-01-07 15:19:43 +01:00
Lexi Winter
9c401bf148 zstd: Move to a new zstd package
Zstd is a discrete, self-contained system component.  To match how we
package zlib, bzip2 and xz, move it to its own package, with a separate
lib package.

Add the new package to the minimal set, since this is a core component
that users expect to be installed.

This change adds a new package to the system so, until we have a proper
policy on how to handle this in release/stable branches, it should not
be MFC'd.

MFC after:	never
Reviewed by:	bapt
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D53603
2026-01-06 04:24:59 +00:00
Ed Maste
3949c2b8c4 release: Use make's :H rather than /..
Some checks are pending
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
In general we want to strip subdir components, rather than appending
`..`s.

Reviewed by:	lwhsu
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54373
2026-01-05 11:49:04 -05:00
Li-Wen Hsu
90eda62996
release: Include comms/usbmuxd to DVD to ensure ipheth(4) works
PR:		291370
Reviewed by:	emaste, aokblast, dch
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D54074
2025-12-06 07:57:48 +08:00
Minsoo Choo
96265d5ea9 release: match comment for if statement
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
2025-11-28 21:56:35 -07:00
Colin Percival
c8cf5a99f8 release: Ship DVD with only emacs@nox flavour
Contrary to the claim made in a previous commit, removing KDE and
adding all of vim and emacs results in an image which does not fit
into 4.7 GB; to be specific, it lands at 4.722 GB rather than the
claimed 4.689 GB.  (This descrepancy resulted from doing test DVD
image builds using an out-of-date tree, and became visible when the
15.0-RC3 images were built.)

Limit the emacs packages shipped on the DVD to the "nox" flavor;
this brings the disk image down to 4.407 GB, aka under the 4.7 GB
limit for standard DVDs.

Fixes:	6cc6beb4c8 ("release: Remove KDE from dvd1.iso")
MFC after:	1 day (for 15.0-RC4)
2025-11-22 22:09:10 -08:00
Colin Percival
6cc6beb4c8 release: Remove KDE from dvd1.iso
Some checks are pending
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
Prior to this commit, we were shipping 2155 MB of packages (from the
ports tree, not counting pkgbase) on dvd1.iso.  Due to the amount of
space required by shipping pkgbase packages *and* distribution sets
on the DVD images, we only have 1696 MB available if we want to fit
into the 4.7 GB limit for DVDs.  Many users have indicated that this
is indeed important.

It is practically impossible to hit this target without removing KDE;
while KDE and its dependencies narrowly fit (1550 MB), we exceed the
limit as soon as we include either of freebsd-doc-all or gnome.  While
we would pick KDE over GNOME (surveys regularly indicate that KDE is
the more widely used of the two), we believe that documentation is the
most important thing to include.

Since removing KDE leaves a bit of extra space, add editors/emacs and
editors/vim.  This takes the 15.0 amd64 dvd1.iso up to 4.689 GB. [1]

Requested by:	adamw [1]
MFC after:	immediately (for 15.0-RC3)
Differential Revision:	https://reviews.freebsd.org/D53800
2025-11-19 12:06:18 -08:00
Colin Percival
f6e9474ebd release: Add a MISSING_METALOGS hack to VMs
Some checks are pending
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
The packages for 15.0-RELEASE built without the bug fix needed to make
files created via @sample get properly listed in METALOG.  Fix the
cloudware which contain @sample-using packages by adding the necessary
files to METALOG manually.

This should be reverted after the next full package build, and live on
only in releng/15.0.

Reviewed by:	markj
MFC after:	immediately (15.0-RC2)
Differential Revision:	https://reviews.freebsd.org/D53797
2025-11-17 18:18:27 -08:00
Colin Percival
0dbb00733c GCE: Add /usr/src and /usr/ports to METALOG
We ship these in order to comply with GCE Marketplace rules about
providing source code and licenses for all the software we ship as
part of images.

Reviewed by:	markj
MFC after:	immediately (15.0-RC2)
Differential Revision:	https://reviews.freebsd.org/D53796
2025-11-17 18:18:27 -08:00
Colin Percival
86c63597f2 release: Add /boot/loader.conf to some cloudware
These were forgotten during the METALOGization process earlier.

Reviewed by:	markj
MFC after:	immediately (for 15.0-RC2)
Differential Revision:	https://reviews.freebsd.org/D53795
2025-11-17 18:18:27 -08:00
Colin Percival
aa33b6b820 vmimage.subr: Log correct paths into METALOG
Paths all need to start with "./" because that's what newfs wants.

Fixes:	e0c41af925 ("vmimage.subr: Enable FreeBSD-base repo if pkgbase")
MFC after:	immediately
2025-11-16 09:14:02 -08:00
Colin Percival
78fa6965e9 vmimage.subr: Don't log missing files from pkgs
Some checks are pending
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
When installing "extra" packages (aka those built from the ports tree),
we record everything being installed in METALOG.pkg; the contents of
that file is appended to METALOG before we generate the filesystem.

There are two cases when files recorded in METALOG.pkg will no longer
exist by the time we create the final disk image:
1. If a pkg bug results in false dependencies being installed which
are later removed by "pkg autoremove", and
2. If the pkg we build and install from /usr/ports is older than the
pkg on pkg.freebsd.org, and pkg gets upgraded automatically as part of
installing extra packages.

The ultimate issue in both cases is that there's no mechanism for
removing entries from METALOG when we run 'pkg delete'.

Address this build breakage by checking, line by line, if filesystem
objects mentioned in METALOG.pkg exist before appending them to METALOG.

Fixes:	6a13aeac3c ("vmimage.subr: pkg autoremove after pkg install")
MFC after:	immediately (needed for 15.0-RC1)
2025-11-15 17:19:50 -08:00
Colin Percival
509dfd3690 vmimage.subr: autoremove -y
Running 'pkg autoremove' without -y results in VM image builds failing
when (bogusly installed) packages are removed.

Fixes:	6a13aeac3c ("vmimage.subr: pkg autoremove after pkg install")
MFC after:	immediately (needed for 15.0-RC1)
2025-11-15 16:39:58 -08:00
Colin Percival
e0c41af925 vmimage.subr: Enable FreeBSD-base repo if pkgbase
When creating a VM image using pkgbase, create a configuration file in
/usr/local/etc/pkg/repos/FreeBSD.conf which enables the FreeBSD-base
repository.  (This repository is defined in /etc/pkg/FreeBSD.conf as
being disabled by default.)

Reported by:	Mark Millard
MFC after:	immediately (needed for 15.0-RC1)
2025-11-15 14:05:58 -08:00
Colin Percival
10a4f2d016 vmimage.subr: Log pkg/local.sqlite if pkgbase
We were doing this in vm_extra_install_packages but VM images without
any extra packages installed would not get this installed.  This
results in a pkgbase system which thinks it doesn't have any packages
installed (even though all the files are right there).

Add a "metalog_add_data ./var/db/pkg/local.sqlite" call to the pkgbase
install code path, and make the call from vm_extra_install_packages
conditional on !PKGBASE.

Reported by:	Michael Dexter
MFC after:	immediately (needed for 15.0-RC1)
2025-11-15 13:40:57 -08:00
Colin Percival
787d09753f GCE: Don't .error on unsupported targets
Some checks are pending
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
We ingest Makefile.gce even when we're not trying to create GCE images
so we don't want to .error here.  Instead, set GCE_ARCH to a dummy
value which should make the problem clear to anyone who attempts to
create GCE images on an unsupported architecture.

Reported by:	Jenkins
Fixes:		0a8ecca4e3 ("GCE: Specify the architecture of images")
2025-11-15 07:04:06 -08:00
Andrew Jorgensen
0a8ecca4e3 GCE: Specify the architecture of images
Without a specified architecture, a user can attempt to create an
arm64 instance with an amd64 image or vice versa. With the change
the API will prevent that mismatch.
2025-11-15 06:45:46 -08:00
Andrew Jorgensen
fc83e6c5e1 GCE: Add TARGET and FS to image family
GCE image family is meant to be unique per set of image characteristics
so that a user can create instances using the image family instead of the
image name to reliably get a similar image with updated software, but no
other changes.

Without this change, the instances create API would select the most recent
non-deprecated image matching the name, regardless of architecture or
filesystem.
2025-11-15 06:45:46 -08:00
Colin Percival
df84867e8a Azure: Fix image names
Some checks are pending
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
We need to specify the correct image names -- *.vhdf, not *.vhd -- in
order for them to upload.

15.0 candidate

Reviewed by:	lwhsu
MFC after:	2 days
Differential Revision:	https://reviews.freebsd.org/D53684
2025-11-10 22:56:30 -08:00
Lexi Winter
560af6b43e libpam: Move to a new "pam" package
OpenPAM is a discrete, largely self-contained system component.
Users may not need PAM for many use-cases (e.g. jails, containers),
so move it to its own package.

Use LIB_PACKAGE to create a separate pam-lib package for libpam,
so that applications that support PAM don't need to bring in all
the PAM modules if PAM isn't actually in use.

Add pam to the minimal sets, since this is a core system component that
people expect to be installed.  This means all supported installation
methods will install the PAM modules by default, so don't add explicit
dependencies on the PAM modules from things that use PAM (e.g. runtime),
allowing custom/embedded systems to omit these easily.

This change adds a new package to the system so, until we have a proper
policy on how to handle this in release/stable branches, it should not
be MFC'd.

MFC after:	never
Reviewed by:	des, bapt
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D53602
2025-11-10 11:05:37 +00:00
Colin Percival
f89aa18848 release: Add WITHOUT_QEMU to IMAKE
We have NO_ROOT here, so we need WITHOUT_QEMU to avoid problems.

15.0 candidate.

Reviewed by:	emaste, markj
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D53637
2025-11-07 15:03:11 -08:00
Li-Wen Hsu
36095c9420
release: Comply with Azure Marketplace requirements for aarch64
Azure requires the first 1 MB (2,048 sectors) of the OS disk to remain
empty for VM images:

  https://learn.microsoft.com/partner-center/marketplace-offers/azure-vm-certification-faq#vm-images-must-have-1-mb-of-free-space

Also append the BOOTPARTSOFFSET suffix for aarch64 images, which only
has an ESP partition for booting.

Co-authored-by:	Brad Davis <brd@FreeBSD.org>
Approved by:	cperciva
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53628
2025-11-07 13:10:44 +08:00
Lexi Winter
0c90c9ad46 lib/googletest: Move to a new googletest package
gtest/gmock are not normally used by users unless running the tests,
so they shouldn't be in the utilities package.  Move them to a new
googletest package, to match what we did with ATF/Kyua.

While here, move tests dependencies from tests-all.ucl to tests.ucl,
which is the canonical place for that.

This change adds a new package to the system so, until we have a proper
policy on how to handle this in release/stable branches, it should not
be MFC'd.

MFC after:	never
Reported by:	emaste
Reviewed by:	manu
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D53607
2025-11-06 15:20:52 +00:00
Lexi Winter
3bcb297770 packages: Make set-base-dbg depend on set-optional-dbg
As set-base depends on set-optional, so should set-base-dbg depend on
set-optional-dbg.  Otherwise, people who install set-base-dbg will be
missing a bunch of debug packages.

MFC after:	1 day
Reviewed by:	emaste
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D53575
2025-11-05 00:38:07 +00:00
Colin Percival
8234c1899b release: Make fetch happen in GCE images
We want to fetch distfiles, regardless of whether they contain known
vulnerabilities or we're building images for a different version of
FreeBSD.

Reviewed by:	ivy
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D53569
2025-11-03 16:32:30 -08:00
Colin Percival
05b3a45cd0 release: Don't try to fetch distfiles for pkgbase
In order to comply with the require that GCE images must include their
source code, we fetch distfiles for all of the packages installed into
GCE images.  This fails for obvious reasons for packages with an origin
of base/*; filter those out to generate the list to fetch.

Reviewed by:	ivy
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D53568
2025-11-03 16:32:13 -08:00
Colin Percival
7f536b1c11 release: GCE builds depend on ftp
GCE images are required by Google to include their source code; we do
this by extracting {src,ports}.txz into the images, from the (legacy)
distribution sets.

Make sure those distribution sets actually exist.

Reviewed by:	ivy
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D53567
2025-11-03 16:31:52 -08:00
Colin Percival
6a13aeac3c vmimage.subr: pkg autoremove after pkg install
A bug in pkg, which somehow only surfaced as a consequence of pkgbase,
results in pkg install sometimes pulling in false dependencies.  This
problem might be limited to cases when the lib32 pkgbase packages are
not installed.  In the case of EC2 "small" images, installing the
ebsnvme-id package results in binutils, gcc12-devel, gmp, indexinfo,
liblz4, mpc, mpfr, and zstd packages being installed.

These false dependencies are however not recorded as dependencies --
at some level pkg does understand that they're not needed -- so running
pkg autoremove immediately after pkg install cleans them up.

Note: This does not remove lines from METALOG corresponding to these
packages, and makefs emits an error when it attempts to create the
filesystem but cannot find the files listed in METALOG -- but makefs
does seem to complete normally despite the error messages.

This change should be reverted once the pkg issue has been located and
fixed.

Reviewed by:	ivy
MFC after:	3 days
Sponsored by:	https://www.patreon.com/cperciva
Differential Revision:	https://reviews.freebsd.org/D53543
2025-11-03 13:40:17 -08:00
Colin Percival
c3a3af1346 release: Spell metalog_add_data conventionally
Some checks are pending
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
Reviewed by:	markj
MFC after:	3 days
Fixes: f1995d6fc1 ("release: Prepare GCE cloudware images for building as non-root")
Differential Revision:	https://reviews.freebsd.org/D53530
2025-11-01 17:43:22 -07:00
Colin Percival
b485322d6b release: Only check no-root/no-qemu when building
Building VMs as non-root requires no-QEMU code paths (installing
packages from outside the VM image rather than inside it) and vice
versa; we have a check for broken combinations.

Unfortunately that check was breaking
make -C src/usr.sbin/pkg NO_ROOT=YES -V PKGCONFBRANCH
because that code reaches into src/release to determine the branch
name (which is then used to determine which /etc/pkg/FreeBSD.conf to
install).

Wrap the no-root/no-qemu check in an .if to only run when we've
asked for VM and/or CLOUD building to be enabled.

Reviewed by:	ivy
MFC after:	5 minutes
Sponsored by:	https://www.patreon.com/cperciva
Differential Revision:	https://reviews.freebsd.org/D53486
2025-10-30 13:50:38 -07:00
Lexi Winter
924c0c60d4 zlib: Move to a new zlib package
zlib is a standalone third-party component, and deserves its own
package rather than living in runtime.  For example, this will make
future security updates less invasive.  This also means there's no
dependency on runtime for ports that just require zlib, which is
useful for service jails.

MFC after:	3 days
Reviewed by:	bapt, emaste
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D53058
2025-10-28 19:24:55 +00:00
Lexi Winter
bf28c98f14 packages: dhclient, local-unbound require resolvconf
Both of these packages use resolvconf for various things.  Add a
dependency to make this work.

MFC after:	3 days
Reviewed by:	des
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D53115
2025-10-26 02:26:06 +00:00
Lexi Winter
8a9d29beda packages: Put dhclient in the minimal-jail set
This is somewhat widely used in VNET jails, it's fairly small (150kB on
amd64) and it's enough of a core system component that it's reasonable
to include, even if many jails don't require it.

MFC after:	3 days
Reviewed by:	dch
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D53154
2025-10-26 02:22:47 +00:00
Lexi Winter
957715f877 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.

MFC after:	3 days
Reviewed by:	kevans
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D53161
2025-10-26 02:22:47 +00:00
Lexi Winter
842942be28 packages: Remove the /boot hack from mtree-to-plist.awk
Currently, files in /boot (other than /boot/kernel) are assigned to the
bootloader package using a filename match in mtree-to-plist.awk.  This
causes some problems, most notably that debug info for userboot ends up
in the utilities-dbg package instead of bootloader-dbg.

Remove the path handling from mtree-to-plist and instead set PACKAGE
in the appropriate Makefiles to put these in the correct package.

While here, move userboot*.so from bootloader-dev to bootloader.

MFC after:	3 days
Reviewed by:	cperciva
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D53179
2025-10-26 02:22:47 +00:00
Mark Johnston
bbe65c5e8c release: Use PKG_CMD when installing pkgbase packages in vmimage.subr
This defaults to plain "pkg", but being able to override it is useful
when testing pkg itself.

Reviewed by:	cperciva
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D53307
2025-10-23 22:41:51 +00:00
Mark Johnston
fa240b7ff0 packages: Update the METALOG when (un)installing the caroot package
There may be other issues here but this change certainly seems to
be necessary.

PR:	290394
Reviewed by:	cperciva
Differential Revision:	https://reviews.freebsd.org/D53263
2025-10-22 16:14:47 -07:00
Colin Percival
2b5c62494d release: Add pkg .conf to METALOG on dvd
We're correctly recording all of the packages in the dvd METALOG file,
but if we don't record ./packages/repos/FreeBSD_install_cdrom.conf then
users won't be able to install them very easily.

Reviewed by:	markj
Reported by:	Lars Tunkrans
MFC after:	3 days
Sponsored by:	https://www.patreon.com/cperciva
Differential Revision:	https://reviews.freebsd.org/D53199
2025-10-20 14:00:26 -07:00
Dave Cottlehuber
81d807a906 release: split up Oracle Cloudware tools
Sometimes one or the other but not both tools are present; this ensures
that all cases are correctly handled.

Reported by:	cperciva
Approved by:	cperciva (re)
Sponsored by:	SkunkWerks, GmbH

Reviewed by:	cperciva
Differential Revision:	https://reviews.freebsd.org/D53186

MFC after:	2 days
2025-10-20 09:37:01 +00:00
Colin Percival
012014403b vmimage.subr: Fix when/where we fix up METALOG
We only need to check for unMETALOGed directories and sort the METALOG
file if we're using it, i.e. if we're doing a NO_ROOT build.  This
non-NO_ROOT builds by no longer bogusly writing to /METALOG*.

We only need to add databases (spwd.db etc) to METALOG if we're doing
a pkgbase-enabled NO_ROOT build; but we should always do this before
creating the filesystem, not only if we installed extra packages (in
vm_extra_install_packages, where that code was erroneously placed).
This fixes non-cloud VM images, which in 15.0-BETA2 shipped without
password databases.

Reviewed by:	ivy
MFC after:	3 days
Sponsored by:	https://www.patreon.com/cperciva
Differential Revision:	https://reviews.freebsd.org/D53194
2025-10-19 09:21:56 -07:00
Colin Percival
71b2f98535 vmimage.subr: Add missing directories to METALOG
Theoretically METALOG should include everything which needs to go
into disk images; unfortunately there are still a few bugs which
are resulting in directories not being listed -- and if METALOG
has files in unrecorded directories, the directories end up being
created with 000 permissions.

Oddly enough, systems where / has 000 permissions are not very
usable.

As a temporary hack, compare the staging tree against METALOG and
add entries for any unrecorded directories.  This will hopefully
be reverted before 15.0-RELEASE.

Reviewed by:	bapt, emaste, ivy
Sponsored by:	https://www.patreon.com/cperciva
MFC after:	5 minutes
Differential Revision:	https://reviews.freebsd.org/D53153
2025-10-17 09:50:52 -07:00
Ed Maste
2db11dda84 pkg-stage: Correct /packages permissions
Include /packages in the METALOG used to create dvd1.iso.  Previously
we used an expression ^./packages/ (with a trailing /) which did not
match /packages itself, and then with no METALOG entry /packages on
dvd1.iso ended up with mode d---------.

PR:		290222
Reviewed by:	cperciva
MFC after:	1 minute
Sponsored by:	The FreeBSD Foundation
2025-10-16 21:23:15 -04:00
Lexi Winter
bf84861460 packages: Rename unbound to local-unbound
This more accurately reflects its purpose, and its contents, since
everything in the package is prefixed with "local-".

While here, add a message on upgrade about regenerating the config.

MFC after:	3 seconds
Requested by:	des
Reviewed by:	des
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D53056
2025-10-15 13:29:18 +01:00
Colin Percival
0cc81b375e vmimage.subr: Sort METALOG before running makefs
When creating VM images from pkgbase, the METALOG may not be in order;
in particular, files may be listed before the directories which contain
them.  This causes makefs to create directories with 000 permissions.

Interestingly, such VM images boot just fine, since root ignores those
permissions; the first sign of trouble was sshd refusing logins with an
error message which said absolutely nothing about /etc/ having
incorrect permissions or being unable to read files inside it.

Immediately prior to running makefs, sort the METALOG file.  While
we're here, uniquify as well; this does not guarantee that we do not
have duplicate paths, but if there are duplicate paths with different
settings something else has gone wrong and we don't really have any
good way of solving the problem anyway.

Reviewed by:	ivy
Hint from:	imp
MFC after:	3 days
Sponsored by:	https://www.patreon.com/cperciva
Differential Revision:	https://reviews.freebsd.org/D53046
2025-10-12 13:11:46 -07:00