FreeBSD/src 3f494a4release Makefile

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 at freebsdfoundation.org>
Event:          Kitchener-Waterloo Hackathon 202506
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50919
DeltaFile
+16-3release/Makefile
+16-31 files

FreeBSD/src 47c3158usr.sbin/bsdinstall/scripts auto

bsdinstall: Skip pkgbase question if no legacy dist sets

If the install media was built without dist sets (and so has no MANIFEST
file) we do not need to prompt the user, and only pkgbase is in use.

Reviewed by:    Isaac Freund <ifreund at freebsdfoundation.org>
Event:          Kitchener-Waterloo Hackathon 202506
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50918
DeltaFile
+9-5usr.sbin/bsdinstall/scripts/auto
+9-51 files

FreeBSD/src 2669d26share/man/man7 intro.7

intro.7: Reference tracing(7)
DeltaFile
+3-1share/man/man7/intro.7
+3-11 files

FreeBSD/src 0a5b763. ObsoleteFiles.inc, include dirent.h

libc: Rename fscandir{,_b}() to fdscandir{,_b}().

This seems to fit the pattern better (e.g. fdopendir()).

I've added weak references to ease the transition, but since it's only
been a few days, we can remove them (and the ObsoleteFiles entries for
the manual pages) before we branch stable/15.

Fixes:          deeebfdecab5
Sponsored by:   Klara, Inc.
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D50980
DeltaFile
+14-14lib/libc/gen/scandir.3
+10-4lib/libc/gen/scandir.c
+6-6lib/libc/tests/gen/scandir_blocks_test.c
+6-6lib/libc/tests/gen/scandir_test.c
+4-0ObsoleteFiles.inc
+2-2include/dirent.h
+42-323 files not shown
+47-359 files

FreeBSD/src 124b5dbsys/arm64/arm64 identcpu.c, sys/arm64/include cpu.h

arm64: Add more CPU MIDR values

Found in Linux and https://github.com/arm-software/data

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D50726
DeltaFile
+26-2sys/arm64/arm64/identcpu.c
+19-1sys/arm64/include/cpu.h
+45-32 files

FreeBSD/src cbc2e34sys/dev/virtio/block virtio_blk.c

virtio_blk: Limit use of indirect descriptors

Pass 0 as the number of indirect descriptors when they are not
supported.

This fixes an issue on the Arm FVP model where we don't negotiate
them, however pass a number of segments greater than
VIRTIO_MAX_INDIRECT. This leads to virtqueue_alloc failing and
virtio_blk failing to attach.

Reviewed by:    Harry Moulton <harry.moulton at arm.com>
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D50909
DeltaFile
+5-1sys/dev/virtio/block/virtio_blk.c
+5-11 files

FreeBSD/src 1e4b86asys/arm64/include armreg.h

arm64: Remove the MRS_REG macro and it's users

These are now unused so can be removed.

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D50906
DeltaFile
+0-82sys/arm64/include/armreg.h
+0-821 files

FreeBSD/src 3113ac2sys/arm64/arm64 identcpu.c, sys/arm64/include cpu.h

arm64: Add get_user_reg

This is similar to get_kernel_reg such that it gives us a common view
of the userspace ID register.

This will be used to replace extract_user_id_field in a future change.

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D50902
DeltaFile
+18-0sys/arm64/arm64/identcpu.c
+1-0sys/arm64/include/cpu.h
+19-02 files

FreeBSD/src b47a6c9sys/arm64/arm64 undefined.c, sys/arm64/include undefined.h armreg.h

arm64: Reduce where we decode msr/mrs instructions

We only use the mrs_Op* and mrs_CR* functions and MRS_* macros when
handling userspace executing a msr/msr instruction.

Move the macros to where they are used and expand the functions to
just use the macros directly.

While here update MRS_Op0_MASK to include bit 20 as this will cause
the correct op0 value to be calculated for all instructions we decode.

Reviewed by:    Harry Moulton <harry.moulton at arm.com>
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D50214
DeltaFile
+42-7sys/arm64/arm64/undefined.c
+0-20sys/arm64/include/undefined.h
+0-19sys/arm64/include/armreg.h
+42-463 files

FreeBSD/src 128085asys/arm64/arm64 identcpu.c, sys/arm64/include cpu.h

arm64: Use ISS to search for a special register

Previously we would use part of the msr/mrs instruction to find what
register was being asked for. This was the only use for these values.

We now have ESR_EL1 ISS field values for the same register so can use
this new value to find what register is asked for. This lets us remove
the old reg field from struct mrs_user_reg.

Add macros to keep the old KPI.

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D50905
DeltaFile
+8-10sys/arm64/arm64/identcpu.c
+12-4sys/arm64/include/cpu.h
+2-1sys/arm64/vmm/vmm.c
+22-153 files

FreeBSD/src f820b6esys/arm64/arm64 exec_machdep.c

arm64: Switch to get_user_reg in fill_dbregs

This lets us read the register in one go then decode it, rather than
searching for the register 3 times.

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D50903
DeltaFile
+16-6sys/arm64/arm64/exec_machdep.c
+16-61 files

FreeBSD/src 5948644sys/arm64/arm64 identcpu.c, sys/arm64/include cpu.h

arm64: Remove extract_user_id_field

It's unneeded now we have get_user_reg.

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D50904
DeltaFile
+0-17sys/arm64/arm64/identcpu.c
+0-1sys/arm64/include/cpu.h
+0-182 files

FreeBSD/src b2ac169lib/libc/gen glob.c

glob: Delete trailing whitespace in 'struct glob_limit' definition

Sponsored by: Klara, Inc.
DeltaFile
+2-2lib/libc/gen/glob.c
+2-21 files

FreeBSD/src 66d780alib/libc/gen glob.3

glob.3: Fix punctuation mistakes

Fixes: 1e0743f54d2d
Sponsored by: Klara, Inc.
DeltaFile
+3-3lib/libc/gen/glob.3
+3-31 files

FreeBSD/src 0ee191fsys/sys fcntl.h

fcntl.h: warn that bits for O_* flags are scarce

Running out of O_* flag bits will end out ability to make additions that
are source compatible with other operating systems.

Add a warning to coordinate all additions with srcmgr@.

Reviewed by:    markj, emaste
Differential Revision:  https://reviews.freebsd.org/D50703

(cherry picked from commit 6d0a335aaa81d3ddce95de8d862a23c97bb038a6)
DeltaFile
+10-0sys/sys/fcntl.h
+10-01 files

FreeBSD/src 6ff6a0bcontrib/libexecinfo execinfo.h, lib/msun/aarch64 fenv.h

Don't rely on sys/_types.h including sys/cdefs.h

These headers relied in __BEGIN_DECS/__END_DECLS being defined when
sys/_types.h was included, but there's not a requirement that this be
the case.

Reviewed by:    imp
Exp-run by:     antoine (PR 286274)
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1595

(cherry picked from commit b01e971fd39d10273a387788019457792873e81c)
(cherry picked from commit 4f4c465b45d42ed8d2b65c8b4c909246987ac877)
(cherry picked from commit 12913e4ddf710e517f3ae00b7b420b783cca9b37)
DeltaFile
+2-0sys/arm/include/sysarch.h
+2-0contrib/libexecinfo/execinfo.h
+2-0sys/arm64/include/sysarch.h
+1-0lib/msun/aarch64/fenv.h
+1-0lib/msun/riscv/fenv.h
+1-0lib/msun/src/math.h
+9-03 files not shown
+12-09 files

FreeBSD/src 7fe39belib/libc/tests/gen glob_blocks_test.c glob2_test.c

glob: Improve callback tests.

Most importantly, they need to run without privileges, since root is
allowed to read a directory regardless of its permission bits.

PR:             287694
Fixes:          4d7c31bca252
Sponsored by:   Klara, Inc.
Reviewed by:    bnovkov
Differential Revision:  https://reviews.freebsd.org/D50965
DeltaFile
+32-19lib/libc/tests/gen/glob_blocks_test.c
+31-16lib/libc/tests/gen/glob2_test.c
+63-352 files

FreeBSD/src 953119clibexec/nuageinit nuageinit.7

nuageinit.7: language and grammar improvements

Reviewed by:    bapt

(cherry picked from commit b78b7fa01fc775c9bb95ac7d68fbf3994a5ab5c5)
DeltaFile
+10-10libexec/nuageinit/nuageinit.7
+10-101 files

FreeBSD/src 14237eclibexec/nuageinit nuageinit.7

nuageinit.7: language and grammar fixes mostly

(cherry picked from commit 1049c079c013e17b72d64f6b558e9f7e777714f1)
DeltaFile
+26-28libexec/nuageinit/nuageinit.7
+26-281 files

FreeBSD/src 1970a6clibexec/nuageinit/tests nuageinit.sh

nuageinit(7) tests: Fix extra space in test output expectation

This fixes the test case libexec.nuageinit.nuageinit.config2_userdata_packages

Signed-off-by: Siva Mahadevan <me at svmhdvn.name>

Event:          Kitchener-Waterloo Hackathon 202506
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1734

(cherry picked from commit 7067bab893e60c60d56f52322a686bc7e7cd4955)
DeltaFile
+1-1libexec/nuageinit/tests/nuageinit.sh
+1-11 files

FreeBSD/src 808038alibexec/nuageinit nuageinit.7 Makefile

nuageinit: write a documentation

Reviewed by:    imp, ziaee (both a previous version)
Differential Revision:  https://reviews.freebsd.org/D50878

(cherry picked from commit 5ec727ea1a1e65f3a784d70f7392d0a75d38d0a6)
DeltaFile
+288-0libexec/nuageinit/nuageinit.7
+1-0libexec/nuageinit/Makefile
+289-02 files

FreeBSD/src 56d0667libexec/nuageinit nuageinit

nuageinit: fix typo

(cherry picked from commit dba559e8066457fbb5105dcc09616ba6eb766345)
DeltaFile
+1-1libexec/nuageinit/nuageinit
+1-11 files

FreeBSD/src 5540b9elibexec/nuageinit nuage.lua nuageinit, libexec/nuageinit/tests nuageinit.sh

nuageinit: add support for sudo

(cherry picked from commit 6a54f886bede6e6193ebc82ec5fca85679b7dc41)
DeltaFile
+38-1libexec/nuageinit/nuage.lua
+3-0libexec/nuageinit/nuageinit
+2-0libexec/nuageinit/tests/nuageinit.sh
+43-13 files

FreeBSD/src 3406fbalibexec/nuageinit nuageinit, libexec/nuageinit/tests nuageinit.sh

nuageinit: support "fqdn" and "hostname"

(cherry picked from commit f1dd507b2c44f16c94395e67f82125c491ebddf2)
DeltaFile
+22-0libexec/nuageinit/tests/nuageinit.sh
+6-0libexec/nuageinit/nuageinit
+28-02 files

FreeBSD/src bb3bc92libexec/nuageinit nuageinit, libexec/nuageinit/tests nuageinit.sh

nuageinit: add a post network script

refactor nuageinit to allow a 3rd execution point during boot:
1. nuageinit is invoked before NETWORKING with a minimalistic network setup
   for openstrack and potentially other network config setup. it tries
   to configure everything which is not requiring any network.
2. nuageinit is invoked again post NETWORKING but pre SERVERS, in the
   phase it does all that requires network, like dealing with packages.
   Note that creating users have been moved to this phase to allow the
   installation of shells like bash or zsh prior the creation of the
   users, before that the user creation was failing if a non installed
   shell was requested.
3. nuageinit will execute at the rc.local time all the specified scripts
   and commands.

MFC After: 1 week

(cherry picked from commit 2a05d577ab30dcefcf51def4c65a64af30610c85)
DeltaFile
+230-169libexec/nuageinit/nuageinit
+19-15libexec/nuageinit/tests/nuageinit.sh
+25-0libexec/rc/rc.d/nuageinit_post_net
+1-0libexec/rc/rc.d/Makefile
+275-1844 files

FreeBSD/src 7ee737elibexec/rc/rc.d nuageinit_user_data_script

nuageinit: fix typo

PR:     287503
Reported by:    crest at rlwinm.de

(cherry picked from commit cae3d6c8d40a417f32be165aa9a9b4be86bb7f49)
DeltaFile
+1-1libexec/rc/rc.d/nuageinit_user_data_script
+1-11 files

FreeBSD/src 279f984libexec/nuageinit nuageinit

nuageinit: pet luacheck

Rename path into ni_path (ni stands for nuageinit) which is more
understandable and avoid a shadowing warning because we also use a
variable named path later.

Add a missing local

(cherry picked from commit f678c47590276aa8acdacdecfb78cc6c44bbf449)
DeltaFile
+8-8libexec/nuageinit/nuageinit
+8-81 files

FreeBSD/src f27b5d0libexec/nuageinit nuageinit, libexec/nuageinit/tests nuageinit.sh

nuageinit: runcmd should also be executed late

Execute the runcmd specified in cloudinit at the same moment as the
user_data script aka late in the boot process, to respect cloudinit
specifications

(cherry picked from commit 8feca60d6ee983ef3c81903675b4d9c3218c7e7a)
DeltaFile
+10-3libexec/nuageinit/nuageinit
+7-5libexec/nuageinit/tests/nuageinit.sh
+4-0libexec/rc/rc.d/nuageinit_user_data_script
+21-83 files

FreeBSD/src 09e960flibexec/nuageinit nuage.lua nuageinit, libexec/nuageinit/tests nuageinit.sh

nuageinit: more package related functions

Implement package_update and package_upgrade, which allows to launch
an update of the metadata and an upgrade of the packages.

Sponsored by:   OVHCloud

(cherry picked from commit 682af9601aebb71357d05bb9ffbc137958a437cf)
DeltaFile
+33-0libexec/nuageinit/tests/nuageinit.sh
+19-1libexec/nuageinit/nuage.lua
+7-0libexec/nuageinit/nuageinit
+59-13 files

FreeBSD/src 5444803libexec/nuageinit nuageinit, libexec/nuageinit/tests nuageinit.sh

nuageinit: implement runcmd

runcmd contains a list of string, each item will be executed in order.

Sponsored by:   OVHCloud

(cherry picked from commit 2f35a5218323b3da7fb71933778c03bbb1c2bb7f)
DeltaFile
+37-0libexec/nuageinit/tests/nuageinit.sh
+8-1libexec/nuageinit/nuageinit
+45-12 files