sysbuild: Copy /etc/localtime as symlink
Without -P (or -R, which defaults to enabling -P) symlinks are
dereferenced and so the target file is copied, not the symlink itself.
Fixes: 5e16809c953f ("tzsetup: symlink /etc/localtime instead of copying")
bsdinstall: Copy /etc/localtime as symlink in jail script
Without -P (or -R, which defaults to enabling -P) symlinks are
dereferenced and so the target file is copied, not the symlink itself.
Fixes: 5e16809c953f ("tzsetup: symlink /etc/localtime instead of copying")
Makefile.inc1: Avoid including cwd in path
Buildworld failed when objcopy tried to overwrite itself, with `objcopy:
open objcopy failed: Text file busy`. The PATH ended up with `::`,
effectively including the current directory, and we found the wrong
objcopy.
PR: 261215
Sponsored by: The FreeBSD Foundation
makefs: Calculate indirect block count properly for large files on ffs
When building an ffs image containing large file(s), space requirements
were calculated incorrectly yielding a bigger image than necessary.
The reason is that amount of indirect blocks estimation was done wrong:
- single indirect block was treated as it can hold just 12 data blocks
- nested indirect blocks were not taken into account at all
Add support for indirect blocks and fix another tiny bug with
underestimated space requirement for files with size between
(UFS_NDADDR-1)*blksz+fragsz ... (UFS_NDADDR)*blksz requesting N>1
fragments instead of a whole block.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D52120
Merge commit cf721e29c6a3 from llvm git (by Amy Kwan):
[PowerPC] Do not merge TLS constants within PPCMergeStringPool.cpp (#94059)
This patch prevents thread-local constants to be merged within
PPCMergeStringPool.cpp.
The PPCMergeStringPool pass primarily merges non-thread-local constants
together, and thread-local constants should not be mixed together with
other (non-thread-local) constants. In the event that thread-local and
other non-thread-local constants are pooled together, the
llvm.threadlocal.address intrinsic can fail as it expects its argument
to be a thread-local global value, but the merged string structure
created by the PPCMergeStringPool pass is not thread-local as a whole.
This fixes an error "llvm.threadlocal.address first argument must be a
GlobalValue" when building the math/nauty port on PowerPC architectures.
PR: 289122
[2 lines not shown]
getmntpoint: Don't compare st_rdev for non-devices
If the mntfromname of a mountpoint is not a device (e.g. nullfs, tarfs,
procfs) we shouldn't compare st_rdev, as any match will be spurious.
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D51945
(cherry picked from commit 8073a5137f223bb481606b15edaa5ecb93ceffcb)
freebsd-update: Do not fsync
Fsyncing each file we install slows us down significantly and adds
little to no safety.
MFC after: 1 week
PR: 287897
(cherry picked from commit 20f0996700a8e60780931e7fde65899040465f4e)
libc: Drop incorrect qsort optimization
As pointed out in the PR and the article linked below, the switch to
insertion sort in the BSD qsort code is based on a misunderstanding of
Knuth's TAOCP and is actually a pessimization. As demonstrated by the
added test, it is trivially easy to construct pathological input which
results in quadratic runtime. Without that misguided optimization, the
same input runs in nearly linearithmic time.
https://www.raygard.net/2022/02/26/Re-engineering-a-qsort-part-3
PR: 287089
MFC after: 1 week
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D51907
(cherry picked from commit 5205b32de3fb7702e96b3991f5b1a61eee406d8b)
freebsd-update: Do not fsync
Fsyncing each file we install slows us down significantly and adds
little to no safety.
MFC after: 1 week
PR: 287897
(cherry picked from commit 20f0996700a8e60780931e7fde65899040465f4e)
getmntpoint: Don't compare st_rdev for non-devices
If the mntfromname of a mountpoint is not a device (e.g. nullfs, tarfs,
procfs) we shouldn't compare st_rdev, as any match will be spurious.
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D51945
(cherry picked from commit 8073a5137f223bb481606b15edaa5ecb93ceffcb)
libc: Drop incorrect qsort optimization
As pointed out in the PR and the article linked below, the switch to
insertion sort in the BSD qsort code is based on a misunderstanding of
Knuth's TAOCP and is actually a pessimization. As demonstrated by the
added test, it is trivially easy to construct pathological input which
results in quadratic runtime. Without that misguided optimization, the
same input runs in nearly linearithmic time.
https://www.raygard.net/2022/02/26/Re-engineering-a-qsort-part-3
PR: 287089
MFC after: 1 week
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D51907
(cherry picked from commit 5205b32de3fb7702e96b3991f5b1a61eee406d8b)
tzcode: Add a test case for thin jails
Add a test case for a typical thin jail scenario where TZDIR does not
exist and we get our information from /etc/localtime. This is
technically already covered by the detect_tz_changes test case, but
this new test case is independent of the DETECT_TZ_CHANGES option.
MFV: libucl: Update to 0.9.2
- Add FREEBSD-upgrade instructions
- Add FREEBSD-Xlist file
- Remove all unnecessary files which are not required for in-tree build
Approved by: bapt
Differential Revision: https://reviews.freebsd.org/D50472
Event: Oslo Hackathon 202508
Sponsored by: The FreeBSD Foundation
enic(4): fix down/up, MTU changes and more
(cherry picked from commits 0acab8b3d1336d4db73a9946ef76b4bcd0b0aabe, 1c9c4a25e600bcfad3eec891d43221b55ddf7e19)
ifconfig down/up cycles was not working. Fix that which is required
to support MTU changes. Now doing ifconfig enic0 mtu 3000 for example
works. If the MTU is changes in the VIC HW configuration, that is not
reflected in and the OS reports the default 1500. I need to look at
that but changing it via ifconfig works. So this is different then
what Linux does.
Change TX interrupt allocation to be in this driver. Change the admin
interrupt count to 2. This make multiple queues work but need to be
done as pairs so if the VIC has more TX or RX queues setup in the
VIC configuration it will use the lesser value.
While updating the TX interrupt also add support for devcmd2.
Enable checksum offloading.
[2 lines not shown]
vm_fault: improve interface for vm_fault_quick_hold_pages()
Provide (transitional) vm_fault_quick_hold_pages_e() function that
returns distinguishable errors in different failure situation. Also it
does not panic() on too short array case, but return an error, allowing
sometimes lessen the burden of the check from the caller.
vm_fault_quick_hold_pages() becomes a wrapper, that should be eliminated
eventually.
Reviewed by: imp, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D52165
Rename FreeBSD* pkg repos to FreeBSD-ports*
With pkgbase being the New Way Of Doing Things in FreeBSD 15.0, it is
unnecessarily confusing to have a repository called "FreeBSD" which
contains packages built from the FreeBSD ports tree but not from the
FreeBSD src tree. Bite the bullet and change it now rather than
having an even more painful transition later.
With hat: re@
Bikeshed on: freebsd-current, freebsd-ports
Relnotes: The "FreeBSD" and "FreeBSD-kmods" repositories defined
in /etc/pkg/FreeBSD.conf have been renamed to
FreeBSD-ports and FreeBSD-ports-kmods respectively.
Users who override these in /usr/local/etc/pkg/repos
will need to adjust their configuration to match the
new names.
uuidgen.1: Correct SYNOPSIS, alphabetize options
Group options that can be used together accordingly in SYNOPSIS.
While here, tag SPDX and fix a parenthetical typo in EXAMPLES.
MFC after: 3 days
gif.4: Mention that gif(4) can tunnel Ethernet traffic
Ideally this manpage shall have examples for the EtherIP setup, but
there has been one in if_bridge(4) since the introduction of EtherIP [1],
so direct the setup to if_bridge(4) at this moment.
While here, add RFC 3378 to the reference section.
[1] 73ff045c575b Add RFC 3378 EtherIP support
Reviewed by: meta
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D51781
Fix grammar in freebsd-version(1)
The man page for freebsd-version describes four options and using the
distinction between two (using neither) does not apply in that context.
Change it to replace "neither" to fix the grammo.
PR: 265808
Event: Oslo Hackathon 2025
Approved by: des
Differential Revision: https://reviews.freebsd.org/D52180
.cirrus.yml: Reenable CI with pre-commit CI scripts
These CI works were disabled as we had been suppressing build logs for
developers running CI. That has been addressed by adding a new variable
called CIENV. So reenable the tests.
Approved by: lwhsu
Differential Revision: https://reviews.freebsd.org/D51178
Event: Oslo Hackthon 202508
tests/ci: Add CIENV variable
The default behavior of of pre-commit script is to suppress all the logs
as it is assumed that developers will run this on their terminal for the
tests. But there are also other use cases like running these in
different CI tools like Cirrus, GH Actions etc where these build logs
are important in the web interface itself.
To fix this issue introduce a new variable named CIENV which defaults to
local if empty or undefined. If the CIENV is local in those cases the
logs are suppressed while for anything else it is not. This variable is
also important for some other WIP projects of CI I am working on like
running the CI tests on remote cloud AWS, Azure, GCP etc.
Approved by: lwhsu
Differential Revision: https://reviews.freebsd.org/D51178
Event: Oslo hackathon 202508