Commit Graph

7211 Commits

Author SHA1 Message Date
Dimitry Andric 770cf0a5f0 Fixups after llvm-project main llvmorg-21-init-19288-gface93e724f4 merge
Fix various configuration fails, update generated headers, Makefiles, etc.

PR:		292067
MFC after:	1 month
2026-04-25 16:11:52 +02:00
Ali Mashtizadeh 70ae0c4524 i386: Remove perfmon performance monitoring facility
Remove the perfmon performance monitoring facility that was for Intel
Pentium and Pentium Pro processors.

Reviewed by: imp,mhorne,emaste
Pull Request: https://github.com/freebsd/freebsd-src/pull/2155
2026-04-24 10:23:05 -06:00
Pierre Pronchery b8352da33f pkgconf: import into the base system
This introduces the following option:

* MK_PKGCONF: determines if pkgconf and bomtool should be built

The objective is to allow the creation of SBOM information while
building FreeBSD's src tree. The build system cannot rely on the
presence of bomtool (and eventually also spdxtool) in the build
environment, except for having it as part of the src tree directly.

The framework implementing the generation of SBOM files is under review
in D56474.

This will also help simplifying the build, with the introduction of
another framework relying on the availability of pkgconf.

Sponsored by:		Alpha-Omega, The FreeBSD Foundation
Reviewed by:		bapt, philip
Approved by:		philip (mentor)
Differential Revision:	https://reviews.freebsd.org/D56404
2026-04-22 15:42:56 +02:00
Andrew Turner 0ddaa4c86d arm64: Add arm64 SVE tests
Add the tests/sys/arch directory for architecture-specific tests and
use it to add arm64 SVE tests. These test the kernel is managing the
SVE state in a way we expect.

These tests require SVE hardware support to run so will skip when they
can't detect it.

Reviewed by:	markj
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D43311
2026-04-08 15:20:52 +01:00
Dag-Erling Smørgrav 6630c3a736 tunefs: Add tests
MFC after:	1 week
Reviewed by:	ngie
Differential Revision:	https://reviews.freebsd.org/D56034
2026-04-02 13:22:14 +02:00
Dag-Erling Smørgrav 40e8afadc3 pkgbase: Move all of Kyua into the kyua package
Some Kyua directories were improperly tagged as belonging to the tests
package.  Move them to the kyua package, which contains all of the
files found in these directories.

PR:		294129
MFC after:	1 week
Reviewed by:	ivy, emaste
Differential Revision:	https://reviews.freebsd.org/D56159
2026-03-30 16:03:29 +02:00
Dag-Erling Smørgrav 0a6dbf51d8 pkgbase: Move all of ATF into the atf package
Parts of ATF (including the licence and some of the documentation) were
for some reason part of the tests package instead of the atf package.
Moving them to where they logically belong poses no problem since tests
already depends on atf.

PR:		294129
MFC after:	1 week
Reviewed by:	ivy
Differential Revision:	https://reviews.freebsd.org/D56158
2026-03-30 16:03:29 +02:00
Lexi Winter 8ba3ada41d etc/mtree: Restore removed package tags
Following commit 436618a427 which added package tags to mtree,
some of the tags were later removed due to an issue with empty
packages being created.  That problem has been fixed by commit
7965c93e4d, so we can now restore the tags that were removed.

This reverts commit 00352ef6d2.
This reverts commit 1fbdb149aa.
This reverts commit ef2d586d7e.
This reverts commit 2a8a6179eb.

MFC after:	2 weeks (stable/15 only)
Reviewed by:	des, bapt, emaste
Differential Revision:	https://reviews.freebsd.org/D55645
Sponsored by:		https://www.patreon.com/bsdivy
2026-03-27 15:42:36 +00:00
Jose Luis Duran 8d99314a04 mtree: Add missing entries
Add missing mtree directory entries.  Without them, the resulting
worldstage METALOG file would produce an invalid (incomplete) mtree
specification file.

Reviewed by:	ivy
Differential Revision:	https://reviews.freebsd.org/D56013
2026-03-23 06:41:59 +00:00
Baptiste Daroussin b42e852e89 pkg-serve(8): serve pkg repositories over TCP via inetd (8)
Reviewed by:	manu, bdrewery (previous version)
Differential Revision:	https://reviews.freebsd.org/D55895
2026-03-20 13:29:48 +01:00
Dag-Erling Smørgrav 67728a18b9 yes: Add tests
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D55802
2026-03-11 04:44:17 +01:00
Dag-Erling Smørgrav d4f6cb7542 build: Move all of lp under LPR option
* Tag related directories with package=lp

* Make the examples/printing directory conditional on MK_LPR

* Make the hosts.lpd(5) manual page conditional on MK_LPR

MFC after:	3 days
2026-02-21 22:25:49 +01:00
Mark Johnston af099eaa5e vmm: Enable unprivileged bhyve
- Add the vmm group.
- Let /dev/vmmctl belong to the vmm group by default, and give group
  write permissions.
- When creating a VM's device files, make them owned by the creating
  process' effective UID.

Reviewed by:	bnovkov
MFC after:	2 months
Sponsored by:	The FreeBSD Foundation
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D54741
2026-02-19 17:16:15 +00:00
Baptiste Daroussin 9a6e77e3db ed: add missing test entry in mtree
Reported by:	olce
2026-02-19 12:56:48 +01:00
Dimitry Andric 212272a437 mtree: stop creating /usr/share/doc/ncurses
In base 68ad2b0d7a the ncurses html documentation was removed, and
entries added to ObsoleteFiles.inc to get rid of /usr/share/doc/ncurses,
but the directory was still being re-created via BSD.usr.dist. Remove it
from there too.

Fixes:		68ad2b0d7a
MFC after:	1 month
2026-02-10 15:34:03 +01:00
Dag-Erling Smørgrav 36ec2b1c10 pwd: Add tests
MFC after:	1 week
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D55153
2026-02-10 15:29:08 +01:00
Enji Cooper b78806b156 Remove additional libtpool and libuutil-related files
This change removes additional library files and tests orphaned in the
commit referenced below.

MFC with:	8b78d412a
Fixes: 8b78d412a ("zfs: world changes after 89f729dcc merge")
2026-02-03 23:33:04 -08:00
Jose Luis Duran ce8cd5dab3 mtree: debug: Add missing krb5 entries
Reviewed by:	ivy
Differential Revision:	https://reviews.freebsd.org/D54681
2026-01-15 19:26:39 +00:00
Jose Luis Duran b8480379ad mtree: usr: Add missing pkg/triggers entry
Reviewed by:	ivy
Fixes:		ea5e50c298 ("packages: Add a mandoc package")
Differential Revision:	https://reviews.freebsd.org/D54682
2026-01-14 14:29:35 +00:00
Jose Luis Duran 0d9fd06b03 gdb: Add missing mtree debug entry
Reviewed by:	markj
Fixes:		ea675a43f0 ("libexec/kgdb: Add new modules and install them together with debug info")
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D54680
2026-01-14 14:27:51 +00:00
Dag-Erling Smørgrav a678e87f55 unionfs: Support renaming symbolic links
This adds support for renaming a symbolic link found on the lower fs,
which necessitates copying it to the upper fs, as well as basic tests.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Sponsored by:	NetApp, Inc.
Reviewed by:	olce, siderop1_netapp.com, jah
Differential Revision:	https://reviews.freebsd.org/D54229
2025-12-17 23:40:59 +01:00
Emmanuel Vadot 00352ef6d2 etc/mtree/BSD.include.dist: Remove atf tags
When building with WITHOUT_TESTS this result in a FreeBSD-atf-dev
package with only this directory and a dependency on FreeBSD-atf which
doesn't exists.

Reviewed by:	ivy
Differential Revision:	https://reviews.freebsd.org/D54236
Fixes:          436618a427 ("etc/mtree: Add package tags for /usr/include")
Sponsored by:   Beckhoff Automation GMbH & Co. KG
2025-12-16 10:00:58 +01:00
Emmanuel Vadot 1fbdb149aa etc/mtree/BSD.include.dist: Remove bsnmp tags
When building with WITHOUT_BSNMP this result in a FreeBSD-bsnmp-dev
package with only this directory and a dependency on FreeBSD-bsnmp which
doesn't exists.

Reviewed by:	ivy
Differential Revision:	https://reviews.freebsd.org/D54235
Fixes:          436618a427 ("etc/mtree: Add package tags for /usr/include")
Sponsored by:   Beckhoff Automation GMbH & Co. KG
2025-12-16 09:59:58 +01:00
Emmanuel Vadot ef2d586d7e etc/mtree/BSD.include.dist: Remove libmilter-dev
When building with WITHOUT_SENDMAIL this result in a FreeBSD-libmilter-dev
package with only this directory and a dependacy on FreeBSD-libmilter which
doesn't exists.

Differential Revision:	https://reviews.freebsd.org/D54193
Fixes:		436618a427 ("etc/mtree: Add package tags for /usr/include")
Reviewed by:	ivy
Sponsored by:	Beckhoff Automation GMbH & Co. KG
2025-12-12 16:52:19 +01:00
Robert Clausecker 2fb8cbc6ef libc/tests: add stdbit test framework and unit tests
This adds unit tests for all 70 functions in <stdbit.h>.

I'm sorry for the test framework, but it makes it so I don't
have to write 70 unit tests by hand.

Reviewed by:	adrian, des
Approved by:	markj (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D53660
2025-11-30 20:21:52 +01:00
Jose Luis Duran 3d91a74638 mtree: Keep mtree files indented with spaces
The mtree tool indents directory entries with 4 spaces.

Reviewed by:	imp
Fixes:		9cab9fde5e ("virtual_oss: Port to base")
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D53979
2025-11-29 00:12:39 +00:00
Colin Percival b05f38262b Add pkgbase signing keys for FreeBSD 15
These keys were generated by cperciva@ using the AWS Key Management
Service.  They will not be used for signing anything other than
FreeBSD 15.x pkgbase repositories.

Keys will be generated for FreeBSD 16 at a later date, and likely in
a different way.

With hat:	re
MFC after:	8 hours (needed in 15.0-RC1)
Differential Revision:	https://reviews.freebsd.org/D53768
2025-11-14 23:58:41 -08:00
Kyle Evans 6a9452c837 lam: fix using stdin more than once
Historically, lam(1) closes stdin once we've hit EOF the first time,
which would stop it from doing anything else on subsequent gatherline()
calls with another openfile.  However, this doesn't seem to be strictly
necessary- the EOF flag on FILEs is quite sticky, so we can assume that
a subsequent fgetc(stdin) will flag EOF properly.

This 'fixes' the below-referenced commit in the sense that it surfaced
this problem as a fatal error, but the issue was pre-existing.  If we
do `lam - -`, then one gatherline() will fclose(stdin) and set `ip->eof`
for *that* openfile, while the next one will then observe that
STDIN_FILENO has been closed and turn it into an EBADF.

Add a few tests that were easy to snipe while I'm here, but I haven't
aimed for anything close to exhaustive because I think re@ would prefer
this fix go in sooner rather than later to land in 15.0.

Minor style adjustment for the previous commit while we're here.

Reported by:	cperciva
Discussed with:	jrtc27
Reviewed by:	des, jlduran
Fixes:	4472fd66d0 ("lam: fail on I/O errors")
MFC after:	3 days (tentative)
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D53750
2025-11-14 08:36:28 -06:00
Lexi Winter 6a12f58434 share/doc/llvm: Move to the clang package
This change moves files between packages 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:	manu, dim
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D53608
2025-11-06 15:20:52 +00:00
Lexi Winter 8a8f2ebd2d ncurses: Move termcap and tabset to ncurses-lib
termcap and tabset are currently in runtime, but since ncurses is the
only thing which uses them, they belong in the ncurses package.

curses without termcap is not very useful, so put them in the -lib
subpackage rather than ncurses itself, so that installing ncurses-lib
provides a working curses.

This change moves files between packages 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
Discussed with:	kevans
Reviewed by:	manu, kevans
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D53610
2025-11-06 15:20:52 +00:00
Lexi Winter 2a8a6179eb etc/mtree/BSD.include.dist: Remove libipt-dev
This package only exists on amd64, which means on other platforms we
produce an empty package containing nothing but this directory, and
without a base package (libipt) that package fails to install due to
a missing dependency.

For now, fix this by removing the libipt-dev package tag, which moves
this directory to clibs.

Fixes: 436618a427 ("etc/mtree: Add package tags for /usr/include")
Reported by:	cperciva
MFC after:	3 seconds
2025-11-06 10:19:22 +00:00
Lexi Winter 436618a427 etc/mtree: Add package tags for /usr/include
Set the default package to clibs-dev, since that's where the vast
majority of include files comes from.  Add explicit package tags
for the directories which are installed in their own package.

MFC after:	1 day
Reviewed by:	emaste
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D53577
2025-11-05 00:38:07 +00:00
Jose Luis Duran f7ccf05101 mtree: Remove stray an (Aironet) directory
Reviewed by:	imp
Fixes:	663b174b5b ("an: Remove driver")
MFC after:	5 days
Differential Revision:	https://reviews.freebsd.org/D53265
2025-10-22 22:41:53 +00:00
Jose Luis Duran f942a74654 mtree: Remove stray wi directory
Reviewed by:	imp, emaste
Fixes:	a21def4d56 ("pccard: Remove wi(4) driver")
MFC after:	5 days
Differential Revision:	https://reviews.freebsd.org/D53264
2025-10-22 22:41:03 +00:00
Jose Luis Duran 8e8ee8bbe2 mtree: Remove stray atm directory
ATM support for netgraph was removed in af0cc0b223 ("NgATM: Remove
netgraph ATM support")

Remove the directory from the mtree specification.

Reviewed by:	emaste
Fixes:	21735dfaeb ("include: Remove no longer existing netgraph/atm")
MFC after:	5 days
Differential Revision:	https://reviews.freebsd.org/D53260
2025-10-22 17:48:01 +00:00
Siva Mahadevan f66068d937 Add glabel tests to mtree
Fixes:		e868a20266: glabel: add a basic test.
Submitted by:	Siva Mahadevan
Pointy hat to:	brd
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1877
2025-10-17 20:55:35 -06:00
Dag-Erling Smørgrav aa870a1935 quot: Add tests
To facilitate the task, we change the comparison function so that users
with equal filesystem usage are sorted by UID, and add an undocumented
option that prevents quot from replacing numerical UIDs with names.  We
also switch from getfsfile(3) to getmntpoint(3) so the first line is
identical regardless of whether we pass quot a mountpoint or a device.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D53133
2025-10-17 13:55:12 +02:00
Enji Cooper 3b6442370a openssl: add a simple smoke test for the legacy provider
This change adds a simple smoke test for the legacy provider to ensure
that the provider doesn't break in the future when performing updates.

This is not a functional or system test; the OpenSSL test suite does a
much better job at doing this than we can.

MFC after:		1 week
Differential Revision:	https://reviews.freebsd.org/D53045
2025-10-16 23:36:15 -07: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
Lexi Winter 6235ee2848 etc/mtree: Add package tags for Kerberos directories
Fixes:		e7e7bf757a ("krb5: create the KDC database directory")
MFC after:	3 seconds
Reviewed by:	cy
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D52975
2025-10-10 10:53:57 +01:00
Lexi Winter fa6d67cd16 BSD.root.dist: Add package tag for all directories
This fixes some missing directories, notably /boot/modules.  Other
directories are not missing because they contain other files, but
they should still have their own METALOG entries and be placed in
the correct package.

MFC after:	3 days
Reported by:	bdrewery
Reviewed by:	cperciva, imp
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D52958
2025-10-08 06:54:36 +01:00
Gleb Smirnoff e7e7bf757a krb5: create the KDC database directory
Reviewed by:		rmacklem, cy
Differential Revision:	https://reviews.freebsd.org/D52970
2025-10-07 14:50:07 -07:00
Mark Johnston ea675a43f0 libexec/kgdb: Add new modules and install them together with debug info
This change simplifies integration of gdb python scripts with our kernel
debugging infrastructure.  Rather than putting debugging scripts in
/usr/libexec/kgdb, move them to <path-to-kernel-debug-symbols>/gdb, and
add a kernel-gdb.py which automatically loads modules from that
directory.  kernel-gdb.py will be automatically executed by kgdb when
loading kernel debug symbols (assuming a default configuration), so one
no longer needs to do anything to use these modules.

The change also adds a couple of new modules, vnet.py and pcpu.py, for
conveniently accessing VNET symbols and PCPU/DPCPU fields, respectively.
Note that these require a change to the kernel linker when accessing
symbols from a loadable kernel module.

sys/tools/gdb/README.txt describes the scheme in more detail and
provides some rudiementary documentation for the commands and functions
added by these modules.  It should be updated when adding new features.

sys/tools/gdb/selftest.py can be used to do some primitive testing of
the modules.  All it does is execute a number of gdb commands making use
of commands and functions added by these modules.  The developer is
expected to verify that the commands complete without errors and that
the output looks sane.

Discussed with:	kp, avg, jhb, glebius
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D50825
2025-10-03 14:32:09 +00:00
Lexi Winter 09cd3decf0 etc, ypserv: Fix symlink creation for pkgbase
The Makefile logic for /etc/aliases, /var/yp/Makefile and /etc/unbound
tries to avoid creating the symlink if it already exists in the target,
but this breaks with pkgbase since the symlink won't be installed (and
therefore won't be added to METALOG) if building with an existing
worldstage, meaning it's missing from the generated package.

Change the logic to forcibly install the symlink if NO_ROOT is defined,
but keep the existing logic for non-package builds to avoid trashing
the user's custom symlinks on non-pkgbase installworld.

MFC after:	3 seconds
Reported by:	cperciva
Reviewed by:	cperciva, emaste
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D52834
2025-10-02 02:37:35 +01:00
Christos Margiolis 9cab9fde5e virtual_oss: Port to base
This patch diverges quite a bit from the current upstream [1] in a few
ways:

1. virtual_oss(8), virtual_bt_speaker(8) and virtual_oss_cmd(8) are
   actually separate programs.
2. Backends (lib/virtual_oss) are built as separate shared libraries and
   we dlopen() them in virtual_oss(8) and virtual_bt_speaker(8) on
   demand.
3. virtual_equalizer(8) and the sndio and bluetooth backends are built
   as ports, because they depend on third-party libraries.
4. Use newer libav API in bluetooth backend (see HAVE_LIBAV ifdefs) to
   address compiler errors.

[1] https://github.com/freebsd/virtual_oss

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D52308
2025-09-28 11:56:52 +02:00
Lexi Winter b346820299 mtree: Add package tags to some root directories
This ensures the normally-empty directories /proc, /net, /media and /mnt
are created on a fresh pkgbase install.

Put /proc, /mnt and /media in -runtime since those are basic directories
that should always exist.  /net is only used by the automounter, so put
that in -autofs.  While here, also tag /rescue in -rescue, since nothing
else installs there.

Reported by:	Graham Perrin <grahamperrin@gmail.com>
PR:		289654
MFC after:	3 days
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D52622
2025-09-19 17:39:04 +01:00
Christos Margiolis dafd960a3d libsamplerate: Define as PRIVATELIB
Fixes the following warnings:

ld: error: relocation R_X86_64_32S cannot be used against local symbol; recompile with -fPIC

>>> defined in /usr/obj/usr/src/amd64.amd64/lib/libsamplerate/libsamplerate.a(samplerate.o)
>>> referenced by samplerate.c:498 (/usr/src/contrib/libsamplerate/samplerate.c:498)
>>>
>>>   samplerate.o:(src_new) in archive /usr/obj/usr/src/amd64.amd64/lib/libsamplerate/libsamplerate.a

Related discussion: https://reviews.freebsd.org/D52306

Sponsored by:	The FreeBSD Foundation
Reviewed by:	fuz
Differential Revision:	https://reviews.freebsd.org/D52307
2025-09-15 16:09:38 +03:00
Dimitry Andric ac2f284258 BSD.usr.dist: remove obsolete usr/share/examples/drivers entry
In base 8f0a6a9aad, usr/share/examples/drivers was cleaned up,
because it contained unmaintained scripts. The directory itself is
cleaned up by ObsoleteFiles.inc, but there was still an entry in
BSD.usr.dist that re-created the directory. Remove it.

Fixes:		8f0a6a9aad
MFC after:	3 days
2025-09-07 16:37:48 +02:00
Lexi Winter e957c041d7 sendmail: Remove runtime dependency on clang
etc/mail/Makefile includes bsd.own.mk, which includes bsd.compiler.mk,
which fails with an error if it can't locate a C compiler.  Set
_WITHOUT_SRCCONF=yes before including bsd.own.mk to disable this
behaviour.

Reviewed by:	gshapiro
Differential Revision:	https://reviews.freebsd.org/D52134
2025-08-26 06:57:37 +01:00
Dag-Erling Smørgrav 6d95b2023e BSD.root.mtree: Tag a few empty directories
* /etc/zfs needs to exist for the zfs cache and exports files
* /etc/ssl/certs and /etc/ssl/untrusted need to exist for caroot

Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D52123
2025-08-22 18:17:21 +02:00